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

来源:互联网 发布:神经网络算法的应用 编辑:程序博客网 时间:2024/06/04 18:20

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
@

 

 评论这张
转发至微博
转发至
原创粉丝点击