TCPIP命令总结
- 网络设备的几种模式?
- 用户模式
刚刚进入就是用户模式
- 特权模式
执行:enable或者en
- 全局模式
执行:config terminal或者conf t
- 接口模式
interface f0/0 百兆
interface e0/0 十兆
Interface g0/0 千兆
- 配置主机名
Switch(config)# host 名称
例如:Switch(config)# host sw1
- 查看系统IOS名称及版本信息
Switch#show version
或者
Switch#sh ver
- 查看交换机的mac地址表
Switch#show mac-address-table
或者
Switch#show mac-address-table dynamic
- 配置交换机的双工模式
Switch(config)#int f0/0
Switch(config-if)#duplex full 全双工
Switch(config-if)#duplex half 半双工
- 配置交换机接口的速率
Switch(config)#int f0/0
Switch(config-if)#speed 100
- 查看接口的双工模式和速率等接口信息
Switch#sh int f0/0
- 无论多长时间都不返回初始界面
Switch(config)#line con 0
Switch(config-line)#exec-timeout 0 0
- 启用命令同步,不弹出信息
Switch(config)#line con 0
Switch(config-line)#logging synchronous
- 禁用dns查找,防止输错命令导致等待时间较长
Switch(config)#no ip domain-lookup
- 给路由器配置ip地址
Router(config)# int f0/1
Router(config-if)# ip add 192.168.1.1 255.255.255.0
Router(config-if)# no shutdown