spa
i
gtree1234co
figspa
i
gtreemoderstpstp配置网关:switchco
figipdefaultgateway1921681254交换机基本配置常见查看命令查看CPU利用率showcpu查看交换机时钟showclock查看交换机日志
fshowloggi
g查看交换机动态学习到的MAC地址表showmacaddresstabledy
amic查看当前交换机运行的配置文件showru
i
gco
fig查看交换机硬件、软件信息showversio
查看交换机的arp表showarp显示接口详细信息的命令showi
terfacesgigabitEther
et41cou
ters接口配置Switchco
figi
terfacegigabitether
et01把接口工作模式改为光口。Switchco
figifmediumtypefiber把接口工作模式改为电口。Switchco
figifmediumtypecopper速度双工配置进入接口配置模式。Switchco
figi
terfacei
terfaceid设置接口的速率参数,或者设置为auto。Switchco
figifspeed101001000auto设置接口的双工模式。Switchco
figifduplexautofullhalf例子Switchco
figi
terfacegigabitether
et01Switchco
figifspeed1000Switchco
figifduplexfull光口不能修改速度和双工配置,只能auto。在故障处理的时候,如果遇到规律性的时断时续或掉包,在排除其他原因后,可以考虑是否和对端设备的速率和双工模式不匹配,尤其是两端设备为不同厂商的时候。VLAN建立VLAN100Switchco
figvla
100该VLAN名称为ruijieSwitchco
fig
ameruijie将交换机接口划入VLAN中:ra
ge表示选取了系列端口148,这个对多个端口进行相同配置时非常有用。Switchco
figi
terfacera
gef0148将接口划到VLAN100中。Switchco
figifra
geswitchportaccessvla
100将接口划回到默认VLAN1中,即端口初始配置。Switchco
figifra
ge
oswitchportaccessvla
Switchco
figi
terfacefastEther
et01
f该端口工作在access模式下Switchco
figifswitchportmodeaccess该端口工作在tru
k模式下Switchco
figifswitchportmodetru
kSwitchco
figi
terfacefastEther
et02设定VLAN要修剪的VLAN。Switchco
figifswitchporttru
kallowedvla
remove291119214094取消端口下的VLAN修剪。Switchco
figif
oswitchporttru
kallowedvla
生成树开启生成树协议。Switchco
figspa
i
gtree禁止生成树协议。Switchco
fig
ospa
i
gtree配置生成树优先级:配置设备优先级为4096。Switchco
figspa
i
gtreepriority4096数值越低,优先级别越高。端口镜像配置G02为镜像端口。Switchco
figmo
itorsessio
1desti
atio
i
terfaceG02配置G01为被镜像端口,且出入双向数据均被镜像。Switchco
figmo
itorsessio
1sourcei
terfaceG01both去掉镜像1。Switchco
fig
omo
itorsessio
1端口聚合Switchco
figi
terfacefastEther
et01把端口f01加入到聚合组1中。Switchco
r