网络基础——交换机的基本配置

交换机的基本配置

1.配置前的连接

  1>.Console电缆连接,计算机COM口,交换机/路由器Console口

  2>.超级终端

  3>.其他软件

2.交换机的基本配置

  1>.工作模式:

  2>.interface  fastEthernet  0/1进入接口模式

  3>.interface:进入接口模式所必须的关键字

  4>.fastEthernet:接口类型,fastEthernet表示快速以太网,即百兆位以太网。

  5>.0/1:0表示模块号,1表示端口号

注:交换机的接口类型中还有(e、gi、和te) e表示十兆位以太网接口;gi表示吉比特,千兆位以太网接口;te表示十吉比特,万兆位以太网接口。

Switch>用户模式

Switch>enable 

Switch#特权模式

Switch#configure  terminal 

Switch(config)#全局配置模式

Switch(config)#interface  FastEthernet0/1

Switch(config-if)#接口模式

3.工作模式的退出

Exit

End

Disable从特权回到用户模式

Ctrl+z等效于end

4.常用命令

1>.特权:show  version查看系统IOS名称及版本信息(IOS互联网络操作系统,是指cisco路由器或交换的操作系统)

2>.配置enable明文口令

  全局配置模式:enable  password  123

3>.配置enable加密口令

  全局配置模式: enable  secret  456

4>.配置Console口令

  全局模式:line  console  0

  password  789

  login

5>.配置管理用IP地址

  Console不是唯一的管理手段,有时需要通过网络对设备进行远程管理

  配置管理用IP地址

  全局配置模式:interface  vlan  1

  ip  address  192.168.1.3  255.255.255.0

  no  shutdown

6>.查看MAC地址表

  特权:show mac-address-table

 7>.使用CDP协议

  用来查看邻居Cisco设备的信息

  特权:show  cdp  neighbors  detail

8>.接口的工作模式配置

指定接口的双工模式

  接口模式:duplex  {full | half | auto}

  full(全双工)

  Half(半双工)

  Auto(自动协商)

指定接口的通信速率

  接口模式:speed {10 | 100 | 1000 | auto}

查看以太网接口的双工模式和通信速率

  特权:show interface fastethernet 0/24

9>.保存交换机的配置

特权: copy  running-config  startup-config

或 write

10>.恢复设备出厂默认值

特权:erase  startup-config

11>.配置交换机默认网关

全局配置模式:

  ip  default-gateway  192.168.1.100

猜你喜欢

转载自www.cnblogs.com/a-ant/p/10878991.html