Compale

Border Gateway Protocol (BGP)

AS numbers

Each ISP or company is uniquely identified by an AS number. The 16-bit number was extended by RFC 4893 to 32-bit

PurposeAS numbers
Reserved0, 65535
Public IANA-assigned1 - 64495
Documentation/examples64496 - 64511
Private64512 - 65534

eBGP and iBGP

There are two BGP flavors:

iBGP

eBGP

iBGP

iBGP requires full-mesh connectivity between all iBGP peers. To avoid (N-1)/2 links Route Reflectors (RR) and confederations were introduced.

Route Reflectors (RR)

![[HPE7-A08.md#^frame=V7I2T9Ro]]

Confederations

eBGP next hop behavior

ScenarioNext hop
Directly connected eBGP peerseBGP session interface
Multihop eBGPeBGP session interface
Route reflectors (RR)Unchanged
iBGP next-hop-self
iBGP next-hop-self or advertise outside route inside the AS

BGP route selection

Route reflectors We Love Oranges As Oranges Mean Pure Refrehment

AttributeDescriptionCommand
WeightAttribute that can be specified locally per route.set weight 100 or neighbor x.x.x.x weight 100
Local preferenceUsed within iBGP to determine the best exit to reach a particular route.set local-preference 200
(Locally originated)
AS path length
OriginRoutes injected to BGP are preferred (IGP < EGP < ?)
MEDSet by ISP routersset metric 200
eBGP over iBGP
IGP metric to next hop
ORIGINATOR_ID(If ECMP is disabled)
CLUSTER_LIST(If ECMP is disabled)
Router ID(If ECMP is disabled)
Neighbor’s IP address

Commands

show bgp ipv4 unicast neighbor to verify neighbor information

show bgp to verify the BGP routing table The BGP routing table is different from the IP routing table. Only valid and best paths from the BGP routing table are added to the IP routing table.

SymbolDescription
*Route is valid and next hop is reachable
eRoute is from foreign AS or protocol
iNative BGP route from local AS
>Route is best path to reach destination