Introduction. Keith Barker, CCIE #6783. YouTube - Keith6783.

Similar documents
Internetwork Expert s CCNP Bootcamp. Border Gateway Protocol (BGP) What Is BGP?

Configuring BGP. Cisco s BGP Implementation

Border Gateway Protocol - BGP

Chapter 13 Configuring BGP4

Configuring BGP on Cisco Routers Volume 1

Configuring BGP community 43 Configuring a BGP route reflector 44 Configuring a BGP confederation 44 Configuring BGP GR 45 Enabling Guard route

Module 6 Implementing BGP

internet technologies and standards

Operation Manual BGP. Table of Contents

BGP Commands. Network Protocols Command Reference, Part 1 P1R-355

Configuration prerequisites 45 Configuring BGP community 45 Configuring a BGP route reflector 46 Configuring a BGP confederation 46 Configuring BGP

This appendix contains supplementary Border Gateway Protocol (BGP) information and covers the following topics:

BGP Commands. Network Protocols Command Reference, Part 1 P1R-355

Configuring Advanced BGP

Protecting an EBGP peer when memory usage reaches level 2 threshold 66 Configuring a large-scale BGP network 67 Configuring BGP community 67

LACNIC XIII. Using BGP for Traffic Engineering in an ISP

BGP Part-1.

BGP can also be used for carrying routing information for IPv6 prefix over IPv6 networks.

Inter-Domain Routing: BGP

Configuring a Basic BGP Network

Chapter 17 BGP4 Commands

Q&As. CCIP Configuring BGP on Cisco Routers (BGP) Pass Cisco Exam with 100% Guarantee

CS4700/CS5700 Fundamentals of Computer Networks

CertifyMe. CertifyMe

Symbols. Numerics I N D E X

Internet inter-as routing: BGP

Connecting to a Service Provider Using External BGP

Configuring Internal BGP Features

COMP/ELEC 429 Introduction to Computer Networks

The Contemporary Internet p. 3 Evolution of the Internet p. 5 Origins and Recent History of the Internet p. 5 From ARPANET to NSFNET p.

Table of Contents. BGP Configuration 1

Introduction to BGP. ISP/IXP Workshops

Configuring a Basic BGP Network

BGP for Internet Service Providers

BGP Configuration. BGP Overview. Introduction to BGP. Formats of BGP Messages. Header

Unit 3: Dynamic Routing

Table of Contents 1 BGP Configuration 1-1

BGP. BGP Overview. Formats of BGP Messages. I. Header

Internet Interconnection Structure

BGP. BGP Overview. BGP Operation. BGP Neighbors

Introduction to BGP. ISP Workshops. Last updated 30 October 2013

LARGE SCALE IP ROUTING LECTURE BY SEBASTIAN GRAF

Connecting to a Service Provider Using External BGP

Multiprotocol BGP (MBGP)

Routing Between Autonomous Systems (Example: BGP4) RFC 1771

BGP. Autonomous system (AS) BGP version 4

BGP Protocol & Configuration. Scalable Infrastructure Workshop AfNOG2008

Ravi Chandra cisco Systems Cisco Systems Confidential

Configuration BGP Services Avaya Virtual Services Platform 9000

Chapter 20 Border Gateway Protocol version 4 (BGP-4)

MPLS VPN Multipath Support for Inter-AS VPNs

BGP. Autonomous system (AS) BGP version 4

Internet Routing : Fundamentals of Computer Networks Bill Nace

CCNP 1: Advanced Routing

Internet Routing Architectures, Second Edition

Internet Routing Basics

BGP. Autonomous system (AS) BGP version 4

Routing Protocols --- Exterior Gateway Protocol

Implementing BGP. BGP Functional Overview. Border Gateway Protocol (BGP) is an Exterior Gateway Protocol (EGP) that allows you to create loop-free

Introduction to BGP ISP/IXP Workshops

Configuration - BGP Services Avaya Ethernet Routing Switch 5000 Series

BGP. Autonomous system (AS) BGP version 4. Definition (AS Autonomous System)

BGP. Autonomous system (AS) BGP version 4. Definition (AS Autonomous System)

BGP in the Internet Best Current Practices

BGP Route Reflector Commands

An Operational Perspective on BGP Security. Geoff Huston February 2005

Configuration BGP Services Avaya Ethernet Routing Switch 8300

TDC 363 Introduction to LANs

APNIC elearning: BGP Basics. 30 September :00 PM AEST Brisbane (UTC+10) Revision: 2.0

Implementing Cisco IP Routing (ROUTE)

BGP Scaling (RR & Peer Group)

IP Routing: BGP Command Reference, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)

Border Gateway Protocol (an introduction) Karst Koymans. Tuesday, March 8, 2016

FiberstoreOS BGP Command Line Reference

ABR (Area Border Router), 206, 216 access, dedicated networks, 23 access layer, three-layer hierarchical design model, 6

CSCD 433/533 Network Programming Fall Lecture 14 Global Address Space Autonomous Systems, BGP Protocol Routing

BGP. Inter-domain routing with the Border Gateway Protocol. Iljitsch van Beijnum Amsterdam, 13 & 16 March 2007

Network Protocols. Routing. TDC375 Autumn 03/04 John Kristoff - DePaul University 1

IP Routing Volume Organization

MPLS VPN Inter-AS IPv4 BGP Label Distribution

CS 457 Networking and the Internet. The Global Internet (Then) The Global Internet (And Now) 10/4/16. Fall 2016

HP Load Balancing Module

IBGP internals. BGP Advanced Topics. Agenda. BGP Continuity 1. L49 - BGP Advanced Topics. L49 - BGP Advanced Topics

Contents. BGP commands 1

Configuring basic MBGP

Operation Manual Routing Protocol. Table of Contents

How BGP Routers Use the Multi Exit Discriminator for Best Path Selection

Routing Basics. SANOG July, 2017 Gurgaon, INDIA

Border Gateway Protocol (BGP-4)

PART III. Implementing Inter-Network Relationships with BGP

Cisco CISCO Configuring BGP on Cisco Routers Exam. Practice Test. Version

Routing(2) Inter-domain Routing

MPLS VPN Route Target Rewrite

Vendor: Alcatel-Lucent. Exam Code: 4A Exam Name: Alcatel-Lucent Border Gateway Protocol. Version: Demo

MPLS VPN Carrier Supporting Carrier Using LDP and an IGP

Implementing Cisco IP Routing E-Learning

Copyright 1998, Cisco Systems, Inc. All rights reserved. Printed in USA. 0945_05F9_c1.scr 1. RST _05_2001_c1

Border Gateway Protocol (an introduction) Karst Koymans. Monday, March 10, 2014

MPLS VPN--Inter-AS Option AB

University of Belgrade - School of Electrical Engineering Department of Telecommunications

Transcription:

Understanding, Implementing and troubleshooting BGP 01 Introduction http:// Instructor Introduction Keith Barker, CCIE #6783 CCIE Routing and Switching 2001 CCIE Security 2003 kbarker@ine.com YouTube - Keith6783 Copyright 2010 Internetwork Expert 1

Keith s Office BGP fundamentals Our Journey Injecting networks, ibgp, ebgp, Route Reflectors, Confederations, Peer Groups Policy Based BGP Attributes and Filtering Manipulating BGP Complex Topologies Advanced route maps, community, load balancing, dampening, troubleshooting Copyright 2010 Internetwork Expert 2

The playing field 642-661661 Copyright 2010 Internetwork Expert 3

General Q&A BGP Overview 02 http:// Copyright 2010 Internetwork Expert 4

What Is BGP? Border Gateway Protocol Version 4 Standards based RFC 4271 A Border Gateway Protocol 4 (BGP-4) Exterior Gateway Protocol (EGP) Used for inter-domain routing between Autonomous Systems Path vector routing Uses multiple l attributes t for routing decision i Classless Supports VLSM and summarization Inter-AS 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 inter-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 RFC 4893 defines 4-byte ASNs 0.0 65535.65535 notation 0.[0-65535] denote original 2-byte ASNs Copyright 2010 Internetwork Expert 5

ICANN ICANN Copyright 2010 Internetwork Expert 6

IANA Address Space Registry Copyright 2010 Internetwork Expert 7

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 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 Transit networks Who Needs BGP? SPs that sell access or transit bandwidth to customers Need full routing table to make accurate decisions Should not use default routing Multihomed networks Enterprise networks with two or more connections to ISPs Allows control of inbound and outbound routing policy Copyright 2010 Internetwork Expert 8

Example Transit Network Example Multihomed Network Internet ISP 1 AS 1000 ISP 2 AS 2000 Customer 1 AS 100 Copyright 2010 Internetwork Expert 9

The actual network is DownStream When not To Use BGP Single ISP connectivity Default routing sufficient Limited it 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 behalf Red tape involved with getting Provider Independent address space and BGP ASN Copyright 2010 Internetwork Expert 10

General Q&A BGP Basic Compnents 03 http:// Copyright 2010 Internetwork Expert 11

BGP Building Blocks BGP 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 Routing table The best routes from the BGP table actually used for routing (Maybe. AD still used) Copyright 2010 Internetwork Expert 12

How BGP Works Establish BGP peerings to build neighbor table Exchange updates to build BGP table Choose BGP bestpaths to build routing table Won t you be my neighbor? Copyright 2010 Internetwork Expert 13

Example: BGP Neighbors Example: Global BGP table Copyright 2010 Internetwork Expert 14

Example: Routing Table Establishing BGP Peerings Like IGP, first step in BGP is to find neighbors to exchange information with Unlike 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 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 Copyright 2010 Internetwork Expert 15

BGP Packet Formats Peering establishment and maintenance uses four types of packets OPEN KEEPALIVE UPDATE NOTIFICATION BGP OPEN Message Used to negotiate parameters for peering Includes BGP version Should be 4 Local ASN Local Router-ID Hold time Negotiated t to lowest requested value Options AKA capabilities Copyright 2010 Internetwork Expert 16

BGP Open Message BGP KEEPALIVE Message Used for dead neighbor detection If hold time = 0, keepalives disabled Copyright 2010 Internetwork Expert 17

Keepalive BGP 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 Attributes of route being advertised Used for bestpath selection Copyright 2010 Internetwork Expert 18

BGP Update Withdrawn Route Copyright 2010 Internetwork Expert 19

BGP NOTIFICATION Message Used to convey error messages After notification sent, BGP session closed Examples Unsupported Version Number Unsupported Optional Parameter Unacceptable Hold Time Hold Timer Expired Notification Copyright 2010 Internetwork Expert 20

BGP 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 Open confirm OPEN message received, parameters agreed upon Established Peering complete Debug ip bgp Copyright 2010 Internetwork Expert 21

General Q&A Configuring Basic BGP 04 http:// Copyright 2010 Internetwork Expert 22

BGP fundamentals Our Journey Injecting networks, ibgp, ebgp, Route Reflectors, Confederations, Peer Groups Policy Based BGP Attributes and Filtering Manipulating BGP Complex Topologies Advanced route maps, community, load balancing, dampening, troubleshooting Configuring BGP, the beginning Copyright 2010 Internetwork Expert 23

BGP 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 Basic BGP Configuration Enable global BGP process router bgp [ASN] Establish BGP peers neighbor [address] remote-as [remote ASN] Copyright 2010 Internetwork Expert 24

ibgp 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 the AS must peer with each other i.e. ibgp full mesh n*(n-1)/2 peerings Add ibgp neighbor Copyright 2010 Internetwork Expert 25

Idle, connect, open sent/confirm established Verify neighbors Copyright 2010 Internetwork Expert 26

Verify ibgp neighbor details EBGP 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] Uses AS-Path attribute t for loop prevention If I receive an update from an EBGP peer with my own ASN in the AS-Path, discard it Copyright 2010 Internetwork Expert 27

ebgp Neighbor ebgp Neighbor Copyright 2010 Internetwork Expert 28

State/PfxRcd Show ip bgp summary Copyright 2010 Internetwork Expert 29

Show ip bgp neighbor (ebgp) BGP Router-ID Copyright 2010 Internetwork Expert 30

BGP Router-ID cont Changing the BGP router-id Copyright 2010 Internetwork Expert 31

General Q&A Getting routes/prefixes into BGP 05 http:// Copyright 2010 Internetwork Expert 32

BGP fundamentals Our Journey Injecting networks, ibgp, ebgp, Route Reflectors, Confederations, Peer Groups Policy Based BGP Attributes and Filtering Manipulating BGP Complex Topologies Advanced route maps, community, load balancing, dampening, troubleshooting Network Statements Copyright 2010 Internetwork Expert 33

Auto-Summary is OFF by default Effects of enabling Auto-summary Copyright 2010 Internetwork Expert 34

Without Auto-Summary Network statement / static routes Copyright 2010 Internetwork Expert 35

Redistribution into BGP Routes must be in routing table to be injected on the local router into BGP Copyright 2010 Internetwork Expert 36

Redistribute Connected and Origin code Setting the metric on redistribution Copyright 2010 Internetwork Expert 37

Sourcing a default route, for others Neighbor sees default route Copyright 2010 Internetwork Expert 38

ORIGIN Path Attribute Additional ways of injecting routes: Aggregate (summary) routes At least 1 more specific route that belongs to the 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 39

Aggregation BGP aggregation, like IGP summarization, is used to reduce resource requirements needed to process the BGP table Configured as aggregate-address [network] [mask] [summary-only as-set routemap...] Can be applied at any point in the network No hierarchy like OSPF/IS-IS Does not automatically stop subnet advertisements summary-only argument Can be used for longest match routing traffic engineering Synchronization 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 40

General Q&A Configuring ibgp using Loopbacks 06 http:// Copyright 2010 Internetwork Expert 41

