Indice de la Documentación
802.1Q VLANs for better bandwidth
The IEEE's 802.1Q standard was developed to address the problem of how to
break large networks into smaller parts so broadcast and multicast traffic
wouldn't grab more bandwidth than necessary. The standard also helps
provide a higher level of security between segments of internal networks.
The 802.1Q specification establishes a standard method for inserting
virtual LAN (VLAN) membership information into Ethernet frames.
In a LAN, datalink-layer broadcast and multicast traffic is delivered to
all endstations, but this traffic cannot go beyond the LAN boundary. In
the past, shared cabling or hubs were the boundaries for LANs.
Because network protocols typically rely on broadcast queries to let
endstations discover one another, devices on two LANs cannot "see" each
other without the help of a network-layer device with ports in both LANs,
such as a router.
The fact that broadcasts are distributed to all devices in a LAN means
LANs cannot become very large. If they do, devices become overburdened
with broadcast traffic. The ability of devices in a LAN to discover each
other also means servers housing sensitive data should be placed in a LAN
separate from the average user, with router filters controlling access.
These factors make it critical for network administrators to control LAN
boundaries.
A VLAN is an administratively configured LAN or broadcast domain. Instead
of going to the wiring closet to move a cable to a different LAN, network
administrators can accomplish this task remotely by configuring a port on
an 802.1Q-compliant switch to belong to a different VLAN. The ability to
move endstations to different broadcast domains by setting membership
profiles for each port on centrally managed switches is one of the main
advantages of 802.1Q VLANs.
The switch acts as an intelligent traffic forwarder and a simple network
security device. Frames get sent only to the ports where the destination
device is attached. Broadcast and multicast frames are constrained by VLAN
boundaries so only stations whose ports are members of the same VLAN see
those frames. This way, bandwidth is optimized and network security is
enhanced.
802.1Q VLANs aren't limited to one switch. VLANs can span many switches,
even across WAN links. Sharing VLANs between switches is achieved by
inserting a tag with a VLAN identifier (VID) between one and 4,094 into
each frame. A VID must be assigned for each VLAN. By assigning the same
VID to VLANs on many switches, one or more VLAN (broadcast domain) can be
extended across a large network.
The secret to performing this magic is in the tags. 802.1Q-compliant
switch ports can be configured to transmit tagged or untagged frames. A
tag field containing VLAN (and/or 802.1p priority) information can be
inserted into an Ethernet frame. If a port has an 802.1Q-compliant device
attached (such as another switch), these tagged frames can carry VLAN
membership information between switches, thus letting a VLAN span multiple
switches.
There is one important caveat: Network administrators must ensure ports
with non-802.1Q-compliant devices attached are configured to transmit
untagged frames. Many network interface cards for PCs and printers are not
802.1Q-compliant. If they receive a tagged frame, they will not understand
the VLAN tag and will drop the frame. Also, the maximum legal Ethernet
frame size for tagged frames was increased in 802.1Q (and its companion,
802.3ac) from 1,518 to 1,522 bytes. This could cause network interface
cards and older switches to drop tagged frames as "oversized."
In the case of a network with an ATM WAN, Ethernet switches with ATM
uplinks can have a VLAN-to-emulated-LAN (ELAN) mapping feature that
matches 802.1Q VIDs to ATM ELAN names. This lets the benefits of VLAN
bandwidth optimization and security be extended between campus buildings
or even between remote sites.
Usage: add [interface-name] [vlan_id]
rem [vlan-name]
set_dflt [interface-name] [vlan_id]
add_port [port-name] [vlan_id]
rem_port [port-name] [vlan_id]
set_egress_map [vlan-name] [skb_priority] [vlan_qos]
set_ingress_map [vlan-name] [skb_priority] [vlan_qos]
set_name_type [name-type]
set_bind_mode [bind-type]
* The [interface-name] is the name of the ethernet card that hosts
the VLAN you are talking about.
* The port-name is the name of the physical interface that a VLAN
may be attached to.
* The vlan_id is the identifier (0-4095) of the VLAN you are operating on.
* skb_priority is the priority in the socket buffer (sk_buff).
* vlan_qos is the 3 bit priority in the VLAN header
* name-type: VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5),
DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5)
* bind-type: PER_DEVICE # Allows vlan 5 on eth0 and eth1 to be unique.
PER_KERNEL # Forces vlan 5 to be unique across all devices.
command I usually use is:
vconfig add eth0 5
This attempts to create a VLAN device with VLAN-ID of 5 on the eth0
device. If you want to delete a VLAN, use something like:
vconfig rem eth0.5
You will also need to give it an ip, eg: ifconfig -i eth0.5 192.168.2.1
and configure it UP: ifconfig -i eth0.5 up
NOTE: You can get lots of VLAN related configuration information from the
/proc/net/vlan/* files by using 'cat' or 'more' to look at them.
Indice de la Documentación
|