top of page
Search

Route Maps as a primary tool for specifying route policies and manipulating BGP path attributes

  • Writer: sukeshtandon
    sukeshtandon
  • Sep 18, 2018
  • 2 min read







LAB

We will configure Route Map , the objective is to filter on a specific prefix.

AS 64775 - has been configured with the help of redistribute static command for 10.75.0.0

So the prefixes in BGP table will be marked as incomplete.


If BGP looks in the unicast routing table and find the prefix, that it is suppose to advertise then it will set the origin of the prefix to i (IGP)

If it not sure of the origin then ? (redistribute/incomplete)




R2#sh ip bgp

BGP table version is 7, local router ID is 10.2.255.2

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,

x best-external, a additional-path, c RIB-compressed,

Origin codes: i - IGP, e - EGP, ? - incomplete

RPKI validation codes: V valid, I invalid, N Not found


Network Next Hop Metric LocPrf Weight Path

*> 10.16.0.0/16 10.1.1.1 0 65520 64616 i

*> 10.20.0.0/16 10.1.1.1 0 0 65520 i

*> 10.23.0.0/16 10.1.1.1 0 65520 64860 64723 i

*> 10.60.0.0/16 10.1.1.1 0 65520 64860 i

*> 10.75.0.0/16 10.1.1.1 0 65520 64616 64775 ?

*> 192.168.23.0 10.1.1.1 0 65520 64860 64723 i






R2(config)#ip as-path access-list 10 permit _64775$

R2(config)#ip as-path access-list 10 deny _64616$

R2(config)#ip as-path access-list 10 perm

R2(config)#ip as-path access-list 10 permit _64616_

R2(config)#ip as-path access-list 10 deny .*




R2(config)#route-map LESSON permit 10

R2(config-route-map)#match as-path 10

R2(config-route-map)#set weigh 500

R2(config-route-map)#set origin igp


R2(config)#route-map LESSON permit 20

R2(config-route-map)#match ip address prefix-list AS64723

R2(config-route-map)#set weight 200


R2(config)#router bgp 65501

R2(config-router)#neighbor 10.1.1.1 route-map LESSON in



R2#sh ip bgp

BGP table version is 13, local router ID is 10.2.255.2

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,

x best-external, a additional-path, c RIB-compressed,

Origin codes: i - IGP, e - EGP, ? - incomplete

RPKI validation codes: V valid, I invalid, N Not found


Network Next Hop Metric LocPrf Weight Path

*> 10.75.0.0/16 10.1.1.1 500 65520 64616 64775 i

*> 192.168.23.0 10.1.1.1 200 65520 64860 64723 i






R2(config)#route-map LESSON permit 30



R2#sh route-map LESSON

route-map LESSON, permit, sequence 10

Match clauses:

as-path (as-path filter): 10

Set clauses:

weight 500

origin igp

Policy routing matches: 0 packets, 0 bytes

route-map LESSON, permit, sequence 20

Match clauses:

ip address prefix-lists: AS64723

Set clauses:

weight 200

Policy routing matches: 0 packets, 0 bytes

route-map LESSON, permit, sequence 30

Match clauses:

Set clauses:

Policy routing matches: 0 packets, 0 bytes




R2#sh ip bgp

BGP table version is 17, local router ID is 10.2.255.2

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,

x best-external, a additional-path, c RIB-compressed,

Origin codes: i - IGP, e - EGP, ? - incomplete

RPKI validation codes: V valid, I invalid, N Not found


Network Next Hop Metric LocPrf Weight Path

*> 10.16.0.0/16 10.1.1.1 0 65520 64616 i

*> 10.20.0.0/16 10.1.1.1 0 0 65520 i

*> 10.23.0.0/16 10.1.1.1 0 65520 64860 64723 i

*> 10.60.0.0/16 10.1.1.1 0 65520 64860 i

*> 10.75.0.0/16 10.1.1.1 500 65520 64616 64775 i

*> 192.168.23.0 10.1.1.1 200 65520 64860 64723 i


 
 
 

Recent Posts

See All
BGP main loop prevention mechanism

The only usable metric do prevent loops in bgp is the as-path attribute. No EBGP peering neighbors do accepct an update which includes...

 
 
 

Comments


bottom of page