一.测试拓扑:
  
参考链接:
A.Configuring VRF Tables-思科MPLS教程
http://www.doc88.com/p-085712708378.html
B.如何利用VRF在单台路由器上创建多份路由表
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:
①创建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:
①创建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:
①创建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:
①创建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静态路由配置:
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

本文转自 碧云天 51CTO博客,原文链接:http://blog.51cto.com/333234/1107107,如需转载请自行联系原作者

路由器VRF多个虚拟路由器测试相关推荐

  1. 学习VRRP虚拟路由器冗余协议与项目实例

    目录 VRRP定义 VRRP目的 VRRP作用: VRRP好处: VRRP两组重要概念 VRRP的工作原理 VRRP的工作过程: 怎么让路由器成为主路由器? VRRP配置的总结 VRRP项目实例 总结 ...

  2. 虚拟路由器冗余协议(VRRP)原理与实验

    一.基础知识: 虚拟路由冗余协议(VRRP)与热备份路由协议(HSRP)都是一种默认网关冗余方法,它们都是让一组路由器构成一台虚拟路由器.和HSRP不同的是,VRRP是开发的协议,而HSRP是思科专属 ...

  3. 虚拟路由器冗余协议VRRP原理详解!

    虚拟路由器冗余协议VRRP原理详解! https://virtual.51cto.com/art/201905/596666.htm?pc 我们知道,为了实现不同子网之间的设备通信,需要配置路由.目前 ...

  4. 网络基础之虚拟路由器冗余协议(VRRP)理论基础及华为ENSP基础配置

    一. VRRP的引入 局域网中的用户终端通常采用配置一个默认网关的形式访问外部网络,如果此时默认网关设备发生故障,将中断所有用户终端的网络访问,这很可能会给用户带来不可预计的损失,所以可以通过部署多个 ...

  5. 虚拟路由器冗余协议vrrp原理的理解

    VRRP(Virtual Router Redundancy Protocol)虚拟路由器冗余协议 作用 避免由于局域网网关单点故障而导致的网络中断,如下图,如果交换机与外网连接出现故障,则所有的pc ...

  6. ovn 通过网关虚拟路由器连接外部网络

    本文实验如何通过ovn的网关逻辑路由器将ovn网络连接到外部网络. 前面讲过ovn的逻辑路由器是分布式的,这意味着它没有绑定到某个节点上,而是存在于所有节点上的,同时它是通过每个节点的openflow ...

  7. vrrp路由器三种状态_虚拟路由器冗余协议(VRRP)

    虚拟路由器冗余协议(VRRP) 5.1 VRRP协议原理 VRRP协议(Virtual Router Redundancy Protocol,虚拟路由器冗余协议)与HSRP类似,能够提高网络的稳定性和 ...

  8. vrrp路由器三种状态_VRRP路由器切换方法、路由器、VRRP主备切换系统及存储介质与流程...

    本发明涉及虚拟路由冗余协议(VRRP)技术领域,尤其涉及一种VRRP路由器切换方法.路由器.VRRP主备切换系统及存储介质. 背景技术: 虚拟路由冗余协议(Virtual Router Redunda ...

  9. 有没有开源的虚拟路由器?有,VPP了解一下

    VPP(Vector Packet Processing,矢量包处理)平台是一个可扩展的开源框架,提供开箱即用的网络交换机或路由器的功能.VPP技术基于Cisco产品的成熟技术,是思科矢量包处理 (V ...

最新文章

  1. 【Java】学习笔记(1)
  2. mysql输入select now()_mysql 中select now(); 是怎么执行的?没有指定FROM tablename?
  3. 计算机英文文献博客,计算机专业外文文献论文翻译.docx
  4. 1128:图像模糊处理
  5. sumif三个条件怎么填_函数SUMIF和SUMIFS
  6. openssl不是内部或外部命令_OpenSSL新架构蓝图
  7. 阿里巴巴的页面不能被抓取吗_符合百度抓取的高质量内容(72小时秒收录)
  8. Java——IO基础
  9. 2. Javascript 数据类型
  10. db2数据库基础知识
  11. mob AndroidStudio 短信SDK集成
  12. 渗透测试工具Nmap从初级到高级
  13. 压缩包文件密码忘记了文件怎么办?
  14. js获取明天的年月日和计时器
  15. CSS 设置文字间距
  16. 伯努利大数定理(揭示了频率和概率的关系)
  17. Contiki教程——进程
  18. Tansat XCO2数据下载
  19. 正确使用数字化仪前端信号调理功能
  20. 大学生职业生涯规划——我的未来我做主

热门文章

  1. Bea Webblogic
  2. html写一个猜数字游戏,JS实现网页端猜数字小游戏
  3. Mask R-CNN完整翻译
  4. python 英语分词_自然语言处理 | NLTK英文分词尝试
  5. 宽带码分多址系统中多径衰落与多址干扰的影响
  6. 利用confluence搭建wiki
  7. 虎年啦,小老虎带你4.5分钟彻底掌握Linux中的创建-目录-文件(mkdir-touch)
  8. 截取图片DEMO. JAVA Windows FFmpeg
  9. 淘宝批量下单软件 捷易淘宝批量下单软件
  10. 草根博客[很牛逼的,都浏览下] android Graphics(二):路径及文字