[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tcpreplay-users
Subject:    Re: [Tcpreplay-users] split a pcap based on direction in order to
From:       Aaron Turner <synfinatic () gmail ! com>
Date:       2011-11-11 21:53:17
Message-ID: CANAZdzXY18C8HsKXsb+vn37Q8qUVG13K0p_WjuPXnNw4tX=eJw () mail ! gmail ! com
[Download RAW message or body]

On Fri, Nov 11, 2011 at 1:20 PM, John Lumby <johnlumby@hotmail.com> wrote:
>
> =A0 I *think* I know why no traffic is being received at the other end=A0=
 -
> =A0 These are bootpc (dhcp) requests and I guess the server must be on the
> same LAN or VLAN as the client?
> =A0 Which it wasn't if I run the tcpreplay from the pseudo-client machine=
 via
> an un-tagged interface such as virbr0.
> =A0 So I am wondering if I can make it use a VLAN-tagged interface instea=
d,
> and tag the interface on the server the same tag.
> =A0 I am kind of hoping this should work since tcprewrite supports adding=
 VLAN
> tag into the e-header.
> =A0 I tried it and addded VLAN id 172 with tcprewrite (ok),
> =A0=A0 set up a vlan-tagged interface virbr0.172 tagged with VLAN id 172 =
(also
> ok),
> =A0=A0 then tried tcpreplay to virbr0.172=A0=A0 -=A0=A0 but no luck.=A0 I=
t says
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Fatal Error: Invalid interface name/=
alias: virbr0.172
> =A0=A0 In fact it won't even let me use the buddy virbr0 interface either=
=A0 -=A0 it
> has disappeared from the listnics list.
>
> =A0 My question is,=A0 does tcpreplay support sending out on a VLAN-tagged
> interface?
> =A0 Or is there some other way I can make the client packets go to the se=
rver?

Basically, tcpreplay really only works with physical interfaces, not
logical ones like vlan tagged interfaces.  The reason being is that it
writes the entire ethernet header and won't let the OS do things like
add VLAN tags.

You should be able to use tcprewrite to add the VLAN tag (sounds like
you already did that) and then send it out the untagged physical
interface.

Anyways, I'm not that familiar with the virbr0 interface type, but if
it doesn't show up under --listnics then libpcap can't open it for
writing packets.  If you're using Linux which defaults to the
PF_PACKET API, that may not matter, but you'd just have to try to find
out.

Basically, I haven't tried tcpreplay under various VM solutions and I
never know if things will change between versions, so I can't really
say how successful you will be. I always strongly recommend not using
VMWare/etc in general since it tends to screw up the clock (or at
least how I use it in tcpreplay) anyways.

-Aaron

-- =

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

---------------------------------------------------------------------------=
---
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic