Date: Tue, 08 Aug 2000 16:27:52 +1000 From: Peter Jeremy <peter.jeremy@alcatel.com.au> To: hackers@FreeBSD.ORG Cc: dgilbert@velocet.ca Subject: VLAN Support in FreeBSD Message-ID: <00Aug8.162756est.115205@border.alcanet.com.au>
next in thread | raw e-mail | index | archive | help
About a month ago, David Gilbert <dgilbert@velocet.ca> started a thread in freebsd-stable about supporting a 1500MTU through a VLAN trunk (see Message-ID: <14689.22689.894466.908666@trooper.velocet.net>). Since this would be very useful to me, I did some digging into it and looked through the code (there being no other documentation). As far as I can tell from the code, the only thing restricting VLAN over ethernet devices to an MTU of 1496 is the code deleted in the following patch. Based on references to if_mtu, ifi_mtu, if_hdrlen and ifi_hdrlen, there is nothing in the system which will get upset if the MTU+hdrlen on the VLAN interface is more than the MTU+hdrlen on the trunk interface (the VLAN parent). When I try this in practise, I can send 1500 byte packets without problem, but when a 1500 byte packet is sent to me, it never arrives (at least at bpf_tap() on the trunk interface). Unfortunately, I can't tell (at this stage) whether this is a problem with the 3Com 3C905 NIC, or the switch. (There's no problem with shorter packets). Has anyone else played with VLAN's in FreeBSD? Does anyone know which (if any) NICs are likely to object to receiving VLAN trunk frames (1522 instead of 1518 bytes). Index: if_vlan.c =================================================================== RCS file: /home/CVSROOT/src/sys/net/if_vlan.c,v retrieving revision 1.18 diff -u -r1.18 if_vlan.c --- if_vlan.c 2000/07/13 22:54:30 1.18 +++ if_vlan.c 2000/08/08 06:11:02 @@ -356,11 +356,7 @@ if (ifv->ifv_p) return EBUSY; ifv->ifv_p = p; - if (p->if_data.ifi_hdrlen == sizeof(struct ether_vlan_header)) - ifv->ifv_if.if_mtu = p->if_mtu; - else - ifv->ifv_if.if_mtu = p->if_data.ifi_mtu - EVL_ENCAPLEN; - + ifv->ifv_if.if_mtu = p->if_mtu; /* * Preserve the state of the LINK0 flag for ourselves. */ Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00Aug8.162756est.115205>