BGP networks use a routing table to control and manage data packets for networking and data exchange between routers. Routers generate the table’s BGP information with incoming router information and the RIB (Routing Information Database) stored on the router. The RIB not only includes information about external and internal peers, but also updates the routing table based on new information about the current BGP peer group and available or no longer available paths, routers and peers. BGP routers use TCP connections and TCP port 179 to exchange messages and data, for example:
- OPEN: starts the exchange of information of a BGP session
- UPDATE: transmits information about modified or new paths
- KEEPALIVE: regular KEEPALIVE messages acknowledge OPEN messages and inform connected routers that a session should be maintained
- NOTIFICATION: used to delete routing paths or to abort a session if the KEEPALIVE message fails to appear
BGP determines the best path for data exchange based on the routing table and corresponding path attributes such as:
- Reachable autonomous systems (AS_PATH)
- Required hops or intermediate nodes (Next Hop)
- Cost (IGP metric)
- Prioritized parallel connections (multi-exit discriminator)
BGP routing can be applied with IPv4 and IPv6 and other internet protocols or MPLS labels. In addition, BGP works according to the OSI model on the OSI transport layer to control the network layer
Providing a constant exchange to available or new paths via BGP, BGP routers can create graphs to map networked paths within or between autonomous systems. This ensures reliable data and information exchange in networks, improves network stability and prevents loop formation.