pktgen and sniffing VLAN packets

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

 



Hello,
 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 192.168.0.0" and  "tcpdump -f vlan and udp
port 9" and many other ways . on both sides,
(192.168.0.10 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:
   fi
}

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

echo "Adding devices to run".

PGDEV=/proc/net/pktgen/kpktgend_0
pgset "rem_device_all"
pgset "add_device eth0"
pgset "max_before_softirq 10"


PGDEV=/proc/net/pktgen/eth0

pgset "clone_skb 10"
pgset "min_pkt_size 64"
pgset "max_pkt_size 64"
pgset "dst 192.168.0.10"
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 192.168.0.10

whereas  192.168.0.10 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 ?


Regards,
Ian
_______________________________________________
Vlan mailing list
Vlan@xxxxxxxxxxxxxxx
http://www.candelatech.com/mailman/listinfo/vlan

[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