交換機配置命令集錦
1、 進入全局配置模式
2、 啓用交換機的HTTP Server
3、 配置主機名
4、 配置超級用戶口令
5、 配置遠程登錄口令
6、 配置系統時間
7、 配置設備管理地址(IP地址及缺省路由)
8、 進入端口配置模式
9、 配置端口描述信息
10、配置交換機端口的關閉與開啓
11、配置交換機端口的通信方式
12、配置交換機端口的傳輸速率
13、配置VTP域名
14、配置VTP工作模式
15、進入VLAN配置模式
16、建立VLAN
17、刪除VLAN
18、修改VLAN
19、爲端口分配VLAN
20、配置VLAN Trunk模式
21、封裝VLAN協議
22、設置允許中繼的VLAN
23、打開或關閉STP
24、配置根網橋和備份根網橋
25、配置生成樹優先級
26、配置BackboneFast 生成樹可選功能
27、配置UplinkFast 生成樹可選功能
28、配置PortFast 生成樹可選功能
29、配置BPDU Filter 生成樹可選功能
交換機配置命令集錦之Catalyst 3548
1、Switch-3548 > enable
Password : ********
Switch-3548 # config t
Switch-3548 (config) #
2、Switch-3548 (config) # ip http server
3、Switch-3548 (config) # hostname Switch-PHY-3548
4、Switch-PHY-3548 (config) # enable secret 5 zzz
Switch-PHY-3548 (config) # enable password zzz
Switch-PHY-3548 (config) #
Switch-PHY-3548 (config) # enable password 7 zzz
Switch-PHY-3548 (config) #
5、Switch-PHY-3548 (config) # line vty 0 4
Switch-PHY-3548 (config-line) # password 7 zzz
Switch-PHY-3548 (config-line) # password 0 zzz
Switch-PHY-3548 (config-line) #
6、Switch-PHY-3548 # clock set 23:00:00 29 March 2009
7、Switch-PHY-3548 (config) # interface VLAN1
Switch-PHY-3548 (config-if) # ip address 203.105.1.62 255.255.255.0
Switch-PHY-3548 (config) # ip default-gateway 203.105.1.1
8、Switch-PHY-3548 (config) # interface f0/24
9、Switch-PHY-3548 (config-if) # description To-lib
10、Switch-PHY-3548 (config-if) # (no) shutdown
11、Switch-PHY-3548 (config-if) # duplex auto/full/half
12、Switch-PHY-3548 (config-if) # speed 10/100/auto
13、Switch-PHY-3548 (config) # vtp domain pku
14、Switch-PHY-3548 (config) # vtp mode server/client/transparent
15、Switch-PHY-3548 # vlan data
16、Switch-PHY-3548 (vlan) # vlan 1000 name vlan1000
17、Switch-PHY-3548 (vlan) # no vlan 1000
18、Switch-PHY-3548 (vlan) # vlan 1000 name v1000
19、Switch-PHY-3548 (config-if) # switchport access vlan 248
20、Switch-PHY-3548 (config-if) # switchport mode trunk
21、Switch-PHY-3548 (config-if) # switchport trunk encapsulation dot1 q/isl/negotiate P
22、Switch-PHY-3548 (config-if) # switchport trunk allowed vlan 10,14/10-14/except 100-1000
23、Switch-PHY-3548 (config) # (no) spanning-tree vlan 3
24、Switch-PHY-3548 (config) # spanning-tree vlan 3 root primary/secondary
25、Switch-PHY-3548 (config) # spanning-tree vlan 3 priority 8192
26、Switch-PHY-3548 (config) # spanning-tree backbonefast
27、Switch-PHY-3548 (config) # spanning-tree uplinkfast max-update-rate 32000
Switch-PHY-3548 (config) # spanning-tree uplinkfast
28、Switch-PHY-3548 (config) # spanning-tree portfast default
29、Switch-PHY-3548 (config) # spanning-tree portfast bpdufilter default
交換機配置命令集錦之Catalyst 6500
1、Switch-6509 > enable
Enter password :
Switch-6509 > (enable)
2、Switch-6509 > (enable) set ip http server enable
3、Switch-6500 > (enable) set system name Switch-PHY-6500 or
Switch-6500 > (enable) set prompt Switch-PHY-6500 >
4、Switch-PHY-6500 > (enable) set enablepass
5、Switch-PHY-6500 > (enable) set password
6、Switch-PHY-6500 > (enable) set time fri 3/29/2009 23:00:00
7、Switch-PHY-6500 > (enable) set interface sc0 203.105.1.63 255.255.255.0 203.105.1.255
8
Switch-PHY-6500 > (enable) set port name 4/5 mail-server
9
10、Switch-PHY-6500 > (enable) set port enable/disable 4/5
11、Switch-PHY-6500 > (enable) set port duplex 5/1 full/half
Switch-PHY-6500 > (enable) set port duplex 5/1-24 full/half
12、Switch-PHY-6500 > (enable) set port speed 5/1-24 auto/10/100/1000
13、Switch-PHY-6500 > (enable) set vtp domain pku
14、Switch-PHY-6500 > (enable) set vtp mode server/client/transparent/off
15
Switch-PHY-6500 > (enable) set vlan 999 name vlan999
16
17、Switch-PHY-6500 > (enable) clear vlan 999
18、Switch-PHY-6500 > (enable) set vlan 999 name v999
19、Switch-PHY-6500 > (enable) set vlan 42 5/20
20
Switch-PHY-6500 > (enable) set trunk 5/1 on dot1 qPort(s) 1/2 trunk mode set to on
21
22、Switch-PHY-6500 > (enable) set trunk 5/1 vlan 37-42
23、Switch-PHY-6500 > (enable) set spantree enable/disable 3
24、Switch-PHY-6500 > (enable) set spantree root 1,200-204
Switch-PHY-6500 > (enable) set spantree root secondary 1,200-204
25、Switch-PHY-6500 > (enable) set spantree priority 8192
26、Switch-PHY-6500 > (enable) set spantree backbonefast enable
27、Switch-PHY-6500 > (enable) set spantree uplinkfast enable
28、Switch-PHY-6500 > (enable) set spantree portfast 3/2 enable
29、Switch-PHY-6500 > (enable) set spantree portfast bpdu-filter enable
說明:上述所有交換機命令以實例爲背景,總結教材所列命令,便於記憶,基本覆蓋教材所有內容,希望能給壇友們的學習帶來便利!若有錯誤,還望斧正。若有疑難問題,可發郵件至[email protected],希望我們大家共同進步!