Border Gateway Protocol

Similar documents
Inter-domain Routing Basics. Border Gateway Protocol. Inter-domain Routing Basics. Inter-domain Routing Basics. Exterior routing protocols created to:

Routing in Small Networks. Internet Routing Overview. Agenda. Routing in Large Networks

Exterior Gateway Protocols (BGP)

Module 7. Routing and Congestion Control. Version 2 CSE IIT, Kharagpur

Border Gateway Protocol BGP4 (2)

Inter-domain Routing. Outline. Border Gateway Protocol

BGP overview BGP operations BGP messages BGP decision algorithm BGP states

Route Discovery Protocols

How To Understand Bg

Border Gateway Protocol (BGP)

Border Gateway Protocol (BGP-4)

ITRI CCL. IP Routing Primer. Paul C. Huang, Ph.D. ITRI / CCL / N300. CCL/N300; Paul Huang 1999/6/2 1

Using the Border Gateway Protocol for Interdomain Routing

Active measurements: networks. Prof. Anja Feldmann, Ph.D. Dr. Nikolaos Chatzis Georgios Smaragdakis, Ph.D.

CLASSLESS INTER DOMAIN ROUTING - CIDR

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ

Advanced Networking Routing: RIP, OSPF, Hierarchical routing, BGP

APNIC elearning: BGP Basics. Contact: erou03_v1.0

Based on Computer Networking, 4 th Edition by Kurose and Ross

Router and Routing Basics

Week 4 / Paper 1. Open issues in Interdomain Routing: a survey

BGP Best Path Selection Algorithm

Internet Firewall CSIS Packet Filtering. Internet Firewall. Examples. Spring 2011 CSIS net15 1. Routers can implement packet filtering

Lecture 18: Border Gateway Protocol"

OSPF Version 2 (RFC 2328) Describes Autonomous Systems (AS) topology. Propagated by flooding: Link State Advertisements (LSAs).

DD2491 p Inter-domain routing and BGP part I Olof Hagsand KTH/CSC

BGP. 1. Internet Routing

Introduction to Dynamic Routing Protocols

Outline. Internet Routing. Alleviating the Problem. DV Algorithm. Routing Information Protocol (RIP) Link State Routing. Routing algorithms

Routing with OSPF. Introduction

BGP Terminology, Concepts, and Operation. Chapter , Cisco Systems, Inc. All rights reserved. Cisco Public

Internet inter-as routing: BGP

Masterkurs Rechnernetze IN2097

Introduction to TCP/IP

Introduction to Routing

basic BGP in Huawei CLI

Network Level Multihoming and BGP Challenges

CS551 External v.s. Internal BGP

APNIC elearning: BGP Attributes

How To Make A Network Plan Based On Bg, Qos, And Autonomous System (As)

E : Internet Routing

Chapter 4. Distance Vector Routing Protocols

Routing Protocol - BGP

Routing Protocols. Interconnected ASes. Hierarchical Routing. Hierarchical Routing

6.263 Data Communication Networks

Dove siamo? Architecture of Dynamic Routing

Distance Vector Routing Protocols. Routing Protocols and Concepts Ola Lundh

Interdomain Routing. Project Report

Chapter 6: Implementing a Border Gateway Protocol Solution for ISP Connectivity

--BGP 4 White Paper Ver BGP-4 in Vanguard Routers

DD2491 p Load balancing BGP. Johan Nicklasson KTHNOC/NADA

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

Outline. EE 122: Interdomain Routing Protocol (BGP) BGP Routing. Internet is more complicated... Ion Stoica TAs: Junda Liu, DK Moon, David Zats

Border Gateway Protocols

BGP4 Case Studies/Tutorial

Dynamic Routing Protocols II OSPF. Distance Vector vs. Link State Routing

Examination. IP routning på Internet och andra sammansatta nät, DD2491 IP routing in the Internet and other complex networks, DD2491

IK2205 Inter-domain Routing

Internet Control Message Protocol (ICMP)

HP Networking BGP and MPLS technology training

GregSowell.com. Mikrotik Routing

The ISP Column. An Introduction to BGP the Protocol

BGP: Border Gateway Protocol

Configuring BGP. Cisco s BGP Implementation

CSC458 Lecture 6. Homework #1 Grades. Inter-domain Routing IP Addressing. Administrivia. Midterm will Cover Following Topics

Using OSPF in an MPLS VPN Environment

The Internet. Internet Technologies and Applications

Interdomain Routing. Outline

How To Make A Full Autonomous System Work

Cisco CCNP Optimizing Converged Cisco Networks (ONT)

JNCIA Juniper Networks Certified Internet Associate

Routing Protocols (RIP, OSPF, BGP)

Juniper Exam JN0-343 Juniper Networks Certified Internet Specialist (JNCIS-ENT) Version: 10.1 [ Total Questions: 498 ]

A Case Study Design of Border Gateway Routing Protocol Using Simulation Technologies

F5 Silverline DDoS Protection Onboarding: Technical Note

Supporting Document PPP

BIGP- A NEW SINGLE PROTOCOL THAT CAN WORK AS AN IGP (INTERIOR GATEWAY PROTOCOL) AS WELL AS EGP (EXTERIOR GATEWAY PROTOCOL)

Table of Contents. Cisco How Does Load Balancing Work?

Beginning BGP. Peter J. Welcher. Introduction. When Do We Need BGP?

BGP Advanced Routing in SonicOS

BGP: Frequently Asked Questions

The Case for Source Address Routing in Multihoming Sites

BGP Router Startup Message Flow

Can Forwarding Loops Appear when Activating ibgp Multipath Load Sharing?

Transitioning to BGP. ISP Workshops. Last updated 24 April 2013

Textbook Required: Cisco Networking Academy Program CCNP: Building Scalable Internetworks v5.0 Lab Manual.

Internet inter-as routing: BGP

Configuring and Testing Border Gateway Protocol (BGP) on Basis of Cisco Hardware and Linux Gentoo with Quagga Package (Zebra)

MPLS Architecture for evaluating end-to-end delivery

Multihoming and Multi-path Routing. CS 7260 Nick Feamster January

Administra0via. STP lab due Wednesday (in BE 301a!), 5/15 BGP quiz Thursday (remember required reading), 5/16

How To Set Up Bgg On A Network With A Network On A Pb Or Pb On A Pc Or Ipa On A Bg On Pc Or Pv On A Ipa (Netb) On A Router On A 2

Understanding Large Internet Service Provider Backbone Networks

Example: Advertised Distance (AD) Example: Feasible Distance (FD) Example: Successor and Feasible Successor Example: Successor and Feasible Successor

Understanding Route Aggregation in BGP

BGP Attributes and Path Selection

Faculty of Engineering Computer Engineering Department Islamic University of Gaza Network Chapter# 19 INTERNETWORK OPERATION

Lesson 5-3: Border Gateway Protocol

Understanding Route Redistribution & Filtering

Transcription:

Border Gateway Protocol Professor Richard Harris School of Engineering and Advanced Technology (SEAT)

Presentation Outline Introduction Types of Routing in the Internet Internet Concepts Core, Peers, Autonomous Systems Defining BGP BGP Operation overview and characteristics BGP Message Types Choosing BGP When is it required/not appropriate? BGP Path Selection and Manipulation BGP Hierarchical Route Selection process BGP Attributes BGP Router operation BGP Policy routing Control of Outgoing and Incoming Traffic Conclusions Computer Networks - 1/2

References Cormac Long, IP Network Design, Osborne, McGraw Hill ISBN 0-07-212999-9, 2001. RFC 1105 A Border Gateway Protocol (BGP) Quoitin, B., Pelsser, C., Swinnen, L., Interdomain Traffic Engineering with BGP, IEEE Communications Magazine, May 2003. Huitema, C., Routing in the Internet, 1995 RFC 1771 and other related RFCs Intro to BGP All-DayTutorial Powerpoint presentation by Avi Freedman (freedman@netaxs.com). Computer Networks - 1/3

