BGP II

Categories

Study

RR (Route Reflector):
As we know BGP have loop prevention mechanism for iBGP where Route learned from an iBGP peer must not be advertised to any other iBGP Peer. Therefore we have a requirement where all iBGP Peer should be connected in logical Full mesh topology to exchange route information and this is not scalable solution in Large networks. To overcome from this BGP came up with Route reflector feature, which do below two things:

  • Route reflector is the way to reduce number of IBGP peer Connection.
  • Minimize Prefix Replication (send update to the RR and RR send update to its “peer or client”)

RR peer:

  1. EBGP Peer: – As normal EBGP peer (neighbor in different AS). 
  2. Client Peer: – IBGP peer with “route-reflector-client” is known as Client Peer.
  3. Non-Client Peer: – A BGP peer that functions as neither an RR nor a client is called a non-client means basically IBGP peer without  “route-reflector-client” command.

RR updates Processing

  1. If RR learns route from EBGP peer or client Peer then advertise to EBGP peer, client peer and non-client peer. Here we can see RR is allowing to break the iBGP loop avoidance rule. 
  2. If RR learns route from “Non-Client Peer” then advertise the route to EBGP peer and Client peer means don’t advertise other Non-client peer.

In short we have to remember that routes learnt from non-client peer can’t be advertised to other non-clients Peer.

To prevent routing loops, RR use two Path Attribute:-

In Below diagram eva-wr01 and eva-wr02 are acting as RR. eva-wr03 and eva-wr04 are both clients with both RR. eva-wr01 and eva-wr02 are normal iBGP Peer.

  • The RR adds the Originator ID to the routes received from its RR-clients.
  • The RR appends its own Router ID to the Cluster List attribute.
  1. Originator_ID:-this 4 byte attribute is created by RR; this is the Router-ID of router that originated the prefix.  If the originator of Prefix receive update with its own router-ID, it will ignore that Prefix.
  2. Cluster_ID : When RR advertise prefix to its peer than add cluster-id to that prefix’s Cluster-list. When RR receives update with its own cluster-id in cluster-list, it will ignore that update.**RR and its clients are collectively known as “Cluster”.Each cluster must be uniquely identified and cluster-ID is the router-ID of RR unless specifically configured.**we can use multiple RR in single Cluster and multiple clusters within single AS. RR can be client of another RR.

Let’s have a look in below output. I did debug at eva-wr03 and eva-wr03 is advertising 3.3.3.3/32 to RR and RR will add Originator_ID therefore when eva-wr03 will receive same network from RR then will ignore the route.

show ip bgp 3.3.3.3 output at all router as below:

 

Route Summarization:

There are two ways to do summarization in BGP:-

  1. Create static entry in R.T for summary address and advertise with Network Command.
  2. Route summarization using aggregate-address: At least one route from the summary address’ IP block has to be in the BGP table to get BGP to advertise the aggregate-addresses.

 

 

1.  R2(config-router)#aggregate-address 20.0.0.0 255.255.252.0

We are receiving Summary route as well as more specific routes means more specific routes are not suppressed.

2. R2(config-router)#aggregate-address 20.0.0.0 255.255.252.0 summary-only

Summary-only keyword will suppress all the prefixes therefore we are receiving only summary routes as below not more specific route.

Here we have to notice that two new attributes (aggregator and atomic-aggregate) are added to summary route.
The purpose of these attribute is to alert BGP peer along the path that some information have been lost due to the route aggregation process.

Aggregate:-aggregate attribute identifies the AS number that aggregation was performed and it also identifies the router-ID of router that performed the aggregation.

Atomic-Aggregate:-By default when aggregation is configured in BGP, the “atomic-aggregate” attribute is attached to the aggregate address; this alarms the administrator that certain information could be hidden. This is an attribute that is assigned to aggregate route automatically if “AS-Set” argument is not used “aggregate-address” command.

3. R2(config-router)#aggregate-address 20.0.0.0 255.255.252.0 summary-only as-set

we can see after using “as-set” key-word atomic-aggregate attribute  is no longer attached with the aggregate address and we see AS path information along with summary route.

