guan...@gyhuang:~/Desktop/tcpreplay-3.4.3$ sudo tcprewrite --dlt=enet --skipbroadcast --enet-smac=00:22:19:17:68:94 --enet-dmac=00:22:19:17:AB:2F --skip-soft-errors -i /home/guanyao/Research_Works/OpenFlowMR/equinix-sanjose.dirB.20081218-045904.UTC.anon.pcap -o /home/guanyao/Research_Works/OpenFlowMR/output.pcap tcprewrite: ./plugins/dlt_en10mb/en10mb.c:346: dlt_en10mb_encode: Assertion `pktlen >= 14' failed. Aborted (core dumped)
So, I guess I should use fixlen option. I find I can only use --fixlen=del, otherwise the same error occurs. guan...@gyhuang:~/Desktop/tcpreplay-3.4.3$ sudo tcprewrite --dlt=enet --skipbroadcast --fixlen=del --enet-smac=00:22:19:17:68:94 --enet-dmac=00:22:19:17:AB:2F --skip-soft-errors -i /home/guanyao/Research_Works/OpenFlowMR/equinix-sanjose.dirB.20081218-045904.UTC.anon.pcap -o /home/guanyao/Research_Works/OpenFlowMR/output.pcap Fatal Error: Error rewriting packets: From edit_packet.c:untrunc_packet() line 314: Invalid fixlen value: 0x3 >From the ouput I guess I should use mtu option. However, the same error comes again: guan...@gyhuang:~/Desktop/tcpreplay-3.4.3$ sudo tcprewrite --dlt=enet --skipbroadcast --fixlen=del --mtu-trunc --enet-smac=00:22:19:17:68:94 --enet-dmac=00:22:19:17:AB:2F --skip-soft-errors -i /home/guanyao/Research_Works/OpenFlowMR/equinix-sanjose.dirB.20081218-045904.UTC.anon.pcap -o /home/guanyao/Research_Works/OpenFlowMR/output.pcap tcprewrite: ./plugins/dlt_en10mb/en10mb.c:346: dlt_en10mb_encode: Assertion `pktlen >= 14' failed. Aborted (core dumped) Any idea what happens here? On Tue, Dec 1, 2009 at 4:31 PM, Aaron Turner <[email protected]> wrote: > On Tue, Dec 1, 2009 at 3:12 PM, Guanyao Huang <[email protected]> wrote: >> Hi, I am still confused. Below is my command: >> myn...@xxxx:~/Desktop/tcpreplay-3.4.3$ sudo tcprewrite --user-dlt=1 >> --dlt=enet --enet-smac=00:22:19:17:68:94 --enet-dmac=00:22:19:17:AB:2F >> --fixlen=del --skip-soft-errors -i >> /home/myname/Research_Works/OpenFlowMR/equinix-sanjose.dirB.20081218-045904.UTC.anon.pcap >> -o /home/myname/Research_Works/OpenFlowMR/output.pcap > > There is no reason to use --dlt=enet and --user-dlt. --user-dlt is > for when you use --dlt=user and you need to create a custom L2 header > using --user-dlink. > >> Fatal Error: Error rewriting packets: From >> edit_packet.c:untrunc_packet() line 314: >> Invalid fixlen value: 0x3 >> >> I donot know what does this stand for. > > Uh... that option never worked. not sure why it's documented. Sorry. > >> Did you mean I should first use the above commands to change smac and >> dmac and also dlt type, then I can use --endpoint, right? > > You can do all of it at the same time if you wanted. Often people > break it up into two steps because the cli options gets pretty long > and confusing. But.... > >> Also, regarding the --endpoints arg, I dont want to split the traffic >> to client and server, I only want to send all of it from one host to >> another host, why still I need cache file? > > Well actually you do want to use a cachefile with endpoints (and > smac/dmac for that matter). The reason is that tcprewrite is > *stupid*. It's stupid because it needs to be fast in order to edit > packets as they're sent (via tcpreplay-edit) since both use the same > engine/code base. > > It is allowed to be stupid because it can reference a cache file which > has all the smarts- ie, the cache file tells tcprewrite which packets > are sent by the server and which are sent by the client. Without the > cache file, tcprewrite will treat all the packets the same (ie: ALL > packets will have the same source & destination MAC & IP's). > > Hence if you want your packets to look right, you need to use tcpprep > to create a cachefile for tcprewrite. > > Now, there is a time when you can get away without doing a cache file- > when all the packets are going in a single direction (server never > talks back to the client). SNMP traps or syslog traffic are good > examples of that. If that's the case, just use --srcipmap & > --dstipmap like this: > > --srcipmap=0.0.0.0/0:5.5.5.5/32 > > 0.0.0.0/0 == match all IP's > 5.5.5.5/32 == replace with new IP is 5.5.5.5 > > That will only apply to the source IP field. For the destination IP > field, use --dstipmap. > > Good luck! > -Aaron > > > -- > 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" > > > >> Thank you. >> >> On Tue, Dec 1, 2009 at 8:05 AM, yassine antir <[email protected]> wrote: >>> Hi, >>> >>> you should rewrite your RAW IP first >>> >>> The following would cause all traffic to have a destination host MAC address >>> (example 00:55:22:AF:C6:37) (the gateway MAC address if your destination is >>> not in the same network) and your source MAC address (example >>> 00:44:66:FC:29:AF): >>> >>> $ tcprewrite --enet-dmac=00:55:22:AF:C6:37 --enet-smac=00:44:66:FC:29:AF >>> --infile=input.pcap --outfile=output.pcap >>> >>> >>> >>> then just relay the output file. >>> >>> For more informations see http://tcpreplay.synfin.net/trac/wiki/tcprewrite >>> >>> >>> >>>> Date: Tue, 1 Dec 2009 01:40:55 -0800 >>>> From: [email protected] >>>> To: [email protected] >>>> Subject: [Tcpreplay-users] Help regarding sending raw IP pcap file to >>>> ethernet >>>> >>>> Hi, >>>> >>>> I now want to tcpreplay some raw IP on the DLT_EN10MB (Ethernet) . I >>>> dont know what changes I should make on the pcap file. It seems to me >>>> "Forcing Traffic Between Two Hosts" is enough. >>>> >>>> Do you have any ideas what else I should do. Currently, I can not >>>> successfully send the pcap file. The pcap file was from some high >>>> speed link. Even if I use a speed option, I can see from tcpdump that >>>> the tcpreplaying of flows is not successful. >>>> >>>> For my case, if I Forcing Traffic Between Two Hosts, how can I get the >>>> correct cache file? >>>> >>>> Thanks. >>>> > > ------------------------------------------------------------------------------ > Join us December 9, 2009 for the Red Hat Virtual Experience, > a free event focused on virtualization and cloud computing. > Attend in-depth sessions from your desk. Your couch. Anywhere. > http://p.sf.net/sfu/redhat-sfdev2dev > _______________________________________________ > Tcpreplay-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/tcpreplay-users > Support Information: http://tcpreplay.synfin.net/trac/wiki/Support > ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ Tcpreplay-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tcpreplay-users Support Information: http://tcpreplay.synfin.net/trac/wiki/Support
