BGP Default Routing

BGP Default Route Origination
=============================

We can originate default route to specific BGP neighbor through

route bgp [AS No.] neighbor [ip address] default-originate

Note:-By doing this the Default route is originated to the BGP peer along with the other routes in the BGP table.If you want to advertise only Default-route then do backup your configuration with a prefix-list or access-list or route-map.

>>router bgp [AS No.] neighbor [ip address of neighbor] prefix-list ONLY_DEFAULT_ORIGINATE  out

Your Prefix-list could look like this.
>>ip prefix-list ONLY_DEFAULT_ORIGINATE seq 5 permit 0.0.0.0/0

Here in the above prefix-list we are only permitting Default-route by “0.0.0.0/0” if we have taken “0.0.0.0/0 le 32” then all the routes including Default route will advertise to the neighbor.Do watch for the granular things while doing configurations in BGP.

Important thing:-One very important thing to remember to check the routing table of the IBGP neighbor where we are advertising the Default route,whether the route that we have redistributed into IBGP neighbor is installed into routing table or not.check with the command:-
>>sh ip route | inc 0.0.0.0

if the Neighbor routing table is already learing the default route from other IGP then do deny this route by access-list,suppose we have originated earlier a default route via ospf in the routing domain , it will look like this.

R1#sh ip route | include  0.0.0.0
Gateway of last resort is X.X.X.X to network 0.0.0.0
O*E2 0.0.0.0/0 [110/1] via X.X.X.X, 00:33:11, FastEthernet1/12

Here we are already learing the default route from OSPF as the OSPF has lower Admin Distance(110) than IBGP(200) the default route via OSPF is installed in the routing table.
We can deny it in OSPF by.
>>router ospf 1
distribute-list PREFER_DEFAULT_VIA_BGP in

>>ip access-list standard PREFER_DEFAULT_VIA_BGP
 deny   0.0.0.0
 permit any

 

 

 

Afroz Ahmad
Afroz Ahmad

"Hey there, fellow network enthusiasts! My name is Afroz, and I bring over 14 years of expertise as a CCIE along with hands-on experience in the realm of Internet Services. I've worked with multiple ISPs and am currently engaged with one of the major ISP equipment vendors as a Network Designer. My true passion lies in not only navigating the intricacies of the networking industry but also in imparting that knowledge through my blog and courses. I understand the challenges that come with navigating the complex world of networking, and I firmly believe that teaching not only enriches others but also deepens my own understanding. Whether you're taking your first steps or you're a seasoned veteran in the field, I invite you to join me on this rewarding journey of learning and discovery. It's an expedition that promises to be both valuable and enjoyable – who knows, you might even have some fun along the way!"

Articles: 172