3.2.c Configure and verify eBGP between directly connected neighbors (best path selection algorithm and neighbor relationships)
Two routers can form a BGP peering relationship if they have working IP reachability to each other and the BGP session parameters match.
- Create the eBGP process
- Router bgp [process-id]
- Statically assign routing ID
- Bgp router-id [router-id]First choice is any up loopbac
- Then any up interface
- Identify the link’s neighbor
- Neighbor [ip] remote-AS [remote-AS #]
- Applies to both internal BGP and external BGP, meaning even if the neighbor is within your own AS you still have to use the command
- Define the network to advertise (much like rip or ospf)
- Network [network address] mask [subnet mask]
- Means if I have an interface that’s UP within this network and mask, I want that interface and its network to be advertised in this routing protocol
- Initialize address family with command
- (router-config-bgp)# address-family []
- Activate for the neighbor with
- neighbor [ip-address] activate

Multiprotocol BGP = MBGP = allows IPv4 and IPv6 to coexist on the same device and routes are not shared, with the same BGP process
Verification of BGP
- show ip bgp summary = came out before multiprotocol
- show bgp [ipv4/ipv6] summary

BGP Session States

- IDLE = sitting there doing nothing
- Connect = each side initiates TCP connections with each other using TCP port 179. Three-way handshake Routers always listen on port 179 for connection requests but the source port is ephemeral. That means the first router to initiate the connection is the one with source port random high number.
- Active = first connection is open and active. BGP starts a second TCP connection and keeps it open for 4 minutes. The next step is OpenSent, which remains until the timer reaches 0.
- OpenSent = R1 sends an Open message to R2. Upon receipt, R2 will send an Open message back. Once both routers receive an open message, they do CRC check and check BGP configurations, which must match. Open messages contain info about the source router configuration.
- BGP versions must matchSource IP address of Open msg
- must match that of the neighbor commandRID’s must be exist and be unique.
- must match that of the neighbor commandAS number in the Open msg.
- OpenConfirm = If the Open messages have no errors, a KEEPALIVE is sent and the hold timer is reset and status enters OpenConfirm.
- Established = Upon each router receiving a KEEPALIVE, they enter Established. BGP session is initiated. Route information is exchanged in the Update message type. KEEPALIVES are sent to keep Established open.




