热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

隔离公司各个部门虚拟路由器(RIP)

实验拓扑:R1配置:ipvrfretailrd100:100route-targetexport100:100route-targetimport100

实验拓扑:

 

R1配置:

ip vrf retail
rd 100:100
route-target export 100:100
route-target import 100:100
!
ip vrf trading
rd 100:200
route-target export 100:200
route-target import 100:200
mpls label range 100 199
mpls label protocol ldp
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
ip address 12.1.1.1 255.255.255.0
duplex auto
speed auto
mpls ip
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
!
interface FastEthernet0/1.100
encapsulation dot1Q 100
ip vrf forwarding retail
ip address 192.168.14.1 255.255.255.0
!
interface FastEthernet0/1.200
encapsulation dot1Q 200
ip vrf forwarding trading
ip address 172.16.14.1 255.255.255.0
!
router ospf 100
router-id 1.1.1.1
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 12.1.1.0 0.0.0.255 area 0
!
router rip
version 2
no auto-summary
!
address-family ipv4 vrf trading
redistribute bgp 100 metric transparent
network 172.16.0.0
no auto-summary
exit-address-family
!
address-family ipv4 vrf retail
redistribute bgp 100 metric transparent
network 192.168.14.0
no auto-summary
exit-address-family
!
router bgp 100
bgp router-id 1.1.1.1
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 3.3.3.3 remote-as 100
neighbor 3.3.3.3 update-source Loopback0
!
address-family ***v4
neighbor 3.3.3.3 activate
neighbor 3.3.3.3 send-community extended
exit-address-family
!
address-family ipv4 vrf trading
redistribute rip
no synchronization
exit-address-family
!
address-family ipv4 vrf retail
redistribute rip
no synchronization
exit-address-family
!
mpls ldp router-id Loopback0

R2配置:

mpls label range 200 299

mpls label protocol ldp
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 12.1.1.2 255.255.255.0
duplex auto
speed auto
mpls ip
!
interface FastEthernet0/1
ip address 23.1.1.2 255.255.255.0
duplex auto
speed auto
mpls ip
!
router ospf 100
router-id 2.2.2.2
log-adjacency-changes
network 2.2.2.2 0.0.0.0 area 0
network 12.1.1.0 0.0.0.255 area 0
network 23.1.1.0 0.0.0.255 area 0
!
mpls ldp router-id Loopback0
R3配置:

ip vrf retail
rd 100:100
route-target export 100:100
route-target import 100:100
!
ip vrf trading
rd 100:200
route-target export 100:200
route-target import 100:200
!
mpls label range 300 399
mpls label protocol ldp
!
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.100
encapsulation dot1Q 100
ip vrf forwarding retail
ip address 192.168.35.3 255.255.255.0
!
interface FastEthernet0/0.200
encapsulation dot1Q 200
ip vrf forwarding trading
ip address 172.16.35.3 255.255.255.0
!
interface FastEthernet0/1
ip address 23.1.1.3 255.255.255.0
duplex auto
speed auto
mpls ip
!
router ospf 100
router-id 3.3.3.3
log-adjacency-changes
network 3.3.3.3 0.0.0.0 area 0
network 23.1.1.0 0.0.0.255 area 0
!
router rip
version 2
no auto-summary
!
address-family ipv4 vrf trading
redistribute bgp 100 metric transparent
network 172.16.0.0
no auto-summary
exit-address-family
!
address-family ipv4 vrf retail
redistribute bgp 100 metric transparent
network 192.168.35.0
no auto-summary
exit-address-family
!
router bgp 100
bgp router-id 3.3.3.3
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 update-source Loopback0
!
address-family ***v4
neighbor 1.1.1.1 activate
neighbor 1.1.1.1 send-community extended
exit-address-family
!
address-family ipv4 vrf trading
redistribute rip
no synchronization
exit-address-family
!
address-family ipv4 vrf retail
redistribute rip
no synchronization
exit-address-family
!
mpls ldp router-id Loopback0
R4配置:

ip vrf retail
rd 1:1
!
ip vrf trading
rd 2:2
!
!
interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
interface Loopback1
ip vrf forwarding trading
ip address 20.1.1.4 255.255.255.0
ip ospf network point-to-point
!
interface FastEthernet0/0
ip vrf forwarding retail
ip address 10.1.1.4 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
!
interface FastEthernet0/1.100
encapsulation dot1Q 100
ip vrf forwarding retail
ip address 192.168.14.4 255.255.255.0
!
interface FastEthernet0/1.200
encapsulation dot1Q 200
ip vrf forwarding trading
ip address 172.16.14.4 255.255.255.0
!
router rip
version 2
no auto-summary
!
address-family ipv4 vrf trading
network 20.0.0.0
network 172.16.0.0
no auto-summary
exit-address-family
!
address-family ipv4 vrf retail
network 10.0.0.0
network 192.168.14.0
no auto-summary
exit-address-family
R5配置:
 

