vrf路由泄露原理和简单示例

    通过简单示例讲解一下vrf泄露的方法

前提

1、在思科设备里面称为vrf。
2、在华为设备里面称为vpn-instance。

一、原理

需求:vpn-a访问vpn-b

vpn-instance有2个vpn-a和vpn-b。1.1.1.1/24在vpn-b里面,需要从vpn-a去访问vpn-b里面1.1.1.1/24。

1、方法一: 出方向接口是“出接口” (接口E0/0/0属于vpn-b)

这里写图片描述

方法二:出方向接口是“vrf” (vpn-b)

这里写图片描述

二、示例

需求:使R2和R3可以互通

1、拓扑

这里写图片描述

2、配置

1)R1:

interface Vlanif102
 ip binding vpn-instance vpn-a
 ip address 12.1.1.1 255.255.255.0

interface Vlanif103
 ip binding vpn-instance vpn-b
 ip address 13.1.1.1 255.255.255.0
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094

interface GigabitEthernet0/0/2            
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
ip route-static vpn-instance vpn-a 13.1.1.0 255.255.255.0 vpn-instance vpn-b 13.1.1.3
ip route-static vpn-instance vpn-b 12.1.1.0 255.255.255.0 Vlanif102 12.1.1.2

2)R2:

interface Vlanif102
 ip address 12.1.1.2 255.255.255.0

interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
ip route-static 0.0.0.0 0.0.0.0 Vlanif102 12.1.1.1

3)R3:

interface Vlanif103
 ip address 13.1.1.3 255.255.255.0

interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
ip route-static 0.0.0.0 0.0.0.0 Vlanif103 13.1.1.1

3、结果

这里写图片描述

  • 7
    点赞
  • 60
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值