交换机配置端口类型,vlan间互通。
[Huawei]ip vpn-instance AAA
[Huawei-vpn-instance-AAA]ipv4-family
[Huawei-Vlanif10]ip binding vpn-instance AAA Info: All IPv4 related configurations on this interface are removed! Info: All IPv6 related configurations on this interface are removed! [Huawei-Vlanif10]ip address 192.168.1.1 24
[Huawei]display ip routing-table vpn-instance AAA Route Flags: R - relay, D - download to fib ------------------------------------------------------------------------------ Routing Tables: AAA Destinations : 2 Routes : 2
Destination/Mask Proto Pre Cost Flags NextHop Interface
192.168.1.0/24 Direct 0 0 D 192.168.1.1 Vlanif10 192.168.1.1/32 Direct 0 0 D 127.0.0.1 Vlanif10 [Huawei]ip vpn-instance BBB [Huawei-vpn-instance-BBB]ipv4-family [Huawei-Vlanif20]ip binding vpn-instance BBB [Huawei-Vlanif20]ip address 192.168.1.1 24
[Huawei]display ip routing-table vpn-instance BBB Route Flags: R - relay, D - download to fib ------------------------------------------------------------------------------ Routing Tables: BBB Destinations : 2 Routes : 2
Destination/Mask Proto Pre Cost Flags NextHop Interface
192.168.1.0/24 Direct 0 0 D 192.168.1.1 Vlanif20 192.168.1.1/32 Direct 0 0 D 127.0.0.1 Vlanif20 <Huawei>ping -vpn-instance BBB 192.168.1.10 //在ping后加上对应的vpn实例 PING 192.168.1.10: 56 data bytes, press CTRL_C to break Reply from 192.168.1.10: bytes=56 Sequence=1 ttl=128 time=50 ms Reply from 192.168.1.10: bytes=56 Sequence=2 ttl=128 time=60 ms Reply from 192.168.1.10: bytes=56 Sequence=3 ttl=128 time=50 ms Reply from 192.168.1.10: bytes=56 Sequence=4 ttl=128 time=80 ms Reply from 192.168.1.10: bytes=56 Sequence=5 ttl=128 time=30 ms
--- 192.168.1.10 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 30/54/80 ms
|