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

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

Table of Contents. BGP Configuration 1

Table of Contents 1 BGP Configuration 1-1

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

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

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

Inter-Domain Routing: BGP

H3C S9500 Series Routing Switches

BGP. Border Gateway Protocol (an introduction) Karst Koymans. Informatics Institute University of Amsterdam. (version 17.3, 2017/12/04 13:20:08)

Routing Between Autonomous Systems (Example: BGP4) RFC 1771

Internet Interconnection Structure

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

BGP. Border Gateway Protocol A short introduction. Karst Koymans. Informatics Institute University of Amsterdam. (version 18.3, 2018/12/03 13:53:22)

BGP. Attributes 2005/03/11. (C) Herbert Haas

BGP. Autonomous system (AS) BGP version 4

BGP. Autonomous system (AS) BGP version 4

BGP. Autonomous system (AS) BGP version 4

Routing Protocols --- Exterior Gateway Protocol

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

BGP Attributes (C) Herbert Haas 2005/03/11 1

HP Load Balancing Module

LARGE SCALE IP ROUTING LECTURE BY SEBASTIAN GRAF

TELE 301 Network Management

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

Operation Manual BGP. Table of Contents

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

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

2011, Sushile Tejwani

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

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

Border Gateway Protocol

internet technologies and standards

Module 6 Implementing BGP

Configuring basic MBGP

Chapter 13 Configuring BGP4

Ravi Chandra cisco Systems Cisco Systems Confidential

CSCI-1680 Network Layer: Inter-domain Routing Rodrigo Fonseca

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

University of Belgrade - School of Electrical Engineering Department of Telecommunications

Configuring BGP. Cisco s BGP Implementation

CSCI-1680 Network Layer: Inter-domain Routing Rodrigo Fonseca

Architectures and Protocols for Integrated Networks. Intra-domain and Inter-domain Routing Protocols

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

Connecting to a Service Provider Using External BGP

Internet Routing Protocols Lecture 01 & 02

IBGP scaling: Route reflectors and confederations

Chapter 1. Getting Started

CS BGP v4. Fall 2014

c2001, Dr.Y.N.Singh, EED, IITK 2 Border Gateway Protocol - 4 BGP-4 (RFC intended to be used for routing between Autonomou

Table of Contents 1 MBGP Configuration 1-1

Contents. BGP commands 1

Routing part 2. Electrical and Information Technology

Connecting to a Service Provider Using External BGP

Advanced Computer Networks

Multiprotocol BGP (MBGP)

CSCI-1680 Network Layer: Inter-domain Routing Rodrigo Fonseca

BGP-v4 Theory and Practice

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

Routing Unicast routing protocols

Internet Protocols Fall Lectures Inter-domain routing, mobility support, multicast routing Andreas Terzis

Routing. Jens A Andersson Communication Systems

CertifyMe. CertifyMe

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

BGP Attributes and Path Selection

LACNIC XIII. Using BGP for Traffic Engineering in an ISP

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

Configuring Internal BGP Features

Configuring Advanced BGP

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

Internet inter-as routing: BGP

Inter-domain Routing. Outline. Border Gateway Protocol

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

Internet Routing : Fundamentals of Computer Networks Bill Nace

Border Gateway Protocol - BGP

Internet Routing Protocols Lecture 03 Inter-domain Routing

ibgp Multipath Load Sharing

BGP. BGP Overview. BGP Operation. BGP Neighbors

From the given configuration taken from RTA and graphic, which network will be filtered from being propagated to RTC from RTA?

PART III. Implementing Inter-Network Relationships with BGP

Border Gateway Protocol (BGP-4)

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

IP Routing Tecnologie e Protocolli per Internet II rev 1

Configuration BGP Services Avaya Ethernet Routing Switch 8300

Inter-AS routing and BGP. Network Layer 4-1

ibgp Multipath Load Sharing

MPLS VPN Multipath Support for Inter-AS VPNs

BGP Attributes and Policy Control

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

MPLS VPN Route Target Rewrite

BGP Route Reflector Commands

CS 640: Introduction to Computer Networks. Intra-domain routing. Inter-domain Routing: Hierarchy. Aditya Akella

Veryx ATTEST TM. Sample Test cases Overview. Conformance Test Suite. Border Gateway Protocol 4-IPv4 (BGP4-IPv4)

Configuration - BGP Services Avaya Ethernet Routing Switch 5000 Series

CS4450. Computer Networks: Architecture and Protocols. Lecture 15 BGP. Spring 2018 Rachit Agarwal

Network Working Group. Category: Standards Track Cisco Systems. D. Katz Juniper Networks Y. Rekhter. Cisco Systems. February 1998

Advanced Computer Networks

Unit 3: Dynamic Routing

Advanced Computer Networks

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

Multiprotocol BGP 1 MPLS VPN. Agenda. Multiprotocol BGP 2

Transcription:

Table of Contents BGP Configuration 1 BGP Overview 1 Introduction to BGP 1 Formats of BGP Messages 1 BGP Path Attributes 4 BGP Route Selection 8 Configuring BGP 8 Configuration Prerequisites 8 Configuration Overview 8 Configuring BGP Globally 9 Configuring BGP Peer 9 Displaying BGP Peer Information 10 BGP Configuration Example 11 i

BGP Configuration The Border Gateway Protocol (BGP) is a dynamic inter-as Exterior Gateway Protocol. When configuring BGP, go to these sections for information you are interested in: NOTE: The term route refers to both routers and Layer 3 switches, and BGP refers to BGP-4 in this document. BGP Overview Introduction to BGP There are three early BGP versions, BGP-1 (RFC1105), BGP-2 (RFC1163) and BGP-3 (RFC1267). The current version in use is BGP-4 (RFC 4271), which is the defacto Internet exterior gateway protocol used between ISPs. The characteristics of BGP are as follows: Focusing on the control of route propagation and the selection of optimal routes rather than the route discovery and calculation, which makes BGP, an exterior gateway protocol different from interior gateway protocols such as OSPF and RIP Using TCP to enhance reliability Supporting CIDR Reducing bandwidth consumption by advertising only incremental updates and therefore applicable to advertising a great amount of routing information on the Internet Eliminating routing loops completely by adding AS path information to BGP routes Providing abundant policies to implement flexible route filtering and selection Good scalability A router advertising BGP messages is called a BGP speaker. It establishes peer relationships with other BGP speakers to exchange routing information. When a BGP speaker receives a new route or a route better than the current one from another AS, it will advertise the route to all the other BGP peers in the local AS. To simplify configuration, multiple peers having an identical policy can be organized as a peer group. BGP runs on a router in either of the following two modes: ibgp (internal BGP) ebgp (external BGP) BGP is called ibgp when it runs within an AS and is called ebgp when it runs between ASs. Formats of BGP Messages Header BGP has five types of messages: 1

Open Update Notification Keep-alive Route-refresh They have the same header, as shown below: Figure 1 BGP message header Open Marker: The 16-byte field is used to delimit BGP messages. The Marker must be all ones. Length: The 2-byte unsigned integer indicates the total length of the message. Type: This 1-byte unsigned integer indicates the type code of the message. The following type codes are defined: 1 Open, 2-Update, 3-Notification, 4 Keepalive, and 5 Route-refresh. The former four are defined in RFC1771, and the last one is defined in RFC2918. After a TCP connection is established, the first message sent by each side is an Open message for peer relationship establishment. An Open message contains the following fields: Figure 2 BGP open message format Version: This 1-byte unsigned integer indicates the protocol version number. The current BGP version is 4. My autonomous system: This 2-byte unsigned integer indicates the Autonomous System number of the sender. Hold time: When establishing a peer relationship, two parties negotiate an identical hold time. If no Keepalive or Update is received from a peer within the hold time, the BGP connection is considered down. 2

Update BGP identifier: An IP address that identifies the BGP router Opt Parm Len (Optional Parameters Length): Length of optional parameters, which is set to 0 if no optional parameter is available. Optional parameters: Used for multiprotocol extensions, and other functions. The Update messages are used to exchange routing information between peers. It can advertise a feasible route or remove multiple unfeasible routes. Its format is shown below: Figure 3 BGP Update message format Notification Each update message can advertise a group of feasible routes with identical attributes, and the routes are contained in the network layer reachable information (NLRI) field. The Path Attributes field carries attributes of these routes. Each update message can also carry multiple withdrawn routes in the Withdrawn Routes field. Unfeasible routes length: The total length of the Withdrawn Routes field in bytes. A value of 0 indicates no route is withdrawn from service, and the Withdrawn Routes field is not present in this Update message. Withdrawn routes: This is a variable length field that contains a list of withdrawn IP prefixes. Total path attribute length: Total length of the Path Attributes field in bytes. A value of 0 indicates that no Network Layer Reachability Information field is present in this Update message. Path attributes: List of path attributes related to NLRI. Each path attribute is a triple <attribute type, attribute length, attribute value> of variable length. BGP uses these attributes to avoid routing loops, and perform routing and protocol extensions. NLRI (Network Layer Reachability Information): Each feasible route is represented as <length, prefix>. A Notification message is sent when an error is detected. The BGP connection is closed immediately after sending it. The Notification message format is shown below: Figure 4 BGP Notification message format Error code: Type of Notification. Error subcode: Specific information about the nature of the reported error. 3

Keepalive Route-refresh Data: Used to diagnose the reason for the Notification. The contents of the Data field depend upon the Error Code and Error Subcode. Erroneous part of data is recorded. The Data field length is variable. Keepalive messages are sent between peers to maintain connectivity. Its format contains only the message header. A route-refresh message is sent to a peer to request the resending of the specified address family routing information. Its format is shown below: Figure 5 BGP Route-refresh message format AFI: Address family identifier. Res: Reserved. Set to 0. SAFI: Subsequent Address Family Identifier. BGP Path Attributes Classification of path attributes Path attributes fall into four categories: Well-known mandatory: Must be recognized by all BGP routers and must be included in every update message. Routing information errors occur without this attribute. Well-known discretionary: Can be recognized by all BGP routers and optional to be included in every update message as needed. Optional transitive: Transitive attribute between ASs. A BGP router not supporting this attribute can still receive routes with this attribute and advertise them to other peers. Optional non-transitive: If a BGP router does not support this attribute, it will not advertise routes with this attribute. The usage of each BGP path attribute is described in the following table. Table 1 Usage of BGP path attributes Name ORIGIN AS_PATH NEXT_HOP LOCAL_PREF ATOMIC_AGGREGATE AGGREGATOR COMMUNITY Category Well-known mandatory Well-known mandatory Well-known mandatory Well-known discretionary Well-known discretionary Optional transitive Optional transitive 4

Name MULTI_EXIT_DISC (MED) ORIGINATOR_ID CLUSTER_LIST Category Optional non-transitive Optional non-transitive Optional non-transitive Usage of BGP path attributes 1. ORIGIN ORIGIN is a well-known mandatory attribute, which defines the origin of routing information, that is, how a route became a BGP route. It involves three types: IGP: Has the highest priority. Routes added to the BGP routing table using the network command have the IGP attribute. EGP: Has the second highest priority. Routes obtained via EGP have the EGP attribute. incomplete: Has the lowest priority. The source of routes with this attribute is unknown, which does not mean such routes are unreachable. The routes redistributed from other routing protocols have the incomplete attribute. 2. AS_PATH AS_PATH is a well-known mandatory attribute. This attribute identifies the autonomous systems through which routing information carried in this Update message has passed. When a route is advertised from the local AS to another AS, each passed AS number is added into the AS_PATH attribute, thus the receiver can determine ASs to route the massage back. The number of the AS closest to the receiver s AS is leftmost, as shown below: Figure 6 AS_PATH attribute In general, a BGP router does not receive routes containing the local AS number to avoid routing loops. 5

The AS_PATH attribute can be used for route selection and filtering. BGP gives priority to the route with the shortest AS_PATH length if other factors are the same. As shown in the above figure, the BGP router in AS50 gives priority to the route passing AS40 for sending data to the destination 8.0.0.0. 3. NEXT_HOP Different from IGP, the NEXT_HOP attribute may not be the IP address of a directly connected router. It involves three types of values, as shown in Figure 7. When advertising a self-originated route to an ebgp peer, a BGP speaker sets the NEXT_HOP for the route to the address of its sending interface. When sending a received route to an ebgp peer, a BGP speaker sets the NEXT_HOP for the route to the address of the sending interface. When sending a route received from an ebgp peer to an ibgp peer, a BGP speaker does not modify the NEXT_HOP attribute. If load-balancing is configured, the NEXT_HOP attribute will be modified. Figure 7 NEXT_HOP attribute 4. MED (MULTI_EXIT_DISC) The MED attribute is exchanged between two neighboring ASs, each of which does not advertise the attribute to any other AS. Similar with metrics used by IGP, MED is used to determine the best route for traffic going into an AS. When a BGP router obtains multiple routes to the same destination but with different next hops, it considers the route with the smallest MED value the best route if other conditions are the same. As shown below, traffic from AS10 to AS20 travels through Device B that is selected according to MED. 6

Figure 8 MED attribute In general, BGP compares MEDs of routes received from the same AS only. 5. LOCAL_PREF The LOCAL_PREF attribute is exchanged between ibgp peers only, and thus is not advertised to any other AS. It indicates the priority of a BGP router. LOCAL_PREF is used to determine the best route for traffic leaving the local AS. When a BGP router obtains from several ibgp peers multiple routes to the same destination but with different next hops, it considers the route with the highest LOCAL_PREF value as the best route. As shown below, traffic from AS20 to AS10 travels through Device C that is selected according to LOCAL_PREF. Figure 9 LOCAL_PREF attribute 6. COMMUNITY The COMMUNITY attribute is used to simplify routing policy usage and ease management and maintenance. It identifies a collection of destination addresses having identical attributes, without physical boundaries in between, and having nothing to do with the local AS. Well known community attributes involve: Internet: By default, all routes belong to the Internet community. Routes with this attribute can be advertised to all BGP peers. 7

No_Export: After received, routes with this attribute cannot be advertised out the local AS or out the local confederation but can be advertised to other sub-ass in the confederation. No_Advertise: After received, routes with this attribute cannot be advertised to other BGP peers. No_Export_Subconfed: After received, routes with this attribute cannot be advertised out the local AS or other ASs in the local confederation. BGP Route Selection The current BGP implementation supports the following route selection sequence: Discard routes with unreachable NEXT_HOPs first Select the route with the highest Preferred_value Select the route with the highest LOCAL_PREF Select the route originated by the local router Select the route with the shortest AS-PATH Select IGP, EGP, Incomplete routes in turn Select the route with the lowest MED value Select routes learned from ebgp, confederation, ibgp in turn Select the route with the smallest next hop cost Select the route with the shortest CLUSTER_LIST Select the route with the smallest ORIGINATOR_ID Select the route advertised by the router with the smallest Router ID Select the route with the lowest IP address NOTE: CLUSTER_IDs of route reflectors form a CLUSTER_LIST. If a route reflector receives a route that contains its own CLUSTER ID in the CLUSTER_LIST, the router discards the route to avoid routing loops. Configuring BGP Configuration Prerequisites Before configuring BGP, you need to configure the link layer protocol, and IP addresses for interfaces, making neighboring nodes accessible with each other at the network layer. Configuration Overview Perform the tasks in Table 2 to configure BGP. Table 2 BGP configuration task list Task Enable BGP Configuring BGP Globally Remarks Required Enable BGP and specify an AS number. 8

Task Import static routes Configuring BGP Peer Configuring BGP Globally Remarks Optional Configure BGP to redistribute static routes. Required Configure the IP address and AS number for the BGP peer. Displaying BGP Peer Information Optional Display the IP address, AS number, version and current state of the BGP peer. Configuring BGP Globally Select Network > Routing Management > BGP from the navigation tree to enter the BGP configuration page, as shown in Figure 10. Figure 10 BGP global configuration page Table 3 describes the BGP global configuration items. Table 3 BGP global configuration items Item Enable BGP AS Import static routes Description Enable BGP. Specify a local AS number. Configure BGP to redistribute static routes. Return to BGP configuration task list. Configuring BGP Peer Select Network > Routing Management > BGP from the navigation tree to enter the BGP configuration page. After you enable BGP, the tabs shown in Figure 11 are displayed on the page. Click Add on the Peer Configuration tab to enter the BGP peer configuration page, as shown in Figure 12. 9

Figure 11 Tabs on the BGP peer configuration page Figure 12 Create a BGP peer Table 4 describes the BGP peer configuration items. Table 4 BGP peer configuration items Item Peer IP Address Peer AS Description Configure the IP address of the BGP peer. Specify the AS number of the BGP peer. Return to BGP configuration task list. Displaying BGP Peer Information Select Network > Routing Management > BGP from the navigation tree to enter the BGP configuration page. After you complete BGP peer configurations, click Show Peer on the Show Information tab to display the BGP peer information on the page shown in Figure 13. 10

Figure 13 Display BGP peer information Table 5 describes the BGP peer information. Table 5 BGP peer information Item Peer IP Address Peer AS Version State Description IP address of the BGP peer. AS number of the BGP peer. BGP version. Current state of the BGP peer. Return to BGP configuration task list. BGP Configuration Example Network requirements In the following figure are all BGP devices. Between Device A and Device B is an ebgp connection. ibgp speakers Device B, Device C, and Device D are fully meshed. Figure 14 Network diagram for BGP configuration Configuration procedure Step1 Configure IP addresses for interfaces and configure security zones(omitted) Step2 Configure ibgp connections # Configure Device B. 11

Select Network > Routing Management > BGP from the navigation tree of Device B and make the following configurations in Figure 15. Select the Enable BGP check box. Type 65009 for AS. Figure 15 Enable BGP After you enable BGP, the following figure is displayed. Figure 16 The web page displayed after you enable BGP Click Add in the Peer Configuration field and make the following configurations as shown in Figure 17. Type 9.1.1.2 for Peer IP Address. Type 65009 for Peer AS. 12

Figure 17 Add a BGP peer Click Add in the Peer Configuration field. Type 9.1.3.2 for Peer IP Address. Type 65009 for Peer AS. # Configure Device C. Select Network > Routing Management > BGP from the navigation tree of Device C. Select the Enable BGP check box. Type 65009 for AS. Click Add in the Peer Configuration field. Type 9.1.3.1 for Peer IP Address. Type 65009 for Peer AS. Click Add in the Peer Configuration field. Type 9.1.2.2 for Peer IP Address. Type 65009 for Peer AS. # Configure Device D. Select Network > Routing Management > BGP from the navigation tree of Device D. Select the Enable BGP check box. Type 65009 for AS. Click Add in the Peer Configuration field. Type 9.1.1.1 for Peer IP Address. Type 65009 for Peer AS. Click Add in the Peer Configuration field. Type 9.1.2.1 for Peer IP Address. Type 65009 for Peer AS. 13

Step3 Configure ebgp connection. # Configure Device A. Select Network > Routing Management > BGP from the navigation tree of Device A. Select the Enable BGP check box. Type 65008 for AS. Click Add in the Peer Configuration field. Type 200.1.1.1 for Peer IP Address. Type 65009 for Peer AS. # Configure Device B. Select Network > Routing Management > BGP from the navigation tree of Device B. Click Add in the Peer Configuration field. Type 200.1.1.2 for Peer IP Address. Type 65008 for Peer AS. Verify the configuration # Display the BGP peer connection state of Device B. Select Network > Routing Management > BGP from the navigation tree of Device B, and then click Show Peer in the Show Information field. BGP connections are established from Device B to other devices, as shown in Figure 18. Figure 18 BGP configuration result 14