Notes 09‐1 - LPouliot/Junior-Spring-NET-330-01-Network-Design GitHub Wiki

WAN Routing - BGP

BGP – Routing Protocol of Internet

Remember the distinction between IGP and EGP?

  • Interior Gateway Protocols: Responsible for building and updating routing tables within an organization

OSPF

RIP

  • Exterior Gateway Protocol: Responsible for building and updating routing tables between organizations – across large internetworks like the Internet

Border Gateway Protocol (BGP): Is the EGP used on the Internet

BGP Overview

Exchanges routing and reachability information among autonomous systems (AS) on the Internet.

The protocol is classified as a path vector protocol

Makes routing decisions based on paths, network policies, or rule-sets configured by a network administrator.

Some very large organizations may also use BGP as an IGP

Autonomous Systems

An autonomous system (AS) is:

  • A collection of connected Internet Protocol (IP) routing prefixes
  • under the control of a single administrative entity (e.g. company, university, ISP)
  • that presents a common, clearly defined routing policy to the Internet.

AS Numbers

A unique ASN is allocated to each AS for use in BGP routing.

AS numbers are important because the ASN uniquely identifies each (aggregated) network on the Internet.

IANA handles AS number assignments

Until 2007, AS numbers were defined as 16-bit integers, which allowed for a maximum of 65536 assignments

Now, registries can hand out 32 bit AS numbers (over 4 billion)

AS Number Growth

  • The number of unique autonomous networks in the routing system of the Internet exceeded 5000 in 1999
  • 30,000 in late 2008
  • 35,000 in mid-2010
  • 42,000 in late 2012
  • 54,000 in mid-2016
  • 118,000 in Oct 2024

image

image

BGP Operation

BGP neighbors, called peers, are established by manual configuration between routers

Creates a TCP session on port 179.

A BGP speaker sends 19-byte keep-alive messages every 60 seconds to maintain the connection.

Among routing protocols, BGP is unique in using TCP as its transport protocol.

  • Others are their own layer 4 protocols

BGP Peering

So, organizations must “peer” with their ISP(s) and other networks with which they share an external link.

This allows for multi-homed networks (aka multiple connections to the Internet).

Your AS will be advertised through your multiple peers – this allows multiple paths to your IP networks from the Internet

Other routers pick the best “path” to your network

Multi-homed Peering

Peering on the Internet: http://www.itransformers.net/logo/bg_peering.png

image

BGP- Path Vector Protocol

Distance Vector Protocols Like RIP - use ”distance” as a route selection metric

  • Routing table includes how many hops/routers to a remote network
  • Only knows IP of next router – not the full path to destination

Path Vector Protocols – Like BGP

  • Routing table includes the “path” of AS numbers to get to remote netwworks

Path Vector

image

BGP Best Path Algorithm

BGP Best Path Selection Algorithm is used to choose and install the best routes into the router’s routing table.

The full Internet BGP routing table includes over 400,000 routes

BGP router can receive numerous copies of those routes from various providers

So, it has to compare the multiple routing tables and choose the optimal route on the router.

BGP Attributes for Selecting Path

image

BGP Update Message

Sent to Peers

Incl. AS Path

and IPV4 nets

  • 10.0.0.0/8 in
  • this example

image

Configuring BGP

A Basic configuration of BGP is pretty simple

3 Steps

  • Create BGP instance
  • Identify peer neighbors by IP address
  • Identify any networks that the router is responsible to advertise

BGP on Cisco

Define router instance

  • router bgp AS_Number_for_Router
  • router bgp 1010

Identify peers

  • (config-router) neighbor ip_of_peer remote-as as-number_of_peer
  • (config-router) neighbor 192.168.1.2 remote-as 2352

Advertise Networks

  • (config-router) network 10.10.52.0 mask 255.255.255.0

Additional Notes

Configuring redistribution of OSPF on border router

To advertise networks shared through OSPF – the following command must be included in BGP config

“redistribute ospf instance_numberI