H3C交换机常用配置命令
- 格式:doc
- 大小:35.50 KB
- 文档页数:3
登入交换机后默认为用户模式,系统提示符为
查看交换机配置命令
查看CPU使用率
查看内存使用率
查看硬件运行温度
查看vlan信息
查看vlan下所属端口
查看端口信息列表
查看端口信息列表时只查看UP状态端口
查看三层端口IP信息列表
输入system-view进入系统配置模式,系统提示符变为[SW1],可对交换机进行配置
[SW1]
添加vlan 2,将e0/4/2配置为二层交换端口,并划归为vlan 2所属
[SW1]vlan 2
[SW1-vlan2]quit
[SW1]int e0/4/2
[SW1-Ethernet0/4/2]port link-mode bridge
[SW1-Ethernet0/4/2]port access vlan 2
[SW1-Ethernet0/4/2]quit
[SW1]
将g0/0/0配置为三层路由端口,并配置ip地址和子网掩码
[SW1]int g0/0/0
[SW1-GigabitEthernet0/0/0]port link-mode route
[SW1-GigabitEthernet0/0/0]ip add 192.168.1.1 24
[SW1-GigabitEthernet0/0/0]quit
[SW1]
端口的手动开启和关闭,注意红色字体为系统提示信息
[SW1]int g0/0/0
[SW1-GigabitEthernet0/0/0]shut
[SW1-GigabitEthernet0/0/0]
%Aug 25 16:15:02:693 2014 SW1 IFNET/3/LINK_UPDOWN: GigabitEthernet0/0/0 link status is DOWN.
%Aug 25 16:15:02:693 2014 SW1 IFNET/5/LINEPROTO_UPDOWN: Line protocol on the interface GigabitEthernet0/0/0 is DOWN.
[SW1-GigabitEthernet0/0/0]undo shut
[SW1-GigabitEthernet0/0/0]
%Aug 25 16:15:07:498 2014 SW1 IFNET/3/LINK_UPDOWN: GigabitEthernet0/0/0 link status is UP.
%Aug 25 16:15:07:498 2014 SW1 IFNET/5/LINEPROTO_UPDOWN: Line protocol on the interface GigabitEthernet0/0/0 is UP.
[SW1-GigabitEthernet0/0/0]
建立聚合端口100,将e0/4/0和e0/4/1添加到聚合组100,配置聚合端口类型为trunk,指定允许通过vlan2的流量,不允许通过vlan1的流量,注意红色字体为系统提示信息
[SW1]int Bridge-Aggregation 100
[SW1-Bridge-Aggregation100]quit
[SW1]int e0/4/0
[SW1-Ethernet0/4/0]port link-aggregation group 100
[SW1-Ethernet0/4/0]quit
[SW1]int e0/4/1
[SW1-Ethernet0/4/1]port link-aggregation group 100
[SW1-Ethernet0/4/1]quit
[SW1]int Bridge-Aggregation 100
[SW1-Bridge-Aggregation100]port link-type trunk
[SW1-Bridge-Aggregation100]port trunk permit vlan 2
Please wait... Done.
Configuring Ethernet0/4/0... Done.
Configuring Ethernet0/4/1... Done.
[SW1-Bridge-Aggregation100]undo port trunk permit vlan 1
Please wait... Done.
Configuring Ethernet0/4/0... Done.
Configuring Ethernet0/4/1... Done.
[SW1-Bridge-Aggregation100]quit
[SW1]
查看聚合端口号为100的所属物理端口,注意红色字体为系统提示信息
[SW1]dis link verb bri 100
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing