Sw4(config-if)#switchport mode access
Sw4(config-if)#switchport access vlan 30
Sw4(config-if)#exit
Sw4(config)#interface FastEthernet 0/4
Sw4(config-if)#switchport mode access
Sw4(config-if)#switchport access vlan 40
Sw4(config-if)#exit
3.Trunklarni aniqlash
Sw4(config)#interface FastEthernet 0/1
Sw4(config-if)#switchport mode trunk
Sw4(config-if)#end
Sw4#copy run
start
3.2.2 R1 marshrutizatorni sozlash
1. Vlan lar orasida
marshrutizatsiyani sozlash
R1>enableRouter#configure terminal
R1(config)#interface FastEthernet 0/0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface FastEthernet 0/0.20
R1(config-subif)#encapsulation dot1Q 20
R1(config-subif)#ip address 192.168.20.1 255.255.255.0
R1(config-subif)#exit
R1(config)#interface FastEthernet 0/0.30
R1(config-subif)#encapsulation dot1Q 30
R1(config-subif)#ip address 192.168.30.1 255.255.255.0
R1(config-subif)#exit
R1(config)#interface FastEthernet 0/0.40
R1(config-subif)#encapsulation dot1Q 40
R1(config-subif)#ip address 192.168.40.1 255.255.255.0
R1(config-subif)#end
R1#copy run start
2.
VTP diagnostikasi
R1#show vtp status
R1#show vlan
R1#show
interfaces trunk
3.2.3. Laboratoriya ishi jarayonini tekshirish
PC21da quyidagilarni bajaring:
ping 192.168.20.1 - default gw
ping 192.168.20.22 - PC22
ping 192.168.20.23 - PC23
ping 192.168.20.24 - PC24
ping 192.168.30.31 - PC31
ping 192.168.30.32 - PC32
ping 192.168.30.33 - PC33
ping 192.168.40.41 - PC41
ping 192.168.40.42 - PC42
ping 192.168.40.43 - PC43
ping 192.168.40.44 - PC44