Types of Routing Protocol in the Internet Routing Protocol Interior Gateway Protocol (IGP) Exterior Gateway Protocol (EGP) Distance Vector (Bellman-Ford) DUAL Link State Preference and Policy Path Vector Link State RIP 1,2 IGRP EIGRP IS-IS OSPF EGP BGP 4 IDRP Computer Networks - 1/4

Core Routers for Early Internet A small set of routers that have consistent & complete information about all destinations. Outlying routers can have partial information provided they point their default routes to the core Partial information allows site administrators to make local routing changes independently. Initially, core routers were under a central authority and were synchronized for consistency => single backbone. Internet quickly outgrew single backbone (ARPANET + NSFNET). Core architecture does not scale well. Computer Networks - 1/5

Moving to the Idea of Peers Initially NSFNET had only one connection to ARPANET (a router in Pittsburg) => only one route between the two. Addition of multiple interconnections => multiple possible routes => need for dynamic routing decision Single core replaced by a network of peer backbones => more scalable Today there are over 30 backbones! The routing protocol used by cores & peers was called the Gateway- Gateway Protocol (GGP). GGP was replaced by EGP and now by BGP-4. Computer Networks - 1/6

Autonomous Systems (AS) - 1 The core + edges were still considered one network Administrative problems like rebooting a router required coordination. Replace this n/w with autonomous systems (AS). Stub AS connect via cores AS = set of routers and networks under the same administration No theoretical limit to the size of the AS All parts within an AS remain connected. If two networks rely on core-as to connect, they don t belong to a single AS Computer Networks - 1/7

Autonomous Systems (AS) - 2 One router represents the AS to the external world (the core and other AS). This router also collects reachability information ( external routes ) from other AS s and diffuses it into its domain. AS is identified by a 16-bit AS number Traffic types: Local = traffic originating or terminating at AS. Transit = non-local traffic AS types: Stub AS Only single connection to one other AS => it carries only local traffic. Multihomed AS: Connected to multiple AS, but does not allow transit traffic Transit AS: Carries transit traffic under policy restrictions Computer Networks - 1/8

Simple Internet [3] AS 2 R 23 R 24 R 31 R 32 AS 3 Transit R 22 R 21 R 25 R 26 R 33 R 34 R 27 R 28 R 35 R 36 R 11 Transit R 12 Transit R 41 R 42 R 14 R 13 R 43 R 45 AS 1 R 44 R 51 AS 5 Stub AS 4 Multi-homed AS 6 R 61 Computer Networks - 1/9

Autonomous Systems Summary An AS is a group of networks under a common control and administration. An Interior Gateway Protocol (IGP) routes traffic within an AS. An Exterior Gateway Protocol (EGP) routes traffic between different AS s. AS-2 AS-3 AS-1 Computer Networks - 1/10 10

