目前我这边网络拓扑结构为:
核心交换机(H3C-5500EI)--楼层交换机(H3C5024EI ACCESS Vlan接到下级普通交换机)--办公室交换机(普通交换机)VLAN100(192.168.1.0/24)
监控交换机(上联核心交换机ACCESS Vlan110,普通交换机)Vlan110(10.10.10.0/21) (由于现场情况复杂,只能将设备接入这个普通交换机,设备设置IP地址为192.168.1.200-210 /24)
现在想让监控交换机(普通交换机)内的192.168.1.200-210这段IP在核心交换机内配置为基于IP的VLAN,让这些地址能与VLAN100相互访问,而且核心交换机内仍需传输原先的Vlan110。
每个交换机距离很远,没开启telnet,我只想配置一台核心交换机。有大神能给参考命令吗?
(0)
最佳答案
1.7.2 配置基于IP子网的VLAN
https://www.h3c.com/cn/d_201101/707256_30005_0.htm#_Toc280606324
(0)
看过这个说明了,不是很理解
https://jingyan.baidu.com/article/72ee561a58764ae16138df29.html
您好,请知:
以下是基于IP子网的典型配置举例,请参考:
如图1-9所示,办公区的主机属于不同的网段192.168.5.0/24和192.168.50.0/24,Device C在收到来自办公区主机的报文时,根据报文的源IP地址,使来自不同网段主机的报文分别在指定的VLAN中传输。
图1-9 基于IP子网的VLAN组网图
创建VLAN100、VLAN200,配置子网与VLAN的关联关系,并配置端口与VLAN的关联关系。
<DeviceC> system-view
# 配置子网192.168.5.0/24与VLAN 100关联。
[DeviceC] vlan 100
[DeviceC-vlan100] ip-subnet-vlan ip 192.168.5.0 255.255.255.0
[DeviceC-vlan100] quit
# 配置子网192.168.50.0/24与VLAN 200关联。
[DeviceC] vlan 200
[DeviceC-vlan200] ip-subnet-vlan ip 192.168.50.0 255.255.255.0
[DeviceC-vlan200] quit
# 配置端口GigabitEthernet 1/0/11,使其允许通过VLAN 100的报文。
[DeviceC] interface gigabitethernet 1/0/11
[DeviceC-GigabitEthernet1/0/11] port link-type hybrid
[DeviceC-GigabitEthernet1/0/11] port hybrid vlan 100 tagged
Please wait... Done.
[DeviceC-GigabitEthernet1/0/11] quit
# 配置端口GigabitEthernet 1/0/12,使其允许通过VLAN 200的报文。
[DeviceC] interface gigabitethernet 1/0/12
[DeviceC-GigabitEthernet1/0/12] port link-type hybrid
[DeviceC-GigabitEthernet1/0/12] port hybrid vlan 200 tagged
Please wait... Done.
[DeviceC-GigabitEthernet1/0/12] quit
# 配置端口GigabitEthernet 1/0/1,使其和基于IP子网的VLAN 100、VLAN 200关联。
[DeviceC] interface gigabitethernet 1/0/1
[DeviceC-GigabitEthernet1/0/1] port link-type hybrid
[DeviceC-GigabitEthernet1/0/1] port hybrid vlan 100 200 untagged
Please wait... Done.
[DeviceC-GigabitEthernet1/0/1] port hybrid ip-subnet-vlan vlan 100
[DeviceC-GigabitEthernet1/0/1] port hybrid ip-subnet-vlan vlan 200
[DeviceC-GigabitEthernet1/0/1] return
# 查看所有VLAN的IP子网信息。
<Device C> display ip-subnet-vlan vlan all
VLAN ID: 100
Subnet Index IP Address Subnet Mask
====================================================
0 192.168.5.0 255.255.255.0
VLAN ID: 200
Subnet Index IP Address Subnet Mask
====================================================
0 192.168.50.0 255.255.255.0
# 查看端口GigabitEthernet 1/0/1上所配置的IP子网VLAN信息。
<DeviceC> display ip-subnet-vlan interface gigabitethernet 1/0/1
Interface: GigabitEthernet1/0/1
VLAN ID Subnet-Index IP ADDRESS NET MASK
=======================================================
100 0 192.168.5.0 255.255.255.0
200 0 192.168.50.0 255.255.255.0
基于IP子网的VLAN只对Hybrid端口配置才有效。
在完成上述配置后,在任意视图下执行display命令可以显示配置后VLAN的运行情况,通过查看显示信息验证配置的效果。
在用户视图下执行reset命令可以清除接口统计信息。
表1-13 VLAN显示和维护
操作 | 命令 |
显示VLAN相关信息 | display vlan [ vlan-id1 [ to vlan-id2 ] | all | dynamic | reserved | static ] [ | { begin | exclude | include } regular-expression ] |
显示VLAN接口相关信息 | display interface [ vlan-interface ] [ brief [ down ] ] [ | { begin | exclude | include } regular-expression ] display interface vlan-interface vlan-interface-id [ brief ] [ | { begin | exclude | include } regular-expression ] |
显示设备上当前存在的Hybrid或Trunk端口 | display port { hybrid | trunk } [ | { begin | exclude | include } regular-expression] |
显示MAC-VLAN表项 | display mac-vlan { all | dynamic | mac-address mac-address [ mask mac-mask] | static | vlan vlan-id } [ | { begin | exclude | include } regular-expression ] |
显示所有使能了MAC VLAN功能的接口 | display mac-vlan interface [ | { begin | exclude | include } regular-expression ] |
显示指定VLAN上配置的协议信息及协议的索引 | display protocol-vlan vlan { vlan-id [ to vlan-id ] | all } [ | { begin | exclude | include } regular-expression ] |
显示指定端口上已配置的协议VLAN的相关信息 | display protocol-vlan interface { interface-type interface-number [ to interface-type interface-number ] | all } [ | { begin | exclude | include } regular-expression ] |
显示指定VLAN上配置的IP子网VLAN信息及IP子网的索引 | display ip-subnet-vlan vlan { vlan-id1 [ to vlan-id2 ] | all } [ | { begin | exclude | include } regular-expression ] |
显示指定端口上配置的IP子网VLAN信息及IP子网的索引 | display ip-subnet-vlan interface { interface-list | all } [ | { begin | exclude | include } regular-expression ] |
清除接口的统计信息 | reset counters interface vlan-interface [ vlan-interface-id ] |
(2)
已按照你的案例解决问题,非常感谢
已按照你的案例解决问题,非常感谢
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
https://jingyan.baidu.com/article/72ee561a58764ae16138df29.html