Uploaded by 黃子銓

VLAN Configuration Lab Guide

advertisement
基礎 VLAN
l
查看 SWITCH 初始化的狀況
Switch#show vlan brief
(第 2 層)
Switch#conf t
Enter configuration commands, one per line.
Switch(config)#vlan 2
End with CNTL/Z.
-1-
Switch(config-vlan)#name mis
Switch(config)#exit
Switch(config)#vlan 3
Switch(config-vlan)#name sales
Switch(config-vlan)#^Z
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#show vlan brief
Switch#conf t
Enter configuration commands, one per line.
Switch(config)#int fa0/1
Switch(config-if)#switchport access vlan 2
Switch(config-if)#exit
Switch(config)#int fa0/2
Switch(config-if)#switchport access vlan 2
End with CNTL/Z.
Switch(config-if)#exit
Switch(config)#int range fa0/3 – 4
( 指定範圍的設定方式
Switch(config-if-range)#switchport access vlan 3
Switch(config-if-range)#^Z
%SYS-5-CONFIG_I: Configured from console by console
Switch#show vlan brief
Switch#conf t
-2-
Tips : ‘-’ 前後要空格)
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#int range fa0/1 - 4
Switch(config-if-range)#spanning-tree portfast
l
PC 端
PC0:192.168.10.10 ; PC1:192.168.10.20 ; PC3:192.168.10.30 ; PC4:192.168.10.40
PC0 ping PC1 à 通
PC0 ping PC3 à 不通
l
SWITCH 端
Switch#show mac-address-table
l
刪除 Vlan 的設定
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#int range fa0/1 - 4
Switch(config-if-range)#switchport access vlan 1
Switch(config-if-range)# no spanning-tree portfast
Switch(config-if-range)#^Z
%SYS-5-CONFIG_I: Configured from console by console
Switch#erase start
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
[OK]
Erase of nvram: complete
%SYS-7-NV_BLOCK_INIT: Initialized the geometry of nvram
Switch#show flash
-3-
Switch#delete vlan.dat
Delete filename [vlan.dat]?
Delete flash:/vlan.dat? [confirm]
Switch#show flash
Switch#reload
System configuration has been modified. Save? [yes/no]:no
-4-
Download