华为交换机之vlan之间通信的实现

基于二层交换机的vlan之间通信-(单臂路由)

交换机配置
[2S]interface e0/0/1
port link-type access  #设置端口模式,默认模式是不能加入vlan的
[2S]interface e0/0/2
port link-type access
[2S]interface e0/0/3
port link-type access
[2S]interface g0/0/24
port link-type trunk
port trunk allow-pass vlan all   #允许所有vlan的数据通过
[2S]vlan 100          #创建vlan
port ethernet 0/0/1
[2S]vlan 200
port ethernet 0/0/2
[2S]vlan 300
port ethernet 0/0/3

(R)路由器配置
[R]interface g0/0/0.1
dot1q termin vid 100 #开启处理标记的功能,添加和删除标记
arp broadcast enable #如果不开启,只能收不能发
ip address 192.168.10.254 255.255.255.0
[R]interface g0/0/0.2
dot1q termin vid 200
arp broadcast enable
ip address 192.168.20.254 255.255.255.0
[R]interface g0/0/0.3
dot1q termin vid 300
arp broadcast enable
ip address 192.168.30.254 255.255.255.0

基于三层交换机的vlan之间通信

[3S]interface g0/0/1
port link-type access
[3S]interface g0/0/2
port link-type access
[3S]interface g0/0/3
port link-type access
[3S]vlan 100
port g 0/0/1
[3S]vlan 200
port g 0/0/2
[3S]vlan 300
port g 0/0/3
[3S]interface vlanif 100
ip address 192.168.10.254 255.255.2550
[3S]interface vlanif 200
ip address 192.168.20.254 255.255.2550
[3S]interface vlanif 300
ip address 192.168.30.254 255.255.2550
声明:本文为原创,作者为 辣条①号,转载时请保留本声明及附带文章链接:https://boke.wsfnk.com/archives/70.html
谢谢你请我吃辣条谢谢你请我吃辣条

如果文章对你有帮助,欢迎点击上方按钮打赏作者

最后编辑于:2022/11/21作者: 辣条①号

现在在做什么? 接下来打算做什么? 你的目标什么? 期限还有多少? 进度如何? 不负遇见,不谈亏欠!

暂无评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

arrow grin ! ? cool roll eek evil razz mrgreen smile oops lol mad twisted wink idea cry shock neutral sad ???

文章目录