On Thu, Oct 7, 2010 at 11:10 AM, Chinna Morampalle (cmorampa) <[email protected]> wrote: > Aaron, > Sorry it was a typo. After correcting that it created the cache file > successfully. After that I am trying to do tcprewrite using below command. > > tcprewrite --enet-dmac=00:21:1b:d2:dc:19,00:21:1b:d2:dc:1a > --enet-smac=00:02:B3:AC:FA:ED,00:02:B3:AC:FA:EC --cachefile=http1.cache > --infile=http_input.pcap --outfile=http_output.pcap > > Fatal Error: Unable to open input pcap file: http_input.pcap: No such file or > directory > [r...@tcpreplay-lnx tcpreplay-3.4.4]# > > But it was unsuccessful.with the above error. Do I need to create dummy i/p > and o/p files before running the above command ?
No, the --infile is your http.pcap from before. > Sorry for the multiple questions, I am new to tcpreplay and I am trying to > replay a capture file in bi-directional way. And I am trying the following > commands to achieve that. Please review and let me know do I need any changes. > > tcpprep --cidr=171.71.0.0/16 --pcap=http.pcap --cachefile=http.cache > > tcprewrite --enet-dmac=00:21:1b:d2:dc:19,00:21:1b:d2:dc:1a > --enet-smac=00:02:B3:AC:FA:ED,00:02:B3:AC:FA:EC --cachefile=http.cache > --infile=http.pcap --outfile=http_output.pcap --cachefile is the file generated via tcpprep in step #1. --infile is the original pcap file from step #1. > > tcpreplay --cachefile=http.cache --intf1=eth1 --intf2=eth2 http_output.pcap Normally people want to replay the edited pcap file, hence using the http_output.pcap file. > My setup is as below: > > Tcpreplay (port1) ----------- Router ------------ (port2) tcpreplay Looks good too. If you haven't yet, I recommend reading: http://tcpreplay.synfin.net/wiki/usage#PassingTrafficThroughaFirewallRouterNon-TransparentDevice -- Aaron Turner http://synfin.net/ Twitter: @synfinatic 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" ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb _______________________________________________ Tcpreplay-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tcpreplay-users Support Information: http://tcpreplay.synfin.net/trac/wiki/Support
