Академический Документы
Профессиональный Документы
Культура Документы
Practices
ISP Workshops
Configuring BGP
Where do we start?
All best paths on the local router are passed to the neighbour
All routes announced by the neighbour are received by the
local router
Can have disastrous consequences
p eBGP
used to
NOT:
p YOUR
Aggregation
Aggregation
p
11
Aggregation
p Address
p Aggregate
n
12
13
Announcing an Aggregate
p
p
For IPv4:
p
p
p
For IPv6:
p
Aggregation Example
100.10.10.0/23
100.10.0.0/24
100.10.4.0/22
customer
Internet
p
p
AS100
100.10.10.0/23
15
n
n
n
n
n
n
n
Aggregation Example
100.10.0.0/19
100.10.0.0/19
aggregate
customer
Internet
p
p
AS100
100.10.10.0/23
p
p
Aggregation Summary
p Good
do!
p Bad
19
469725
188940
232915
164052
249009
45306
21
n
n
www.cidr-report.org
(covers both IPv4 and IPv6 BGP tables)
24
25
26
Importance of Aggregation
p
This is a problem
Bigger table takes longer for CPU to process
BGP updates take longer to deal with
BGP Instability Report tracks routing system update
activity
bgpupdates.potaroo.net/instability/bgpupd.html
27
28
29
Receiving Prefixes
30
Receiving Prefixes
p There
p Each
31
Receiving Prefixes:
From Customers
p
Receiving Prefixes:
From Customers
p
Receiving Prefixes:
From Customers
p
For Example:
n
n
n
Configuration on upstream
router bgp 100
neighbor 102.102.10.1 remote-as 101
neighbor 102.102.10.1 prefix-list customer in
!
ip prefix-list customer permit 100.50.0.0/20
35
Receiving Prefixes:
From Peers
p A
36
Receiving Prefixes:
From Peers
p Agreeing
other:
37
For Example:
n
remote-as 101
prefix-list my-peer in
permit 220.50.0.0/16
permit 61.237.64.0/18
permit 81.250.128.0/17
deny 0.0.0.0/0 le 32
38
Receiving Prefixes:
From Upstream/Transit Provider
p
p
originate a default-route
OR
announce one prefix you can use as default
39
Receiving Prefixes:
From Upstream/Transit Provider
p Downstream Router Configuration
router bgp 100
network 101.10.0.0 mask 255.255.224.0
neighbor 101.5.7.1 remote-as 101
neighbor 101.5.7.1 prefix-list infilter in
neighbor 101.5.7.1 prefix-list outfilter out
!
ip prefix-list infilter permit 0.0.0.0/0
!
ip prefix-list outfilter permit 101.10.0.0/19
40
Receiving Prefixes:
From Upstream/Transit Provider
p Upstream Router Configuration
router bgp 101
neighbor 101.5.7.2 remote-as 100
neighbor 101.5.7.2 default-originate
neighbor 101.5.7.2 prefix-list cust-in in
neighbor 101.5.7.2 prefix-list cust-out out
!
ip prefix-list cust-in permit 101.10.0.0/19
!
ip prefix-list cust-out permit 0.0.0.0/0
41
Receiving Prefixes:
From Upstream/Transit Provider
p
For IPv4:
n
For IPv6:
n
Receiving Prefixes:
From Upstream/Transit Provider
p
43
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
Default
Network Zero
RFC1918
RFC6598 shared addr
Local prefix
Loopback
Auto-config
RFC1918
TEST1
RFC1918
Benchmarking
TEST2
TEST3
Multicast
Prefixes >/24
44
!
!
!
!
!
!
!
!
Teredo
Teredo subnets
Documentation
6to4
6to4 subnets
Local Prefix
Old 6bone
Global Unicast
45
Receiving Prefixes
p Paying
p Responsibility
46
47
p Point
48
Router Configuration:
network statement
p Example:
interface loopback 0
ip address 215.17.3.1 255.255.255.255
!
interface Serial 5/0
ip unnumbered loopback 0
ip verify unicast reverse-path
!
ip route 215.34.10.0 255.255.252.0 Serial 5/0
!
router bgp 100
network 215.34.10.0 mask 255.255.252.0
49
p Many
50
Router Configuration:
redistribute static
p
Example:
ip route 215.34.10.0 255.255.252.0 Serial 5/0
!
router bgp 100
redistribute static route-map static-to-bgp
<snip>
!
route-map static-to-bgp permit 10
match ip address prefix-list ISP-block
set origin igp
<snip>
!
ip prefix-list ISP-block permit 215.34.10.0/22 le 30
51
p Be
n
52
Summary
p Best
Practices Covered:
53
Configuration Tips
Of passwords, tricks and
templates
p Make
iBGP: Next-hop-self
p BGP
p Even
96.27.246.0/24
2497 1239 12026 12026 12026
12026 12026 12026 12026 12026 12026 12026 12026 12026
12026 12026 12026 12026 12026 12026 12026 12026 12026
12026 i
This example shows 21 prepends (for no obvious reason)
p
ISP
TTL 254
R1
Attacker
AS 100
R2
TTL 253
TTL 254
Hack:
p Provides
Templates
p Good
p eBGP
n
http://www.team-cymru.org/ReadingRoom/
Documents/
iBGP Template
Example
p iBGP
between loopbacks!
p Next-hop-self
n
p Always
n
p Hardwire
n
BGP to version 4
iBGP Template
Example continued
p Use
p Powerful
eBGP Template
Example
p
BGP damping
n
n
eBGP Template
Example continued
p Use
n
maximum-prefix tracking
p Limit
p Make
Summary
p Use
configuration templates
p Standardise the configuration
p Be aware of standard tricks to avoid
compromise of the BGP session
p Anything to make your life easier, network
less prone to errors, network more likely
to scale
p Its all about scaling if your network
wont scale, then it wont be successful
67