BGP Techniques For ISP
BGP Techniques For ISP
Neighbor Neighbor
BGP Router I/F, IGP BGP Router
Routing Table
Neighbor Neighbor
BGP Router Forwarding Table
BGP Router
• Route flap
– Going up and down of path or change is attribute
• BGP WITHDRAW followed by UPDATE = 1 flap
• eBGP neighbor peering reset is NOT a flap
– Ripples through the entire Internet
– Causes instability, wastes CPU
• Damping aims to reduce scope of route flap
propagation
Route Flap Damping
• Requirements
– Fast convergence for normal route changes
– History predicts future behavior
– Suppress oscillating routes
– Advertise stable routes
• Documented in RFC2439
Route Flap Damping - Operation
• DO NOT:
distribute BGP prefixes into an IGP
distribute IGP routes into BGP
use an IGP to carry customer prefixes
• YOUR NETWORK WILL NOT BE SCALE
Injection prefixes into iBGP
• Redundancy
One connection to internet means the network is
dependent on:
• Reliability
Upstream ISP
AS100
IXP
A
AS200
One Upstream, Local Exchange Point
• Router A Configuration
!
interface fastethernet 0/0
description Exchange Point LAN
ip address 220.5.10.1 mask 255.255.255.224
ip verify unicast reverse-path
no ip directed-broadcast
no ip proxy-arp
no ip redirect
!
router bgp 200
network 221.10.0.0 mask 255.255.224.0
neighbor IXP-PEERS peer-group
neighbor IXP-PEERS soft-reconfiguration inbound
neighbor IXP-PEERS prefix-list AS200-CIDR out
..next slide
One Upstream, Local Exchange Point
neighbor 220.5.10.2 remote-as 101
neighbor 220.5.10.2 peer-group IXP-PEERS
neighbor 220.5.10.2 prefix-list PEER-AS101 in
neighbor 220.5.10.3 remote-as 102
neighbor 220.5.10.3 peer-group IXP-PEERS
neighbor 220.5.10.3 prefix-list PEER-AS102 in
neighbor 220.5.10.4 remote-as 103
neighbor 220.5.10.4 peer-group IXP-PEERS
neighbor 220.5.10.4 prefix-list PEER-AS103 in
neighbor 220.5.10.5 remote-as 104
neighbor 220.5.10.5 peer-group IXP-PEERS
neighbor 220.5.10.5 prefix-list PEER-AS104 in
One Upstream, Local Exchange Point
ip route 221.10.0.0 255.255.224.0 null0
!
ip prefix-list AS200-CIDR permit 221.10.0.0/19
ip prefix-list PEER-AS101 permit 222.0.0.0/19
ip prefix-list PEER-AS102 permit 222.30.0.0/19
ip prefix-list PEER-AS103 permit 222.12.0.0/19
ip prefix-list PEER-AS104 permit 222.18.128.0/19
!
One Upstream, Local Exchange Point
• Router C Configuration
!
router bgp 200
network 221.10.0.0 mask 255.255.224.0
neighbor 222.222.10.1 remote-as 100
neighbor 222.222.10.1 prefix-list DEFAULT in
neighbor 222.222.10.1 prefix-list AS200-CIDR out
!
ip prefix-list AS200-CIDR permit 221.10.0.0/19
ip prefix-list DEFAULT permit 0.0.0.0/0
!
ip route 221.10.0.0 255.255.224.0 null0
!
One Upstream, Local Exchange Porint
Upstream ISP
AS100
Upstream ISP
C AS105
Local peer
AS108
A D
AS200
One Upstream, Local Exchange Point
• Router A
Same routing configuration as in example which one
upstream and one local peer
Same hardware configuration
Two Upstream, One local peer
• Router C Configuration
!
router bgp 200
network 221.10.0.0 mask 255.255.224.0
neighbor 222.222.10.1 remote-as 100
neighbor 222.222.10.1 prefix-list DEFAULT in
neighbor 222.222.10.1 prefix-list AS200-CIDR out
!
ip prefix-list AS200-CIDR permit 222.10.0.0/19
ip prefix-list DEFAULT permit 0.0.0.0/0
!
ip route 221.10.0.0 255.255.224.0 null0
!
Two Upstream, One local peer
• Router D Configuration
!
router bgp 109
network 221.10.0.0 mask 255.255.224.0
neighbor 222.222.10.5 remote-as 105
neighbor 222.222.10.5 prefix-list DEFAULT in
neighbor 222.222.10.5 prefix-list AS200-CIDR out
!
ip prefix-list AS200-CIDR permit 222.10.0.0/19
ip prefix-list DEFAULT permit 0.0.0.0/0
!
ip route 221.10.0.0 255.255.224.0 null0
!
Two Upstream, One local peer
..next slide
Two Upstream, One local peer – Full Routes
!
ip route 221.10.0.0 255.255.224.0 null0
!
ip as-path access-list 10 permit ^(100_)+$
ip as-path access-list 10 permit ^(100_)+_[0-9]+$
!
route-map AS100-LOADSHARE permit 10
match ip as-path 10
set local-preference 120
route-map AS100-LOADSHARE permit 10
set local-preference 80
!
Two Upstream, One local peer – Full Routes
Router D Configuration
!
router bgp 200
network 221.10.0.0 mask 255.255.224.0
neighbor 222.222.10.5 remote-as 105
neighbor 222.222.10.5 prefix-list DEFAULT in
neighbor 222.222.10.5 prefix-list AS200-CIDR out
!
ip prefix-list AS200-CIDR permit 221.10.0.0/19
ip prefix-list DEFAULT permit 0.0.0.0/0
!
ip route 221.10.0.0 255.255.224.0 null0
!
Two Upstream, One local peer – Full Routes
• Router C configuration:
– Accept full route from AS100
– Tag prefixes originated by AS100 and AS100’s
neighboring ASes with local preference 120
• Traffic to those ASes will go over AS100 link
– Remaining prefixes tagged with local preference 80
• Traffic to other all other ASes will go over the link to AS105
• Router D configuration same as Router C
without the route-map
Two Upstream, One local peer – Full Routes
• Use peer-groups
• iBGP between loopbacks!
• Next-hop-self
Keep DMZ and point-to-point out of IGP
• Always send communities in iBGP
Otherwise accidents will happen
• Hardware BGP to version 4
Yes, this is things paranoid!
• Use passwords on iBGP session
Not being paranoid, VERY necessary
eBGP template
eBGP template
End of Tutorial