交换机常用设备信息查看命令最终版.doc

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

交换机常用设备信息查看命令

Ruijie#show running-config

查看设备当前的配置

2)Ruijie#show version

查看设备的软件版本信息

3) Ruijie#show log

查看设备的日志

4)Ruijie#show ip interface brief

查看设备的三层接口ip和掩码

5)Ruijie#show interface f0/1

查看f0/1接口的信息,包括mac地址,流量信息等等

6)Ruijie#show interface status

查看交换接口的信息,包括状态、vlan、双工、速度和使用介质7)Ruijie#show vlan

查看交换接口所属的vlan信息

交换机的基本命令有以下四种:

一、模式命令:

1. 用户模式:Switch>

2. 特权模式:Switch>enable

Switch#

3. 全局配置模式:Switch#config terminal

Switch(config)#

4. 接口配置模式:Switch(config)#interface fastethernet0/1 Switch(config-if)#

5. Line模式:Switch(config)#line console 0

Switch(config-line)#

二、特权模式下的命令:

1. 查看机MAC地址:Switch#show mac-address-table

2. 发现(CDP):

Switch#show cdp

Switch#show cdp interface fastethernet0/1

Switch#show cdp neighbors

Switch#show cdp neighbors detail

Switch#show cdp entry

3. 保存机配置:

Switch#copy running-config startup-config或者Switch#write 4. 恢复交换机出厂值:

Switch#erase startup-config

Switch#reload

三、全局配置模式下的命令:

1. 配置主机名:Switch(config)#hostname Sw1

Sw1(config)#

2、设置登陆台密码:Switch(config)#line console 0 Switch(config-line)#password 密码

Switch(config-line)#login

3. 使能口令:Switch(config)#enable Password 密码

4. 加密保存的使能口令:Switch(config)#enable secret 密码

5. 配置IP地址:

Switch(config)#interface vlan 1

Switch(config-if)#ip address IP地址网关

Switch(config-if)#no shutdown

6. 配置交换机网关:Switch(config)#ip default-gateway 网关

四、VLAN配置命令:

1. 创建vlan命令:

a) 全局配置模式下:

Switch(config)#vlan 2

Switch(config)#name v2

Switch(config)#mtu 数值

Switch(config)#end

b) Vlan数据库下:

Switch#vlan database

Switch#vlan 2 name v2

Switch#vlan 2 mut 数值

Switch#exit

2. 删除vlan命令:

a) 全局配置模式下:

Switch(config)#no vlan 2

Switch(config)#end

b) Vlan数据库下:

Switch#no vlan 2 name v2

Switch#exit

3. 在vlan中添加端口:

Switch#config terminal

Switch(config)#interface f0/1(端口)

Switch(config-if)#Switchport mode access

Switch(config-if)#switchport access vlan 2

Switch(config-if)#end

一次将多个端口添加到vlan中:

Switch#config terminal

Switch(config)#interface range f0/1 - 5(端口)

Switch(config-if)#switchport access vlan 2

Switch(config-if)#end

注:switch#show vlan biref(查看vlan信息)

4. 配置vlan trunk:

1. 配置接口为trunk命令:

Switch(config)# interface f0/1(端口)

Switch(config-if)#Switchport mode trunk

2. 配置接口为动态协商模式的命令:

Switch(config)# interface f0/1(端口)

Switch(config-if)#switchport mode dynamic desirable/auto 3. 从trunk中删除vlan:

Switch(config)# interface f0/1(端口)

Switch(config-if)#Switchport trunk allowed vlan remove 2 4. 在trunk中添加vlan:

Switch(config)# interface f0/1(端口)

Switch(config-if)#Switchport trunk allowed vlan add 2

相关文档
最新文档