VLAN | Сегмент |
vlan 1 | 192.168.19.0 |
vlan 2 | 192.168.16.0 |
vlan 3 | 192.168.18.0 |
VLANID | Номер порта на коммутаторе | |||
1 | 2 | 3 | 4 | |
vlan 1 | R5 | – | – | R4 |
vlan 2 | – | R1 | – | R4 |
vlan 3 | – | – | R2 | R4 |
5. Настройка VLAN на коммутаторе CISCO
Switch>enable
Switch#configure terminal
Switch(config)#interface fastethernet0/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 1
Switch(config-if)#end
%SYS-5-CONFIG_I: Configured from console by console
Switch#configure terminal
Switch(config)#vlan 2
Switch(config-vlan)#name VLAN2
Switch(config-vlan)#end
%SYS-5-CONFIG_I: Configured from console by console
Switch#configure terminal
Switch(config)#interface fastethernet0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 2
Switch(config-if)#end
%SYS-5-CONFIG_I: Configured from console by console
Switch#configure terminal
Switch(config)#vlan 3
Switch(config-vlan)#name VLAN3
Switch(config-vlan)#end
%SYS-5-CONFIG_I: Configured from console by console
Switch#configure terminal
Switch(config)#interface fastethernet0/3
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 3
Switch(config-if)#end
%SYS-5-CONFIG_I: Configured from console by console
Switch#configure terminal
Switch(config)#interface fastethernet0/4
Switch(config-if)#switchport mode trunk
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up
Switch(config-if)#
Switch#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
6. Литература
1. Олифер В.Г., Олифер Н.А. Компьютерные сети. Принципы, технологии, протоколы.