Difference between revisions of "VLAN"

From OpenVZ Virtuozzo Containers Wiki
Jump to: navigation, search
m (--netdev_add is depreciated --> --netif_add is used now.)
(Advantages of VLAN)
 
(One intermediate revision by one other user not shown)
Line 6: Line 6:
  
 
==Advantages of VLAN==
 
==Advantages of VLAN==
* Increases the number of '''broadcast domains''' but reduces the size of each '''broadcast domain''', which in turn reduces network traffic and increases network security (both of which are hampered in case of single large broadcast domain)
+
* Increases the number of '''broadcast domains''' but reduces the size of each '''broadcast domain''', which in turn reduces network traffic and increases network security (two of the main weaknesses in having a single large broadcast domain)
 
* Reduces management effort to create subnetworks
 
* Reduces management effort to create subnetworks
 
* Reduces hardware requirement, as networks can be logically instead of physically separated
 
* Reduces hardware requirement, as networks can be logically instead of physically separated
Line 28: Line 28:
 
* [http://en.wikipedia.org/wiki/VLAN wikipedia:VLAN]
 
* [http://en.wikipedia.org/wiki/VLAN wikipedia:VLAN]
 
* [http://en.wikipedia.org/wiki/IEEE_802.1Q wikipedia:IEEE 802.1Q]
 
* [http://en.wikipedia.org/wiki/IEEE_802.1Q wikipedia:IEEE 802.1Q]
 +
[[Category:Networking]]

Latest revision as of 20:44, 12 April 2018

A virtual LAN, commonly known as a vLAN or as a VLAN, is a method of creating independent logical networks within a physical network. Several VLANs can co-exist within such a network. This helps in reducing the broadcast domain and administratively separating logical segments of LAN (like company departments) which should not exchange data using LAN (they still can by routing).

A VLAN consists of a network of computers that behave as if connected to the same wire - even though they may actually be physically connected to different segments of a LAN. Network administrators configure VLANs through software rather than hardware, which makes them extremely flexible. One of the biggest advantages of VLANs emerges when physically moving a computer to another location: it can stay on the same VLAN without the need for any hardware reconfiguration.

VLAN 1 is the default VLAN; it can never be deleted. All untagged traffic falls into this VLAN by default.

Advantages of VLAN[edit]

  • Increases the number of broadcast domains but reduces the size of each broadcast domain, which in turn reduces network traffic and increases network security (two of the main weaknesses in having a single large broadcast domain)
  • Reduces management effort to create subnetworks
  • Reduces hardware requirement, as networks can be logically instead of physically separated
  • Increases control over multiple traffic types.

Common VLAN configurations for container[edit]

VLAN can be used in following ways:

  • Create VLAN device on physical network interface (eth0) and move it (VLAN device) to container:
host #  vconfig add eth0 <vlan_id>
host #  vzctl set <CTID> --netif_add eth0.<vlan_id> --save
  • Create VLAN device inside container on veth device
ve #  vconfig add eth0 <vlan_id>

The second option is available only in kernel with virtualized VLAN (since 2.6.18-028test005 version).

External links[edit]