You are on page 1of 4

18 - BGP - Foundation Concepts

IGP - Interior Gateway Protocol


BGP - Border Gateway Protocol
The facts about BGP

BGP runs on top of TCP (port 179)

TCP used for reliability (ACK)

Updates (of course) are incremented and triggered

Metric is the biggest you've ever seen!

Slowest routing protocol on the planet to converge


Styles of BGP Implementations

default routes

partial updates

full updates
BGP Routing Algorithm

BGP is technically a distance vector protocol, but most call it a "path


vector" protocol

Without tuning, BGP behaves just like RIP


BGP Packets
Packets

Tables

and Tables
Open: Starts the session (like the hello packet)
Keepalive: Checks whether neighbor is stil alive
Update: Network reachability exchanges
Notifications: Something bad has happened; close session
Neighbor table: the connected BGP friends
BGP table: a list of ALL BGP routes (can be big)
Routing table: a list of the best routes

19 - BGP - Implementation and Tuning 1


IBGP - Internal BGP
EBGP - External BGP
BGP runs on top of your existing interior structure
conf t
router bgp 6500
neighbor 10.1.45.1 remote-as 5500
show bgp summary

host route:
conf t
int lo4
ip address 4.4.4.4 255.255.255.255
neighbor 1.1.1.1 update-source lo4

ip route [ip][mask]

EBGP has to be directly connected


neighbor 5.5.5.5 ebgp-multihop 2

! it is recommended that this be less than 5, otherwise it can cause routing loops
20 - BGP - Implementation and Tuning 2
Two ways to get networks into BGP

network command

redistribution
BGP Synchronization (is off by default in iOS versions 12.2(8)T and later)

Do not use or advertise a route learned via IBGP until the same
route has been learned from the internal routing protocol
BGP next-hop processing

for EBGP peers: change next hop address on advertised routes

for IBGP peers: do not change next hop address on advertised


routes
router bgp 5500
neighbor 1.1.1.1 next-hop-self

21 - BGP - Implementation and Tuning 3


BGP peer groups

Allow you to assign configurations in groups rather than to each


individual neighbor
router bgp 5500
neighbor IBGP_PEERS
neighbor IBGP_PEERS
neighbor IBGP_PEERS
neighbor IBGP_PEERS

peer-group
remote-as 5500
next-hop-self
update-source lo1

neighbor 2.2.2.2 peer-group IBGP_PEERS


neighbor 3.3.3.3 peer-group IBGP_PEERS
neighbor 4.4.4.4 peer-group IBGP_PEERS

BGP split-horizon: do not send updates that you receive via IBGP to other IBGP
peers
How BGP Neighbor relationships form
1. Idle: Verifying route to neighbor
2. Active: Attempting connectivity to neighbor
3. Open sent: Open message (hello) sent to neighbor
4. Open confirm: Neighbor replied with open message
4a. Active: Neighbor failed to reply or mismatched parameters
5. Established

1 and 2 are the 2 slowest processes.

A router can sometimes become "stuck in active", where it will keep going
back and forth between 3 and 4a
"clear ip bgp *" for configurations to take effect

Useful show and debug commands

debug ip bgp events


show ip bgp summary
show ip bgp
show ip bgp rib-failure (although it usually doesn't work)
debug ip bgp events
clear ip bgp *

22 - BGP - Tuning Attributes 1


What are BGP Attributes?
The BGP metric is not simple
o RIP: hop count
o OSPF: cost = 100 / BW
o EIGRP: bandwidth & delay
Attributes are ways that you can 'tag' incoming or outgoing BGP routes
Some attributes are well-known (everyone supports) while others are
optional
Some attributes are mandatory (must be in the update) while others are
discretionary
Some attributes are transitive (travel from router to router) while others
are non-transitive
Well known

attributes
autonomous system path (AS-path - mandatory)
next hop address (mandatory)
origin (mandatory)
local preference (discretionary)
atomic aggregate (discretionary)

Optional attributes

aggregator

multi-exit discriminator (med / metric)


How BGP uses attributes to find the best path
0. Ignore routes with an inaccessible next hop address
1. Prefer the path with the highest WEIGHT (cisco proprietary)
2. Prefer the path with the highest LOCAL_PREF
3. Prefer the path that was locally originated via a network command
4. Prefer the path with the shortest AS_PATH
5. Prefer the path with the lowest origin type
6. Prefer the path with the lowest multi-exit discriminator (MED)
7. Prefer eBGP over iBGP paths
8. Prefer the path with the lowest IGP metric to the BGP next hop
9. Determine if multiple paths require installation in the routing table for BGP
Multipath

10. When both paths are external, prefer the path that was received first (the
oldest one)
11. Prefer the route that comes from the BGP router with the lowest router ID
12. If the originator or router ID is the same for multiple paths, prefer the path
with the minimum cluster list length
13. Prefer the path that comes from the lowest neighbor address
23 - BGP - Tuning Attributes 2

neighbor 10.1.13.2 shutdown: keeps all the settings for that neighbor

an "incomplete origin" is often because of redistribution

"IGP origin" is because the "network" command was used

bgp default local-preference 700 (higher is better)

You might also like