BGP Outbound Route Filtering (ORF)实验

简介:
在R1与R4之间配置BGP ORF,使R1不能广播155.1.5.0/24 到R4

 
【实验拓扑】

 

【实验基本配置】
1:
interface FastEthernet0/0
ip address 155.1.146.1 255.255.255.0
interface Serial0/0
ip address 155.1.13.1 255.255.255.0
clock rate 2000000
router eigrp 2
network 155.1.13.1 0.0.0.0
no auto-summary
!
router bgp 2
no synchronization
bgp log-neighbor-changes
neighbor 155.1.13.3 remote-as 2
neighbor 155.1.13.3 next-hop-self
neighbor 155.1.23.2 remote-as 2
neighbor 155.1.23.2 next-hop-self
neighbor 155.1.146.4 remote-as 3
no auto-summary

R2:
interface Serial0/0
ip address 155.1.23.2 255.255.255.0
clock rate 2000000
interface Serial0/1
ip address 155.1.0.2 255.255.255.0
encapsulation frame-relay
clock rate 2000000
frame-relay map ip 155.1.0.5 205 broadcast
router eigrp 2
network 155.1.23.2 0.0.0.0
auto-summary
!
router bgp 2
no synchronization
bgp log-neighbor-changes
neighbor 155.1.0.5 remote-as 1
neighbor 155.1.13.1 remote-as 2
neighbor 155.1.13.1 next-hop-self
neighbor 155.1.23.3 remote-as 2
neighbor 155.1.23.3 next-hop-self


R3: (注意R3不用配置next-hop-self,因为它不不是边界路由器)
interface Loopback0
ip address 155.1.37.3 255.255.255.0
interface Serial0/0
ip address 155.1.13.3 255.255.255.0
clock rate 2000000
interface Serial0/1
ip address 155.1.23.3 255.255.255.0
clock rate 2000000
router eigrp 2
network 155.1.13.3 0.0.0.0
network 155.1.23.3 0.0.0.0
auto-summary
!
router bgp 2
no synchronization
bgp log-neighbor-changes
network 155.1.37.0 mask 255.255.255.0
neighbor 155.1.13.1 remote-as 2
neighbor 155.1.23.2 remote-as 2
no auto-summary
R4:
interface Loopback0
ip address 204.12.1.4 255.255.255.0
!
interface FastEthernet0/0
ip address 155.1.146.4 255.255.255.0
router bgp 3
no synchronization
bgp log-neighbor-changes
network 204.12.1.0
neighbor 155.1.146.1 remote-as 2
no auto-summary
R5:
interface Loopback0
ip address 155.1.5.5 255.255.255.0
interface Serial0/0
ip address 155.1.0.5 255.255.255.0
encapsulation frame-relay
clock rate 2000000
frame-relay map ip 155.1.0.2 502 broadcast
router bgp 1
no synchronization
bgp log-neighbor-changes
network 155.1.5.0 mask 255.255.255.0
neighbor 155.1.0.2 remote-as 2
no auto-summary
【实验前验证】
R4#show ip bgp
BGP table version is 4, local router ID is 204.12.1.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
*> 155.1.5.0/24 155.1.146.1 0 2 1 i
*> 155.1.37.0/24 155.1.146.1 0 2 i
*> 204.12.1.0 0.0.0.0 0 32768 i

 

【实验配置】

注意下面配置中标红部分是不需要输入的,是系统在配置完address-family ipv4后自动加入的

 
R1:
router bgp 2
address-family ipv4
neighbor 155.1.13.3 activate
neighbor 155.1.23.2 activate
neighbor 155.1.146.4 activate
neighbor 155.1.146.4 capability orf prefix-list receive

 
R4:
router bgp 3
address-family ipv4
neighbor 155.1.146.1 activate
neighbor 155.1.146.1 capability orf prefix-list send
neighbor 155.1.146.1 prefix-list PERMIT_OTHER in
exit-address-family
!
ip prefix-list 
PERMIT_OTHER
 
permit 
155.1.37.0/24

 
【实验验证】

 
R1#clear ip bgp *
R1#show ip bgp
BGP table version is 8, local router ID is 155.1.146.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
*>i155.1.5.0/24 155.1.23.2 0 100 0 1 i
*>i155.1.37.0/24 155.1.13.3 0 100 0 i
*> 204.12.1.0 155.1.146.4 0 0 3 i
R4#show ip bgp
BGP table version is 3, local router ID is 204.12.1.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
*> 155.1.37.0/24 155.1.146.1 0 2 i
*> 204.12.1.0 0.0.0.0 0 32768 i

R4#clear ip bgp *
R4#ping 155.1.5.5 source 204.12.1.4

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 155.1.5.5, timeout is 2 seconds:
Packet sent with a source address of 204.12.1.4
.....
Success rate is 0 percent (0/5)
R5#show ip bgp
BGP table version is 6, local router ID is 155.1.5.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
*> 155.1.5.0/24 0.0.0.0 0 32768 i
*> 155.1.37.0/24 155.1.0.2 0 2 i
*> 204.12.1.0 155.1.0.2 0 2 3 i

 


 

推介相关文章


本文转自zcm8483 51CTO博客,原文链接:http://blog.51cto.com/haolun/992755
相关文章
|
网络协议 网络架构
RIP(Routing Information Protocol,路由信息协议)
RIP是由Xerox公司在20世纪七十年代开发的,最初定义的RFC1058中。每个有RIP功能的路由器在默认情况下每隔30秒利用UDP520端口向与它直连的网络邻居广播(RIP v1)或组播(RIP v2)路由更新。因此,路由器不知道网络的全局情况,如果路由更新在网络上传播慢,将会导致网络收敛较慢,造成路由环路。为了避免路由环路,RIP采用水平分割、毒性逆转、定义最大跳数、触发更新和抑制计时器等机制来避免路由环路。
511 0
RIP(Routing Information Protocol,路由信息协议)
|
负载均衡 网络协议 网络架构
策略路由(Policy-Based-Route)
定义及运用场景 PBR: Policy-Based-Route,该技术打破了路由表的传统选路规则,可以根据管理员定义的策略条件来选择性的转发数据包。
632 0
策略路由(Policy-Based-Route)
|
网络协议 数据安全/隐私保护
ip-prefix在OSPF和BGP中路由过滤的应用举例。
ip-prefix,路由过路在ospf和bgp中的应用。
6603 0