Main index | Section 4 | Options |
Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5):
if_vlan_load="YES"
Each vlan interface is created at runtime using interface cloning. This is most easily done with the ifconfig(8) create command or using the cloned_interfaces variable in rc.conf(5).
To function, a vlan interface must be assigned a parent interface and numeric VLAN tag using ifconfig(8). A single parent can be assigned to multiple vlan interfaces provided they have different tags. The parent interface is likely to be an Ethernet card connected to a properly configured switch port. The VLAN tag should match one of those set up in the switched network.
vlan initially assumes the same minimum length for tagged and untagged frames. This mode is selected by setting the sysctl(8) variable net.link.vlan.soft_pad to 0 (default). However, there are network devices that fail to adjust frame length when it falls below the allowed minimum due to untagging. Such devices should be able to interoperate with vlan after changing the value of net.link.vlan.soft_pad to 1. In the latter mode, vlan will pad short frames before tagging them so that their length is not less than the minimum value after untagging by the non-compliant devices.
At present, these devices are capable of full VLAN processing in hardware: ae(4), age(4), alc(4), ale(4), bce(4), bge(4), bxe(4), cxgb(4), cxgbe(4), em(4), igb(4), ixgbe(4), jme(4), liquidio(4), msk(4), mxge(4), nge(4), re(4), sge(4), stge(4), ti(4), txp(4), and vge(4).
Other Ethernet interfaces can run VLANs using software emulation in the vlan driver. However, some lack the capability of transmitting and receiving long frames. Assigning such an interface as the parent to vlan will result in a reduced MTU on the corresponding vlan interfaces. In the modern Internet, this is likely to cause tcp(4) connectivity problems due to massive, inadequate icmp(4) filtering that breaks the Path MTU Discovery mechanism.
These interfaces natively support long frames for vlan: axe(4), bfe(4), cas(4), dc(4), et(4), fwe(4), fxp(4), gem(4), hme(4), le(4), nfe(4), rl(4), sf(4), sis(4), sk(4), ste(4), tl(4), tx(4), vr(4), vte(4), and xl(4).
The vlan driver automatically recognizes devices that natively support long frames for vlan use and calculates the appropriate frame MTU based on the capabilities of the parent interface. Some other interfaces not listed above may handle long frames, but they do not advertise this ability. The MTU setting on vlan can be corrected manually if used in conjunction with such a parent interface.
VLAN (4) | May 8, 2018 |
Main index | Section 4 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | The most horrifying thing about Unix is that, no matter how many times you hit yourself over the head with it, you never quite manage to lose consciousness. It just goes on and on. | ” |
— Patrick Sobalvarro |