ip vrf retail
rd 1:1
!
ip vrf trading
rd 2:2
!
interface Loopback0
ip address 5.5.5.5 255.255.255.255
!
interface Loopback1
ip vrf forwarding trading
ip address 40.1.1.5 255.255.255.0
ip ospf network point-to-point
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.100
encapsulation dot1Q 100
ip vrf forwarding retail
ip address 192.168.35.5 255.255.255.0
!
interface FastEthernet0/0.200
encapsulation dot1Q 200
ip vrf forwarding trading
ip address 172.16.35.5 255.255.255.0
!
interface FastEthernet0/1
ip vrf forwarding retail
ip address 30.1.1.5 255.255.255.0
duplex auto
speed auto
!
router rip
version 2
no auto-summary
!
address-family ipv4 vrf trading
network 40.0.0.0
network 172.16.0.0
no auto-summary
exit-address-family
!
address-family ipv4 vrf retail
network 30.0.0.0
network 192.168.35.0
no auto-summary
exit-address-family

验证

 



推荐阅读
  • MPLS VP恩 后门链路shamlink实验及配置步骤
    本文介绍了MPLS VP恩 后门链路shamlink的实验步骤及配置过程,包括拓扑、CE1、PE1、P1、P2、PE2和CE2的配置。详细讲解了shamlink实验的目的和操作步骤,帮助读者理解和实践该技术。 ... [详细]
  • 在Android开发中,使用Picasso库可以实现对网络图片的等比例缩放。本文介绍了使用Picasso库进行图片缩放的方法,并提供了具体的代码实现。通过获取图片的宽高,计算目标宽度和高度,并创建新图实现等比例缩放。 ... [详细]
  • Linux重启网络命令实例及关机和重启示例教程
    本文介绍了Linux系统中重启网络命令的实例,以及使用不同方式关机和重启系统的示例教程。包括使用图形界面和控制台访问系统的方法,以及使用shutdown命令进行系统关机和重启的句法和用法。 ... [详细]
  • 开发笔记:加密&json&StringIO模块&BytesIO模块
    篇首语:本文由编程笔记#小编为大家整理,主要介绍了加密&json&StringIO模块&BytesIO模块相关的知识,希望对你有一定的参考价值。一、加密加密 ... [详细]
  • Java容器中的compareto方法排序原理解析
    本文从源码解析Java容器中的compareto方法的排序原理,讲解了在使用数组存储数据时的限制以及存储效率的问题。同时提到了Redis的五大数据结构和list、set等知识点,回忆了作者大学时代的Java学习经历。文章以作者做的思维导图作为目录,展示了整个讲解过程。 ... [详细]
  • baresip android编译、运行教程1语音通话
    本文介绍了如何在安卓平台上编译和运行baresip android,包括下载相关的sdk和ndk,修改ndk路径和输出目录,以及创建一个c++的安卓工程并将目录考到cpp下。详细步骤可参考给出的链接和文档。 ... [详细]
  • Java学习笔记之面向对象编程(OOP)
    本文介绍了Java学习笔记中的面向对象编程(OOP)内容,包括OOP的三大特性(封装、继承、多态)和五大原则(单一职责原则、开放封闭原则、里式替换原则、依赖倒置原则)。通过学习OOP,可以提高代码复用性、拓展性和安全性。 ... [详细]
  • IjustinheritedsomewebpageswhichusesMooTools.IneverusedMooTools.NowIneedtoaddsomef ... [详细]
  • RouterOS 5.16软路由安装图解教程
    本文介绍了如何安装RouterOS 5.16软路由系统,包括系统要求、安装步骤和登录方式。同时提供了详细的图解教程,方便读者进行操作。 ... [详细]
  • 本文介绍了如何在Mac上使用Pillow库加载不同于默认字体和大小的字体,并提供了一个简单的示例代码。通过该示例,读者可以了解如何在Python中使用Pillow库来写入不同字体的文本。同时,本文也解决了在Mac上使用Pillow库加载字体时可能遇到的问题。读者可以根据本文提供的示例代码,轻松实现在Mac上使用Pillow库加载不同字体的功能。 ... [详细]
  • 本文整理了Java中java.lang.NoSuchMethodError.getMessage()方法的一些代码示例,展示了NoSuchMethodErr ... [详细]
  • 本文介绍了一个Magento模块,其主要功能是实现前台用户利用表单给管理员发送邮件。通过阅读该模块的代码,可以了解到一些有关Magento的细节,例如如何获取系统标签id、如何使用Magento默认的提示信息以及如何使用smtp服务等。文章还提到了安装SMTP Pro插件的方法,并给出了前台页面的代码示例。 ... [详细]
  • 使用Ubuntu中的Python获取浏览器历史记录原文: ... [详细]
  • 不同优化算法的比较分析及实验验证
    本文介绍了神经网络优化中常用的优化方法,包括学习率调整和梯度估计修正,并通过实验验证了不同优化算法的效果。实验结果表明,Adam算法在综合考虑学习率调整和梯度估计修正方面表现较好。该研究对于优化神经网络的训练过程具有指导意义。 ... [详细]
  • iOS超签签名服务器搭建及其优劣势
    本文介绍了搭建iOS超签签名服务器的原因和优势,包括不掉签、用户可以直接安装不需要信任、体验好等。同时也提到了超签的劣势,即一个证书只能安装100个,成本较高。文章还详细介绍了超签的实现原理,包括用户请求服务器安装mobileconfig文件、服务器调用苹果接口添加udid等步骤。最后,还提到了生成mobileconfig文件和导出AppleWorldwideDeveloperRelationsCertificationAuthority证书的方法。 ... [详细]
author-avatar
可怜的绷带_565
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有