2024年6月11日发(作者:)

锐捷系列交换机常用配置的命令锐捷常用命令

交换机基本命令

switch>enable !从用户模式进入特权模式

switch # configure terminal !从特权模式进入全局配置模式

switch (config)# hostname SwitchA !设置交换机名称为为“SwitchA”

SwitchA (config)# enable secret level 1 0 star 设置交换机远程登陆telnet口令

SwitchA (config)# enable secret level 15 0 star 将交换机特权模式口令配置为“star”

SwitchA (config)# interface vlan 1 !进入交换机管理接口配置模式

SwitchA (config-if)#ip address 172.16.0.1 255.255.255.0 配置交换机的IP地址

SwitchA (config-if)# no shutdown ! 启用端口

S2150G(config)#ip default-gateway 192.168.1.254 //配置网关地址为192.168.1.254

S2150G(config)#interface range f 1/0/1-48,2/0/1-48

S2150G(config-if) #spanning-tree bpdufilter enabled//将上联光纤口启动过滤Bpdu报文功

能,提高网络的稳定性

S2150G(config-if)#spanning-tree bpdufilter disabled //禁用Bpdu过滤功能

S2150G(config) #snmp-server community public ro //给交换机启动SNMP协议,便于

StarView网管工具发现

SwitchA # show ip interface 显示三层IP接口的各个属性

SwitchA #show mac-address-table 显示交换机MAC地址表的记录

SwitchA# show running-config 查看交换机的当前配置

SwitchA#show interface fastethernet 0/1 该命令查看接口设置和统计信息

SwitchA# copy running-config startup-config 或SwitchA# write memory

Delete flash: !清除配置文件

Delete flash: !删除VLAN配置文件

虚拟局域网VLAN配置

S2126G(config)# vlan 10 !创建vlan 10

S2126G(config-vlan)# name test10 !将Vlan 10命名为test10

S2126G(config-vlan)# exit !返回交换机全局配置模式

保存配置