BGP ORF 配置实验(基于前缀)

        BGP ORF(Outbound Route Filtering,出口路由过滤)可以将本端基于前缀的入口策略发送给对端,使对端在路由发送时控制路由的过滤。换句话说:是我把需要的路由策略发给你,你按我的需求来给我发路由

一、拓扑:

二、配置过程:
        1、基础配置,在同一AS内
        2、在 AR4 上配置 ip-prefix 1,只接收 55.5.5.0/24 的路由,对 peer 端使能 orf 发送能力
        3、在 AR5 上配置对 peer 端使能 orf 接收能力
三、详细配置:
[R4]:
interface Serial4/0/0
 link-protocol ppp
 ip address 10.1.45.4 255.255.255.0 
#
interface LoopBack0
 ip address 4.4.4.4 255.255.255.0 
#
bgp 45
 router-id 4.4.4.4
 peer 10.1.45.5 as-number 45 
 #
 ipv4-family unicast
  undo synchronization
  network 4.4.4.0 255.255.255.0 
  network 10.1.45.0 255.255.255.0 
  peer 10.1.45.5 enable
  peer 10.1.45.5 ip-prefix 1 import
  peer 10.1.45.5 capability-advertise orf ip-prefix send
#
ip ip-prefix 1 index 10 permit 55.5.5.0 24 greater-equal 24 less-equal 32
#

[R5]:
interface Serial4/0/0
 link-protocol ppp
 ip address 10.1.45.5 255.255.255.0 
#
interface LoopBack0
 ip address 5.5.5.5 255.255.255.0 
#
interface LoopBack1
 ip address 55.5.5.5 255.255.255.0 
#
bgp 45
 peer 10.1.45.4 as-number 45 
 #
 ipv4-family unicast
  undo synchronization
  network 5.5.5.0 255.255.255.0 
  import-route direct
  peer 10.1.45.4 enable
  peer 10.1.45.4 capability-advertise orf ip-prefix receive
#
四、检查结果:
        1、在 R4 上查看从 R5 上收到的路由:

        2、在 R5 上查看自己的路由和发给 R4 的路由:

        3、在 R5 上查看从 R4 上收到的 orf 策略:

        最后,如果不确定是收还是发,可以在安全的环境下用 both 选项,而不是 receive | send

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值