Title: BGP Overview
1 BGP Overview
- Joe Walter
- Enterprise Solutions Center
- ESG
- Verizon
- November 20, 2002
2NJEDge - Border Gateway Protocol (BGP)
- AGENDA
- What is BGP Why is it needed?
- Connectivity and Addressing Choices
- BGP Best Practices
- Q A
- ------(For Reference)_----------
- MPLS (Multiprotocol Label Switching) Overview
- MPLS and Traditional BGP
- BGP/MPLS VPN Overview
3Border Gateway Protocol
- Evolved from EGP (Exterior Gateway Protocol) -
RFC 827 from the early 1980s - BGP is now in Version 4 and has evolved from RFC
1105, RFC 1163, RFC 1267 which is BGP -1, BGP-2
and BGP-3 respectively - BGP-4 was introduced in 1995 in RFC 1771
- Key Difference is that BGP-4 is classless versus
classful - Classless - the prefix length is carried along
with the routing update
4BGP defined continued
- Path vector protocol. PV is an ordered set of
values that represent AS numbers. - PV is contained within the routing update as
AS_PATH attribute - determines the shortest path to the destination
- prevents routing loops
- Uses TCP port 179
- Uses Incremental updates - only when network
topology changes - Internal and External BGP
- Internal (within the same AS)
- External (between different ASs)
5CIDR (Classless Interdomain Routing)
- CIDR is an IP address summarization technique
- BGP supports CIDR
- Makes routing scalable
- Takes advantage of hierarchical nature of the
Internet - Route summarization is used to cut down the
number of routes in routing tables
6CIDR Example
192.168.0.0/24
192.168.1.0/24
CIDR
192.168.0.0/22
192.168.2.0/24
192.168.3.0/24
7BGP Message Types
- Open - identify itself and specify its BGP
operational parameters - Keepalive - 60 seconds default on Cisco
- Update - advertises feasible routes, withdrawn
routes or both - Notification - sent whenever an error is detected
and always causes the BGP connection to close
8BGP attributes
- Below is a partial list
- Origin
- AS-PATH
- NEXT_HOP
- LOCAL_PREF
- COMMUNITY
- MULTI_EXIT_DISC (MED)
- ORIGINATOR_ID
9BGP and IGP
- IGP (Interior Gateway Protocol) - OSPF, IS-IS,
EIGRP and RIP - BGP relies on IGP for peer reachability
- BGP is synchronized with IGP
- BGP will not announce a route if it is NOT known
by IGP - Routers running IGP must know where to send
packets for BGP destinations. - MPLS significantly simplifies BGP and IGP
interaction (to be discussed later)
10Why is BGP needed?
- In General
- For its ability to deliver routing information
between routers that are not directly attached - For its flexible and powerful route advertisement
and filtering policies - It runs the Internet
- For Service Providers
- Protocol of choice to exchange routing
information between SPs in a scalable and
controlled manner - For Customers
- To provide dynamic routing connectivity to the
Internet - Redundancy
- Routing granularity
11Addressing and Connectivity Choices
- Addressing Choices
- Private versus Public AS number (ASN)
- Provider Assigned (PA) versus Provider
Independent (PI) IP addressing - Connectivity Choices
- Single Homed to Single Autonomous System
- Dual Homed to Single Autonomous System
- Dual Homed to Dual Autonomous Systems
- Split Connection ISP and Extranet
12Addressing Private vs. Public ASN
- Autonomous System (AS) - A set of routers under a
common technical administrative control - AS number (ASN) - an AS identifier
- decimal number in the range of 1 - 65535
- Private ASN
- 64512 ? private ASN ? 65535
- Usually assigned by ISP
- ISP removes Private ASN from AS_PATH before
sending route to the Internet - Public ASN
- 1 ? public ASN ? 64511
- Assigned by ARIN
13Addressing PA vs. PI
- Provider Assigned (PA) IP addresses
- assigned by ISP to the customer from ISP address
block - usually comes with the Private ASN
- If customer changes provider then addresses are
taken back - Provider Independent (PI) IP addresses
- assigned by ARIN
- usually comes with public ASN
- Stays with the customer if the provider changes
14Connectivity Single-Homed Autonomous System
Public ASN and PI Addresses
Private ASN and PA Addresses
AS 65100
AS 100
X.X.X.4/30
Y.Y.Y.4/30
X.Y.Z.0/22
A.B.C.0/22
AS 1
AS 1
X.0.0.0/8
Y.0.0.0/8
Internet
Network A.B.C.0/22 Path 1,100
Internet
Network X.0.0.0/8 Path 1
15Single-Homed Autonomous System Config
- Public ASN and PI Addresses
- Router bgp 100
- network A.B.C.0 mask 255.255.252.0
- Neighbor Y.Y.Y.5 remote-as 1
- Only partial configuration shown
- Private ASN and PA Addresses
- Router bgp 65100
- network X.Y.Z.0 mask 255.255.252.0
- Neighbor X.X.X.5 remote-as 1
16Connectivity Dual-Homed Autonomous System to
single Autonomous System
Public ASN and PI Addresses
Private ASN and PA Addresses
AS 100
AS 65100
Y.Y.Y.4/30
X.X.X.4/30
A.B.C.0/22
X.Y.Z.0/22
AS 1
Y.0.0.0/8
AS 1
X.0.0.0/8
Y.Y.Y.8/30
X.X.X.8/30
Internet
Network A.B.C.0/22 Path 1,100
Internet
Network X.0.0.0/8 Path 1
17Dual-Homed Autonomous System to single
Autonomous System Config
- Public ASN and PI Addresses
- Top router
- Router bgp 100
- network A.B.C.0 mask 255.255.252.0
- Neighbor Y.Y.Y.9 remote-as 1
- Bottom router
- Router bgp 100
- network A.B.C.0 mask 255.255.252.0
- Neighbor Y.Y.Y.5 remote-as 1
- Only partial configuration shown
- Private ASN and PA Addresses
- Top router
- Router bgp 65100
- network X.Y.Z.0 mask 255.255.252.0
- Neighbor X.X.X.5 remote-as 1
- Bottom router
- Router bgp 65100
- network X.Y.Z.0 mask 255.255.252.0
- Neighbor X.X.X.9 remote-as 1
18Connectivity Dual-Homed Autonomous System to
Dual Autonomous Systems
Public ASN and PI Addresses
AS 100
A.B.C.0/22
X.X.X.4/30
Y.Y.Y.4/30
AS 3
AS 1
X.0.0.0/8
Y.0.0.0/8
ISP 1
ISP 2
Internet
Network A.B.C.0/22 Path 1 1,100 Path 2
3,100
19Dual-Homed Autonomous System to Dual Autonomous
Systems Config
- Public ASN and PI Addresses
- Router on the Left
- router bgp 100
- network A.B.C.0 mask 255.255.252.0
- Neighbor Y.Y.Y.5 remote-as 1
- Only partial configuration shown
- Router on the right
- router bgp 100
- network A.B.C.0 mask 255.255.252.0
- Neighbor X.X.X.5 remote-as 3
20Split - Dual connection - NJEDge
AS 100
A.B.C.0/22 - PI Internet Space
10.10.0.0/22 - NJEdge Extranet Space
TX A.B.C.0/22 Only RX Default/Partial/Full
TX 10.10.0.022 Only RX NJEdge Extranet Routes
10.X.X.4/30
Y.Y.Y.4/30
AS 1
Y.0.0.0/8
AS 19262
ISP
VIS
Network A.B.C.0/22 Path 1 1,100
Internet
NJEDge
21Split - Dual connection - NJEDge
- CE- Router Config
- router bgp 100
- network A.B.C.0 mask 255.255.252.0
- network 10.10.0.0 mask 255.255.252.0
- neighbor Y.Y.Y.5 description Tier1 ISP
- neighbor Y.Y.Y.5 remote-as 1
- neighbor Y.Y.Y.5 prefix-list INTERNET-RANGE out
- neighbor Y.Y.Y.5 prefix-list DEFAULT in
- neighbor 10.X.X.5 description NJEdge Extranet
PE - neighbor 10.X.X.5 remote-as 19262
- neighbor 10.X.X.5 prefix-list NJEDGE-RANGE out
- neighbor 10.X.X.5 prefix-list NJEDGE-EXTRANET in
- ip prefix-list INTERNET-RANGE seq 5 permit
A.B.C.0/22 - ip prefix-list DEFAULT seq 5 permit 0.0.0.0/0
- ip prefix-list NJEDGE-RANGE seq 5 permit
10.10.0.0/22 - ip prefix-list NJEDGE-EXTRANET seq 5 deny
10.10.0.0/22 - ip prefix-list NJEDGE-EXTRANET seq 10 permit
10.0.0.0/8 le 24
The configuration DEPENDS on your local
environment Need to setup filtering for policy
IN and OUT bound
22BGP Best Practices
- Full BGP routing table requires minimum of 128
Mbytes memory for router - Keep it Simple!
- Be careful of use of no synchronization
- Be careful of use of no auto-summary
- Avoid redistribution of IGP
- Try to Summarize
- Set inbound policy
- Set outbound policy
23More on BGP
- Ciscos BGP support link
- http//www.cisco.com/pcgi-bin/Support/browse/psp_v
iew.pl?pInternetworkingBGP - Routing TCP/IP Volume II, Jeff Doyle Cisco
Press - Internet Routing Architectures, Bassam Halabi,
Cisco Press - BGP/MPLS VPNs
- http//www.ietf.org/rfc/rfc2547.txt
24Q A
25For Reference - MPLS Overview
- MPLS - Multiprotocol Label Switching - a
technology that combines benefits of Layer 2
switching and Layer 3 routing - MPLS Architecture
- Control Plane
- IP Routing Protocols (OSPF, IS-IS, etc). Used to
obtain Layer 3 network reachability information. - Label Distribution Protocol (LDP). Used to
distribute bindings between learned Layer 3
prefixes and MPLS labels - Forwarding Plane
- Label Switching
- Basic MPLS Network Components
- P-routers Provider Backbone or Label Switch
Routers (LSR) - PE-routers Provider Edge or Label Edge Routers
- CE-routers Customer Edge Routers
26MPLS Overview - Labels
- Labels are numerical values that are inserted
into frames - ATM uses VPI/VCI
- Frame Relay uses DLCI
- Ethernet uses a special shim header
- Labels can be stacked (important for MPLS VPNs)
6 bytes
6 bytes
2 bytes
20 bits
3 bits
1
8 bits
4 bytes
Data
Src. MAC
Type/Length
Label 1
EXP
TTL
FCS
Label 2
E
T
S
Dest MAC
Shim Header - 4 bytes min.
For Ethernet MPLS uses Type value of 0x8847 -
MPLS Unicast
27MPLS and Traditional BGP
- MPLS significantly simplifies packet forwarding
to BGP destinations - Traditionally BGP had to be run on every router
in the core of an ISP network to enable proper
packet forwarding - MPLS allows to forward packets to BGP
destinations by simply label-switching traffic to
a BGP next-hop address - BGP next-hop addresses must be reachable via IGP,
which allows them to be associated with MPLS
labels - This allows ISP core routers to run only an IGP
(IS-IS). ISP PE routers are the only ones that
need to run BGP
28MPLS and Traditional BGP (contd)
Pre-MPLS
Peering ISP or Customer
Peering ISP or Customer
CORE
IBGP
IGP
EBGP
MPLS
LDP
LDP
LDP
Peering ISP or Customer
Peering ISP or Customer
MPLS CORE
P
P
PE
PE
29BGP/MPLS VPN - RFC 2547
- Implemented within a Service Provider network
- This is not a Tunnel technology (like IPSec)
- Provides Peer-to-Peer Full Mesh Native IP
connectivity (eliminates the N2 issue) - VPN Routing Information is Distributed using
MP-BGP (Multiprotocol BGP) - Each VPN is assigned a unique Route Distinguisher
(RD). RD is used by MP-BGP as an Extended
Community attribute - VPN routes are constructed by pre-pending a
32-bit IPv4 prefix with a unique 64-bit Route
Distinguisher (RD) - Overlapping IP Addresses are Allowed
30BGP/MPLS VPN (contd)
- VPN Packet Forwarding is done by MPLS using a
two-label stack - An outer label is used to deliver a packet across
MPLS network - An inner label is used to forward a packet to an
appropriate VPN interface - Uses Virtual Routing and Forwarding (VRF) Tables
on (Cisco) Routers - A VRF is a set of physical interfaces and logical
routing information - VRFs effectively partition a router into a set of
independent Virtual Routers
31BGP/MPLS VPN (contd)
CUST1
CUST1
MPLS/MP-BGP
PE
PE
P
CUST2
CUST2
P
CUST1 10.0.0.0/8 RD 100100
P
CUST2 10.0.0.0/8 RD 200200
PE
CUST1
CUST2
32BGP/MPLS VPN - CE to PE Connectivity
- Physical Connectivity
- ATM
- Frame Relay
- Ethernet
- Point-to-Point (PPP, HDLC)
- Logical Connectivity
- Static Routing
- OSPF
- RIPv2
- BGP
- Single Homed to Single AS with Public/Private ASN
and PA/PI Address Space - Dual Homed to Single AS with Public/Private ASN
and PA/PI Address Space