H3C三层交换机配置笔记
- 进入系统视图
system-view
- 显示当前详细配置
display current-configuration
或者
dis cu
- 显示vlan明细
display vlan all
display vlan 1
- 显示三层聚合接口状态
display interface Route-Aggregation1
- 显示端口归属
display link-aggregation verbose
- 显示端口
display interface brief
- 显示协议状态
display interface
- 进入vlan
vlan 1
- 启动接口
undo shutdown
- 关闭接口
shutdown
- 更改描述
description xxx
- 进入vlan接口
interface Vlan-interface1
- 配置接口ip
ip address 10.92.232.254 255.255.255.0
- 启用接口
undo shutdown
- 进入接口
interface GigabitEthernet1/0/2
或者
interface range GigabitEthernet1/0/1 to GigabitEthernet1/0/2
- 接口调成桥接
port link-mode bridge
- 端口划入vlan
port access vlan 1
- 启用接口
undo shutdown
- 静态路由配置
undo ip route-static 10.92.232.0 255.255.255.0 Vlan-interface1
查看完整路由表
display ip routing-table
- 聚合组
system-view
# 第一步:删除VLAN239及相关配置
interface Vlan-interface239
undo ip address 10.92.239.2 255.255.255.252 # 删除接口IP
shutdown # 关闭接口
quit
undo vlan 239 # 删除VLAN定义
# 第二步:清除原聚合组配置(Bridge-Aggregation1)
interface Bridge-Aggregation1
undo port link-aggregation group # 解除聚合组成员
undo interface Bridge-Aggregation1 # 删除聚合组(如有配置)
quit
# 第三步:创建新聚合组(以Bridge-Aggregation2为例)
interface Bridge-Aggregation2
description UPLINK_TO_IT_CORE
port link-mode route # 设置为三层聚合接口
link-aggregation mode dynamic # 启用LACP动态聚合
ip address 10.92.239.2 255.255.255.252 # 保持原有IP配置
undo shutdown # 启用接口
quit
# 第四步:将50/51端口加入新聚合组
interface Ten-GigabitEthernet1/0/50
port link-mode route # 切换为三层模式
port link-aggregation group 2 # 加入聚合组2
undo shutdown
quit
interface Ten-GigabitEthernet1/0/51
port link-mode route # 切换为三层模式
port link-aggregation group 2 # 加入聚合组2
undo shutdown
quit
# 第五步:恢复默认路由(指向IT汇聚端)
ip route-static 0.0.0.0 0 10.92.239.1
# 保存配置
save
- 验证命令
# 查看聚合组状态
display link-aggregation summary
# 应显示:
# Aggregation Interface Type:
# Bridge-Aggregation2 Dynamic S--R-U-
# 检查IP配置
display ip interface brief | include Bridge-Aggregation2
# 应显示:
# Bridge-Aggregation2 10.92.239.2/30 UP UP
# 验证路由表
display ip routing-table | include 0.0.0.0
# 应显示:
# 0.0.0.0/0 Static 60 0 10.92.239.1 Bridge-Aggregation2
# 测试连通性
ping -a 10.92.239.2 10.92.239.1
- 可参考的
system-view
# 1. 清除VLAN 1的IP配置(关键!)
interface Vlan-interface1
undo ip address 10.92.232.101
shutdown
quit
# 2. 重建管理VLAN 232
vlan 232
description Management_VLAN
quit
interface Vlan-interface232
ip address 10.92.232.101 255.255.255.0
undo shutdown
quit
# 3. 清理VLAN 1的端口成员(逐个端口操作)
interface range FortyGigE1/0/53 to FortyGigE1/0/54
undo vlan 1
quit
interface range GigabitEthernet1/0/1 to GigabitEthernet1/0/2
undo vlan 1
quit
interface GigabitEthernet1/0/47 to GigabitEthernet1/0/48
undo vlan 1
quit
# 4. 修正VLAN 239聚合组配置
interface Bridge-Aggregation2
port link-type trunk
port trunk permit vlan only 239 # 仅允许VLAN 239
undo vlan 1 # 移除VLAN 1关联
quit
# 5. 重新分配管理端口(示例:G1/0/48)
interface GigabitEthernet1/0/48
port access vlan 232
description Management_Port
undo shutdown
quit
# 6. 恢复默认路由
ip route-static 0.0.0.0 0 10.92.239.1
# 保存配置
save
- 启用ssh
system-view
local-user admin class manage
service-type ssh
authorization-attribute user-role level-15
quit
local-user admin class manage
password simple Jmc0707!
quit
ssh server enable
本文是原创文章,采用 CC BY-NC-SA 4.0 协议,完整转载请注明来自 QNAPClubCN
评论
匿名评论
隐私政策
你无需删除空行,直接评论以获取最佳展示效果