pktgen and sniffing VLAN packets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


 I must first say that this question was sent more than two days ago to
  tcpdump-workers but there was no answer, so I hope I will get some help
  from the VLAN gurus around.

- I am using pktgen on Linux to generate vlan traffic.

 - I am sniffing with tcpdump on both sides (src and dest) and cannot
catch VLAN traffic.

 - I tried sniffing in various ways , like by "tcpdump -f vlan" and
"tcpdump -f vlan and net" and  "tcpdump -f vlan and udp
port 9" and many other ways . on both sides,
( and the source machine , where pktgen runs) but I could
not catch any VLAN frames.

The script I am using for pktgen is this:

function pgset() {
   local result

   echo $1 > $PGDEV

   result=`cat $PGDEV | fgrep "Result: OK:"`
   if [ "$result" = "" ]; then
        cat $PGDEV | fgrep Result:

function pg() {
   echo inject > $PGDEV
   cat $PGDEV

echo "Adding devices to run".

pgset "rem_device_all"
pgset "add_device eth0"
pgset "max_before_softirq 10"


pgset "clone_skb 10"
pgset "min_pkt_size 64"
pgset "max_pkt_size 64"
pgset "dst"
pgset "dst_mac 00:0D:60:9A:26:D2"
pgset "count 10"
pgset "vlan_id 45"       #set VLAN ID 0-4095

# Next dev
# Time to run

pgset "start"
echo "Done"

more details:

MY nic is 8139 RealTek (RTL).

tcpdump -vv -i eth0 vlan and host

whereas is the destination.

I  also sniff thus:  tcpdump -vv -i eth0 vlan

And again - nothing in both these two filters.

Any ideas ?
Does anyone have any experience with tcpdump and pktgen ?

BTW, I wrote a small module which checks the features member of the
8139 RTL net device I use.

(see: include/linux/netdevice.h in the kernel tree).

I found out the followoing :

  NETIF_F_VLAN_CHALLENGED is not set => VLANs is supported

 NETIF_F_HW_VLAN_RX is NOT set => no HW VLAN RX acceleration
 NETIF_F_HW_VLAN_TX is NOT set => no HW VLAN TX acceleration

 vlan_rx_register is NULL.

 Does this shed more light on my question and gives any hints ?

Vlan mailing list

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux