三個有用的Switch命令:spanning-tree portfast、switchport host、smartport

1.spanning-tree portfast
正常來說生成樹協議是保證冗餘的同時避免迴環,但是狀態的改變需要一些延遲,而這些延遲在網絡中可能是不允許的,特別是連接的主機,思科就有了portfast這樣的新特性,但是在每個端口配置這個命令是很痛苦的,其實可以在全局模式下配置這個命令的
Switch(config)# spanning-tree portfast default
這個命令就會把所有配置爲access port的端口配置成正確的模式。
2.switchport host
該命令可以把端口配置成下列模式,省去了好多命令
Switch(config)# interface range fa0/1 - 24
Switch(config-if-range)# switchport host
switchport mode will be set to access
spanning-tree portfast will be enabled
channel group will be disabled
3.smartport
smartport
簡單的說就是一個宏,端口可以應用這個宏從而簡化配置,思科缺省有下面幾個smartport模板
Switch# show parser macro brief
cisco-desktop
cisco-phone
cisco-switch
cisco-router
Sample-Macro
當然你可以自己定義
Switch# config t
Switch(config)# macro name Test-Macro
Enter macro commands one per line. End with the character ‘@’.
switchport block unicast
switchport block multicast

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章