Hi, while replacing a switch I ran into a problem with using 802.1q VLANs (vlan(4)) on a em(4) card - that is, I could not get the card to work with VLANs. Details: Software is FreeBSD 10.3-RELEASE i386 with a custom kernel (but has em(4) and vlan(4) compiled in (not as a module)). Hardware is a Soekris net6501-70, the interface in question is (pciconf) em2 at pci0:10:0:0: class=0x020000 card=0x00008086 chip=0x10d38086 rev=0x00 vendor = 'Intel Corporation' device = '82574L Gigabit Network Connection' class = network subclass = ethernet The setup I wanted to create was a "router on a stick", that is having 3 (for starters) tagged VLANs on that one link between router and switch. I was not able to get any packet through to the switch, while tcpdump shows the packets on the vlan interface (but not on the underlying em interface - I understand that this could be the result of hardware vlan processing). I could not ping any host beyond the switch nor the switch's management interface itself, I did not even receive ARP replies. I tried both manual creation of the vlan devices and the rc.conf/ netif mechanism - with the very same results ("doesn't work"). Experimenting with the vlanhw* flags on the em interface did not result in any change. To make sure it's not the switch (or my own mistake), I took another host with an em interface - this time, it was a em0 at pci0:0:25:0: class=0x020000 card=0x21ce17aa chip=0x15028086 rev=0x04 vendor = 'Intel Corporation' device = '82579LM Gigabit Network Connection' class = network subclass = ethernet (again 10.3-RELEASE, but amd64). With this interface (connected to the very same switch port) I had instantaneous success, so I guess the switch is ok and I'm not totally mistaken in my doings. Could anybody give a hint on how to further debug this or a pointer to further reading? Regards, Christoph -- Spare Space
tcpdump on em0 will show the vlan-tagged packets if everything is working correctly. The fact that they are not showing up is a sign that something is not working correctly (or that your tcpdump filter isn't account for the vlan tag) On Sun, Apr 10, 2016 at 1:44 PM, Christoph Moench-Tegeder < cmt at burggraben.net> wrote:> Hi, > while replacing a switch I ran into a problem with using 802.1q VLANs > (vlan(4)) on a em(4) card - that is, I could not get the card to work > with VLANs. > Details: > Software is FreeBSD 10.3-RELEASE i386 with a custom kernel (but has > em(4) and vlan(4) compiled in (not as a module)). > Hardware is a Soekris net6501-70, the interface in question is (pciconf) > em2 at pci0:10:0:0: class=0x020000 card=0x00008086 chip=0x10d38086 > rev=0x00 > vendor = 'Intel Corporation' > device = '82574L Gigabit Network Connection' > class = network > subclass = ethernet > > The setup I wanted to create was a "router on a stick", that is having > 3 (for starters) tagged VLANs on that one link between router and > switch. I was not able to get any packet through to the switch, > while tcpdump shows the packets on the vlan interface (but not on > the underlying em interface - I understand that this could be the > result of hardware vlan processing). I could not ping any host beyond > the switch nor the switch's management interface itself, I did not > even receive ARP replies. > I tried both manual creation of the vlan devices and the rc.conf/ > netif mechanism - with the very same results ("doesn't work"). > Experimenting with the vlanhw* flags on the em interface did not > result in any change. > > To make sure it's not the switch (or my own mistake), I took another > host with an em interface - this time, it was a > em0 at pci0:0:25:0: class=0x020000 card=0x21ce17aa chip=0x15028086 > rev=0x04 > vendor = 'Intel Corporation' > device = '82579LM Gigabit Network Connection' > class = network > subclass = ethernet > > (again 10.3-RELEASE, but amd64). > With this interface (connected to the very same switch port) I > had instantaneous success, so I guess the switch is ok and I'm > not totally mistaken in my doings. > > Could anybody give a hint on how to further debug this or a pointer > to further reading? > > Regards, > Christoph > > -- > Spare Space > _______________________________________________ > freebsd-stable at freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org" >
Hi!> while replacing a switch I ran into a problem with using 802.1q VLANs > (vlan(4)) on a em(4) card - that is, I could not get the card to work > with VLANs.Have you tried fiddeling with the flags ? options=4219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC,VLAN_HWTSO> examples: ifconfig em0 -rxcsum -txcsum -wol ifconfig em0 -vlanmtu -vlanhwtag I have a 10.3-i386 box with 82574L and VLANs on that interface, works fine (but I'm not using it for production, only as a test box). Can you show sysctl -a | grep dev.em | grep desc I have: dev.em.5.%desc: Intel(R) PRO/1000 Legacy Network Connection 1.1.0 dev.em.4.%desc: Intel(R) PRO/1000 Legacy Network Connection 1.1.0 dev.em.3.%desc: Intel(R) PRO/1000 Network Connection 7.6.1-k dev.em.2.%desc: Intel(R) PRO/1000 Network Connection 7.6.1-k dev.em.1.%desc: Intel(R) PRO/1000 Network Connection 7.6.1-k dev.em.0.%desc: Intel(R) PRO/1000 Network Connection 7.6.1-k -- pi at opsec.eu +49 171 3101372 4 years to go !