Upload
others
View
10
Download
3
Embed Size (px)
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 1
Understanding, Implementing and Understanding, Implementing and troubleshooting BGPtroubleshooting BGP
01
http://www.INE.com
Introduction
Instructor IntroductionInstructor Introduction
• Keith Barker, CCIE #6783• CCIE Routing and Switching – 2001
CCIE S it 2003• CCIE Security – 2003
• YouTube - Keith6783
Copyright © Copyright © 2010 2010 Internetwork Expert, Inc Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 2
Keith’s OfficeKeith’s Office
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
Our JourneyOur Journey
• BGP fundamentals– Injecting networks, iBGP, eBGP, Route
Reflectors, Confederations, Peer GroupsReflectors, Confederations, Peer Groups
• Policy Based BGP– Attributes and Filtering
– Manipulating BGP
• Complex Topologies
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
g– Advanced route maps, community, load
balancing, dampening, troubleshooting
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 3
The playing fieldThe playing field
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
642642--661661
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 4
General Q&AGeneral Q&A
Copyright © Copyright © 2010 2010 Internetwork Expert, Inc Internetwork Expert, Inc www.INE.comwww.INE.com
BGP OverviewBGP Overview
02
http://www.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 5
What Is BGP?What Is BGP?
• Border Gateway Protocol Version 4
• Standards basedRFC 4271 “A B d G t P t l 4 (BGP 4)”– RFC 4271 “A Border Gateway Protocol 4 (BGP-4)”
• Exterior Gateway Protocol (EGP)– Used for inter-domain routing between Autonomous
Systems
• Path vector routingU lti l “ tt ib t ” f ti d i i
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
– Uses multiple “attributes” for routing decision
• Classless– Supports VLSM and summarization
InterInter--AS Routing and ASNsAS Routing and ASNs
• Autonomous System (AS)– “…a set of routers under a single technical administration, using
an interior gateway protocol (IGP) and common metrics to determine how to route packets within the AS, and using an i t AS ti t l t d t i h t t k t tinter-AS routing protocol to determine how to route packets to other ASes.” (RFC 4271)
• Like IP address space, Autonomous System Numbers (ASNs) allocated by Internet Assigned Numbers Authority (IANA)– http://www.iana.org/numbers/
• BGP ASNs originally 2-byte field– Values 0-65535
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
– Values 0-65535
• RFC 4893 defines 4-byte ASNs– 0.0 – 65535.65535 notation– 0.[0-65535] denote original 2-byte ASNs
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 6
ICANNICANN
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
ICANNICANN
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 7
IANAIANA
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
Address Space RegistryAddress Space Registry
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 8
Why Use BGP?Why Use BGP?
• Scalability– IGPs can scale to thousands of routes– BGP can scale to hundreds of thousands of routes– Current Global (Internet) BGP table ~ 300,000 routes
• Stability– Internet routing table never converges– BGP stable enough to handle routing and decision
making at the same time• Enforce routing policy
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
– IGP uses link cost for routing decision• Effective traffic engineering nearly impossible with IGP
– BGP uses attributes of the route itself• Traffic engineering feasible and simple to implement
Who Needs BGP?Who Needs BGP?
• Transit networks– SPs that sell access or transit bandwidth to
customerscustomers– Need full routing table to make accurate
decisions – Should not use default routing
• Multihomed networksEnterprise networks with two or more
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
– Enterprise networks with two or more connections to ISPs
– Allows control of inbound and outbound routing policy
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 9
Example Transit NetworkExample Transit Network
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
Example Multihomed NetworkExample Multihomed Network
Internet
ISP 2AS 2000
ISP 1AS 1000
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
Customer 1AS 100
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 10
The actual network is “The actual network is “DownStreamDownStream””
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
When When notnot To Use BGPTo Use BGP
• Single ISP connectivity– Default routing sufficient
Li it d d/ CPU• Limited memory and/or CPU resources– Global table needs ~ 1GB of memory just for
storage
• Don’t “own” your IPv4 addresses– ISP advertises “their” address space on your
b h lf
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
behalf– Red tape involved with getting Provider
Independent address space and BGP ASN
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 11
General Q&AGeneral Q&A
Copyright © Copyright © 2010 2010 Internetwork Expert, Inc Internetwork Expert, Inc www.INE.comwww.INE.com
BGP Basic BGP Basic CompnentsCompnents
03
http://www.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 12
BGP Building BlocksBGP Building Blocks
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
BGP Data StructureBGP Data Structure
• Like EIGRP/OSPF/IS-IS, BGP uses a three table data structure
• Neighbor table– List of active adjacencies called “peerings”
• BGP table– All prefixes learned from all peers
IP R ti t bl
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
• IP Routing table– The “best” routes from the BGP table actually
used for routing (Maybe . AD still used)
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 13
How BGP WorksHow BGP Works
• Establish BGP peerings to build neighbor table
• Exchange updates to build BGP table
• Choose BGP bestpaths to build routing table
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
Won’t you be my neighbor?Won’t you be my neighbor?
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 14
Example: BGP NeighborsExample: BGP Neighbors
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
Example: Global BGP tableExample: Global BGP table
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 15
Example: Routing TableExample: Routing Table
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
Establishing BGP PeeringsEstablishing BGP Peerings
• Like IGP, first step in BGP is to find neighbors to exchange information with
• Unlike IGPUnlike IGP…– BGP does not have its own transport
• Uses TCP port 179
– BGP neighbors are not discovered• Manually configured via neighbor statement
– BGP neighbors do not have to be connected• IGP is always on a link-by-link basis
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
IGP is always on a link by link basis• BGP is a logical peering over TCP• Implies that BGP always needs IGP underneath
– BGP has different types of neighbors• External BGP vs. Internal BGP
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 16
BGP Packet FormatsBGP Packet Formats
• Peering establishment and maintenance uses four types of packets– OPEN
– KEEPALIVE
– UPDATE
– NOTIFICATION
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
BGP OPEN MessageBGP OPEN Message
• Used to negotiate parameters for peering• Includes…
– BGP version• Should be 4
– Local ASN– Local Router-ID – Hold time
N ti t d t l t t d l
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
• Negotiated to lowest requested value
– Options• AKA “capabilities”
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 17
BGP Open MessageBGP Open Message
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
BGP KEEPALIVE MessageBGP KEEPALIVE Message
• Used for dead neighbor detection
• If hold time = 0, keepalives disabled
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 18
KeepaliveKeepalive
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
BGP UPDATE MessageBGP UPDATE Message
• Used to advertise or withdraw a prefix
• Includes– Withdrawn routes
• List of routes that should be discarded
– NLRI• Route being advertised
– Path vector attributes
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
Path vector attributes• Attributes of route being advertised
• Used for bestpath selection
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 19
BGP UpdateBGP Update
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
Withdrawn RouteWithdrawn Route
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 20
BGP NOTIFICATION MessageBGP NOTIFICATION Message
• Used to convey error messages
• After notification sent, BGP session closed
• Examples– Unsupported Version Number
– Unsupported Optional Parameter
– Unacceptable Hold Time
H ld Ti E i d
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
– Hold Timer Expired
NotificationNotification
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 21
BGP Peering State MachineBGP Peering State Machine
• BGP state machine tracks peering establishment• Idle
– Waiting to start 3-way handshake
• Connect– Waiting to complete 3-way handshake
• Active– 3-way handshake failed, try again
• Open sent– 3-way handshake complete, OPEN message sent
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
• Open confirm– OPEN message received, parameters agreed upon
• Established– Peering complete
Debug Debug ipip bgpbgp
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 22
General Q&AGeneral Q&A
Copyright © Copyright © 2010 2010 Internetwork Expert, Inc Internetwork Expert, Inc www.INE.comwww.INE.com
Configuring Basic BGPConfiguring Basic BGP
04
http://www.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 23
Our JourneyOur Journey
• BGP fundamentals– Injecting networks, iBGP, eBGP, Route
Reflectors, Confederations, Peer GroupsReflectors, Confederations, Peer Groups
• Policy Based BGP– Attributes and Filtering
– Manipulating BGP
• Complex Topologies
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
g– Advanced route maps, community, load
balancing, dampening, troubleshooting
Configuring BGP, the beginningConfiguring BGP, the beginning
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 24
BGP Peering TypesBGP Peering Types
• External BGP (EBGP) Peers– Neighbors outside my Autonomous System
• Internal BGP (iBGP) Peers– Neighbors inside my Autonomous System
• Update and path selection rules change depending on what type of peer a route is being sent to/received from
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
being sent to/received from
Basic BGP ConfigurationBasic BGP Configuration
• Enable global BGP process– router bgp [ASN]
• Establish BGP peers– neighbor [address] remote-as [remote ASN]
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 25
iBGP PeeringsiBGP Peerings
• Peers in the same AS• Many times not directly connected
– Implies IGP needed to provide TCP transport
• Loop prevention via route suppression– Routes learned from an iBGP peer cannot be
advertised on to another iBGP peer
• Implies that all routers running BGP within
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
the AS must peer with each other– i.e. “iBGP full mesh”– n*(n-1)/2 peerings
Add Add iBGPiBGP neighborneighbor
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 26
Idle, connect, open sent/confirm establishedIdle, connect, open sent/confirm established
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
Verify neighborsVerify neighbors
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 27
Verify Verify iBGPiBGP neighbor detailsneighbor details
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
EBGP PeeringsEBGP Peerings
• Peers in different ASes
• Usually directly connected neighbors– e.g. DS3 Frame Relay link to ISP
• Can be “multihop”, but TTL defaults to 1– neighbor [address] ebgp-multihop [ttl]
U AS P th tt ib t f l ti
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
• Uses AS-Path attribute for loop prevention– If I receive an update from an EBGP peer with
my own ASN in the AS-Path, discard it
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 28
eBGPeBGP NeighborNeighbor
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
eBGPeBGP NeighborNeighbor
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 29
State/State/PfxRcdPfxRcd
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
Show Show ipip bgpbgp summarysummary
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 30
Show Show ipip bgpbgp neighbor (neighbor (eBGPeBGP))
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
BGP RouterBGP Router--IDID
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 31
BGP RouterBGP Router--ID contID cont
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
Changing the BGP routerChanging the BGP router--idid
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 32
General Q&AGeneral Q&A
Copyright © Copyright © 2010 2010 Internetwork Expert, Inc Internetwork Expert, Inc www.INE.comwww.INE.com
Getting routes/Prefixes into BGPGetting routes/Prefixes into BGP
05
http://www.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 33
Our JourneyOur Journey
• BGP fundamentals– Injecting networks, iBGP, eBGP, Route
Reflectors, Confederations, Peer GroupsReflectors, Confederations, Peer Groups
• Policy Based BGP– Attributes and Filtering
– Manipulating BGP
• Complex Topologies
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
g– Advanced route maps, community, load
balancing, dampening, troubleshooting
Network StatementsNetwork Statements
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 34
AutoAuto--Summary is OFF by defaultSummary is OFF by default
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
Effects of enabling AutoEffects of enabling Auto--summarysummary
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 35
Without AutoWithout Auto--SummarySummary
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
Network statement / static routesNetwork statement / static routes
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 36
Redistribution into BGPRedistribution into BGP
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
Routes must be in routing table to be Routes must be in routing table to be injected on the local router into BGPinjected on the local router into BGP
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 37
Redistribute Connected and Origin codeRedistribute Connected and Origin code
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
Setting the metric on redistributionSetting the metric on redistribution
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 38
Sourcing a default route, for othersSourcing a default route, for others
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
Neighbor sees default routeNeighbor sees default route
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 39
ORIGIN Path AttributeORIGIN Path Attribute
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
Additional ways of injecting routes:Additional ways of injecting routes:
• Aggregate (summary) routes– At least 1 more specific route that belongs to
th t b i th BGP t blthe summary must be in the BGP table
• BGP inject-map– Doesn’t require the route to be in the BGP
table, and is conditional based on policy
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 40
Aggregation Aggregation
• BGP aggregation, like IGP summarization, is used to reduce resource requirements needed to process the BGP table
C f– Configured as aggregate-address [network] [mask] [summary-only|as-set|route-map|...]
• Can be applied at any point in the network– No hierarchy like OSPF/IS-IS
• Does not automatically stop subnet advertisements
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
advertisements– summary-only argument
• Can be used for longest match routing traffic engineering
Synchronization RuleSynchronization Rule
• Off by default
• IF on, then all the BGP routes must ALSO appear via an IGP, otherwise we won’t use them.
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 41
General Q&AGeneral Q&A
Copyright © Copyright © 2010 2010 Internetwork Expert, Inc Internetwork Expert, Inc www.INE.comwww.INE.com
Configuring Configuring iBGPiBGP using using LoopbacksLoopbacks
06
http://www.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 42
Our JourneyOur Journey
• BGP fundamentals– Injecting networks, iBGP, eBGP, Route
Reflectors, Confederations, Peer GroupsReflectors, Confederations, Peer Groups
• Policy Based BGP– Attributes and Filtering
– Manipulating BGP
• Complex Topologies
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
g– Advanced route maps, community, load
balancing, dampening, troubleshooting
iBGP Full Mesh ExampleiBGP Full Mesh Example
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 43
iBGP Full Mesh ScalabilityiBGP Full Mesh Scalability
• n*(n-1)/2 doesn’t scale– 10 routers, 45 peerings
– 100 routers, 4950 peerings
– 1000 routers, 499,500 peerings
• Can be fixed with two exceptions– Route Reflectors
• Same logic as DR/DIS
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
• Same logic as DR/DIS
– Confederation• Split the AS into smaller Sub-ASes
How many TCP Sessions for Full MeshHow many TCP Sessions for Full Mesh
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 44
BGP Peering RedundancyBGP Peering Redundancy
• BGP peering is based on TCP reachability to peer address
• If peer address is unreachable peering goesIf peer address is unreachable, peering goes down– e.g. if IP address of Serial link is used for peering and
Serial link is down, peer goes down
• Using Loopback addresses for peerings allows rerouting around link failures and adds redundancy
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
redundancy– e.g. as long as any link is up, Loopback can be
reached
• Defined as update-source for TCP session
BGP Loopback Redundancy ExampleBGP Loopback Redundancy ExampleR1 and R2 Peer Using Their
Directly Connected Link
Directly Connected Link GoesDown and BGP Peering Is Lost
R1 and R2 Peer Using TheirLoopback Interfaces
Physical Link Goes DownBut Peering Is Rerouted
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 45
Update Source ConfigurationUpdate Source Configuration
• Modify peering source address– neighbor [address] update-source [interface][interface]
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
General Q&AGeneral Q&A
Copyright © Copyright © 2010 2010 Internetwork Expert, Inc Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 46
Route Reflector ClustersRoute Reflector Clusters
07
http://www.INE.com
Our JourneyOur Journey
• BGP fundamentals– Injecting networks, iBGP, eBGP, Route
Reflectors, Confederations, Peer GroupsReflectors, Confederations, Peer Groups
• Policy Based BGP– Attributes and Filtering
– Manipulating BGP
• Complex Topologies
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
g– Advanced route maps, community, load
balancing, dampening, troubleshooting
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 47
BGP Route ReflectorsBGP Route Reflectors
• Eliminates need for full mesh– Only need peering(s) to the RR(s)
• Like OSPF DR , minimizes prefix replication– Send one update to the RR
– RR sends the update to its “clients”
Loop prevention through Cluster ID
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
• Loop prevention through Cluster-ID– If I am a RR and I receive a route with my own
Cluster-ID, discard it
Route Reflector ExampleRoute Reflector Example
RouteReflector
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 48
Design GuidelinesDesign Guidelines
• Redundant RRs have iBGP between them
• Client have no iBGP connections except to ther RRs
• Cluster ID set to the same value on RRs in the same cluster.
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
Route ReflectorsRoute Reflectors
• Enabling Route Reflection– neighbor [address] route-reflector-clientreflector-client
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 49
Route ReflectorRoute Reflector
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
General Q&AGeneral Q&A
Copyright © Copyright © 2010 2010 Internetwork Expert, Inc Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 50
ConfederationsConfederations
08
http://www.INE.com
Our JourneyOur Journey
• BGP fundamentals– Injecting networks, iBGP, eBGP, Route
Reflectors, Confederations, Peer GroupsReflectors, Confederations, Peer Groups
• Policy Based BGP– Attributes and Filtering
– Manipulating BGP
• Complex Topologies
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
g– Advanced route maps, community, load
balancing, dampening, troubleshooting
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 51
BGP ConfederationBGP Confederation
• Reduces full mesh iBGP need by splitting AS into smaller Sub-ASes
Inside Sub AS full mesh or RR need remains– Inside Sub-AS full mesh or RR need remains– Between Sub-AS acts like EBGP
• Devices outside the confederation do not know about the internal structure– Sub-AS numbers are stripped from
advertisements to true EBGP peers
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
advertisements to true EBGP peers
• Typically uses ASNs in private range (64512 – 65535)
BGP Confederation ExampleBGP Confederation Example
RouteReflector
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 52
Confederation ImplementationConfederation Implementation
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
ConfederationsConfederations
• Enabling Confederation– Enable global BGP process
•router bgp [Sub ASN]•router bgp [Sub-ASN]
– Define global ASN•bgp confederation-id [ASN]
– Define other Sub-ASes•bgp confederation peers [Sub-ASN1] [Sub-ASN2] [Sub-ASNn]
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 53
ConfederationConfederation
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
ConfederationConfederation
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 54
AS Path for InterAS Path for Inter--ConfederationConfederation
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
General Q&AGeneral Q&A
Copyright © Copyright © 2010 2010 Internetwork Expert, Inc Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 55
Peer GroupsPeer Groups
09
http://www.INE.com
Our JourneyOur Journey
• BGP fundamentals– Injecting networks, iBGP, eBGP, Route
Reflectors, Confederations, Peer GroupsReflectors, Confederations, Peer Groups
• Policy Based BGP– Attributes and Filtering
– Manipulating BGP
• Complex Topologies
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
g– Advanced route maps, community, load
balancing, dampening, troubleshooting
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 56
BGP Peer GroupsBGP Peer Groups
• Typically many peers share the same update policy– e.g. a route reflector’s clients
• BGP Peer Groups reduce configuration and processing overhead by applying a template to the peers
• Peer group is assigned parameters such as…– remote-as– route-reflector-client
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
– route-map• Neighbor is specified as a member of the group
– Peers in a group must be either all iBGP or all EBGP
Peer group ConfigurationPeer group Configuration
• Configuring BGP peer group– neighbor [Peer-Group-Name] peer-group
neighbor [Peer Group Name] [attrbiutes]– neighbor [Peer-Group-Name] [attrbiutes]
– neighbor [address] peer-group [Peer-Group-Name]
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 57
BGP Peer Group ExampleBGP Peer Group Examplerouter bgp 1neighbor IBGP_PEER_GROUP peer-groupneighbor IBGP_PEER_GROUP remote-as 1neighbor IBGP_PEER_GROUP update-source Loopback0i hb G G O fl lineighbor IBGP_PEER_GROUP route-reflector-client
neighbor IBGP_PEER_GROUP next-hop-selfneighbor 1.2.3.4 peer-group IBGP_PEER_GROUPneighbor 5.6.7.8 peer-group IBGP_PEER_GROUPneighbor 9.10.11.12 peer-group IBGP_PEER_GROUPneighbor 13.14.15.16 peer-group IBGP_PEER_GROUP
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
Dynamic Update PeerDynamic Update Peer--GroupsGroups
• Separate outbound routing policies
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 58
PeerPeer--groupsgroups
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
General Q&AGeneral Q&A
Copyright © Copyright © 2010 2010 Internetwork Expert, Inc Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 59
Authentication and TTL SecurityAuthentication and TTL Security
10
http://www.INE.com
BGP AuthenticationBGP Authentication
• Like IGP authentication, BGP peer authentication protects control plane against attacks and misconfigurationsattacks and misconfigurations– Without authentication, BGP susceptible to TCP RST
attacks• Interesting read: “Slipping in the Window: TCP Reset attacks”
• Uses MD5 as defined in RFC 2385– “Protection of BGP Sessions via the TCP MD5
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
Signature Option”
• Simply configured as neighbor [address] password [password]
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 60
Authentication ConfigurationAuthentication Configuration
• Enabling BGP authentication– neighbor [address] password [password]
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
TTL SecurityTTL Security
• Configured per eBGP peer
• Chan ges the TTL for eBGP to 255
• You choose how may hops max the peer is away. Any incoming eBGP updates with TTL below the acceptable level are silently discarded.
Copyright © 2010 Internetwork Expert, Inc Copyright © 2010 Internetwork Expert, Inc www.INE.comwww.INE.com
www.INE.comwww.INE.com
Copyright © 2010 Internetwork ExpertCopyright © 2010 Internetwork Expert 61
General Q&AGeneral Q&A
Copyright © Copyright © 2010 2010 Internetwork Expert, Inc Internetwork Expert, Inc www.INE.comwww.INE.com