BGP cheat sheet
Session states, eBGP and iBGP rules, the best-path order and the attributes you change.
01 Sessions
router bgp 65000
bgp router-id 10.255.255.1
neighbor 192.0.2.1 remote-as 65001
network 203.0.113.0 mask 255.255.255.0
neighbor 192.0.2.5 route-map PREFER-B in
ip route 203.0.113.0 255.255.255.0 null0
route-map PREFER-B permit 10
set local-preference 200| State | Means |
|---|---|
| Idle | Not trying (shut, no route to the neighbour) |
| Connect / Active | Trying TCP 179; Active for long = no answer |
| OpenSent / OpenConfirm | Exchanging OPEN messages |
| Established | Up: routes are exchanged |
- eBGP: neighbours in different ASes, TTL 1 (directly connected) unless
ebgp-multihop, AD 20. - iBGP: same AS, usually between loopbacks with
update-source, AD 200; routes from one iBGP peer are not passed to another (full mesh or route reflectors). networkadvertises a prefix only when that exact prefix and mask are in the routing table.
On the full sheet
- Best path, in order
- Exam traps (4)