VLAN
by M Matta
1. Inter-Vlan
1.1. 1. Router-on-a-Stick
1.1.1. Router(config)#interface fa 0/1
1.1.2. Router(config-if)#no shutdown
1.1.3. Router(config)#interface fa 0/1.1
1.1.4. Router(config-subif)#encapsulation dot1q 1 native
1.1.5. Router(config-subif)#description Management VLAN 1
1.1.6. Router(config-subif)#ip address 192.168.1.1 255.255.255.0
1.1.7. Router(config)#interface fa 0/1.2
1.1.8. Router(config-subif)#encapsulation dot1q 100
1.1.9. Router(config-subif)#ip address 192.168.2.1 255.255.255.0
1.2. 2. SVI - Switch L3
1.2.1. Enable Routing
1.2.1.1. Switch3750(Config)# ip routing
1.2.2. Create SVI (Switch Virtual Interface) with the IP address
1.2.2.1. Switch3750(Config)# interface vlan 1
1.2.2.2. Switch3750(Config-if)# ip address 192.168.1.1 255.255.255.0
1.2.2.3. Switch3750(Config-if)#no shutdown
1.2.2.4. Switch3750(Config)#interface vlan 10
1.2.2.5. Switch3750(Config-if)#ip address 192.168.2.1 255.255.255.0
1.2.2.6. Switch3750(Config-if)#no shutdown
1.2.2.7. Switch3750(Config)#interface vlan 20
1.2.2.8. Switch3750(Config-if)#ip address 192.168.3.1 255.255.255.0
1.2.2.9. Switch3750(Config-if)#no shutdown
1.2.3. Configure the interface to the default router
1.2.3.1. Switch3750(Config)# interferface fa 0/1
1.2.3.2. Switch3750(Config-if)#no switchport
1.2.3.3. Switch3750(config-if)#ip address 200.1.1.1 255.255.255.0
1.2.3.4. Switch3750(config-if)#no shutdown
1.2.4. Configure the default route for the switch
1.2.4.1. Switch(config)#ip route 0.0.0.0 0.0.0.0 200.1.1.2
2. VTP VLAN Trunking Protocol
2.1. Switch(config)#vtp mode client
2.2. Switch(config)#vtp mode server
2.3. Switch(config)#vtp mode transparent
2.4. Switch(config)#no vtp mode
2.5. Switch(config)#vtp domain Cisco
2.6. Switch(config)#vtp password password
2.7. Switch(config)#vtp version 2
2.8. Switch(config)#vtp pruning
3. Trunk VLAN Encapsulation
3.1. Switch3750(Config)#interface fa 0/1
3.2. Switch3750(Config-if)# switchport mode trunk
3.3. Switch3750(Config-if)# switchport encapsulation dot1q
3.4. Switch3750(Config-if)# switchport encapsulation isl
3.5. Switch3750(Config-if)# switchport encapsulation negotiate
4. DTP Dynamic Trunking Protocol
4.1. Switch3750(Config)#interface fa 0/1
4.2. Switch3750(Config-if)#switchport mode dynamic auto
4.3. Switch3750(Config-if)#switchport mode dynamic desirable
4.4. Switch3750(Config-if)#switchport mode trunk
4.5. Switch3750(Config-if)#switchport nonegotiate
5. Assigning ports to VLAN
5.1. Switch3750(Config)#interface fa 0/1 - 10
5.2. Switch3750(Config-if)#switchport mode access
5.3. Switch3750(Config-if)#switchport access vlan 10
6. Create and Save VLAN
6.1. Switch3750(Config)#vlan 10
6.2. Switch3750(Config-Vlan)#name Sales
6.3. Switch3750(Config)#vlan 20
6.4. Switch3750(Config-Vlan)#name Accounting
6.5. Switch3750(Config-Vlan)#exit
6.6. Switch3750(Config)#
7. Verifying VLAN
7.1. Switch#show vlna
7.2. Switch#show vlan brief
7.3. Switch#show vlan id 2
7.4. Switch#show vlan name Sales
7.5. Switch#show interface vlan 10
7.6. Switch#show interface switchport
7.7. Switch#show interfaces fa 0/1 switchport
8. Erase VLAN
8.1. Switch# delete flash: vlan.dat
8.2. Switch3750(Config)#no vlan 10
9. Disable/Enable VLAN
9.1. Switch3750(Config-Vlan)#shutdown
9.2. Switch3750(Config-Vlan)#no shutdown