单臂路由配置原理:
路由器重新封装MAC 转换VLAN 标签
- 路由器的物理接口可以被划分成多个逻辑接口
- 每个子接口对应一个VLAN网段的网段
- 路由器配置 :
- pc1 ping pc2
- pc2 ping pc1

<Huawei>system-view
[Huawei]vlan batch 10 20
[Huawei]int Ethernet0/0/1
[Huawei-Ethernet0/0/1]port link-type access
[Huawei-Ethernet0/0/1]port default vlan 10
[Huawei]int Ethernet0/0/2
[Huawei-Ethernet0/0/1]port link-type access
[Huawei-Ethernet0/0/1]port default vlan 20
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type trunk
[Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 20
pc1 ping pc2
PC1>ping 10.20.0.20
Ping 10.20.0.20: 32 data bytes, Press Ctrl_C to break
From 10.20.0.20: bytes=32 seq=1 ttl=127 time=78 ms
From 10.20.0.20: bytes=32 seq=2 ttl=127 time=79 ms
From 10.20.0.20: bytes=32 seq=3 ttl=127 time=62 ms
From 10.20.0.20: bytes=32 seq=4 ttl=127 time=78 ms
From 10.20.0.20: bytes=32 seq=5 ttl=127 time=78 ms
--- 10.20.0.20 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 62/75/79 ms
pc2 ping pc1
Ping 10.10.0.10: 32 data bytes, Press Ctrl_C to break
From 10.10.0.10: bytes=32 seq=1 ttl=127 time=78 ms
From 10.10.0.10: bytes=32 seq=2 ttl=127 time=78 ms
From 10.10.0.10: bytes=32 seq=3 ttl=127 time=78 ms
From 10.10.0.10: bytes=32 seq=4 ttl=127 time=94 ms
From 10.10.0.10: bytes=32 seq=5 ttl=127 time=78 ms
--- 10.10.0.10 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 78/81/94 ms
写的不好还望多多包涵多多指教

本文详细介绍了单臂路由的工作原理及配置步骤,包括路由器如何通过重新封装MAC地址和转换VLAN标签来实现不同VLAN间的通信。通过具体的配置示例,展示了如何在路由器上创建子接口对应各VLAN网段,以及如何进行ping测试验证跨VLAN通信的成功。
3797

被折叠的 条评论
为什么被折叠?



