Sw1 va Sw2 kommutatorlarda VLAN (10, 20, 30) yaratish va unga mos ravishda nom berilishi (bugalteriya, student, dekanat).
Sw1(config)#interface fastEthernet 0/1
Sw1(config-if)#switchport mode access
Sw1(config-if)#switchport access vlan 10
Sw1(config-if)#exit
Sw1(config)#interface fastEthernet 0/2
Sw1(config)#interface fastEthernet 0/3
Sw1(config-if)#switchport mode access
Sw1(config-if)#switchport access vlan 20
Sw1(config-if)#exit
Sw1(config)#interface fastEthernet 0/4
Sw1(config-if)#switchport mode access
Sw1(config-if)#switchport access vlan 20
Sw1(config-if)#exit
Sw1(config)#interface fastEthernet 0/5
Sw1(config-if)#switchport mode access
Sw1(config-if)#switchport access vlan 30
Sw1(config-if)#exit
Sw1(config)#interface fastEthernet 0/6
Sw1(config-if)#switchport mode access
Sw1(config-if)#switchport access vlan 30
Sw1(config-if)#exit
Sw2(config)#interface fastEthernet 0/1
Sw2(config-if)#switchport mode access
Sw2(config-if)#switchport access vlan 10
Sw2(config-if)#exit
Sw2(config)#interface fastEthernet 0/2
Sw2(config)#interface fastEthernet 0/3
Sw2(config-if)#switchport mode access
Sw2(config-if)#switchport access vlan 20
Sw2(config-if)#exit
Sw2(config)#interface fastEthernet 0/4
Sw2(config-if)#switchport mode access
Sw2(config-if)#switchport access vlan 20
Sw2(config-if)#exit
Sw2(config)#interface fastEthernet 0/5
Sw2(config-if)#switchport mode access
Sw2(config-if)#switchport access vlan 30
Sw2(config-if)#exit
Sw2(config)#interface fastEthernet 0/6
Sw2(config-if)#switchport mode access
Sw2(config-if)#switchport access vlan 30
Sw2(config-if)#exit
Sw1 va Sw2 kommutatorlar o`rtasida trunk rejimini sozlash va magistral liniya bo`yicha aniq VLAN ID ta’yinlash.
Sw1(config)#interface fastEthernet 0/7
Sw1(config-if)#switchport mode trunk
Sw1(config-if)#switchport trunk allowed vlan 10,20,30
Sw1(config-if)#end
Sw1#show running-config
Yuqorida keltirilgan buyruq bitta kommutatorga sozlansa yetarli boladi, sababi 2 chi kommutator 1 chi kommutatorga ulangan interfeysini (fa0/7) avtomatik trank rejimini o`tkazadi
VLAN lar o‘rtasida marshrutizatsiyani sozlash
Lokal tarmoqda yaratilgan VLAN lar o‘rtasida marshrutizatsiyani sozlashning 3 xil usuli mavjud:
Demonstrating the legacy inter-VLAN routing.
Router-on-a-Stick
Switch Based Inter Vlan Routing
Bu Laboratoriya ishida VLAN lar o‘rtasida marshrutizatsiyani Router-on-a-stick (ROS) usulidan foydalanamiz.
6.3-rasm. VLAN o‘rtasida marshrutizatsiyalashning ROS usuli
Sw1(config)#interface fastEthernet 0/8
Sw1(config-if)#switchport mode trunk
Router>enable
Router#conf t
Router(config)#interface fastEthernet 0/1
Router(config-if)#no shutdown
Router(config)#interface fastEthernet 0/1.10
Router(config-subif)#encapsulation dot1Q 10
Router(config-subif)#ip address 192.168.10.254 255.255.255.0
Router(config-subif)#exit
Router(config)#interface fastEthernet 0/1.20
Router(config-subif)#encapsulation dot1Q 20
Router(config-subif)#ip address 192.168.20.254 255.255.255.0
Router(config-subif)#exit
Router(config)#interface fastEthernet 0/1.30
Router(config-subif)#encapsulation dot1Q 30