Useful Articles

25/recent/ticker-posts

BGP Redistribute Internal

BGP Redistribute Internal

BGP Redistribute Internal: There is a slight difference in Route Redistribution from BGP to an IGP compared to route redistribution from an IGP to another IGP. By default, internal BGP or iBGP routes do not get redistributed into the IGPs OSPF or IS-IS. This blog explains what BGP Redistribute Internal concept is its related configuration. We need to add "bgp redistribute-internal" command under BGP router configuration to enable the BGP internal routes to get redistributed in OSPF or ISIS.

 

BGP Redistribute Internal - Lab

BGP Redistribute Internal

In the above Lab simulation, we are running BGP on routers R1 and R2 and the IGPs OSPF or ISIS on routers R2 and R3. Our goal is is to redistribute the BGP prefix 10.10.0./32 into OSPF on R2 so that we can see this prefix route on R3. Let us now try to understand BGP Redistribute-Internal Concept with the help of two Scenarios as given below.

 

Redistribute BGP into OSPF - Scenario 1

If we do not configure 'bgp redistribute-internal' command  under the BGP process on router R2, we will not see the route for 10.10.0.1/32 on router R3 even if we redistribute BGP routes on ASBR R2 in OSPF.

R2#show run | section  router ospf
router ospf 1
 log-adjacency-changes
 redistribute bgp 100 subnets

R3#show ip route 10.10.0.1
% Subnet not in table



Note: "Subnets" keyword should be used while redistributing any protocol routes into OSPF else the subnetted routes (VLSM) will not be redistributed into the OSPF.


Redistribute BGP into OSPF  - Scenario 2

After adding the 'bgp redistribute-internal' command under BGP, we will see the route for 10.10.0.1/32 on R3.
 

R2#show run | section router ospf
router ospf 1
 log-adjacency-changes
 redistribute bgp 100 subnets
 
R2(config-if)#router bgp 100
R2(config-router)#bgp redistribute-internal

R3#show ip route 10.10.0.1
  Routing entry for 10.10.0.1/32
  Known via "ospf 1", distance 110, metric 1, type extern 2, forward metric 1
  Last update from 10.10.23.2 on FastEthernet1/0, 00:00:03 ago
  Routing Descriptor Blocks:
  * 10.10.23.2, from 10.10.0.2, 00:00:03 ago, via FastEthernet1/0
     Route metric is 1, traffic share count is 1

Imp Note: 

The use of the 'bgp redistribute-internal' command might require the BGP route refresh using 'clear ip bgp' command.

R2#clear ip bgp *    
 
Use of this command is only recommended for lab simulations and not for real time networks, or

If we were running IS-IS Protocol between R2 and R3, below is the output.


R3#show ip route 10.10.0.1
  Routing entry for 10.10.0.1/32
  Known via "isis", distance 115, metric 10, type level-2
  Redistributing via isis
  Last update from 10.10.23.2 on FastEthernet1/0, 00:00:03 ago
  Routing Descriptor Blocks:
  * 10.10.23.2, from 10.10.23.2, 00:00:03 ago, via FastEthernet1/0
     Route metric is 10, traffic share count is 1

 

Why BGP routes don't get redistributed to OSPF or ISIS by default?

Redistributing BGP routes into IGP protocols might lead to routing loops in the IGP domain. This is because iBGP routes have higher Administrative Distance (AD) of 200 compared to the IGPs OSPF and IS-IS which have a default AD value of 110 and 115 respectively.

Secondly, redistributing a lot of prefixes BGP routes in an IGP domain (OSPF or IS-IS) is not recommended even by the Vendors like Cisco because redistributing all iBGP routes to an IGP could be memory intensive.

It is advised to use route-filtering with help of a prefix-list, distribute-list or route-map while using bgp redisribute-internal command.


Redistributing into BGP. 

Redistributing connected routes into BGP can be done in 2 ways.
 
Router(config-router)#redistribute connected
or
Router(config-router)#network x.x.x.x mask x.x.x.x

Redistribute Static routes in BGP

Router(config-router)#redistribute static route-map [xyz]

Redistribute OSPF into BGP

Router(config-router)#redistribute ospf 1 route-map xyz match ?
  external       Redistribute OSPF external routes
  internal       Redistribute OSPF internal routes
  nssa-external  Redistribute OSPF NSSA external routes

Be careful while redistributing external routes back to BGP as these could cause routing loops. You can use route filtering with the help of a route-map to avoid creating routing loops in the network.
 

Redistribute ISIS into BGP

Router(config-router)#redistribute isis ?
  WORD       ISO routing area tag
  clns       Redistribution of OSI dynamic routes
  ip         Redistribution of IP dynamic routes
  level-1    IS-IS level-1 routes only
  level-1-2  IS-IS level-1 and level-2 routes
  level-2    IS-IS level-2 routes only
  metric     Metric for redistributed routes
  route-map  Route map reference
  <cr>


I hope you have found this article informative and useful and now have a fair understanding of BGP Redistribute Internal Concept and how to use 'bgp redistribute-internal' for BGP Routes redistribution in the IGP Protocols OSPF and IS-IS. For any of the related queries or feedback, kindly write to us at networkurge@gmail.com

Post a Comment

0 Comments