清空配置命令
Erase startup-config
更改交换机名称
Switch-5406Rzl2(config)# hostname Core-1
查看接口
Core-1(config)# show interfaces brief
Status and Counters - Port Status
| Intrusion MDI Flow Bcast
Port Type | Alert Enabled Status Mode Mode Ctrl Limit
------------ ---------- + --------- ------- ------ ---------- ---- ---- -----
A1 100/1000T | No No Down 1000FDx NA off 0
A2 100/1000T | No No Down 1000FDx Auto off 0
A3 100/1000T | No No Down 1000FDx Auto off 0
A4 100/1000T | No No Down 1000FDx Auto off 0
A5 100/1000T | No No Down 1000FDx Auto off 0
<-output omitted->
接口命名
Core-1(config)# interface a13 name Access-1
接口开启和关闭
Core-1(config)# interface a13,a15 enable
Core-1(config)# interface a13,a15 disable
接口配置
untag接口配置(相当于Access接口)
interface 1
untag vlan 10
tag接口配置(相当于Trunk接口)
interface 25
tag vlan 10-13
untag vlan 10 ---- 相当于native vlan
端口聚合配置
interface trk1
tag vlan 10-13
trunk 1-2 trk1
查看本次历史输入命令
Core-1# show history
8 configure
7 interface a1-a24 disable
6 hostname Core-1
5 show interfaces brief
4 interface a13,a15 enable
3 interface a13 name Access-1
2 interface a15 name Access-2
1 exit
查看CPU使用情况
Core-1# show cpu
1 percent busy, from 300 sec ago
1 sec ave: 1 percent busy
5 sec ave: 1 percent busy
1 min ave: 1 percent busy
保存配置
Core-1# write memory
查看配置
Core-1# show run
配置vlan ip地址
Core-1(config)# vlan 2 ip address 192.168.2.1 255.255.255.0
查看接口配置
Core-1 # show run interface A1
重启交换机
Core-1# reload
查看MAC 地址
Core-1# show mac address A1
Core-1# show mac-address xxxxxx-xxxxxx
查看连接设备
Core-1# show lldp info remote-device
In the output, you should see Access-1 and Access-2 as LLDP neighbors.
LLDP Remote Devices Information
LocalPort | ChassisId PortId PortDescr SysName
--------- + ------------------------- ------ --------- ----------------------
A13 | 6c 3b e5 62 08 c0 5 5 Access-1
A15 | 84 34 97 02 23 c0 5 5 Access-2
Core-1# show lldp info remote-device a13
LLDP Remote Device Information Detail
Local Port : A13
ChassisType : mac-address
ChassisId : 6c 3b e5 62 08 c0
PortType : local
PortId : 5
SysName : Access-1
System Descr : HP J9575A 3800-24G-2SFP+ Switch, revision KA.16.01.0006, …
PortDescr : 5
Pvid : 1
System Capabilities Supported : bridge, router
System Capabilities Enabled : bridge
Remote Management Address
Type : ipv4
Address : 10.1.1.3