4. R2(config-router)#aggregate-address 20.0.0.0 255.255.252.0 suppress-map SUPPRESS_ROUTE_1

{R2(config)#do sh run | sec route-map
route-map SUPPRESS_ROUTE_1 permit 10
match ip address 1
R2(config)#do sh run | sec access-list
access-list 1 permit 20.0.1.0 0.0.0.255
access-list 1 permit 20.0.3.0 0.0.0.255
R2(config)#}

Note: A suppress-map is used to do partial suppression of route.
As we seen that by default, when we were doing aggregation, BGP is advertising both the aggregate and more specific the routes therefore if we want to advertise only the summary route then we have to use the summary-only keyword at the end of the aggregate. But what if you want to suppress some more specific routes but not all of the routes then we can use a suppress-map which do partial suppression of routes.

5. unsuppress-map: A unsuppress-map is used to do partial unsppresion of route.

Let’s say we have completed suppression via summary-only, or you globally suppressed a prefix with a suppress-map. But want to leak a specific suppressed prefix to particular neighbor then we will use unsuppress-map.

As we did summarization at R2 with summary-only therefore we are receiving only summarized route at R3 but after applying unsuppress-map results are below:

6. R1(config-router)#aggregate-address 20.0.0.0 255.255.252.0 summary-only as-set

when i did summarization at R1 with as-set keyword, noticed that we are not receiving summary route at R2 and R3 as R2 is receving a summary route with own AS-PATH and we will see below message:

As we know Attributes are inherited from the prefixes by summary. Advertise-map is used to manipulate the aggregate-address attributes. like if we want to exclude AS from AS-PATH List, we can use advertise-map.

R1(config-router)#aggregate-address 20.0.0.0 255.255.252.0 summary-only as-set advertise-map AS_SET_ADVERTISE_MAP

 

BGP Filtering Methods:

There are below methods to filter BGP routes:
1. Distribute-list
2. Filter-list
3. IP Prefix-list
4. Route-map

Remember order preference varies based on whether the filtering is applied for inbound or outbound direction. we can’t apply ip prefix-list and distribute-list at the same time means only one command neighbor X.X.X.X distribute or neighbor X.X.X.X prefix-list can be applied to each direction for a particular neighbor.

1. Filter below two network to being received at R3 using distribute-list.

20.0.0.0/24
197.197.21.0/24

Configuration at R3 to achieve above:
1. Create ACL to identifying the route which is going to be denied or permited.
access-list 11 deny 20.0.0.0 0.0.0.255
access-list 11 deny 197.197.21.0 0.0.0.255
access-list 11 permit any
!
2. Apply Distribute-List that references the ACL and defines the direction
router bgp 1103
neighbor 1.1.23.1 distribute-list 11 in

After applying distribute-list we can see we are not receiving the both routes. please find the below output.

2. Filter all the prefixes that originated in 1101 at R3 using filter-list
!
ip as-path access-list 15 deny _1101$
ip as-path access-list 15 permit .*
!
router bgp 1103
neighbor 1.1.23.1 filter-list 15 in

After applying filter-list we are getting expected output as below where not receiving the route originated from AS 1101.

 

3. Filter below network (197.197.20.0/24) to being received at R3 using distribute-list

access-list 1 per 197.197.20.0 0.0.0.255
!
route-map FITER_FROM_R2 deny 10
match ip add 1
route-map FITER_FROM_R2 permit 20
!
router bgp 1103
nei 1.1.23.1 route-map FITER_FROM_R2 in

 

 

 

2 Comments

Leave a Reply to 바카라사이트 Cancel reply

  • Like!! I blog frequently and I really thank you for your content. The article has truly peaked my interest.

    ปั้มไลค์ Reply
  • It’s the best time to make some plans for the future and it is time to be happy.
    I’ve read this post and if I could I want to suggest you few interesting things or suggestions.
    Perhaps you can write next articles referring to this article.

    I wish to read more things about it!

    바카라사이트 Reply

Leave a Reply to 바카라사이트 Cancel reply

Your email address will not be published. Required fields are marked *

TOP
error: