On Tue, Dec 30, 2008 at 5:13 AM, Abdelrazak Younes <you...@lyx.org> wrote:
> Valentín Carela wrote:
>> Hi Abdel,
>>
>> I think I'm using tcpreplay in a similar scenario. I have a computer
>> with two ethernet cards connected.
>>
>> First I change the MAC addresses of the trace with tcprewrite
>>
>> tcprewrite --dmac=XX:XX:XX:XX:XX:XX (eth2 @MAC) --smac=XX:XX:XX:XX:XX:XX
>> (eth1 @MAC) -i trace.pcap -o new_trace.pcap
>>
>> Then I use tcpreplay to send the packets from eth1 to eth2
>>
>> tcpreplay -i eth1 new_trace.pcap
>>
>> I don't know if it is exactly the same scenario but I hope it helps.
>
> Yes, that's exactly what I am after. But are you sure that the stream
> will effectively go out of eth1 into eth0? My fear is that the system
> (linux) will shortcut the path...
>
> FYI I want to monitor the performance between two PLC devices that are
> connected to eth0 and eth1.
>
> Thanks Valentin,
> Abdel.

You don't need to worry about Linux "short cutting" the packets-
tcpreplay insures the packets actually goes out the interface(s) you
tell it to.  To make sure the listening side of the connection
actually reads the packets rather then silently dropping them, you
need to make sure that:

1) the destination MAC/IP address matches the listening interface
2) the source IP/MAC does NOT match any real interfaces on the system

#2 is important because Linux treats packets received on a
non-loopback interface with a source MAC/IP of another interface as a
"bogon" or forged packet and drops it for security reasons.   If
you're willing to recompile your kernel, it's pretty simple to turn
off this bogon check.

Hope that helps,
Aaron

-- 
Aaron Turner
http://synfin.net/
http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows
They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety.  -- Benjamin Franklin

------------------------------------------------------------------------------
_______________________________________________
Tcpreplay-users mailing list
Tcpreplay-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tcpreplay-users
Support Information: http://tcpreplay.synfin.net/trac/wiki/Support

Reply via email to