BGP fundamentals Our Journey Injecting networks, ibgp, ebgp, Route Reflectors, Confederations, Peer Groups Policy Based BGP Attributes and Filtering Manipulating BGP Complex Topologies Advanced route maps, community, load balancing, dampening, troubleshooting ibgp Full Mesh Example Copyright 2010 Internetwork Expert 42

ibgp 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 Confederation Split the AS into smaller Sub-ASes How many TCP Sessions for Full Mesh Copyright 2010 Internetwork Expert 43

BGP Peering Redundancy BGP peering is based on TCP reachability to peer address If 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 e.g. as long as any link is up, Loopback can be reached Defined as update-source for TCP session BGP Loopback Redundancy Example R1 and R2 Peer Using Their Directly Connected Link Directly Connected Link Goes Down and BGP Peering Is Lost R1 and R2 Peer Using Their Loopback Interfaces Physical Link Goes Down But Peering Is Rerouted Copyright 2010 Internetwork Expert 44

Update Source Configuration Modify peering source address neighbor [address] update-source [interface] General Q&A Copyright 2010 Internetwork Expert 45

Route Reflector Clusters 07 http:// BGP fundamentals Our Journey Injecting networks, ibgp, ebgp, Route Reflectors, Confederations, Peer Groups Policy Based BGP Attributes and Filtering Manipulating BGP Complex Topologies Advanced route maps, community, load balancing, dampening, troubleshooting Copyright 2010 Internetwork Expert 46

BGP 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 If I am a RR and I receive a route with my own Cluster-ID, discard it Route Reflector Example Route Reflector Copyright 2010 Internetwork Expert 47

Design 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. Route Reflectors Enabling Route Reflection neighbor [address] route- reflector-client Copyright 2010 Internetwork Expert 48

Route Reflector General Q&A Copyright 2010 Internetwork Expert 49

Confederations 08 http:// BGP fundamentals Our Journey Injecting networks, ibgp, ebgp, Route Reflectors, Confederations, Peer Groups Policy Based BGP Attributes and Filtering Manipulating BGP Complex Topologies Advanced route maps, community, load balancing, dampening, troubleshooting Copyright 2010 Internetwork Expert 50

BGP Confederation Reduces full mesh ibgp need by splitting AS into smaller Sub-ASes 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 Typically uses ASNs in private range (64512 65535) BGP Confederation Example Route Reflector Copyright 2010 Internetwork Expert 51

Confederation Implementation Confederations Enabling Confederation Enable global BGP process router bgp [Sub-ASN] Define global ASN bgp confederation-id [ASN] Define other Sub-ASes bgp confederation peers [Sub-ASN 1 ] [Sub-ASN 2 ] [Sub-ASN n ] Copyright 2010 Internetwork Expert 52

Confederation Confederation Copyright 2010 Internetwork Expert 53

AS Path for Inter-Confederation General Q&A Copyright 2010 Internetwork Expert 54

Peer Groups 09 http:// BGP fundamentals Our Journey Injecting networks, ibgp, ebgp, Route Reflectors, Confederations, Peer Groups Policy Based BGP Attributes and Filtering Manipulating BGP Complex Topologies Advanced route maps, community, load balancing, dampening, troubleshooting Copyright 2010 Internetwork Expert 55

BGP 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 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 Configuration Configuring BGP peer group neighbor [Peer-Group-Name] peer-group neighbor [Peer-Group-Name] [attrbiutes] neighbor [address] peer-group [Peer- Group-Name] Copyright 2010 Internetwork Expert 56

BGP Peer Group Example router bgp 1 neighbor IBGP_PEER_GROUP peer-group neighbor IBGP_PEER_GROUP remote-as 1 neighbor IBGP_PEER_GROUP update-source Loopback0 neighbor IBGP_PEER_GROUP G route-reflector-client li neighbor IBGP_PEER_GROUP next-hop-self neighbor 1.2.3.4 peer-group IBGP_PEER_GROUP neighbor 5.6.7.8 peer-group IBGP_PEER_GROUP neighbor 9.10.11.12 peer-group IBGP_PEER_GROUP neighbor 13.14.15.16 peer-group IBGP_PEER_GROUP Dynamic Update Peer-Groups Separate outbound routing policies Copyright 2010 Internetwork Expert 57

Peer-groups General Q&A Copyright 2010 Internetwork Expert 58

Authentication and TTL Security 10 http:// BGP Authentication Like IGP authentication, BGP peer authentication protects control plane against attacks 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 Signature Option Simply configured as neighbor [address] password [password] Copyright 2010 Internetwork Expert 59

Authentication Configuration Enabling BGP authentication neighbor [address] password [password] TTL 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 60

General Q&A Copyright 2010 Internetwork Expert 61