BGP does not require neighbors in the same subnet. Instead it uses TCP connection in port 179 to establish neighborship and neighbor IP is configured specifically. Also BGP doesn’t use an integer metric for route selection. Instead it uses path attributes (PAs). In BGP terminology, the IP prefix and length use the term Network Layer Reachability Information (NLRI)
The default PA that BGP uses is the autonomous system path (AS_PATH) unless it is configured diffrently. The AS_PATH contains the ASNs that are in the path between source and destination.
ASN NUMBERS
1 through 64,495 -> Assignable by IANA for public use
64,512 through 65,534 -> Private use
BGP architecture
In order to have a BGP connection towards an ISP, there are some design architectures.
1.single-homed
2.dual-homed
3.single-multihomed
4.dual-miltihomed
The “Homed” referes to the number of the ISP that you are connected to and the single-dual to the number of links towards the ISP(s).
BGP neighborship
basic configuration to achive neighborship
router bgp <local ASN>
neighbor <ip> remote-as <neighbor’s ASN>
eBGP multihop
When using loopback address for establishing neighborship, the command neighbor <ip> egbp-multihop <number> must be configured.
By default BGP uses TTL value equals to 1. However, when neighboship through looback address is configured this command is needed, as the neighbor router lower the TTL value to 0 when the packet is received in the interface and it is never forwarded in the loopback interface.
Also should be taken under cconsiderationn, that when the loopback address is used, it should be specified as source in the local router as well, using the command neighbor <ip> update-source <loopback-ip>
Verification
In order to perform some basic troubleshooting the following commands can be used
show ip bgp summary
show ip bgp neighbors
show ip bgp