欢迎访问华乐美文网

[CISCO交换机常用配置命令]华为交换机常用命令

安全工作计划2019-07-28 03:12书业网

  基本配置

  witch>

  Switch>enable 进入特权执行模式

  Switch#

  Switch#show running-config 列出运行配置清单

  Switch#config terminal 进入配置模式

  Enter configuration commands, one per line. End with CNTL/Z.

  Switch(config)#

  Switch(config)#enable secret cisco1 设置enable密码

  Switch(config)#hostname c2950 设置主机名

  c2950(config)#interface VLAN 1 进入VLAN 1的配置模式

  c2950(config-if)#ip address 192.168.1.2 255.255.255.0

  c2950(config-if)#no shut 保存配置

  c2950(config-if)exit 退出

  配置端口速率及双工模式

  可以配置快速以太口的速率为10/100Mbps及千兆以太口的速率为10/100/1000-Mbps; 但对于GBIC端口则不能配置速率及双工模式,有时可以配置nonegotiate,当需要联接不支持自适应的其它千兆端口时。

  举例如下:

  Switch# configure terminal

  Switch(config)# interface fastethernet0/3

  Switch(config-if)# speed 10

  Switch(config-if)# duplex half

  关闭和打开端口

  举例如下:

  Switch# configure terminal

  Switch(config)# interface fastethernet0/5

  Switch(config-if)# shutdown

  Switch(config-if)#

  *Sep 30 08:33:47: %LINK-5-CHANGED: Interface FastEthernet0/5, changed state to a

  administratively down

  Switch# configure terminal

  Switch(config)# interface fastethernet0/5

  Switch(config-if)# no shutdown

  Switch(config-if)#

  *Sep 30 08:36:00: %LINK-3-UPDOWN: Interface FastEthernet0/5, changed state to up

Copyright @ 2012-2024华乐美文网 All Rights Reserved. 版权所有