Networking: vlan

From wikinotes

Occasionally, you may need a server that can see multiple networks at once. For example a firewall server would need to see the both the WAN, and the LAN.

One method of solving this, is to provide this server with multiple NICs. This is appropriate for machines that will use a lot of bandwidth, like backup servers. The other way of doing this is with a VLAN.

Intro

All frames (datalink layer) are tagged with a number from 1-4096 indicating it's VLAN number. By default, all frames transmitted over a network use the default VLAN. To the operating system, a VLAN is exposed as a separate virtual network-interface (vlan0, eth0:1, ...).

Terminology

  • Trunk - a cable containing multiple vlans. (also possibly multiple NICs configured to behave as one for redundancy)
  • vlan-tag - the tag that gets added to an ethernet frame to indicate it belongs to a VLAN.