一、交换机的基本配置
     
      
       1.
      
     
Switch> (用户执行模式提示符)
      Switch>
      
       enable
      
      (进入特权模式)
     
Switch# (特权模式提示符)
      Switch#
      
       config terminal
      
      (进入配置模式)
     
      Switch(config)#
      
       enable password cisco
      
      (设置enable password为cisco)
     
      Switch(config)#
      
       enable secret cisco1
      
      (设置enable secret为sisco1)
     
      Switch(config)#
      
       hostname C2950
      
      (设置主机名为C2950)
     
      C2950(config)#
      
       end
      
      (退回到特权模式)
     
C2950#
      
       2.
      
     
      C2950(config)#
      
       ip address 192.168.1.1 255.255.255.0
      
      (设置交换机IP)
     
      C2950(config)#
      
       ip default-gateway 192.168.1.254
      
      (设置默认网关)
     
      C2950(config)#
      
       ip domain-name cisco.com
      
      (设置域名)
     
      C2950(config)#
      
       ip name-server 200.0.0.1
      
      (设置域名服务器)
     
      C2950(config)#
      
       end
      
     
      
       3.
      
     
      C2950(config )#
      
       interface fastethernet0/1
      
      (进入接口0/1的配置模式)
     
      C2950(config-if)#
      
       speed ?
      
      (查看speed命令的子命令)
     
      C2950(config-if)#
      
       speed 100
      
      (设置该端口速率为100Mbps)
     
      C2950(config-if)#
      
       duplex ?
      
      (查看duplex命令的子命令)
     
      C2950(config-if)#
      
       duplex full
      
      (设置该端口为全双工)
     
      C2950(config-if)#
      
       description TO_PC1
      
      (设置该端口描述为TO_PC1)
     
      C2950(config-if)#
      
       ^Z
      
      (返回到特权模式,同end)
     
      C2950#
      
       show interface fastethernet0/1
      
      (查看端口0/1的配置结果)
     
      C2950#
      
       show interface fastethernet0/1 status
      
      (查看端口0/1的状态)
     
 
