I'm actually using an OpenWrt router - perhaps there is a way to turn off
or simplify the NAT so that it does not change port numbers?

Mike


On Thu, Apr 3, 2014 at 9:44 AM, Fred Klassen <[email protected]> wrote:

>  If it was a router without NAT you could make this work provided that
> your hardware was identical to IP addresses/MAC addresses in the pcap file.
> If not, you will have to use tcprewrite/tcpprep to make it so.
>
>  With NAT there is an extra complication. When a connection is
> established, NAT will translate the source port number. The algorithm is
> different from one NAT to the next. What is difficult is if the translated
> source port is completely random with no relation to the original source
> port. Luckily those NATs are going by the wayside because they break TURN
> servers, and thereby break direct peer-to-peer VoIP calls (VoIP proxy
> required).
>
>  Provided the capture was done on the same NAT with the same source port
> translation algorithm, and the same care is taken to ensure that the
> addresses match the hardware, and the NAT supports TURN, you should be OK.
>
>  Fred.
>
>   From: Mike A <[email protected]>
> Reply-To: Main forum for tcpreplay <[email protected]>
> Date: Wednesday, April 2, 2014 at 7:11 PM
> To: "[email protected]" <
> [email protected]>
> Subject: [Tcpreplay-users] Passing Traffic Through a Router using one
> Linux machine?
>
>    Hi,
>
> I'm running tcpreplay 4.0.4 on Ubuntu Linux 12.  I've read the usage
> examples (http://tcpreplay.synfin.net/wiki/usage) and followed along.
> I'm trying to replay a single-stream (one 5-tuple) pcap so that packets go
> through a router.
>
>  My hardware setup is involves one Linux machine (with eth0 and eth1) and
> one router (which does NAT):
>
>       eth0 <-> LAN (router) WAN <-> eth1
>  192.168.0.1 <-> 192.168.0.2 (router) 10.0.0.2 <-> 10.0.0.1
>
>  * Will this physical setup work? Or are there common pitfalls or
> mistakes?
>  * For packets that have src IP 192.168.0.1 and dst IP 10.0.0.1 (both on
> the linux machine), will the Linux OS short-circuit and simply pass packets
> internally (and not actually send it out to the router?)?
>
>
>  If I can get tcpreplay to actually send packets from a pcap through a
> router I will donate $ to whoever or whatever, because this will be the
> most useful tool.  It's something I have needed for such a long time, and
> will get used a lot.
>
>  Thanks ahead for any help,
>  Mike
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Tcpreplay-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/tcpreplay-users
> Support Information: http://tcpreplay.synfin.net/trac/wiki/Support
>
------------------------------------------------------------------------------
_______________________________________________
Tcpreplay-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tcpreplay-users
Support Information: http://tcpreplay.synfin.net/trac/wiki/Support

Reply via email to