BGP - Network Layer Reachability Information (NLRI)

In the context of BGP, the Network Layer Reachability Information or NLRI is information that a BGP router uses to inform other BGP routers about the set of destinations (network prefixes) that it can reach. The NLRI is contained within BGP messages that are sent between peers.

An NLRI is represented as a pair made up of the length of the prefix (in bits) and the network prefix itself. This pair identifies a route that can be used to reach a specific network.

For example, in a BGP update message, the NLRI is a list of IPv4 or IPv6 prefixes that the sending router is advertising to the receiving router, indicating that it can reach these networks.

When the BGP protocol runs over a particular transport protocol like TCP, it exchanges messages that contain NLRIs. This information allows each BGP speaker to construct a consistent view of the network and make decisions on the best paths to various network prefixes based on BGP attributes and routing policies.