加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

锐捷交换机配置命令

发布时间:2020-12-15 06:58:49 所属栏目:百科 来源:网络整理
导读:? 交换机基本操作 1.进入特权模式 Switchenable Switch# 2.返回用户模式 Switch#exit Press RETURN to get started! Switch 配置模式: 全局配置模式[主机名(config)#]:配置交换机的整体参数 子模式: 1.线路配置模式[主机名(config-line)#]:配置交换机的线路
?

交换机基本操作

1.进入特权模式

Switch>enable

Switch#

2.返回用户模式

Switch#exit

Press RETURN to get started!

Switch>

配置模式:

全局配置模式[主机名(config)#]:配置交换机的整体参数

子模式:

1.线路配置模式[主机名(config-line)#]:配置交换机的线路参数

2.接口配置模式[主机名(config-if)#]:配置交换机的接口参数

1.进入全局配置模式下

Switch#configure terminal

Switch(config)#exit

Switch#

2.进入线路配置模式

Switch(config)#line console 0

Switch(config-line)#exit

Switch(config)#

3.进入接口配置模式

Switch(config)#interface fastEthernet 0/1

Switch(config-if)#exit

Switch(config)#

从子模式下直接返回特权模式

Switch(config-if)#end

Switch#

交换机操作帮助特点:

1.支持命令简写(按TAB键将命令补充完整)

2.在每种操作模式下直接输入“?”显示该模式下所有的命令

3.命令空格 “?”显示命令参数并对其解释说明

4.字符“?”显示以该字符开头的命令

5.命令历史缓存: (Ctrl+P)显示上一条命令,(Ctrl+N)显示下一条命令

6.错误提示信息

交换机显示命令:

显示交换机硬件及软件的信息 Switch#show version

显示当前运行的配置参数 Switch#show running-config

显示保存的配置参数 Switch#show configure

常用交换机EXEC命令

将当前运行的配置参数复制到flash:Switch#write memory

Building configuration...

[OK]

Switch#

清空flash中的配置参数:Switch#delete flash:config.text

Switch#

交换机重新启动:Switch#reload

System configuration has been modified. Save? [yes/no]:n

Proceed with reload? [confirm]

配置交换机主机名:Switch(config)#hostname S2126G

S2126G(config)#

配置交换机口令:

1、 配置交换机的登陆密码

S2126G(config)#enable secret level 1 0 star

“0”表示输入的是明文形式的口令

2、 配置交换机的特权密码

S2126G(config)#enable secret level 15 0 Star

“0”表示输入的是明文形式的口令

常用交换机配置命令:

1、为交换机分配管理IP地址

S2126G(config)#interface vlan 1

S2126G(config-if)#ip address {IP address} {IP subnetmask}[secondary]

2、将接口启用

S2126G(config-if)#no shutdown

3、将接口关闭

S2126G(config-if)#shutdown

4、配置接口速率

S2126G(config-if)#speed [10|100|auto]

5、配置接口双工模式

S2126G(config-if)#duplex [auto|full|half

显示接口状态:S2126G#show interfaces

测定目的端的可达性:S2126G>ping {IP address}

从TFTP服务器下载配置参数:S2126G#copy tftp startup-config

管理交换机MAC地址表:

1、查看MAC地址表

S2126G#show mac-address-table

2、配置MAC地址表记录的生存时间(缺省为300秒)

S2126G(config)#mac-address-table aging-time <10-1000000>

3、查看MAC地址表记录的生存时间

S2126G#show mac-address-table aging-time

VLAN的配置:

1.添加一个VLAN

S2126G(config)#vlan <1-4094>

S2126G(config-vlan)#

2.为VLAN命名(可选)

S2126G(config-vlan)#name

将交换机端口分配到VLAN

1.配置Port VLAN

Switch(config-if)#switchport access vlan <1-4094>

2.配置Tag VLAN

Switch(config-if)#switchport mode trunk

1).配置本地(native)VLAN

Switch(config-if)#switchport trunk native vlan <1-4094>

2).从主干链路中清除VLAN

Switch(config-if)#switchport trunk allowed vlan except

注:VLAN1不可被清除

VLAN的验证:

1.显示全部的VLAN:Switch#show vlan

2.显示单独的VLAN :Switch#show vlan id <1-4094>

将VLAN信息保存到flash中:Switch#write memory

从flash中清除VLAN信息:Switch#delete flash:vlan.dat

RSTP的配置:

1.启用生成树:S2126G(config)#spanning-tree

2.配置交换机优先级:S2126G(config)#spanning-tree priority <0-61440>

“0”或“4096”的倍数(RSTP BPDU该值后12bit全0)

3.配置交换机端口优先级:S2126G(config-if)#spanning-tree port-priority <0-240>

“0”或“16”的倍数(RSTP BPDU该值后4bit全0)

4、生成树hello时间的配置(由Root决定):S2126G(config)#spanning-tree hello-time <1-10>

5、生成树的验证:Switch#show spanning-tree

Switch#show spanning-tree interface <接口名称> <接口编号>

以上用于锐捷交换机的。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读