Category: BGP

Advertising a default route in BGP

There are four ways to distribute a default route in BGP.

Three of them, the network 0.0.0.0, the default-information originate and redistribution from another routing protocol, are all similar in the resulting effect: they will inject the default route into BGP RIB and it will be advertised to all BGP neighbors. The difference is in the origin of the default route that is injected into BGP. Specifically:

  • network 0.0.0.0 will inject the default route into BGP only if the default route is currently present in the routing table.
  • redistribution will inject the default route into BGP only if the default route is currently present in the routing table and if it has been learned by a specific source protocol we are redistributing from.
  • default-information originate causes the default route to be artificially generated and injected into the BGP RIB, regardlessly of whether it is present in the routing table. The newly injected default will be advertised to all BGP peers (because it now resides in the BGP RIB)

The fourth method:

  • neighbor X.X.X default-originate is similar to the default-information originate in that the default route is “artificially generated” (it does not need to be present in the routing table in order to make the advertisement effective)*.
  • However, the neighbor X.X.X.X default-originate is different from the the default-information originate in that the default route will be advertised only to this specific BGP neighbor and not to all existing BGP neighbors as with the previous approaches. The default route will not be installed in the BGP RIB of the router that is configured with the neighbor X.X.X.X default-originate command and so it won’t be generally advertised to all BGP neighbors.

*By doing the ‘default-originate’, you request a routerA (provider A) to send a route 0.0.0.0/0 via BGP out to RouterB (customer B).This is useful in many cases where customer B doesn’t really want toaccept a full BGP feed(for example in stub autonomous systems).

MP-eBGP Configuration

Some information on how to configure multiprotocol extended Border Gateway Protocol (MP-EBGP). Extended BGP allows for the transport of routing information for multiple network layer protocols IPv6, VPNv4, and others. MP-BGP allows you to have a unicast routing topology different from a multicast routing topology, which helps to control the network and resources.

In this example, the R1 and R3 routers are configured to be in AS 5500 forming iBGP. The R2 router is configured to be in AS 6500. The R1 and R2 routers communicate with each other using MP-EBGP.

MP-BGP Config

More BGP next-hop-self

From the below you can see the next hop for 192.168.0.0 network is 10.0.0.2 which is outsite of 65000 AS, and router jazz doesn’t have a route to it.  BGP will not put 192.168.0.0 into routing table because it doesn’t know how to reach next hop, you can see this below:

BGP-Next Hp Self 2

BGP-Next Hp Self 3

BGP-Next Hp Self 4

By adding the next-hop-self command on the router owen it will change the next-hop attribute for external networks that will be advertised to the router Jazz:

owen(config-router)#neighbour 10.0.1.2 next-hop-self

BGP-Next Hp Self 4.5

This changes the next hop attribute from 10.0.0.2 to be 10.0.1.1 on the router owen

BGP-Next Hp Self 5

from Jazz you can now ping (192.168.0.1) on Jules.

BGP-Next Hp Self 6

Job done!

eBGP Configuration with a Loopback Address

You can also configure eBGP using a loopback address (or any other operational interface) as shown in this section. Loopback interfaces are used in this manner to guarantee reachability in networks with multiple paths as shown in the Load Sharing Using the Loopback Address as a BGP Neighbor section of Load Sharing with BGP in Single and Multihomed Environments: Sample Configurations.

eBGP Config with a loopback

 

Basic eBGP Configuration

In this configuration, the router owen is in AS 300 and Router jazz is in AS 400.

eBGP Config

Peers must be directly connected when using eBGP.  If they are not directly connected, the neighbor ebgp-multihop command must be used and a path through an IGP or static route to reach the peer must exist in order for the routers to establish neighbor relationship. In the configuration above, owen router belongs to AS 300 while jazz router belongs to AS 400.