What is BGP? [2] The Border Gateway Protocol (BGP) is an inter-autonomous system routing protocol. BGP runs over any reliable transport level protocol. TCP will be used, however, since it is present in virtually all commercial routers and hosts. The primary function of a BGP system is to exchange network reachability information with other BGP systems. This network reachability information includes information on the autonomous systems (AS's) that traffic must transit to reach these networks. This information is sufficient to construct a graph of AS connectivity from which routing loops may be pruned and policy decisions at an AS level may be enforced. BGP is actually two protocols - ibgp, designed for internal routing, and ebgp, designed for external routing. Computer Networks - 1/11 11

Why BGP? BGP is a multi-vendor open protocol with multiple implementations, all mostly interoperable. It is the only actively used EGP on the Internet. The main design feature of BGP was to allow ISPs to richly express their routing policy, both in selecting outbound paths and in announcing internal routes. Computer Networks - 1/12 12

BGP Overview BGP uses TCP as its transport Each BGP packet is encapsulated in TCP and identified by port 179. Reliability inherent in TCP is exploited by BGP BGP relies on neighbour formation between routers These routers are said to be BGP peers or neighbours. Formation after TCP session has formed between routers Two types of BGP peer relationships Between routers in different AS s Internal BGP peering between routers in the same AS Computer Networks - 1/13 13

BGP Operation - 1 Two hosts form a transport protocol connection between one another. They exchange messages to open and confirm the connection parameters. The initial data flow is the entire BGP routing table. Port 179 Port 179 Establish TCP connection Routing table Computer Networks - 1/14 14

BGP Operation - 2 Incremental updates are sent as the routing tables change. Keepalive messages are sent periodically to ensure the live-ness of the connection. Notification messages are sent in response to errors or special conditions. If a connection encounters an error condition, a notification message is sent and the connection is optionally closed. Update Update Routing table Keep alive message Keep alive message Computer Networks - 1/15 15

Basic BGP Concepts - 1 There is only one best BGP route for any given IP block at one time. This best BGP route is not always the route that gets installed into the router s RIB/FIB. Once a session comes up, all best-routes are exchanged. Then over time, just topology updates are exchanged. You can ONLY exchange best routes. Computer Networks - 1/16 16

Basic BGP Concepts 2 Policy The Internet was a strange place before the modern commercial Internet evolved in 1992-1993. Some networks had policies about what kind of traffic they would carry. BGP was designed to allow network operators to make routing decisions based on whatever policy they wanted to use. Computer Networks - 1/17 17

BGP Message Types There are four basic message types for BGP: OPEN KEEPALIVE UPDATE NOTIFICATION Messages are sent over the reliable transport protocol connection. A message is processed after it is received in its entirety. The maximum message size is 1024 bytes. All implementations are required to support this maximum message size. The smallest message that may be sent consists of a BGP header without a data portion, or 8 bytes. Each message has a fixed size header. There may or may not be a data portion following the header, depending on the message type. The layout of these fields is shown on the following slide. Computer Networks - 1/18 18

BGP Message Header 1 2 3 01234567890123456789012345678901 Marker Length Version Type Hold time Marker: 16 bits 16 bits of all ones. This field is used to mark the start of a message. If not all ones, then there is an error. Length: 16 bits It is the total length of the message, including header, in bytes. Version: 8 bits Current version # is 4. Type: 8 bits The following type codes are defined: 1 - OPEN 2 - UPDATE 3 - NOTIFICATION 4 - KEEPALIVE 5 - OPEN CONFIRM Hold Time: 16 bits This field contains the number of seconds that may elapse since receiving a BGP KEEPALIVE or BGP UPDATE message from our BGP peer before we declare an error and close the BGP connection. Computer Networks - 1/19 19

Messages Open - 1 1 2 3 01234567890123456789012345678901 My Autonomous System Link Type Auth Code Authentication Data After establishing the connection, an open message is sent by one or other party. The structure of the message is given above My Autonomous System: 16 bits Source AS number Continued Computer Networks - 1/20

Messages Open 2 Link Type: 8 bits The Link Type field is a single octet containing one of the following codes defining our position in the AS graph relative to our peer. 0 - INTERNAL 1 - UP 2 - DOWN 3 - H-LINK UP indicates the peer is higher in the AS hierarchy, DOWN indicates lower, and H-LINK indicates at the same level. INTERNAL indicates that the peer is another BGP speaking host in our autonomous system. INTERNAL links are used to keep AS routing information consistent with an AS with multiple border gateways. Authorisation Code: 8 bits The Authentication Code field is an octet whose value describes the authentication mechanism being used. A value of zero indicates no BGP authentication. Authentication Data: variable length The Authentication Data field is a variable length field containing authentication data. Computer Networks - 1/21

Messages Keepalive BGP does not use any transport protocol based keepalive mechanism to determine if peers are reachable. Instead, KEEPALIVE messages are exchanged between peers often enough as not to cause the hold time (as advertised in the BGP header) to expire. A reasonable minimum frequency of KEEPALIVE exchange would be one third of the Hold Time interval. Computer Networks - 1/22

Messages Update - 1 UPDATE messages are used to transfer routing information between BGP peers. The information in the UPDATE packet can be used to construct a graph describing the relationships of the various autonomous systems. By applying rules to be discussed later, routing information loops and some other anomalies may be detected and removed from the inter-as routing. Computer Networks - 1/23

Messages Update 2 1 2 3 01234567890123456789012345678901 Gateway AS Count Direction AS Number Repeat (Direction, AS Number) pairs AS count times Net Count Network Metric Repeat (Network, Metric) pairs Net Count times Computer Networks - 1/24

Messages Update 3 Gateway: 32 bits. The Gateway field is the address of a gateway that has routes to the Internet networks listed in the rest of the UPDATE message. This gateway MUST belong to the same AS as the BGP peer who advertises it. If there is a problem with the gateway field, a notification message with sub-code 6 (invalid gateway field) is sent. AS count: 8 bits. This field is the count of Direction and AS Number pairs in this UPDATE message. If an incorrect AS count field is detected, sub-code 1 (invalid AS count) is specified in the notification message. Computer Networks - 1/25

Messages Update - 4 Direction: 8 bits The Direction field is an octet containing the direction taken by the routing information when exiting the AS defined by the succeeding AS Number field. The following values are defined. 1 - UP (went up a link in the graph) 2 - DOWN (went down a link in the graph) 3 - H_LINK (horizontal link in the graph) 4 - EGP_LINK (EGP derived information) 5 - INCOMPLETE (incomplete information) There is a special provision to pass exterior learned (non-bgp) routes over BGP. If an EGP learned route is passed over BGP, then the Direction field is set to EGP-LINK and the AS Number field is set to the AS number of the EGP peer that advertised this route. All other exterior-learned routes (non-bgp and non-egp) may be passed by setting AS Number field to zero and Direction field to INCOMPLETE. If the direction code is not recognized, a notification message with subcode 2 (invalid direction code) is sent. AS Number: 16 bits This field is the AS number that transmitted the routing information. If there is a problem with this AS number, a notification message with subcode 3 (invalid autonomous system) is sent. Computer Networks - 1/26

Messages Update 5 Net Count: 16 bits. The Net Count field is the number of Metric and Network field pairs which follow this field. If there is a problem with this field, a notification with subcode 7 (invalid net count field) is sent. Network: 32 bits The Network field is four bytes of Internet network number. If there is a problem with the network field, a notification message with subcode 8 (invalid network field) is sent. Metric: 16 bits The Metric field is 16 bits of an unspecified metric. BGP metrics are comparable ONLY if routes have exactly the same AS path. A metric of all ones indicates the network is unreachable. In all other cases the metric field is MEANINGLESS and MUST BE IGNORED. There are no illegal metric values. Computer Networks - 1/27

Messages - Notification 1 2 3 01234567890123456789012345678901 Op Code Data Data NOTIFICATION messages are sent when an error condition is detected. The BGP connection is closed shortly after sending the notification message. Except for Op code = 4, all remaining op codes result in fatal errors and termination of the session. Computer Networks - 1/28

AS Numbering AS numbers are unique and are assigned by the Internet Assigned Numbers Authority. The AS designator is a 16 bit number that ranges from 1 to 65,535. Similarly to IP network address ranges, a range of AS numbers from 64,512 to 65,530 is reserved for private use. NAP POP POP POP ISP ISP 3 2 POP ISP 1 POP Computer Networks - 1/29

When NOT to use BGP A single connection to the ISP or business partner is present Default route is better, since BGP places a load on the link and the processor No policy is implemented as to what path traffic should take out of the AS If suboptimal routing can be tolerated, do not bother. If the links between the AS s are heavily utilised Heavy routing traffic creates significant overhead May interfere with the TCP sessions. Insufficient memory in the gateway routers to store the routing tables Computer Networks - 1/30

When is BGP Routing Required? Multiple connections exist to the ISP If control over these connections is required, then BGP is highly desirable Multiple ISP s are being used and suboptimal routing is to be avoided. Parameters need to be manipulated in order to influence path selection Routing information is transiting through the AS to and from other AS s Computer Networks - 1/31