关心一些交换机的配置,下面说几个有用的命令: 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 @ 具体的配置命令就不说了,思科有详细的文档,很好玩吧。