Ads 468x60px

Sunday, July 10, 2011

VLAN Technology

As discussed in last post, In this section we will see about VLAN technology.In the Ethernet communication, network problems including serious conflict, flooded broadcast, and performance decreasing may be encountered when the number of hosts is large. 

To solve the preceding problems, the VLAN technology occurs. Each VLAN is a broadcast domain.                            

VLAN helps to break a large broadcast domain.

The hosts in a VLAN can communicate mutually. But the hosts between VLANs cannot communicate with each other. As a result, the broadcast packets are limited to a VLAN.
A VLAN is to divide physical network into logical networks. 
                The division of VLAN is not restricted by the physical location. The hosts in different locations can belong to the same VLAN. VLAN restricts the broadcast domain. The L2 unicast, broadcast, and multicast frames can be forwarded and spread in the local VLAN and cannot enter other VLANs. L2 packets in different VLANs are isolated, namely, users of different VLANs cannot communicate mutually.

VLAN Theory

To identify packets of different VLANs, add VLAN tag in the packets. The encapsulation format of the VLAN packets comply with IEEE 802.1Q, as shown in the following figure.



DA: destination MAC address; SA: Source MAC address.

Type: protocol type of the packets. IEEE 802.1Q defines that after the destination MAC address and the source MAC address, four-byte VLAN tag should be encapsulated to identify the VLAN. The VLAN tag contains four fields including Tag Protocol Identifier (TPID), priority, Canonical Format Indicator (CFI), and VLAN ID.

TPID: identify the frame with VLAN tag; the length is 16bit.The value is 0x8100. Priority: Indicates the 802.1P priority of the packets; the length is 3 bit.

CFI: identifies whether the MAC address can be encapsulated in standard format in different transmission media. The length is 1 bit. The value 0 indicates that the MAC address can be encapsulated in standard format; the value 1 indicates that the address is encapsulated in non-standard format. The default value is 0.

 VLAN ID: identifies the VLAN o the packets. The length is 12bit. The value range is 0-4095. 0 and 4095 are the reserved value of the protocol. The value range of VLAN ID is 1-4094.

VLAN Classification

VLAN can be divided into different types. The common types are as follows:

  • Port-based VLAN
  • MAC-based VLAN
  • IP subnet-based VLAN
  • Protocol-based VLAN

In the default configuration, the priority (from high to low) of the four types of VLANs is: MAC-based VLAN, IP subnet-based VLAN, Protocol-based VLAN, and Port-based VLAN. In the same port, the VLAN division takes effect according to the priority. Only one VLAN division takes effect.

Let's see Port based VLANs:

Port-Based VLAN
In the Port-based VLAN, a port is regarded as a member of the port and added to the VLAN. The port can forward the packets of the VLAN.

Port Types
The port modes can be classified into three types according to the mode of processing packet tag.

Access: The port belongs to one VLAN, the default VLAN ID of the port is 1 and administrator can configure any VLAN ID as access to port. Then particular port can communicate with other ports configured with same VLAN ID. The default type of the port is Access and all ports are in default VLAN 1.

Trunk: The port allows multiple VLANs send and receives packets of multiple VLANs. Permits default VLAN packets without tag, used in interconnection of network devices.

Hybrid: The port can be added to multiple VLANs, send and receives packets of multiple VLANs. Permits packets without tag of multiple VLANs used in interconnection of user devices and network devices.

We will see continuity in upcoming posts. 

Hope this post is informative for you. For any feedback, Plz comment with Name and Mail Id. New users can use Name/URL option. 

Saturday, July 9, 2011

Basic Working of Switch

In this section, we will see about basic switching. The LAN switching technology is  L2 (data-link layer) of the OSI model. 
The "switching means forwarding frames. In the data communication, all switching devices (namely the switches) implement two basic tasks: 
  • Frame forwarding: forward the frames received from the input media to the corresponding output media.
  • Address learning process: construct and maintain the switching address table to maintain the switch operation. The following describes the details of the two basic operations.


Frame Forwarding

The switch forwards frames according to the MAC address. When the switch forwards frames, the switch works based on following rules:

  1. If the destination MAC address of the frame is broadcasting address or multicasting address, the frame is forwarded to all ports of the switch (except the source port of the frame).
  2. If the destination address of the frame is a unicast address, but the address is not in the address table of the switch, the frame is forwarded to all ports (except the source port of the frame).
  3. If the destination address of the frame is in the address table of the switch, forward the frame to the corresponding port according to the address table.
  4. If the destination address and the source address of the frame are in the same network segment, the frame is discarded and switching is not performed.


Address Learning Process

In the address table of the switch, one entry is composed of one MAC address and the resident switch port number. The generation of the address table is through the dynamic self-learning, namely, when the switch receives a frame, the source address and the input port are recorded in the switching address table. 


Below flow chart illustrates the forwarding and learning of the received frames. 




When a frame reaches from a specific port, the switch gets the conclusion according to the two items: from port X, the workstation specified by the frame source address domain can be reached. 
Therefore, the switch can update the forwarding database for the MAC address. To allow the change of the network topology, each item of the database is configured with a life timer. 


When a new item is added to the database, the timer is started. The default value of the timer is 30 seconds. If the scheduled time is up, the item searches the database to check whether any item with the same address field value and frame address exists. 
If such item exists in the database, the content of the item is updated. Reset the timer. If such item does not exist in the database, add a new item in the database.
The address in the new item is the MAC address of the received frame.The port number is the port of the received frame, the timer value is set to the original value.


This was the basic information about working flow of switch. In coming posts we will see about VLAN Technology. 



Hope this information will be useful for beginners. For any feedback, Plz comment with your mail id and name. For new users you can use Name/URL option.  
Related Posts Plugin for WordPress, Blogger...