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 thenetwork命令。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 thenetwork命令。如果IP路由存在,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重新分配command can redistribute static, connected, and IGP learned routes.