Injecting routes/prefixes into the BGP table

The BGP Routing Information Base (RIB) holds the network layer reachability information (NLRI) learned by BGP, as well as the associated path attributes (PAs). An NLRI is simply an IP prefix and prefix length.

A BGP router adds entries to its local BGP table by using the network command. The router receives the prefixes through an Update message from a neighbor or by redistributing from another routing protocol.

The network command instructs BGP protocol to perform the following steps:
  • Look for a route in the current IP routing table that matches the parameters of the network command. If the IP route exists, put the equivalent NLRI into the local BGP table.

  • With this logic, connected routes, static routes, or IGP routes can be taken from the IP routing table and placed into the BGP table for later advertisement.

The BGP redistribute command can redistribute static, connected, and IGP learned routes.