新闻搜索:  
 
      首页>>
 
 
 
 
 
 
 

 

三个有用的交换机命令

 

出处:互联网

 


  • 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
        @

     

     

  •  
    Copyright© 2002~2008 绵阳广播电视大学电子信息工程系 All Rights Reserved版权所有
    蜀ICP备05005035号
    地址:绵阳长虹大道南段71号 信箱:webmaster@myrtvu.com.cn 邮编:621000华