路由器VRF多个虚拟路由器测试
一.測試拓?fù)?#xff1a;
 ??
 參考鏈接:
 A.Configuring VRF Tables-思科MPLS教程
http://www.doc88.com/p-085712708378.html
 B.如何利用VRF在單臺路由器上創(chuàng)建多份路由表
http://net.zdnet.com.cn/files/all-2081627.htm
 C.在Cisco路由器上配置VRF-aware IPsec VPN
http://networking.ctocio.com.cn/76/12336576.shtml
二.基本配置:
A.SW1:
 ①創(chuàng)建VLAN
 vlan database?
 vlan 11
 vlan 12
 ?exit
 ②接口劃入VLAN
 interface FastEthernet0/1
 ?switch mode access
 ?switchport access vlan 11
 ?no shut
 interface FastEthernet0/2
 ?switch mode access
 ?switchport access vlan 12
 ?no shut
 ③trunk接口配置
 interface FastEthernet0/0
 ?sw trunk encapsulation dot1q?
 ?switchport mode trunk
 ?no shut
B.R1:
 ①創(chuàng)建VRF
 ip vrf vd01
 ?rd 1:1
 ip vrf vd02
 ?rd 2:2
 ②劃分子接口,并將子接口劃分到vrf中
 ---處于不同vrf的子接口IP可以相同
 interface FastEthernet0/0
 ?no shut
 interface FastEthernet0/0.11
 ?encapsulation dot1Q 11
 ?ip vrf forwarding vd01
 ?ip address 10.1.1.1 255.255.255.0
 interface FastEthernet0/0.12
 ?encapsulation dot1Q 12
 ?ip vrf forwarding vd02
 ?ip address 10.1.1.1 255.255.255.0
 interface FastEthernet1/0
 ?no shut
 interface FastEthernet1/0.21
 ?encapsulation dot1Q 21
 ?ip vrf forwarding vd01
 ?ip address 202.100.1.1 255.255.255.0
 interface FastEthernet1/0.22
 ?encapsulation dot1Q 22
 ?ip vrf forwarding vd02
 ?ip address 202.100.1.1 255.255.255.0
 ③測試:
 1.路由器能ping通VRF的接口地址
 R1#ping vrf vd01 10.1.1.1
 Type escape sequence to abort.
 Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
 !!!!!
 Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/4 ms
 R1#
 R1#ping vrf vd02 10.1.1.1
 Type escape sequence to abort.
 Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
 !!!!!
 Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
 R1#
 R1#ping vrf vd01 202.100.1.1
 Type escape sequence to abort.
 Sending 5, 100-byte ICMP Echos to 202.100.1.1, timeout is 2 seconds:
 !!!!!
 Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
 R1#ping vrf vd02 202.100.1.1
 Type escape sequence to abort.
 Sending 5, 100-byte ICMP Echos to 202.100.1.1, timeout is 2 seconds:
 !!!!!
 Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/4 ms
 R1#
 2.兩個VPC配置相同的地址,都能ping通路由器的子接口地址
 ?
C.R2:
 ①創(chuàng)建VRF
 ip vrf vd01
 ?rd 1:1
 ip vrf vd02
 ?rd 2:2
 ②劃分子接口,并將子接口劃分到vrf中
 ---處于不同vrf的子接口IP可以相同
 interface FastEthernet0/0
 ?no shut
 interface FastEthernet0/0.11
 ?encapsulation dot1Q 11
 ?ip vrf forwarding vd01
 ?ip address 20.1.1.1 255.255.255.0
 interface FastEthernet0/0.12
 ?encapsulation dot1Q 12
 ?ip vrf forwarding vd02
 ?ip address 20.1.1.1 255.255.255.0
 interface FastEthernet1/0
 ?no shut
 interface FastEthernet1/0.21
 ?encapsulation dot1Q 21
 ?ip vrf forwarding vd01
 ?ip address 202.100.1.2 255.255.255.0
 interface FastEthernet1/0.22
 ?encapsulation dot1Q 22
 ?ip vrf forwarding vd02
 ?ip address 202.100.1.2 255.255.255.0
 ③測試:
 R2#ping vrf vd01 202.100.1.1
 Type escape sequence to abort.
 Sending 5, 100-byte ICMP Echos to 202.100.1.1, timeout is 2 seconds:
 .!!!!
 Success rate is 80 percent (4/5), round-trip min/avg/max = 20/42/80 ms
 R2#ping vrf vd02 202.100.1.1
 Type escape sequence to abort.
 Sending 5, 100-byte ICMP Echos to 202.100.1.1, timeout is 2 seconds:
 .!!!!
 Success rate is 80 percent (4/5), round-trip min/avg/max = 36/53/80 ms
 R2#
 ---R2能ping通R2的相連的子接口地址
D.SW2:
 ①創(chuàng)建VLAN
 vlan database?
 vlan 11
 vlan 12
 ?exit
 ②接口劃入VLAN
 interface FastEthernet0/1
 ?switch mode access
 ?switchport access vlan 11
 ?no shut
 interface FastEthernet0/2
 ?switch mode access
 ?switchport access vlan 12
 ?no shut
 ③trunk接口配置
 interface FastEthernet0/0
 ?sw trunk encapsulation dot1q?
 ?switchport mode trunk
 ?no shut
 ④測試:
 VPC3和VPC4配置相同ip地址能ping通路由器的子接口地址
 ?
三.VRF靜態(tài)路由配置:
A.R1:
 ip route vrf vd01 20.1.1.0 255.255.255.0 202.100.1.2
 ip route vrf vd02 20.1.1.0 255.255.255.0 202.100.1.2
B.R2:
 ip route vrf vd01 10.1.1.0 255.255.255.0 202.100.1.1
 ip route vrf vd02 10.1.1.0 255.255.255.0 202.100.1.1
四.效果測試:
 VPC1能ping通VPC3,VPC2能ping通VPC4
本文轉(zhuǎn)自 碧云天 51CTO博客,原文鏈接:http://blog.51cto.com/333234/1107107,如需轉(zhuǎn)載請自行聯(lián)系原作者
總結(jié)
以上是生活随笔為你收集整理的路由器VRF多个虚拟路由器测试的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: 抵制360的10个理由
- 下一篇: 共享出行的最后一片战场
