H3C单臂路由的配置
(一)目的
2.sw1的配置:建vlan加端口,配trunk接口
[sw1]vlan 10
[sw1-vlan10]port GigabitEthernet 1/0/1
[sw1]vlan 20
[sw1-vlan20]port GigabitEthernet 1/0/2
[sw1]vlan 30
[sw1-vlan30]port GigabitEthernet 1/0/3
[sw1]interface GigabitEthernet 1/0/9
[sw1-GigabitEthernet1/0/9]port link-type trunk
[sw1-GigabitEthernet1/0/9]port trunk permit vlan all
3.r1的配置:子接口,配IP,封装802.1Q(如果是华为还要启用arp广播)
[r1]interface GigabitEthernet 0/0.1
[r1-GigabitEthernet0/0.1]vlan-type dot1q vid 10
[r1-GigabitEthernet0/0.1]ip add 192.168.10.1 24
[r1-GigabitEthernet0/0.1]qu
[r1]interface GigabitEthernet 0/0.2
[r1-GigabitEthernet0/0.2]vlan-type dot1q vid 20
[r1-GigabitEthernet0/0.2]ip address 192.168.20.1 24
[r1-GigabitEthernet0/0.2]qu
[r1]interface GigabitEthernet 0/0.3
[r1-GigabitEthernet0/0.3]vlan-type dot1q vid 30
[r1-GigabitEthernet0/0.3]ip address 192.168.30.1 24
[r1-GigabitEthernet0/0.3]qu
[r1]
4.验证
用pc1来ping 192.168.10.1
ping192.168.20.2
ping192.168.30.2
————————————————
版权声明:本文为CSDN博主「小樊不烦」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_54000288/article/details/122948235