1.静态路由方式配置VRF
![图片[1]-18.9 VRF基础-大赛人网](https://www.dsrw.com/wp-content/uploads/2023/03/图片1-17.png)
1)R1创建vpn-instance R2,下行端口绑定vpn-instance R2
[R1]ip vpn-instance R2
[R1-vpn-instance-R2]ipv4-family
[R1]interface GigabitEthernet 0/0/2
[R1-GigabitEthernet0/0/2]ip binding vpn-instance R2
Info: All IPv4 related configurations on this interface are removed!
Info: All IPv6 related configurations on this interface are removed!
[R1-GigabitEthernet0/0/2]ip address 192.168.1.254 24
2)PC1连通性测试R1,通信正常
PC>ping 192.168.1.254
Ping 192.168.1.254: 32 data bytes, Press Ctrl_C to break
From 192.168.1.254: bytes=32 seq=1 ttl=255 time=47 ms
3)R1连通性测试PC1,通信不正常
[R1]ping 192.168.1.1
PING 192.168.1.1: 56 data bytes, press CTRL_C to break
Request time out
4)R1使用vpn-instance参数连通性测试PC1,通信正常
[R1]ping -vpn-instance R2 192.168.1.1
PING 192.168.1.1: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.1: bytes=56 Sequence=1 ttl=128 time=10 ms
5)R1上行端口绑定vpn-instance R2
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ip binding vpn-instance R2
Info: All IPv4 related configurations on this interface are removed!
Info: All IPv6 related configurations on this interface are removed!
[R1-GigabitEthernet0/0/0]ip address 12.1.1.1 24
6)R1创建vpn-instance R2静态路由,R2创建静态路由
[R1]ip route-static vpn-instance R2 1.1.1.1 32 12.1.1.2
[R2]ip route-static 192.168.1.0 24 12.1.1.1
7)PC1连通性测试R2的loopback0端口
PC>ping 1.1.1.1
Ping 1.1.1.1: 32 data bytes, Press Ctrl_C to break
From 1.1.1.1: bytes=32 seq=1 ttl=254 time=15 ms
8)R1创建vpn-instance R3,上行、下行端口绑定vpn-instance R3
[R1]ip vpn-instance R3
[R1-vpn-instance-R3]ipv4-family
[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]ip binding vpn-instance R3
Info: All IPv4 related configurations on this interface are removed!
Info: All IPv6 related configurations on this interface are removed!
[R1-GigabitEthernet0/0/1]ip address 13.1.1.1 8
[R1]interface GigabitEthernet 1/0/0
[R1-GigabitEthernet1/0/0]ip binding vpn-instance R3
Info: All IPv4 related configurations on this interface are removed!
Info: All IPv6 related configurations on this interface are removed!
[R1-GigabitEthernet1/0/0]IP address 192.168.2.254 24
9)R1创建vpn-instance R3静态路由,R3创建静态路由
[R1]ip route-static vpn-instance R3 1.1.1.1 32 13.1.1.3
[R3]ip route-static 192.168.2.0 24 13.1.1.1
1 2
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
请登录后查看评论内容