On Mon, Dec 7, 2009 at 10:54 PM, Guanyao Huang <[email protected]> wrote:
> Hi
> Sorry to bother others.
> I want to assign the same dst IP to all the packets, but let the src
> IPs untouched. I tried the following command:
> sudo tcprewrite --dstipmap=192.168.1.15/32:192.168.1.15/32 --fixcsum
> -i /home/guanyao/Research_Works/OpenFlowMR/tmpBtoG.pcap -o
> /home/guanyao/Research_Works/OpenFlowMR/BtoG.pcap
>
> However, I can not see any 192.168.1.15 from wireshark. I also failed
> to forward these packets to the host 192.168.1.15 in my network. I am
> wondering how to set the same dst IP.

Your problem is how the --dstipmap (and --srcipmap & --pnat for that
matter) options work.

The CIDR block before the colon is the matcher.  The CIDR block after
the colon is the rewriter.

The "matcher" allows you to restrict which IP addresses get rewritten.
 The "rewriter" allows you to control what they get rewritten to.

Your problem is the matcher is too limited- it will only match
192.168.1.15.  Since you want to rewrite all destination IP's you
should use 0.0.0.0/0.  The result is:

--dstipmap=0.0.0.0/0:192.168.1.15/32

-- 
Aaron Turner
http://synfin.net/
http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows
Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety.
    -- Benjamin Franklin
"carpe diem quam minimum credula postero"

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
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