Sunday, September 2, 2018

VLANs and Trucking


By default, a VLAN is single broadcast domain, every connected devices sees every broadcast packet which is transmitted.that means all devices connected to that VLAN receive broadcasts sent by any other VLAN members. However , devices connected to a different VLAN will not receive those same broadcasts.


A port or group of ports on a single switch can assigned to many VLANs. Even though two devices are connected to the same switch, traffic will not pass between them if they are connected to ports on different VLANs.  To perform this, you could use either a layer 3 device to route packets or an external layer 2 device to bridge packets between the two VLANs.

We have two types of VLAN configurations:


1). Static VLAN -  port based configuration

2). Dynamic VLAN - mac address based configuration.

3). Negotiate( the default)- The encapsulation is negotiated to select either ISL or IEEE 802.1Q, whichever both ends of the trunk support. if both ends support both types, ISL is favored.



By default, all switch ports assigned to VLAN 1 , are set to be a VLAN type of Ethernet, and have a maximum  transmission unit ( MTU ) of 1500 byes.


Static VLAN configuration -

1. Creating a VLANs
2. Adding switch port into VLANs
3. VTP configuration


1. Creating a VLANs -


step 1. VLAN must be created on  a switch, range could be 2 - 1002
  
            Switch ( config ) # vlan 100

step 2. Assigning a name to VLAN 

           Switch ( config - vlan ) # name sales

step 3 . Removing a VLAN

            Switch ( config ) # no vlan 100


2. Adding switch port into VLANs

step 1.  Switch# Interface Fastethernet 0/1

step 2.  config-switch # switchport - [ you will understand about this command in below paragraph ]

step 2.  config-switch #  switchport mode access

step 3.  config-switch # switchport mode vlan 100


3. VTP configuration


Before you begin VTP configuration, you must understand what is switchport command actually do?By default, every Catalyst IOS switch port is ready for Layer 3 operations, something that doesn't co-exit with Layer 2 VLANs. a switch port must be in layer 2 mode before it can support a trunk.a switchport command makes switch port put into layer 2 mode, and also you must learn following stages 

1.VLAN Identification and encapsulation methods
2.DTP modes
3.Native VLAN



Please go through separate links for DTP modes and Native VLAN explanation.



1.VLAN Identification and encapsulation methods -

a. ISL ( Inter Switch Link) -
       In this ISL method, VLANs are tagged and encapsulating in each frame using cisco ISL protocol.     It is a cisco propitiatory

b. 802.1Q -
    In this 802.1Q mthod, VLANs are tagged by tagged and encapsulating in each frame using IEEE.802.1Q standard protocol. The only exception is the native VLAN, which is sent normally and is not tagged. It is a open standard.




switch # interface fasthethernet 0/1
switch (config-if)# switchport
switch (config-if)#switchport trunk encapsulation isl/dot1q/negotiate   
switch (config-if)# switchport mode trunk/dynamic desirable/auto
switch (config-if)#switchport trunk native vlan 100
switch (config-if)#switchport trunk allowed vlan  vlan list/all/add/except/remove
switch (config-if)#switchport trunk allowed vlan 100-102, 104-105
switch (config-if)#switchport trunk allowed vlan remove 103








No comments:

Post a Comment