H3C S6520 SI http://www.h3c.com/cn/d_201001/662413_30005_0.htm
H3C MS4320V2-28S-PWR http://www.h3c.com/cn/d_201805/1080763_30005_0.htm#_Toc512692070
H3C S5830V2 http://www.h3c.com/cn/d_201805/1080763_30005_0.htm#_Toc512692070
1、查看信息、创建vlan、端口设置
1、查看交换机整体配置 :display current-configuration 2、进入系统配置模式命令:system-view 3、设备命名 : sysname sw1 4、查看指定端口详细信息:dis int GigabitEthernet 1/0/2 查看本端口信息: [sw1-GigabitEthernet1/0/2]dis this 5、查看交换机上mac地址:[sw1]dis mac-address 6、不再显示警告信息:undo info-center en VLAN相关: 1、查看已有vlan :display vlan 2、查看指定vlan下的所有端口: display vlan 2 3、vlan 信息描述:description neiwang
4、新建vlan命令 : vlan 10 5、把端口加入vlan里面: [H3C]vlan 2 [H3C-vlan2]port GigabitEthernet 1/0/1 或 [sw1-vlan2]port GigabitEthernet 1/0/1 to GigabitEthernet 1/0/10 6、把端口从lvan中删除: [sw1-vlan2]undo port GigabitEthernet 1/0/1
保存命令:save 或 save safely
静态路由:ip route-static 0.0.0.0 0.0.0.0 192.168.1.1
查看端口up或shutdwon状态 : dis interface brief
端口相关: 1、进入端口:interface GigabitEthernet 1/0/2 2、修改端口类型: port link-type { access | hybrid | trunk } 注意:Trunk端口和Hybrid端口之间不能直接切换,只能先设为Access端口,再设置为其它类型端口。
vlan配置示例
配置Switch A # 创建VLAN101,并配置VLAN101的描述字符串为“DMZ”,将端口GigabitEthernet1/0/1加入到VLAN101。 <SwitchA> system-view [SwitchA] vlan 101 [SwitchA-vlan101] description DMZ [SwitchA-vlan101] port GigabitEthernet 1/0/1 [SwitchA-vlan101] quit # 创建VLAN201,将端口GigabitEthernet1/0/2加入到VLAN201。 [SwitchA] vlan 201 [SwitchA-vlan201] port GigabitEthernet 1/0/2 [SwitchA-vlan201] quit 配置Switch B # 创建VLAN101,并配置VLAN101的描述字符串为“DMZ”,将端口GigabitEthernet1/0/11加入到VLAN101。 <SwitchB> system-view [SwitchB] vlan 101 [SwitchB-vlan101] description DMZ [SwitchB-vlan101] port GigabitEthernet 1/0/11 [SwitchB-vlan101] quit # 创建VLAN201,将端口GigabitEthernet1/0/12加入到VLAN201。 [SwitchB] vlan 201 [SwitchB-vlan201] port GigabitEthernet 1/0/12 [SwitchB-vlan201] quit 配置Switch A和Switch B之间的链路 由于Switch A和Switch B之间的链路需要同时传输VLAN101和VLAN201的数据,所以可以配置两端的端口为Trunk端口,且允许这两个VLAN的报文通过。 # 配置Switch A的GigabitEthernet1/0/3端口 [SwitchA] interface GigabitEthernet 1/0/3 [SwitchA-GigabitEthernet1/0/3] port link-type trunk [SwitchA-GigabitEthernet1/0/3] port trunk permit vlan 101 [SwitchA-GigabitEthernet1/0/3] port trunk permit vlan 201 # 配置Switch B的GigabitEthernet1/0/10端口 [SwitchB] interface GigabitEthernet 1/0/10 [SwitchB-GigabitEthernet1/0/10] port link-type trunk [SwitchB-GigabitEthernet1/0/10] port trunk permit vlan 101 [SwitchB-GigabitEthernet1/0/10] port trunk permit vlan 201
2、telnet远程登录
用于telnet登录 # 配置vlan IP [sw1]interface Vlan-interface 1 [sw1-Vlan-interface1]ip address 192.168.56.1 255.255.255.0 # 开启telnet服务 telnet server enable #创建本地用户并设置密码 local-user admin password simple 123456 service-type telnet quit #进入vty0用户界面视图 user-interface vty 0 4(4不是必须的) authentication-mode password set authentication password simple 123456 # 支撑telnet登录 protocol inbound telnet # 命令级别 user network-admin # 中断屏幕显示30行命令 screen-length 30 # 缓冲区存20条命令 history-command max-size 20 # 登录超时时间(分钟) idle-timeout 6
注意:PC连接的网络口必须也是在vlan1下才能ping通!
远程交换机的端口必须在vlan 1 下,因为二层交换机只支持一个管理vlan,默认为vlan 1
3、端口聚合
H3C S5100-SI[EI]系列以太网交换机
http://www.h3c.com/cn/d_201001/662413_30005_0.htm
(1) 采用手工汇聚方式: # 创建手工汇聚组1。 <Sysname> system-view [Sysname] link-aggregation group 1 mode manual # 将以太网端口GigabitEthernet1/0/1至GigabitEthernet1/0/3加入汇聚组1。 [Sysname] interface GigabitEthernet 1/0/1 [Sysname-GigabitEthernet1/0/1] port link-aggregation group 1 [Sysname-GigabitEthernet1/0/1] quit [Sysname] interface GigabitEthernet1/0/2 [Sysname-GigabitEthernet1/0/2] port link-aggregation group 1 [Sysname-GigabitEthernet1/0/2] quit [Sysname] interface GigabitEthernet1/0/3 [Sysname-GigabitEthernet1/0/3] port link-aggregation group 1 (2) 采用静态LACP汇聚方式: # 创建静态汇聚组1。 <Sysname> system-view [Sysname] link-aggregation group 1 mode static # 将以太网端口GigabitEthernet1/0/1至GigabitEthernet1/0/3加入汇聚组1。 [Sysname] interface GigabitEthernet1/0/1 [Sysname-GigabitEthernet1/0/1] port link-aggregation group 1 [Sysname-GigabitEthernet1/0/1] quit [Sysname] interface GigabitEthernet1/0/2 [Sysname-GigabitEthernet1/0/2] port link-aggregation group 1 [Sysname-GigabitEthernet1/0/2] quit [Sysname] interface GigabitEthernet1/0/3 [Sysname-GigabitEthernet1/0/3] port link-aggregation group 1 (3)采用动态LACP汇聚方式: # 开启以太网端口GigabitEthernet1/0/1至GigabitEthernet1/0/3的LACP协议。 <Sysname> system-view [Sysname] interface GigabitEthernet1/0/1 [Sysname-GigabitEthernet1/0/1] lacp enable [Sysname-GigabitEthernet1/0/1] quit [Sysname] interface GigabitEthernet1/0/2 [Sysname-GigabitEthernet1/0/2] lacp enable [Sysname-GigabitEthernet1/0/2] quit [Sysname] interface GigabitEthernet1/0/3 [Sysname-GigabitEthernet1/0/3] lacp enable