Description of problem: RHEL5 kernel currently does not support vlans in pktgen module. It's not possible to test kernel network stack with VLANs involved. The support has been added in 2.6.19 Linux kernel so the backport should be easy. Version-Release number of selected component (if applicable): kernel-2.6.18-303.el5 Steps to Reproduce: Use any of the commands below to setup the packet generator. pgset "vlan_id 77" set VLAN ID 0-4095 pgset "vlan_p 3" set priority bit 0-7 (default 0) pgset "vlan_cfi 0" set canonical format identifier 0-1 (default 0) or use echo alternatives: echo "vlan_id 77" > /proc/net/pktgen/eth0 Dump network traffic using tcpdump or wireshark network sniffer and check vlan id is applied. Actual results: Write error when trying to set VLAN id. Expected results: VLAN id is applied to pktgen traffic.
commit 34954ddc4f3e790fb6d5ed331513f54b38713234 http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=patch;h=34954ddc4f3e790fb6d5ed331513f54b38713234
0f37c6057414fb68024793966b1dcb6a135cb844 is needed as well.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux release for currently deployed products. This request is not yet committed for inclusion in a release.
Verified on 2.6.18-339.el5 kernel. pktgen module can be loaded and all supported vlan options can be set and applied on generated traffic. Testing included following: 1. Setting VLAN id and it's priority # echo "vlan_id 22" > /proc/net/pktgen/eth1 # echo "vlan_p 3" > /proc/net/pktgen/eth1 10:57:05.448307 52:54:00:aa:bb:c1 > 52:54:00:a5:bd:dc, ethertype 802.1Q (0x8100), length 62: vlan 22, p 3, ethertype IPv4, 192.168.122.2.9 > 192.168.122.1.9: UDP, length 16 3. CFI enabled: # echo "vlan_cfi 1" > /proc/net/pktgen/eth1 11:03:37.678324 52:54:00:a5:bd:dc > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 46: vlan 22, p 0, ethertype ARP, Request who-has 192.168.122.2 tell 192.168.122.1, length 283. 4. CFI disabled: # echo "vlan_cfi 0" > /proc/net/pktgen/eth1 11:03:53.583772 52:54:00:aa:bb:c1 > 52:54:00:a5:bd:dc, ethertype 802.1Q (0x8100), length 62: vlan 22, p 3, ethertype IPv4, 192.168.122.2.9 > 192.168.122.1.9: UDP, length 16 5. Setting SVLAN id and it's priority: # echo "svlan_id 4" > /proc/net/pktgen/eth1 echo "svlan_p 2" > /proc/net/pktgen/eth1 11:17:35.439637 52:54:00:aa:bb:c1 > 52:54:00:a5:bd:dc, ethertype 802.1Q (0x8100), length 66: vlan 4, p 2, ethertype 802.1Q, vlan 22, p 3, ethertype IPv4, 192.168.122.2.9 > 192.168.122.1.9: UDP, length 16 6. Disabling VLAN/SVLAN taggging: # echo "svlan_id 4096" > /proc/net/pktgen/eth1 11:14:33.421531 52:54:00:aa:bb:c1 > 52:54:00:a5:bd:dc, ethertype IPv4 (0x0800), length 60: 192.168.122.2.9 > 192.168.122.1.9: UDP, length 18
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-0006.html