交換機配置命令集錦(適用於全國計算機等級考試四級網絡工程師)

交換機配置命令集錦

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

1Switch-3548 > enable

Password : ********

Switch-3548 # config t

Switch-3548 (config) #

2Switch-3548 (config) # ip http server

3Switch-3548 (config) # hostname Switch-PHY-3548

4Switch-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) #

5Switch-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) #

6Switch-PHY-3548 # clock set 23:00:00 29 March 2009

7Switch-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

8Switch-PHY-3548 (config) # interface f0/24

9Switch-PHY-3548 (config-if) # description To-lib

10Switch-PHY-3548 (config-if) # (no) shutdown

11Switch-PHY-3548 (config-if) # duplex auto/full/half

12Switch-PHY-3548 (config-if) # speed 10/100/auto

13Switch-PHY-3548 (config) # vtp domain pku

14Switch-PHY-3548 (config) # vtp mode server/client/transparent

15Switch-PHY-3548 # vlan data

16Switch-PHY-3548 (vlan) # vlan 1000 name vlan1000

17Switch-PHY-3548 (vlan) # no vlan 1000

18Switch-PHY-3548 (vlan) # vlan 1000 name v1000

19Switch-PHY-3548 (config-if) # switchport access vlan 248

20Switch-PHY-3548 (config-if) # switchport mode trunk

21Switch-PHY-3548 (config-if) # switchport trunk encapsulation dot1 q/isl/negotiate P

22Switch-PHY-3548 (config-if) # switchport trunk allowed vlan 10,14/10-14/except 100-1000

23Switch-PHY-3548 (config) # (no) spanning-tree vlan 3

24Switch-PHY-3548 (config) # spanning-tree vlan 3 root primary/secondary

25Switch-PHY-3548 (config) # spanning-tree vlan 3 priority 8192

26Switch-PHY-3548 (config) # spanning-tree backbonefast

27Switch-PHY-3548 (config) # spanning-tree uplinkfast max-update-rate 32000

 Switch-PHY-3548 (config) # spanning-tree uplinkfast

28Switch-PHY-3548 (config) # spanning-tree portfast default

29Switch-PHY-3548 (config) # spanning-tree portfast bpdufilter default

 

 

交換機配置命令集錦之Catalyst 6500

1Switch-6509 > enable

Enter password :

Switch-6509 > (enable)

2Switch-6509 > (enable) set ip http server enable

3Switch-6500 > (enable) set system name Switch-PHY-6500 or

      Switch-6500 > (enable) set prompt Switch-PHY-6500 >

4Switch-PHY-6500 > (enable) set enablepass

5Switch-PHY-6500 > (enable) set password

6Switch-PHY-6500 > (enable) set time fri 3/29/2009 23:00:00

7Switch-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

10Switch-PHY-6500 > (enable) set port enable/disable 4/5

11Switch-PHY-6500 > (enable) set port duplex 5/1 full/half

Switch-PHY-6500 > (enable) set port duplex 5/1-24 full/half

12Switch-PHY-6500 > (enable) set port speed 5/1-24 auto/10/100/1000

13Switch-PHY-6500 > (enable) set vtp domain pku

14Switch-PHY-6500 > (enable) set vtp mode server/client/transparent/off

15

        Switch-PHY-6500 > (enable) set vlan 999 name vlan999

16

17Switch-PHY-6500 > (enable) clear vlan 999

18Switch-PHY-6500 > (enable) set vlan 999 name v999

19Switch-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

22Switch-PHY-6500 > (enable) set trunk 5/1 vlan 37-42

23Switch-PHY-6500 > (enable) set spantree enable/disable 3

24Switch-PHY-6500 > (enable) set spantree root 1,200-204

Switch-PHY-6500 > (enable) set spantree root secondary 1,200-204

25Switch-PHY-6500 > (enable) set spantree priority 8192

26Switch-PHY-6500 > (enable) set spantree backbonefast enable

27Switch-PHY-6500 > (enable) set spantree uplinkfast enable

28Switch-PHY-6500 > (enable) set spantree portfast 3/2 enable

29Switch-PHY-6500 > (enable) set spantree portfast bpdu-filter enable

 

說明:上述所有交換機命令以實例爲背景,總結教材所列命令,便於記憶,基本覆蓋教材所有內容,希望能給壇友們的學習帶來便利!若有錯誤,還望斧正。若有疑難問題,可發郵件至[email protected],希望我們大家共同進步!

發佈了21 篇原創文章 · 獲贊 1 · 訪問量 12萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章