routing workshop for internet service providers

78
1 4/7/1999 Cisco Proprietary 1 ROUT/BGP4-PGD-1 Routing Workshop for Internet Service Providers 4/7/1999 Cisco Proprietary 2 ROUT/BGP4-PGD-1 Introduction feel free to ask questions some material may not be covered (can’t do everything) Workshop is CASUAL :-) 4/7/1999 Cisco Proprietary 3 ROUT/BGP4-PGD-1 Introduction Routing Protocols Addressing and CIDR Routing Domains and Autonomous Systems

Upload: others

Post on 22-Feb-2022

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Routing Workshop for Internet Service Providers

1

4/7/1999 Cisco Proprietary1ROUT/BGP4-PGD-1

Routing Workshop forInternet Service

Providers

4/7/1999 Cisco Proprietary2ROUT/BGP4-PGD-1

Introduction

• feel free to ask questions

• some material may not be covered (can’t doeverything)

• Workshop is CASUAL :-)

4/7/1999 Cisco Proprietary3ROUT/BGP4-PGD-1

Introduction

• Routing Protocols

• Addressing and CIDR

• Routing Domains and AutonomousSystems

Page 2: Routing Workshop for Internet Service Providers

2

4/7/1999 Cisco Proprietary4ROUT/BGP4-PGD-1

What Is Routing?

Step 2—Switch packets basedon routing table information User

Traffic

??

Step 1—Build Routing Table

AABBCC

2213131313

QQZZXX

RoutingInformation

AABBCC

2213131313

QQZZXX

4/7/1999 Cisco Proprietary5ROUT/BGP4-PGD-1

Protocol Classes• Internal Gateway Protocol (IGP)

• External Gateway Protocol (EGP)

• Differences– IGP - For routing internal to an AS

• Carries internal routes and BGP next-hopinformation

• Example: OSPF, IS-IS, EIGRP, RIP

– EGP - For routing between ASes• Propagates Prefix Information

• Propagates Policy Information

• Example: BGP4

4/7/19996ROUT/BGP4-PGD-1

Why Do We Need an EGP?

• Scaling to large network

Hierarchy

Limit scope of failure

Limiting the scope of instability

• Policy

Control reach-ability to prefixes

Merge separate organizations

Connect multiple IGPs

Page 3: Routing Workshop for Internet Service Providers

3

4/7/19997ROUT/BGP4-PGD-1

• InteriorAutomaticdiscovery

Generally trustyour IGP routers

Routes go to allIGP routers

• ExteriorSpecifically configuredpeers

Connecting withoutside networks

Set administrativeboundaries

Interior vs. Exterior RoutingProtocols

4/7/1999 Cisco Proprietary8ROUT/BGP4-PGD-1

What do you need in a RoutingProtocol?

• Select optimal paths andbasis for selection shouldbe configurable.

• Prevent Loops.

• Converge quickly.

• Provide mechanisms tosupport heirarchicalimplementation.

• Standards-based

• Security

• Efficient use of routerresources (CPU, Memory)

• Scalability (able to map tophysical architecture andhandle large amount ofinformation)

• Configuration

• Extensibility (e.g. OpaqueLSA in OSPF, Attributesin BGP)

4/7/1999 Cisco Proprietary9ROUT/BGP4-PGD-1

Routing Protocol Characteristics

A l g o r i t h m E x a m p le

T r a d i t i o n a lD i s t a n c eV e c t o r

Bel lm a n - F o r d R IP, IG R P

L i n k S t a t e D i jks t ra SPF O S P F , IS -IS

A d v a n c e dD i s t a n c eV e c t o r

D U A L E I G R P

P a t h V e c t o r P a thS e lect ion

B G P

Page 4: Routing Workshop for Internet Service Providers

4

4/7/1999 Cisco Proprietary10ROUT/BGP4-PGD-1

Link State

Routing Table

Q’s Link States

X’s Link States

Z’s Link States

Y

Flood LSAs, Build TopologyDatabase, Build Routing Table

from Topology Database

Topology Database

AABBCC

2213131313

QQZZXX

4/7/1999 Cisco Proprietary11ROUT/BGP4-PGD-1

Traditional Distance Vector

Routing Information IsExchanged by Propagating

Summarized Informationfrom Each Node

X:10

Z:1

Q:1

AABBCC

2213131313

QQZZXX

Y’s Table

Y

X’s Table

Z’s Table

AABBCC

272712123535

AABBCC

1113132020

Q’s Table

AABBCC

553333

4/7/1999 Cisco Proprietary12ROUT/BGP4-PGD-1

Advanced Distance Vector

X:10

On Startup, Routing Tables areExchanged. Routing TableBuilt Based on Best Paths

fromTopology Table.

AA 2727 ZZ

11 QQ

55 XX

BB 1212 ZZ.. .. .... .. ..

Topology Database

Z:1

Q:1

AABBCC

2213131313

QQZZXX

Y’s Table

Y

X’s Table

Z’s Table

AABBCC

272712123535

AABBCC

1113132020

Q’s Table

AABBCC

553333

Page 5: Routing Workshop for Internet Service Providers

5

4/7/1999 Cisco Proprietary13ROUT/BGP4-PGD-1

Route Calculation and Dissemination

• Route Dissemination– Using Routing Protocols

• OSPF/IS-IS– Flooding of LSAs

– Adjacency establishment

• Distance Vector (Traditional)– Broadcast (RIP 30 secs - entire table)

• BGP4– TCP Connection to neighbors

– Delta Advertisements

4/7/1999 Cisco Proprietary14ROUT/BGP4-PGD-1

Which Protocol(s) Do I Choose?

• Selection criteria and considerations:–Ease of planning, design, configuration,installation, migration, integration, troubleshooting,debugging

–Resources and overhead

–Performance: convergence time

–Security, policy

–Required structure/hierarchy, scalability

–Interoperability

4/7/1999 Cisco Proprietary15ROUT/BGP4-PGD-1

Routing Protocol ComparisonFea t u r e / T y p e L S T D V A D V

Sca lab i l i t y G o o d G o o d E x c e l l e n t

C o n v e r g e n c e F a s t S l o w F a s t

M e m o r y H i g h L o w M o d e r a t e

C P U H i g h L o w L o w

C o n f i g u r a t i o n M o d e r a t e E a s y E a s y

B a n d w i d t h L o w H i g h L o w

S t a n d a r d • O S P F / IS ISY e s

• R I P V 1 & V 2Y e s

• IG R P -S e m i-P r o p r i e t a r y

• E I G R PP r o p r i e t a r y

E x tens ib i l i ty • O S P FG o o d

• IS - IS V e r yG o o d

• R I P V 1 &V 2 , I G R PRest r i c t i ve

• E I G R P -Res t r i c t i ve

H i e r a r c h y G o o d( O S P F )

Fa i r (no ts t r u c t u r e d )

Fa i r (no ts t r u c t u r e d )

* Path Vector (PV) not presented since there is no comparative data.

Page 6: Routing Workshop for Internet Service Providers

6

4/7/1999 Cisco Proprietary16ROUT/BGP4-PGD-1

Dotted Decimal Notation:Byte1.Byte2.Byte3.Byte4<--- Most SignificantEach Byte has values from 0 to 2550 - "This Network"255 - BroadcastExamples:161.214.34.2209.58.48.0

Dest. Source

Addressing and Packet Structure

4/7/1999 Cisco Proprietary17ROUT/BGP4-PGD-1

Network Masks

Notation options:a) 255.255.255.0 ---> 24-bit Maskb) /24 <- Represents the number of bits to be “masked” from the beginning of the address.

Values of:“255” represent a byte with each bit set to a value of "1"“192” represent a byte with the first two bits set to a value of "1" and the remainder of the bits each set to a value of "0"

Contiguous vs. Non-Contiguous MasksUse contiguous masking.

4/7/1999 Cisco Proprietary18ROUT/BGP4-PGD-1

IP Network Address(es)

• IP Address and Mask combination define arange of host addresses. One or morediscontiguous net-blocks may exist within asingle routing protocol domain.

• Aggregation permits the definition ofmultiple levels of abstraction through theuse of varying mask lengths. An aggregatecan be comprised of multiple contiguous ordiscontiguous networks.

Page 7: Routing Workshop for Internet Service Providers

7

4/7/1999 Cisco Proprietary19ROUT/BGP4-PGD-1

Uniqueness of Addressing in theInternet

• Each address/mask pair (also referred to asa Prefix/Mask pair) in the Internet Routingtables MUST BE UNIQUE.

4/7/1999 Cisco Proprietary20ROUT/BGP4-PGD-1

Private Addressing and NAT

• Private Addressing is for Inside the ASONLY!

• RFC1918 defines address ranges which areNOT to be announced.– 10.0.0.0 -> 10.255.255.255

– 172.16.0.0 -> 172.31.255.255

– 192.168.0.0 -> 192.168.255.255

• Network Address Translation (NAT)

4/7/1999 Cisco Proprietary21ROUT/BGP4-PGD-1

Reasons for using NAT

• Customer move from one ISP to anotherand address space is non-transferable.

• Private ISP customer wishes to implementprivate addressing.

Page 8: Routing Workshop for Internet Service Providers

8

4/7/1999 Cisco Proprietary22ROUT/BGP4-PGD-1

Address Allocation

• Three Regional Addressing Authorities– APNIC - Asia-Pacific

– ARIN - USA, Latin America, Sub-SaharanAfrica

– RIPE - Europe

• National Authority - typically the nationalacademic network

• IANA/ICANN

4/7/1999 Cisco Proprietary23ROUT/BGP4-PGD-1

What is CIDR?

• No distinction between different classes of networks.Class A, B, C, etc… are no longer relevant. Variable-Length Subnet Masks (VLSMs) are permitted.

• BGP Version4 for designed for CIDR.

• OSPF first IGP to allow VLSMs.

• Group many class C or class B networks in one update(aggregation)

• Aggreagates can be used and more specific routes can besuppressed, reducing information.

• See RFC-1518.

4/7/1999 Cisco Proprietary24ROUT/BGP4-PGD-1

Why CIDR was Introduced?

• Routing Table Size

• IP Address Depletion

Page 9: Routing Workshop for Internet Service Providers

9

4/7/1999 Cisco Proprietary25ROUT/BGP4-PGD-1

Classful vs. Classless Addressing

• Classful– Class A - [0]000 0000. B2 . B3 . B4

• 1.0.0.0/8 -> 126.0.0.0/8

• Mask 255.0.0.0 or /8

– Class B - [10]00 0000. B2 . B3 . B4• 128.0.0.0/16 -> 191.255.0.0/16

• Mask 255.255.0.0 or /16

– Class C - [110]0 0000. B2 . B3 . B4• 192.0.0.0/24 -> 223.255.255.0/24

• Mask 255.255.255.0 or /24

• Classless– No longer any Class Boundaries

– Variable-Length Subnetting

• 0.0.0.0/8

– Reserved for Default route

• 127.0.0.0/8

– Reserved for loopbackfunction.

• Multi-cast

• Broadcast– Directed/Subnetwork

– All networks

• “This” Network ip subnet-zero

4/7/1999 Cisco Proprietary26ROUT/BGP4-PGD-1

Number of Routes in theInternet Today

• Approximately ~60,000 Routes

• Source: Tony Bate’s CIDR Reporthttp//www.employees.org/~tbates/cidr-report.html

4/7/1999 Cisco Proprietary27ROUT/BGP4-PGD-1

Internet Routing Table Growth

Table Created by Geoff Huston, Telstra, Australia

http://www.telstra.net/ops/bgptable.html

Page 10: Routing Workshop for Internet Service Providers

10

4/7/1999 Cisco Proprietary28ROUT/BGP4-PGD-1

Routing Protocol Domain

• Protocol Domain - this term is generally used todescribe a set of physically contiguous routerswhich are running the same routing protocolprocess (as denoted by their protocol process IDsometimes also called ASN).

4/7/1999 Cisco Proprietary29ROUT/BGP4-PGD-1

Autonomous System• An Autonomous System is a set of physically contiguous

routers managed by the same administrative organizationand sharing the same policy (ownership, trust, control).

• It likely implements multiple routing protocol processes(such as OSPF and BGP for e.g.), to include multiple IGPprocesses.

• ASN values are 2 bytes and range from 1 to 65535. Therange 64512 to 65534 is reserved for private ASN use.

• Size and geography can sometimes justify multiple Asesfor the same administrative domain. Multiple copies ofthe same policy must be managed (or different policies).

• Do you need to create an AS? See RFC-1930.

4/7/1999 Cisco Proprietary30ROUT/BGP4-PGD-1

Architecture

• Internet Architecture

• Points of Presence (POP)• Internet Exchange Points and NAPs

• Backbone Architectures

Page 11: Routing Workshop for Internet Service Providers

11

4/7/199931ROUT/BGP4-PGD-1

The old NSFnet architecture was based on asingle, explicit backbone.

Old NSFnet Architecture

4/7/199932ROUT/BGP4-PGD-1

Internet Topology and Architecture

• rapidly increasing complexity– more providers and locations– increased meshing

• global providers– capital, regulatory, and technical reasons limit

the scope of coverage of a single provider

• many new interconnect points (IXPs)

4/7/1999 Cisco Proprietary33ROUT/BGP4-PGD-1

Internet Hierarchy

1

2

3

11

2

2 2

2

2

4

3

3

3

4

4

4

BGP4 is used to “glue” thedifferent AutonomousSystems together that formthe Internet.

Multi-HomedISP

Network of Networks(ASes), no explicitbackbone

CORE

Page 12: Routing Workshop for Internet Service Providers

12

4/7/199934ROUT/BGP4-PGD-1

Icons

Router (layer 3, IP datagram forwarding)

ATM or Frame relay switch (layer 2, frame or cell forwarding)

4/7/199935ROUT/BGP4-PGD-1

Definitions

• POP - Point of Presence

• Routing - building a forwarding table

• Forwarding - switching packets between interfaces

• Transit - carrying traffic across a network, usuallyfor a fee

• Peering - exchanging routing information and traffic

• Default - a next hop indication when no explicit matchis in the forwarding table

4/7/199936ROUT/BGP4-PGD-1

POP Topologies

• Core routers - high speed trunk connections

• Distribution/Access routers and Access (specialized suchas dial-up, VoIP) routers

– high port density

– Connections to customers (ISPs and/or Private)• Services (Servers, Web Servers, AAA)

• Border/Gateway routers - connections to other providers

• Some functions may be collapsed into a single box• Some functions can be handled by switches

Page 13: Routing Workshop for Internet Service Providers

13

4/7/199937ROUT/BGP4-PGD-1

Routed POP Architecture

PrivateCustomerNetwork

ISP Customer

Core RoutersCORE POP

REMOTE POP

DistributionRouters

Core Interconnect

Internet

Gateway/BorderRouter

AccessRouters

4/7/199938ROUT/BGP4-PGD-1

Ring POP Architecture

PrivateCustomerNetwork

ISP Customer

CORE POP

REMOTE POP

Core InterconnectDistributionRouters

Core RoutersInternet

Gateway/BorderRouter

AccessRouters

4/7/199939ROUT/BGP4-PGD-1

Switched POP Architecture

PrivateCustomerNetwork

ISP Customer

CORE POP

REMOTE POP

Core Interconnect

DistributionRouters

Core RoutersInternet

Gateway/BorderRouter

AccessRouters

Page 14: Routing Workshop for Internet Service Providers

14

4/7/199940ROUT/BGP4-PGD-1

Internet Exchange Points (IXP’s)

• local IXP’s - peering point for a group oflocal/regional providers

• transit IXP’s - connects local providers tobackbone (transit) providers

• hybrid (IXP’s) - combines the function oflocal and transit

4/7/199941ROUT/BGP4-PGD-1

Internet Exchange Points

FDDI Ring

DS-3

DS-3

DS-3

DS-3/OC-3

4/7/199942ROUT/BGP4-PGD-1

Public Interconnect (e.g NAP)

Network 2

Network 1

Network 6

Network 4

Network 3

Network 5

each of these represents a border router in a different autonomous system

Page 15: Routing Workshop for Internet Service Providers

15

4/7/199943ROUT/BGP4-PGD-1

Public Interconnect Point

• Centralized (in one facility)

• Distributed (connected via WAN links)

• Shared, switched or routed interconnect– Router, FDDI, Ethernet, ATM, Frame relay,

etc.

• Much easier if it is homogeneous

• DMZ Network - typically a network whichinterconnects various ASes (i.e. IXPmembers).

4/7/199944ROUT/BGP4-PGD-1

Default Free Zone

The default free zone is made up of Internetrouters which have explicit routinginformation about the rest of the Internet,and therefore do not need to use a defaultroute.

4/7/199945ROUT/BGP4-PGD-1

Direct (private) Interconnect

network A

network B

AS 99

AS 334

border border

Page 16: Routing Workshop for Internet Service Providers

16

4/7/199946ROUT/BGP4-PGD-1

Route Server

Network 1

Network 6

Network 4

Network 3

Network 5

Route Server

Network 2

4/7/199947ROUT/BGP4-PGD-1

Route Server

• Benefits:– reduces resource burden on border routers– (CPU, memory, configuration complexity)– reduces administrative burden on providers

• Disadvantage:– providers must rely on a third party (for

configuration, routing softwareupdates, etc…)

4/7/199948ROUT/BGP4-PGD-1

Network Backbone Topologies

Routed backbone

• HDLC or PPP linksbetween routers

• Easier routingconfiguration anddebugging

Page 17: Routing Workshop for Internet Service Providers

17

4/7/199949ROUT/BGP4-PGD-1

Switched backbone• frame relay or ATM

– switches in the core,

– surrounded by routers• more complex routing

and debugging

• traffic management

Network Backbone Topologies

4/7/1999 Cisco Proprietary50ROUT/BGP4-PGD-1

Concepts

• Forwarding

• Routing

• Policy

4/7/199951ROUT/BGP4-PGD-1

Forwarding policies

• Is the process of receiving the packet on the ingressinterface and sending it out the egress interface(filtering etc. included)

• Packet filtering or queue manipulation

• Based on individual packet content– IP, TCP, UDP headers

– considerable granularity possible

• Usually impacts switching performance

• Typically done at the edge of the network

• Not the same as routing policy!

Page 18: Routing Workshop for Internet Service Providers

18

4/7/199952ROUT/BGP4-PGD-1

Routing - building the table

• Several alternative paths can exist (in the protocoldatabases and/or in the routing table as equal-costpaths)

• Decisions are updated periodically or as topologychanges (event driven)

• Decisions are based on:– prefix length*– distance*– topology– metrics (hop count, delay, bandwidth, etc.)– policies

4/7/199953ROUT/BGP4-PGD-1

Routing flow and traffic flow

Traffic flow is always in the oppositedirection of the flow of routing information

• filtering outgoing routing informationaffects traffic flowing in

• filtering incoming routing informationaffects traffic flowing out

4/7/199954ROUT/BGP4-PGD-1

Explicit and Default Routing

• Explicit Routing– All possible routes are in the routing table.

• Default Routing– Packets are forwarded based on a default route

because an explicit route for the destinationdoes not exist in the routing table.

Page 19: Routing Workshop for Internet Service Providers

19

4/7/199955ROUT/BGP4-PGD-1

Explicit vs. Default routing(benefits and disadvantages)

• Default:

– simple, cheap (cycles, memory, bandwidth)

– low granularity (metric games)• Explicit (default free zone) [full routes from all peers]

– high overhead, complex, high cost

– high granularity• Hybrid [partial routes and default routes]

– minimize overhead– provide useful granularity– requires some filtering knowledge

4/7/199956ROUT/BGP4-PGD-1

Default Free Zone

The default free zone is made up of Internetrouters which have explicit routinginformation about the rest of the Internet,and therefore do not need to use a defaultroute.

4/7/199957ROUT/BGP4-PGD-1

Ingress Traffic

• Packets entering “your” network

• How packets get to your network and yourcustomers’ networks (downstream)

• Ingress traffic depends on:• what information you send and to whom• based on your addressing and ASs• based on others’ policy (what they accept from

you and what they do with it)

Page 20: Routing Workshop for Internet Service Providers

20

4/7/199958ROUT/BGP4-PGD-1

Egress Traffic

• Packets exiting “your” network

• this traffic is based on• route availability (what others send you)

• route acceptance (what you accept from others)

• policy and tuning (what you do with routes– from others)• Peering and transit agreements (e.g. whom you– peer with)

4/7/199959ROUT/BGP4-PGD-1

Definition of terms• Neighbors: AS’s which directly exchange routing

information

• Announce: send routing information to a neighbor

• Accept: receive and use routing information sent by aneighbor

• Originate: insert routing information into externalannouncements (usually as a result of the IGP).

• Peer: a router in a neighbor AS (eBGP) or within your ownAS (iBGP) with which routing and policy information isbeing exchanged. Sometimes synonymous with exchangeof routing information without use of defaulting.

4/7/199960ROUT/BGP4-PGD-1

Routing and packet flow

For networks in AS1 and AS2 to communicate:» AS1 must announce to AS2

» AS2 must accept from AS1

» AS2 must announce to AS1

» AS1 must accept from AS2

routing flow

accept

announce

announce

acceptAS 1 AS2

packet flow

routing flowpacket flow

Page 21: Routing Workshop for Internet Service Providers

21

4/7/199961ROUT/BGP4-PGD-1

Routing policy limitations

AS99 uses red link for traffic in red AS’s (r) and greenlink for traffic in green AS’s (g)

To implement this policy for AS99:

• accept routes originating in red AS’s on red link

• accept all other routes on green link (no problems)

red

green

AS99

packet flowInternet

g

gg

g

g

r

rr

rr traffic flow

autonomoussystemsgrouped bycolor

4/7/199962ROUT/BGP4-PGD-1

Routing policy limitations (cont’d)

For packets flowing toward AS 99:

Unless AS 22 and all other intermediate AS’s cooperate inpushing green traffic (g) to the green link and red traffic(r) to the red link then some reasonable policies cannot beimplemented.

red

green

AS99

traffic flow

AS22

Intermediateautonomoussystems

g

gg

g

g

r

rr

rr

4/7/199963ROUT/BGP4-PGD-1

Peering and Transit

provider A

provider C

provider B

Backbone ProviderIXP -

EastIXP-West

A and B can peer, but need transitarrangements to get packets to/from C

TransitAcrossBackboneProvider

Peering

Page 22: Routing Workshop for Internet Service Providers

22

4/7/199964ROUT/BGP4-PGD-1

Routing policy with multiple AS’s

For net N1 in AS1 to send traffic to net N16 in AS16:• AS16 must originate and announce N16 to AS8.

• AS8 must accept N16 from AS16.

• AS8 must announce N16 to AS1 and/or AS34.

• AS1 must accept N16 from AS8 and/or AS34.(For two-way packet flow, comparable policies must exist for N1in the opposite direction.)

AS 1

AS 8

AS 34

AS16

N1

N16

4/7/199965ROUT/BGP4-PGD-1

Routing policy with multiple AS’s

As multiple paths between sites areimplemented it is easy to see how policiescan become quite complex.

AS 1

AS 8

AS 34

AS16

N1

N16

4/7/199966ROUT/BGP4-PGD-1

Routing policy problem

AS1 does not accept any path traversing AS4• If AS2 prefers to reach AS3 via AS4

– result is no connectivity from AS1 to AS3• If AS2 prefers to reach AS3 via AS5

• result is connectivity from AS1 to AS3

• Connectivity indirectly depends on AS2 ‘s policy

AS1

AS4

AS2

AS3

AS5

Page 23: Routing Workshop for Internet Service Providers

23

4/7/199967ROUT/BGP4-PGD-1

Routing policy problem

• Since AS2 prefers to reach AS3 via AS4, there is normally noconnectivity from AS1 to AS3

• If the AS2 - AS4 link fails, then there is connectivity from AS1 to AS3.

• Connectivity only in the presence of network problems is quite difficult todiagnose!

AS1

AS4

AS2

AS3

AS5

4/7/1999 Cisco Proprietary68ROUT/BGP4-PGD-1

Routing Asymmetry (Egress)

84145713

5511

6453

701

12396695 82976859

1800

MAE-E++

SPRINT NAP

MAE-W

PAIX

LINX

Africa Telecom 98 Internet Connectivity (Outgoing Path)

12731755

MAE-FFrankfurt

bone-gw.frankfurt.core.ipf.net

MAE-FFrankfurt

gw6.ipf.net

Autonomous System Number Information

8414 - Africa Telecom 981239 - SPRINTlink1800 -ICM Atlantic701 - UUNET5511 - France Telecom3561 - MCI8297 - Teleglobe (European AS UK, Fr.,Ger.)1755 - EBONE Internal (EBONEConsortium)6859 - MikNet GmbH6695 - IntraNet GmbH (DE-CIX AS)

3561

4/7/1999 Cisco Proprietary69ROUT/BGP4-PGD-1

Routing Asymmetry (Ingress)

84145713

5511

6453

701

3561

12396695 82976859

1800

MAE-E++

SPRINT NAP

MAE-W

PAIX

LINX

Africa Telecom 98 Internet Connectivity (AS Return Path)

12731755

MAE-FFrankfurt

bone-gw.frankfurt.core.ipf.net

MAE-FFrankfurt

gw6.ipf.net

Autonomous System Number Information

8414 - Africa Telecom 981239 - SPRINTlink1800 -ICM Atlantic701 - UUNET5511 - France Telecom3561 - MCI8297 - Teleglobe (European AS UK, Fr., Ger.)1755 - EBONE Internal (EBONE Consortium)6859 - MikNet GmbH6695 - IntraNet GmbH (DE-CIX AS)

Page 24: Routing Workshop for Internet Service Providers

24

4/7/199970ROUT/BGP4-PGD-1

Multihomed Provider

IXP-1

IXP-2

AS 222

AS 333

AS 111

AS123

AS 555

4/7/199971ROUT/BGP4-PGD-1

Multihomed provider

• AS 222 and AS 333 are large backboneproviders.

• IXP-1 is a local interconnect.

• IXP-2 is a major transit interconnect.

• What are some routing policy strategies thatcould be used by AS 111, AS 123, and AS555?

4/7/199972ROUT/BGP4-PGD-1

Granularity of policy description

• What to announce

• What to accept

• Preferences between multiple accepts• single route

• routes originated by single AS

• routes originated by a group of ASs

• routes traversing specific path

• routes traversing specific AS

• routes belonging to other groupings (including combinations)

Page 25: Routing Workshop for Internet Service Providers

25

4/7/199973ROUT/BGP4-PGD-1

Granularity of policy description(cont’d)

• ~60,000 prefixes (not realistic to set policyon all of them individually)

• hundreds of AS’s (still too many)

• routes tied to a specific AS or path may beunstable regardless of connectivity

• groups of AS’s are a natural abstraction forfiltering purposes

4/7/199974ROUT/BGP4-PGD-1

Routing Policy Issues

• Destination based limitations

• Global topology not known (and constantly changing)– details of connectivity are not known

– paths restricted due to policy are not known

• Route groupings are not known– AS membership or AS groups

• Set of all routes in the Internet is not known

4/7/199975ROUT/BGP4-PGD-1

Addressing Issues

• Geographical addressing– ARIN/APNIC/RIPE assigned

– Nationally Assigned

• Provider-based addressing– Addresses assigned by upstream provider

– To a large degree is geographic

Page 26: Routing Workshop for Internet Service Providers

26

4/7/1999 Cisco Proprietary76ROUT/BGP4-PGD-1

Geographical Addressing• Advantages:

– probably reduces global routing table in the long run (as

connectivity continues to increase)

– not tied to non-local backbone provider (may not need to

renumber when changing providers)

– good local routing when interconnects are implemented

• Disadvantages:

– routing may be non-optimal in the near term

– may increase global routing table in the near term

– renumbering is still fairly likely

– global providers can cause a problem with this scheme if

addressing is allocated to providers without regard to geography.

4/7/1999 Cisco Proprietary77ROUT/BGP4-PGD-1

Provider-Based Addressing

• Advantages:• easy way to get started

• no increase in global routing table initially

• Disadvantages:• must renumber to change providers, or use address translation

• causes inefficiencies with geographic address allocation

4/7/199978ROUT/BGP4-PGD-1

Provider based addressing

A and C are in one city, B and D are in a different city

IXP

Backbone #1

133.132/16

Backbone #2

145.19/16

Subscribers

133.132.5/24

133.132.22/24

145.19.23/24

145.19.133/24

A

B

C

D

Page 27: Routing Workshop for Internet Service Providers

27

4/7/199979ROUT/BGP4-PGD-1

Provider based addressingwith local interconnect points

IXP

Backbone #1

133.132/16

Backbone #2

145.19/16

Subscribers

133.132.5/24

133.132.22/24

145.19.23/24

145.19.133/24

A

B

C

D

IXP

4/7/199980ROUT/BGP4-PGD-1

Provider based addressinglimitations

IXP

Backbone #1

133.132/16

Backbone #2

145.19/16

Subscribers

133.132.5/24

133.132.22/24

145.19.23/24

145.19.133/24

A

B

C

D

IXP

If B’s primary link goes down,and D is providing backup,a hole is created.

Other providers may not receive or “see”133.132.22/24 because they may befiltering on a /19 boundary.

Backbone #2 may nowhave to advertise 133.132.22/24

4/7/199981ROUT/BGP4-PGD-1

Provider based addressinglimitations

IXP

Backbone #1

133.132/16

Backbone #2

145.19/16

Subscribers

133.132.5/24

133.132.22/24

145.19.23/24

145.19.133/24

A

B

C

D

If B wants to change to BB #2, a hole is punchedin #1’s address space.

This may require that B re-address to Provider #2’saddress space.

Page 28: Routing Workshop for Internet Service Providers

28

4/7/199982ROUT/BGP4-PGD-1

Geographical/IndependentAddressing

A and C are in one city, B and D are in a different city

IXP

Backbone #1

133.132/16

Backbone #2

145.19/16

Subscribers

201.23.23/24

196.14.10/24

201.23.18/24

196.14.16/24

A

B

C

D

The subscribers have their ownaddresses, and they are not part of the provider’s address space.

4/7/199983ROUT/BGP4-PGD-1

Geographical Addressing

IXP

Backbone #1

133.132/16

Backbone #2

145.19/16

Subscribers

201.23.23/24

196.14.10/24

201.23.18/24

196.14.16/24

A

B

C

D

IXP

B, D, and others in that metro area can interconnect easily

Local ExchangePoint

4/7/199984ROUT/BGP4-PGD-1

Challenges in geographicaladdressing

• Cooperation between providers is necessaryfor it to be effective.

• Suboptimal routing or lack of connectivitycan occur.

• Address coordination issues remain.

• Global providers addressing can bypass“neat” geographical aggregation.

Page 29: Routing Workshop for Internet Service Providers

29

4/7/199985ROUT/BGP4-PGD-1

Renumbering• Renumbering may be necessary in many cases in

order to come into line with geographic or provider -based addressing and to supportsummarization/aggregation.

• Renumbering can allow a range of addresses (aprefix) to be aggregated or summarized as part of alarger block of addresses which are topologicallyclose in the network.

• Address summarization allows the routing hierarchyto be efficient.

• See RFC 2071 and 2072 for more information.

4/7/199986ROUT/BGP4-PGD-1

Network Address Translation

• An alternative to renumbering.

• Packet headers are translated in real time on the edgeof the network.

• See RFC 1631, which describes NAT functions

• NAT can be used with RFC 1918 addresses to allowan organization more flexibility in address space use.

• Concern has been expressed regarding data integrityand security of network address translators.

4/7/1999 Cisco Proprietary87ROUT/BGP4-PGD-1

Border Gateway Protocol,Version 4 (BGP4)

• BGP Basics

• Aggregation and Announcements

• Routing Table Derivation and Path Selection

• Policy Control• Administrative and iBGP Scaling

• Other BGP4 Issues

• BGP4 Management

Page 30: Routing Workshop for Internet Service Providers

30

4/7/199988ROUT/BGP4-PGD-1

BGP Basics

4/7/199989ROUT/BGP4-PGD-1

BGP4 General Operation

• Learns multiple paths via internal (iBGP)and external (eBGP) speakers/peers.

• Picks the best path for installation intothe IP routing table.

• Policies applied by influencing thebest path selection as well as controllingwhat is announced and what is accepted

4/7/199990ROUT/BGP4-PGD-1

External BGP Peering

• Runs over TCP

• Use directly-connectednext-hop

• Incremental updates

• Between speakers indifferent ASes

AS 100 AS 101

AS 102

EE

BB DD

AA CC

Peering

eBGP

eBGPeBGP

Page 31: Routing Workshop for Internet Service Providers

31

4/7/199991ROUT/BGP4-PGD-1

• Shared network between ASs

Demilitarized Zone (DMZ)

AS 100 AS 101

AS 102

EE

BB DD

AA CCeBGP

eBGPeBGP

DMZ Network

DMZ Network

4/7/199992ROUT/BGP4-PGD-1

eBGP Configuration

• Configuration:Router Brouter bgp 110

network 150.10.0.0 mask 255.255.0.0

neighbor 131.108.10.1 remote-as 109

ip route 150.10.0.0 255.255.0.0 null0

Router Arouter bgp 109

network 131.108.0.0 mask 255.255.0.0

neighbor 131.108.10.0 remote-as 110

ip route 131.108.0.0 255.255.0.0 null0

AS 109

AS 110

131.108.0.0/16

A

B

150.10.0.0/16

131.108.10.0

.1

.2

4/7/199993ROUT/BGP4-PGD-1

Internal BGP Peering

• iBGP peers are within the same AS• Not required to be directly physically

connected (uses TCP) - May be several hopsaway

• iBGP neighbors should be fully meshed(announcements are NOT forwarded)

• Peer between loopback interfaces for stability• Advertise loopback as next-hop• iBGP hold timer larger than 2x IGP timer

AS 100

AA

EE

BB

DD

iBGP

iBGP

iBGP

Page 32: Routing Workshop for Internet Service Providers

32

4/7/199994ROUT/BGP4-PGD-1

iBGP Configuration

• ConfigurationRouter B

router bgp 109neighbor 131.108.11.1 remote-as 109

Router A

router bgp 109neighbor 131.108.22.1 remote-as 109

A B

131.108.0.0/16

AS 109

Loopback 0

131.108.22.1/32

Loopback 0

131.108.11.1/32

iBGP

4/7/199995ROUT/BGP4-PGD-1

Stable IBGP Peering

• Peer with loop-back address

• iBGP session is not dependenton a single interface

• Loop-back interface doesnot go down

• Set BGP hold timer to 2x IGP timer.

4/7/1999 Cisco Proprietary96ROUT/BGP4-PGD-1

Route Propagation with iBGP

• iBGP speakers do not forward route informationwith they receive from the first peer to a thirdpeer.

• Full meshing is required between all iBGPspeakers within the same AS in order for eachiBGP speaker to learn information from all otheriBGP speakers.

• Route Reflectors simplify complex meshing.

Page 33: Routing Workshop for Internet Service Providers

33

4/7/199997ROUT/BGP4-PGD-1

Stub Network

AS 100

AS 101BB

AA

eBGPeBGP

Static

103.20.34/24

default

103.20.34/24

Stub Network

ISP

Announce: 103.20.34/24(or aggregate)

Announce: 103.20.34/24(or aggregate)

4/7/199998ROUT/BGP4-PGD-1

Stub Network

• No need for BGP (use static routes)

• Point default towards the ISP

• ISP advertises the stub network

• Policy confined within ISP policy

4/7/199999ROUT/BGP4-PGD-1

Multi-Homed AS

AS 100

AS 200

AS 300DD

CCBB

AA

iBGP

eBGP eBGP

Transit Path150.10.20.0/24

131.108.34/24

161.214.0.0/16

Page 34: Routing Workshop for Internet Service Providers

34

4/7/1999100ROUT/BGP4-PGD-1

Multi-Homed AS

• Many different situations can be considered multi-homed

• Multiple sessions to same ISP

• Multiple sessions to multiple ISPs

• Many reason for muti-homing

• Backup paths

• Load-sharing

• Proximity to particular destinations

• Asymmetry of BGP paths and load balancing

• Policy can become quite complex vs. single-homing

4/7/1999101ROUT/BGP4-PGD-1

Multiple Sessions to sameneighbor AS (same peer router)

• Use eBGP multi-hop to loadshare across multiple, equal-cost links (paths)

• eBGP to loopback address

• eBGP prefixes learned withloopback address as nexthop

• Parallel paths to loopbackaddress allows load sharing AS 201

4/7/1999 Cisco Proprietary102ROUT/BGP4-PGD-1

eBGP Multi-hop Configuration

AS 300

eBGP

131.108.0.0/16

150.10.0.0/16 AS 200

A

B

Loopback 0

131.108.22.1/32

Loopback 0

150.10.97.1/32

• Configuration:Router Brouter bgp 200

neighbor 131.108.22.1 remote-as 300

neighbor 131.108.22.1 update-source loopback 0

neighbor 131.106.22.1 ebgp-multihop

Router Arouter bgp 300

neighbor 150.10.97.1 remote-as 200

neighbor 150.10.97.1 update-source loopback 0

neighbor 150.10.97.1 ebgp-multihop

Page 35: Routing Workshop for Internet Service Providers

35

4/7/1999103ROUT/BGP4-PGD-1

Multiple Sessions to sameneighbor AS (different peer routers)

• Simplest schemeis to use defaults

• Learn/advertiseprefixes from/to bothpeers forbetter control

AS 201

ISP

DD FF

AA BB

4/7/1999104ROUT/BGP4-PGD-1

Multiple Sessions to sameneighbor AS (different peer routers)

• Use EBGP multipath to install multiplepaths in IP table of router A.

• Loadshare overthe alternate paths

• Configuration:Router A:

router bgp 201

neighbor 150.10.29.1 remote-as 301

neighbor 150.10.100.1 remote-as 301

max-paths 2

(use directly-connected next-hop)

• Same prefix/mask pair from each routerwith same attribute values will be“weighted” the same and two paths willbe implemented.

AS 201

DD FF

AA

150.10.0.0/16

150.10.29.1150.10.100.1

AS 301

4/7/1999 Cisco Proprietary105ROUT/BGP4-PGD-1

Multiple sessions to multipleneighbor ASes

AS 100

AS 200

AS 300DD

CCBB

AA

iBGP

eBGP eBGP

Transit Path150.10.20.0/24

131.108.34/24

161.214.0.0/16

Page 36: Routing Workshop for Internet Service Providers

36

4/7/1999106ROUT/BGP4-PGD-1

Multiple sessions to multipleneighbor ASes

• Difficult to achieve load-sharing (due to pathasymmetry nature)

• Some options include:

• Point default towards one AS (higher-distancesecondary default pointed to other AS) take partialroutes from other AS

• Learn selected prefixes from second AS

•Announce selected prefixes to each neighbor AS

• Modify the number of prefixes learned or controlwhich paths to use to achieve acceptable load-sharing

4/7/1999107ROUT/BGP4-PGD-1

BGP in Large (NSP) ISPBackbones

• All routers take part in BGP

• BGP carries full Internet routing table (possiblemultiple views in gateway routers)

• IGPs are used to carry next hopand internal route information

• Routes are never redistributedfrom BGP into IGP

• Recursive route lookup

4/7/1999108ROUT/BGP4-PGD-1

BGP in smaller transit ISPs

• Implement iBGP along transit path routers only

• Default up to gateway routers

• Careful of non-optimal routing

• Don’t usually require full routes (I.e. partial routesfrom neighbors)

• IGPs carry next hop and internal network information

• No IGP <-> BGP redistribution

• Recursive route lookup

Page 37: Routing Workshop for Internet Service Providers

37

4/7/1999109ROUT/BGP4-PGD-1

Synchronization

AS 300AS 200

AS 100RTA knows about204.123.12/24 from

RTC via iBGPRTB

RTC

RTA

RTXRTY

204.123.12/24

RTB knows nothing about204.123.12/24 (because it is

not participating in BGP) butmay know about next-hop on

RTY (if injected into IGP)

iBGP

eBGP eBGP

Forwarding via RTA-RTB-RTC-RTY will break in thiscase since RTB knowsnothing about 204.123.12/24

4/7/1999110ROUT/BGP4-PGD-1

Synchronization• If transit is provided, Transit AS should not advertise route until all

routers within AS have learned about the route via the/an IGP. Theonly way that this can happen is if external routes are injected into theIGP (which may not be a good idea). So, turning synch off andimplementing BGP in the routers along the transit path is the usualprocedure.

• Route will not be announced until it is seen via the IGP (with synchturned on).

• Disable synchronization if:

– Transit is not provided (e.g. stub BGP connected network)

– All transit routers in AS run BGP (so route is known toeach router in transit path via BGP)

• Synchronization is employed to ensure that a path exists through theTransit AS.

4/7/1999111ROUT/BGP4-PGD-1

ConfiguringAggregation

andAnnouncements

Page 38: Routing Workshop for Internet Service Providers

38

4/7/1999112ROUT/BGP4-PGD-1

Configuring Aggregation

•Three ways to configure routeaggregation

• redistribute static

• network mask command

• aggregate-address command

•dynamic redistribution

NOTE: no auto-summary command

4/7/1999113ROUT/BGP4-PGD-1

Configuring Aggregation

•redistribute static– Configuration:

router bgp 109

redistribute static...

ip route 198.10.0.0 255.255.0.0 null 0

– Forces Origin attribute to “Incomplete”

4/7/1999114ROUT/BGP4-PGD-1

Configuring Aggregation

• Network and mask command

– Configuration:

router bgp 109

network 198.10.0.0 mask 255.255.0.0 ...

ip route 198.10.0.0 255.255.0.0 null 0 210

< A matching prefix/mask or more-specific (i.e. longer-prefix) must exist in the routing table…here implementedusing a static route. >

– Can be a good idea to use “210” to weight route (any other route to 198.10.0.0/16 will have a smaller weight).

– If <no auto-summary> is implemented, more-specifics will be advertised.

Page 39: Routing Workshop for Internet Service Providers

39

4/7/1999115ROUT/BGP4-PGD-1

Configuring Aggregation

• Aggregate-address commandrouter bgp 109

network 198.10.0.0 mask 255.255.0.0

aggregate-address 198.10.0.0 255.255.0.0 as-set summary-only...

ip route 198.10.0.0 255.255.0.0 null0

• {summary-only} keyword– Ensures that only the summary is announced, but only if a more- specific prefix exists in the bgp table.

4/7/1999116ROUT/BGP4-PGD-1

Aggregation Policies

• Suppress map

• Unsuppress map

4/7/1999117ROUT/BGP4-PGD-1

Aggregation Policies

• Suppress Map– Used to suppress the announcement of selected more-

specific prefixes (e.g. defined through a route-map) inthe absence of the {summary-only} keyword.

• Unsuppress Map– Used to permit announcement of selected more-

specific prefixes in the presence of {summary-only} keyword.

Page 40: Routing Workshop for Internet Service Providers

40

4/7/1999118ROUT/BGP4-PGD-1

Aggregation Policies• Suppress map (on neighbor 25.97.13.130)

router bgp 900

network 199.10.10.0

network 199.10.11.0

network 199.10.12.0

network 199.10.33.0

network 199.10.34.0

aggregate-address 199.10.0.0 255.255.0.0 suppress-map foo1

neighbor 25.97.13.129 remote-as 1000

… (static null0 routes omitted because of space constraints)

access-list 3 deny 199.10.8.0 0.0.7.255

access-list 3 permit any

route-map foo1 permit 10

match ip address 3

Routes which are not deniedby the access-list “foo1” willbe suppressed.

4/7/1999119ROUT/BGP4-PGD-1

Aggregation Policies

• Suppress map (sh ip bgp on neighbor 25.97.13.129)rtd#sh ip bgp

BGP table version is 9, local router ID is 191.21.10.1

Status codes: s suppressed, d damped, h history, * valid, > best,i - internal

Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path

*> 199.10.0.0/16 25.97.13.130 0 900 i

*> 199.10.10.0 25.97.13.130 0 0 900 i

*> 199.10.11.0 25.97.13.130 0 0 900 i

*> 199.10.12.0 25.97.13.130 0 0 900 i

*> 200.200.200.0 0.0.0.0 0 32768 i

4/7/1999120ROUT/BGP4-PGD-1

Aggregation Policies

• Unsuppress map (on neighbor 25.97.13.130)router bgp 900

network 199.10.10.0

network 199.10.11.0

network 199.10.12.0

network 199.10.33.0

network 199.10.34.0

aggregate-address 199.10.0.0 255.255.0.0 summary-only

neighbor 25.97.13.129 remote-as 1000

neighbor 25.97.13.129 unsuppress-map foo1

… (static null0 routes omitted because of space constraints)

access-list 3 deny 199.10.8.0 0.0.7.255

access-list 3 permit any

route-map foo1 permit 10

match ip address 3

Routes which are not deniedby the access-list “foo1” willbe un-suppressed.

Page 41: Routing Workshop for Internet Service Providers

41

4/7/1999121ROUT/BGP4-PGD-1

Aggregation Policies

• Unsuppress map (on neighbor 25.97.13.129)rtd#sh ip bgp

BGP table version is 23, local router ID is 191.21.10.1

Status codes: s suppressed, d damped, h history, * valid, >best, i - internal

Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path

*> 199.10.0.0/16 25.97.13.130 0 900 i

*> 199.10.33.0 25.97.13.130 0 0 900 i

*> 199.10.34.0 25.97.13.130 0 0 900 i

*> 200.200.200.0 0.0.0.0 0 32768 i

4/7/1999122ROUT/BGP4-PGD-1

Routing TableDerivation and Path

Selection

4/7/1999123ROUT/BGP4-PGD-1

Routing Table Derivation• BGP “in” process receives NLRI (prefix/mask pairs with respective attributes)

as announcements from BGP (iether iBGP or eBGP peers) and “filters” themby (1) omitting received prefix announcements based on prefixmask pairand/or attribute values, on ingress. Manipulation of NLRI attributes can alsobe implemented to influence path selection process.

• BGP path selection takes place and the results are placed in BGP table. Bestpath(s) is “flagged” in table (see slide describing Path Selection algorithm).

• BGP “out” announces BEST path information to peers. Routeannouncements can be filtered and omitted or have attributes manipulated ategress. This works for eBGP and in most cases for iBGP.

• Best paths are copied to IP routing table process and are installed if:– Prefix and mask (also called prefix length) are unique, if not (if they are

not unique then it is assumed that the same prefix/mask has been derivedby other routing protocols) then:

– Protocol distances for all identical prefix/mask pairs are compared and lowest distance “wins”. Winner is installed in routing table.

Page 42: Routing Workshop for Internet Service Providers

42

4/7/1999124ROUT/BGP4-PGD-1

Default Administrative Distances

Connected Interface Connected Interface 00Static RouteStatic Route 11Enhanced IGRP Summary RouteEnhanced IGRP Summary Route 55External BGPExternal BGP 2020Internal Enhanced IGRPInternal Enhanced IGRP 9090IGRPIGRP 100100OSPFOSPF 110110IS-IS IS-IS 115115RIP RIP 120120EGPEGP 140140External Enhanced IGRPExternal Enhanced IGRP 170170Internal BGPInternal BGP 200200UnknownUnknown 255255

Route SourceRoute Source Default DistanceDefault Distance

4/7/1999 Cisco Proprietary125ROUT/BGP4-PGD-1

• BEST-MATCH SEARCH, IF EQUAL PREFER LOWEST PROTOCOL“DISTANCE”

1. AS_SEQUENCE or AS_SET CONTAIN LOCAL ASN à IGNORE/DISCARD

2. NEXT_HOP INACCESSIBLE à IGNORE PREFIX/PATH

3. SYNCH ENABLED, PATH INTERNAL, ROUTE NOT IN IGP à IGNORE

4. LARGEST WEIGHT

5. LARGEST LOCAL_PREF

6. LOCALLY ORIGINATED

7. SHORTEST AS_PATH

8. LOWEST ORIGIN TYPE

9. LOWEST MED

10. eBGP DERIVED PATH PREFERRED OVER iBGP PATH

11. SELECT ROUTE WITH LOWEST METRIC TO NEXT_HOP

12. EXISTING BEST ROUTE AND THIS ROUTE =, AND MAXPATHS > 1 à ADDROUTE

IF MAXPATHS = 1 (DEFAULT) à PREFER LOWEST ROUTER ID

BGP Path Selection Algorithm(summarized)

4/7/1999 Cisco Proprietary126ROUT/BGP4-PGD-1

BGP Path Selection Algorithm

• The whole basis for BGP decision making about which route to implementis found in the Path Selection algorithm shown on the previous slide.

• The decision process is based on a comparison of the relative values of theattributes for each route or path to the same prefix/mask pair.

• Under normal circumstances, a comparison of the values of the attributes,as outlined on the previous slide, is used to make the decision as to which of

two or more identical prefix/mask pairs denotes the best route or path.

• Manipulation of BGP attributes is the mechanism used to control selectionof one route (or “path”) over another (when two or more paths to the same

destination are present).

• Attributes can be manipulated on outgoing announcements to affect ingresstraffic. Attributes which have been manipulted on ingress announcsments

will affect egress traffic.

Page 43: Routing Workshop for Internet Service Providers

43

4/7/1999127ROUT/BGP4-PGD-1

BGP4 Attributes

• AS-Path

• Next Hop

• Local Preference

• Multi-ExitDiscriminator

• Origin

• Atomic Aggregator

• Aggregator

• Communities

• Weight (not anattribute)

4/7/1999128ROUT/BGP4-PGD-1

What Is an Attribute?

• Describe the characteristics of prefix

• Transitive or non-transitive

• Mandatory, non-mandatory

NextNextHopHop

ASASPathPath

............MEDMED......

4/7/1999129ROUT/BGP4-PGD-1

AS-Path

• Path traversed one ormore members of a set

{1880, 1881, 1882} (as-set)

• A list of AS’s that a routehas traversed

1880 1883 (sequence)

1880193.0.34/24 1882

193.0.35/24

1881193.0.33/24

193.0.33/24 1880 1881193.0.34/24 1880193.0.35/24 1880 1882193.0.32/22{1880,1881,1882}

1883193.0.32/24

918

Page 44: Routing Workshop for Internet Service Providers

44

4/7/1999130ROUT/BGP4-PGD-1

Next Hop

• Next hop to reach a network

• Usually a local network is the nexthop in EBGP session

150.10.1.1 150.10.1.2

AS 100160.10.0.0/16

AS 300AS 200150.10.0.0/16

150.10.0.0/16 150.10.1.1160.10.0.0/16 150.10.1.1

AA BB

4/7/1999131ROUT/BGP4-PGD-1

Third-Party Next Hop

192.68.1.0/24

150.1.1.3150.1.1.3

150.1.1.1

150.1.1.2

AS 201

AS 200

CC

AA BB

• Routers C and B have nopeering agreement and arenot peering using BGP

• Traffic destined for192.68.1.0/24 will beforwarded from C to Bbecause next-hop wascarried from B->A->C.

• Use next-hop-self toremedy this problem.

192.68.1.0/24 150.1.1.3

eBGPtraffic flow

AS 202eBGP

4/7/1999132ROUT/BGP4-PGD-1

iBGP Next Hop

• Next hop not changed

150.10.1.1 150.10.1.2

AS 100160.10.0.0/16

AS 300

AS 200150.10.0.0/16 AA BB

CC

150.10.0.0/16 150.10.1.1160.10.0.0/16 150.10.1.1

eBGPsessions

iBGP

Page 45: Routing Workshop for Internet Service Providers

45

4/7/1999133ROUT/BGP4-PGD-1

Next Hop

• IGP should carry route to next hops

• Recursive route lookup is necessary because next-hopcarried internally through iBGP as prefix attribute.

• De-couples BGP from the actual physical topology(BGP routes not redistributed into the IGP).

• Allows IGP to make intelligent fowarding decision byforwarding based on route(s) to next-hop.

4/7/1999 Cisco Proprietary134ROUT/BGP4-PGD-1

Recursive Look-Ups

7505A#sh ip bgp BGP table version is 35, local router ID is 172.24.97.1Status codes: s suppressed, d damped, h history, * valid, > best,i - internalOrigin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path*>i1.0.0.0 190.151.1.2 0 100 0 300 i*>i2.0.0.0 190.151.1.2 0 100 0 300 i* i 190.151.1.2 0 100 0 200 i*>i2.2.2.2/32 190.151.1.2 0 100 0 200 i*>i4.0.0.0 190.151.1.2 0 100 0 200 i*>i10.0.0.0 190.151.17.1 0 100 0 i

The BGP next-hop for the destination, 2.2.2.2 is found to be 190.151.1.2 by looking in the BGP table.

4/7/1999 Cisco Proprietary135ROUT/BGP4-PGD-1

Recursive Look-Ups (cont’d)

7505A#sh ip route

Gateway of last resort is not set

1.0.0.0/8 is variably subnetted, 2 subnets, 2 masksC 200.150.20.0/24 is directly connected, Ethernet1/0/0 2.0.0.0/8 is variably subnetted, 2 subnets, 2 masksB 2.2.2.2/32 [200/0] via 190.151.1.2, 2w3dB 2.0.0.0/8 [200/0] via 190.151.1.2, 18:02:36 190.151.0.0/16 is variably subnetted, 2 subnets, 2 masksO 190.151.1.0/30 [110/74] via 172.24.11.2, 2w2d, Serial2/1/0O 190.151.17.1/32 [110/65] via 172.24.11.2, 2w2d, Serial2/1/0

When forwarding, a first lookup is conducted to determinethe next-hop. The BGP next-hop is actually 190.151.1.2(from the previous slide). The next-hop’s subnet is shownhere as 190.151.1.0/30. A second, recursive lookup isrequired in order to determine the actual, directly-connected next-hop which turns out to be 172.24.11.2.

Page 46: Routing Workshop for Internet Service Providers

46

4/7/1999136ROUT/BGP4-PGD-1

Local Preference

• Local Preference is sent to all routers in the localAS

• Influences best path selection

• Paths with the highest Local_Pref value are mostdesireable.

• Local_pref default = 100 (even when not visiblein sh ip bgp command displays)

• Higher Local_Pref value is preferred.

4/7/1999137ROUT/BGP4-PGD-1

Local Preference

• Configuration of router A:router bgp 109

neighbor 131.108.1.1 remote-as 1880

neighbor 131.108.1.1 route-map foo in

route-map foo 10

match as-path 2

set local-preference 120

route-map foo 20

match as-path 3

ip as-path access-list 2 permit _690$

ip as-path access-list 3 permit .*

4/7/1999138ROUT/BGP4-PGD-1

Local Preference

Needs to go to 690

A

1755 1880

666

690

190Local_Pref = 100

Local_Pref = 120

• In this case path via 1880_1755_690 has Local_Pref of 120. DefaultLocal_Pref is 100 and the path via 666_690 is therefore less preferred.

Page 47: Routing Workshop for Internet Service Providers

47

4/7/1999139ROUT/BGP4-PGD-1

Multi-Exit Discriminator(MED)

• Affects all routes from same AS path

• Advertised to external neighbors

• Lower MED value is more preferable

• Default = 50

4/7/1999140ROUT/BGP4-PGD-1

Multi-Exit Discriminator(MED)

• Non-transitive (reset prior to being sent out as part ofannouncement to third AS). When using comparemechanism, must be set to desired value on annoucementssent by third AS.

• Used to convey the relative preference of entry points to aneighbor, thus affecting ingress traffic to the announcingAS

• Influences best path selection

• Comparable if paths are from same AS (Comparison ofMED on same prefix from two different ASes possible)

• IGP metric can be conveyed as MED (redistribution)

4/7/1999141ROUT/BGP4-PGD-1

Multi-Exit Discriminator(MED)

• Configuration for router B:router bgp 1755

neighbor 131.108.1.1 remote-as 1880

neighbor 131.108.1.1 route-map foo out

route-map foo 10

match as-path 2

set metric 25

route-map foo 20

match as-path 3

ip as-path access-list 2 permit _690$

ip as-path access-list 3 permit .*

Page 48: Routing Workshop for Internet Service Providers

48

4/7/1999142ROUT/BGP4-PGD-1

1755

690

200

1880

1883

209

Multi-Exit Discriminator(MED)

Router B

Set:Local_Pref=150

Set:MED=25

MED=50Default

Local_Pref=100Default

4/7/1999143ROUT/BGP4-PGD-1

Multi-Exit Discriminator (MED)

• Comparison of MED on same prefix fromtwo different ASes– Permits an AS to compare MED values for

path information propagated directly from theoriginating neighboring AS as well as throughan intermediate AS.

– Requires that the intermediate AS set the MEDvalue for the path information since MED is non-transitive.

4/7/1999144ROUT/BGP4-PGD-1

Multi-Exit Discriminator (MED)

• MED Comparison between multipleASes– router bgp 100

– neighbor 2.2.2.1 remote-as 300

– neighbor 2.2.2 remote-as 300

– bgp always-compare-med

Page 49: Routing Workshop for Internet Service Providers

49

4/7/1999145ROUT/BGP4-PGD-1

Origin

• IGPNetwork statement under router BGP

• EGPRedistributed from EGP

• IncompleteRedistribute IGP under router BGPExample: redistribute static

• IGP<EGP<Incomplete

• Lowest origin type is preferred

4/7/1999146ROUT/BGP4-PGD-1

Atomic Aggregate

• Used to inform BGP speaker that lessspecific routes are aggregated into theprefix

• BGP speaker receiving this attributeshall NOT remove the attribute whenpropagating it

4/7/1999147ROUT/BGP4-PGD-1

Aggregator

• Last AS number that formed theaggregate route

• IP address (RID - largest IP address orloopback interface address - loopbackpreferred) of the BGP speaker thatformed the aggregate route

Page 50: Routing Workshop for Internet Service Providers

50

4/7/1999148ROUT/BGP4-PGD-1

Communities• Used to “tag” prefixes for a variety of purposes. These tags are

sent along with the prefixes as they are announced (this must bemanually configured)

• Examples include: grouping destinations (to associate prefixes into“sets”), to send “signals” to neighbor ASes which could be used toderive path preference (e.g. RFC1998). Useful for applyingpolicies.

• Four byte value. Can consist of a “string” of four-byte values.

• Each destination could be member of multiple communities(communities can be additive)

• Community attribute carried across ASes (transitive butdiscretionary)

• New-format: byte 1 & 2 = ASN, byte 3 & 4 free-form.

4/7/1999149ROUT/BGP4-PGD-1

Communities(influencing ingress traffic flow)

161.214.23.0/24

C=100C=90

C=150

C=150

LP=150

LP=100LP=90

AS 200

AS 300

AS 100

Requires that AS 200forward the communityvalue of 150 originatedby AS300.

4/7/1999150ROUT/BGP4-PGD-1

AS 500

CC DD

Communities(influencing ingress traffic flow)

161.214.0.0/16161.214.0.0/16

161.214.0.0/16 161.214.0.0/16

Set Community=1000 for all

prefixes received on router A

RTB

RTD

RTA

RTC

Page 51: Routing Workshop for Internet Service Providers

51

4/7/1999151ROUT/BGP4-PGD-1

Weight• Not an attribute, local to router but can be used to

influence path selection (within a single router)

• Highest weight wins

• Default value: 0

• Can be applied to all routes from a neighborneighbor 160.89.1.1 weight 100

• Can be assigned to specific routes based on filter list orroute-map mechanism:neighbor 160.89.1.1 filter-list 3 weight 50

4/7/1999152ROUT/BGP4-PGD-1

If multiple routes (paths) to the same prefix exist:

• (1) If the next-hop is inaccessible, the route is ignored.

• (2) If synchronization is enabled, the path is internal, and theroute is not in the IGP, it is ignored.

• (3) Prefer the path with the largest weight.

• (4) If weights are the same, prefer the route with the largestlocal preference.

BGP Path Selection Algorithm

4/7/1999153ROUT/BGP4-PGD-1

• (5) If the routes have the same local preference, prefer theroute that was locally originated (originated in “this” router).

• (6) If the routes have the same local preference, prefer theroute with the shortest AS_Path.

• (7) If the AS_Path length is the same, prefer the route with thelowest origin type (IGP<EGP<Incomplete).

• (8) If the origin type is the same, prefer the route with thelowest MED. The comparison is only done if the neighboringAS is the same, unless the “bgp always-compare-med”command is enabled.

BGP Path Selection Algorithm(cont’d)

Page 52: Routing Workshop for Internet Service Providers

52

4/7/1999154ROUT/BGP4-PGD-1

• (9) If the routes have the same MED, prefer the route in thefollowing manner: External (eBGP-derived) is better thaninternal (iBGP-derived). Confederation paths are consideredinternal paths.

• (10) If all the preceding scenarios are identical, prefer theroute that can be reached via the closest IGP neighbor - thatis, take the shortest internal path inside the AS to reach thedestination (follow the shortest path the BGP next-hop).

• (11) If the best route and this route are both external and fromthe neighboring AS, and “maximum-paths” is enabled, insertthe route for this path into the IP routing table.

BGP Path Selection Algorithm(cont’d)

4/7/1999155ROUT/BGP4-PGD-1

BGP Path Selection Algorithm(cont’d)

• (12) If the internal path is the same, and multipath is notenabled, prefer the route coming from the BGP router withthe lowest router ID (RID). The router ID is usually thehighest IP address on the router or the loopback interfaceaddress.

• THE END

4/7/1999156ROUT/BGP4-PGD-1

Policy Control

Page 53: Routing Workshop for Internet Service Providers

53

4/7/1999157ROUT/BGP4-PGD-1

Applying Policy with BGP

• Policy-based on AS path, community or theprefix

• Rejecting/accepting selectedannouncements

• Filtering outgoing announcements

• Setting attributes to influence path selection

4/7/1999158ROUT/BGP4-PGD-1

Policy Control

• Tools:

– Distribute list

– Filter list

– Route-maps

– Communities

– Prefix Lists

4/7/1999159ROUT/BGP4-PGD-1

Policy Control

• Per neighbor access list

• Inbound or outbound

• Based upon network numbers (e.g. throughuse of access-lists)

Distribute List

Page 54: Routing Workshop for Internet Service Providers

54

4/7/1999160ROUT/BGP4-PGD-1

Policy Control

• Configuration:router bgp 109

network 131.108.0.0

neighbor 160.89.1.1 distribute-list 5 in

...

access-list 5 deny 170.10.0.0

access-list 5 permit any

Distribute List

4/7/1999 Cisco Proprietary161ROUT/BGP4-PGD-1

• Per neighbor

• Based on AS_Path access-list

• In-bound or outbound

Policy Control

Filter List

4/7/1999162ROUT/BGP4-PGD-1

Policy Control

• Filter routes based on AS path

• Inbound or outbound

• Configuration:router bgp 109

network 131.108.0.0

neighbor 160.89.1.1 filter list 5 out

ip as-path access-list 5 permit ^200$

Filter List

Page 55: Routing Workshop for Internet Service Providers

55

4/7/1999163ROUT/BGP4-PGD-1

Policy Control

• Configuration:router bgp 109

neighbor 160.89.1.2 remote-as 200

neighbor 160.89.1.2 route-map FILTER-ON-COMMUNITY in

route-map FILTER-ON-COMMUNITY 10 permit

match community 1

set metric 500

route-map FILTER-ON-COMMUNITY 20 permit

match community 2 exact-match

set local-preference 200

route-map FILTER-ON-COMMUNITY 30 permit

match community 3

ip community-list 1 permit 100 200

ip community-list 2 permit 88

Route Maps

4/7/1999164ROUT/BGP4-PGD-1

Route Maps - MATCH Articles

Policy Control

• as-path

• community-list

• interface

• ip address

• ip next-hop

• ip route-source

• length

• metric

• route-type

• tag

4/7/1999165ROUT/BGP4-PGD-1

Route Maps - SET Articles

Policy Control

• as-path

• automatic-tag

• community

• default interface

• interface

• ip default next-hop

• ip next-hop

• Level

• Local Preference

• metric

• metric-type

• next-hop

• origin

• tag

• weight

Page 56: Routing Workshop for Internet Service Providers

56

4/7/1999166ROUT/BGP4-PGD-1

Policy Control

• Configuration:router bgp 109

neighbor 160.89.1.2 remote-as 200

neighbor 160.89.1.2 route-map FILTER-ON-AS_PATH in

route-map FILTER-ON-AS_PATH 10 permit

match as-path 1

set local_preference 100

route-map FILTER-ON-AS_PATH 20 permit

match as-path 2

set local-preference 200

route-map FILTER-ON-AS_PATH 30 permit

match as-path 3

ip as-path access-list 1 permit _2120$

ip as-path access-list 2 permit _3561_

ip as-path access-list 3 permit .*

Route Maps (cont’d)

4/7/1999167ROUT/BGP4-PGD-1

Policy Control

• Configuration:router bgp 300

network 170.10.0.0

neighbor 2.2.2.2 remote-as 100

neighbor 2.2.2.2 route-map SETPATH out

route-map SETPATH permit 10

set as-path prepend 300 300

• This example will do a prepend on ALL outgoing announcementsto the neighbor 2.2.2.2

• Standard practice is to implement two instances of the ASN whenprepending.

Route Maps (cont’d) - AS_Path Prepend

4/7/1999168ROUT/BGP4-PGD-1

Policy Control

• Configuration:router ospf 1001

network 161.214.10.0 0.0.7.255 area 0

redistribute bgp 109 route-map set-metric

...

router bgp 109

network 204.10.0.0 mask 255.255.0.0

neighbor 160.89.1.2 remote-as 200

...

route-map set-metric 10 permit

match ip address 1

set metric 100

route-map set-metric 20 permit

...

access-list 1 permit 161.214.10.0 0.0.0.255

Route Maps (cont’d) - Route Redistribution Example

Page 57: Routing Workshop for Internet Service Providers

57

4/7/1999169ROUT/BGP4-PGD-1

• Like UNIX Regular Expressions

• . Match one character

• * Match any number of preceding expression

• ^ Beginning of line

• $ End of line

• _ Beginning, end, whitespace, brace

Regular Expressions

Policy Control

4/7/1999170ROUT/BGP4-PGD-1

Policy Control

• .* Match anything

• ^$ Match routes local to this AS

• _1800$ Originated by 1800

• ^1800_ Received from 1800

• _1800_ Via 1800

• _790_1800_ Passing through 1800 then 790

• ^1829$ From this neighbor

Regular Expressions

4/7/1999171ROUT/BGP4-PGD-1

• Grouping destinations into a community forapplying a common policy

• Each destination can belong to multiplecommunities (communities can be additive)

Communities

Policy Control

Page 58: Routing Workshop for Internet Service Providers

58

4/7/1999172ROUT/BGP4-PGD-1

• Aggregation results in lossof information

• Next hop information is lost

• Normally more specific routesare leaked to neighbor AS

• More specifics manually filteredin neighboring AS

Policy Control

Communities

4/7/1999173ROUT/BGP4-PGD-1

• Local AS:Do not send it outside local AS

• No-export: Do not advertise this route toexternal peer

• No-advertise: Do not advertise this route toany peer

• Additive: Add to existing community

Policy Control

Communities

4/7/1999174ROUT/BGP4-PGD-1

• Special communities• internet - Advertise this route to the Internet community. All routers belong to it.• no-export - Do not advertise this route to EBGP peers.• no-advertise - Do not advertise this route to any peer (internal or external).• local-as - Send this route to peers in other sub-autonomous systems within the local confederation. Do not advertise this route to an external system.

• No-export routes are automatically filtered

Policy Control

Communities

Page 59: Routing Workshop for Internet Service Providers

59

4/7/1999175ROUT/BGP4-PGD-1

No-Export Community

170.10.0.0/16170.10.X.X No-Export

170.10.0.0/16

AS 100 AS 200

170.10.X.X AA

BB

CC

EE

DD

FF

GG

Community is set to NO-EXPORT at exit of B on update for170.10.X.X. Prefix 170.10.X.X is propagated to AS200 from B but will not be further announced from G

Policy Control

4/7/1999176ROUT/BGP4-PGD-1

• Configuration:router bgp 109

neighbor 160.89.1.2 remote-as 200

neighbor 160.89.1.2 route-map filter-on-community in

route-map filter-on-community 10 permit

match community 1

set metric 500

route-map filter-on-community 20 permit

match community 2 exact-match

set local-preference 200

route-map filter-on-community 30 permit

match community 3

ip community-list 1 permit 100 200

ip community-list 2 permit 88

“Matching” Communities

Policy Control

4/7/1999177ROUT/BGP4-PGD-1

• Configuration: router bgp 109

network 131.108.0.0

neighbor 160.89.1.1 remote-as 200

neighbor 160.89.1.1 send-community

neighbor 160.89.1.1 route-map Set-Community out

route-map Set-Community 10 permit

match ip address 1

set community no-export

route-map Set-Community 20 permit

match ip address 2

access-list 1 permit 170.10.0.0 0.0.255.255

access-list 2 permit any

“Setting” Communities

Policy Control

Page 60: Routing Workshop for Internet Service Providers

60

4/7/1999178ROUT/BGP4-PGD-1

Communities (new format)

Policy Control

The BGP communities RFC specifies that a BGPcommunity is made up of two parts each part being 2 byteslong. The first part is the AS number and the second part isa 2 byte number. In the most recent version of the RFC, acommunity is of the form AA:NN.The Cisco defaultcommunity format is in the format NNAA. The ip bgp-community new-format command changes thecommunity format to AA:NN to conform to the mostrecent RFC.

4/7/1999 Cisco Proprietary179ROUT/BGP4-PGD-1

Prefix-Lists for Route Filtering

• Advantages:– Performance improvement in loading and

route lookup of large lists– Support for incremental updates– More user-friendly command line interface– Sequencing allows insertion of list entries out of order

• Features with the access-list arepreserved in prefix-list:– Configuration of either "permit" or "deny"– Order dependency—first match wins– Filtering on prefix length—both exact match

and range match

Policy Control

4/7/1999 Cisco Proprietary180ROUT/BGP4-PGD-1

Prefix-List (Configuration)– [no] ip prefix-list <list-name> description<text>

–– [no][no] ip ip prefix-list <list-name> [ prefix-list <list-name> [seqseq < <seqseq-value>]-value>]deny|permit <network>/<deny|permit <network>/<lenlen> [> [gege < <gege-value>] [le-value>] [le<le-value>]<le-value>]

– Value range: len < ge-value < le-value <= 32 (len = mask length)– Exact match is assumed when neither "ge" nor "le" is specified. The

range is assumed to be from "ge-value" to 32 if only the "ge” attribute isspecified. And the range is assumed to be from "len" to "le-value" if onlythe "le" attribute is specified.

– Defined per neighbor or with route-maps. May also be used forredistribution.

Policy Control

Page 61: Routing Workshop for Internet Service Providers

61

4/7/1999 Cisco Proprietary181ROUT/BGP4-PGD-1

• Exact match– ip prefix-list aaa deny 0.0.0.0/0

– ip prefix-list aaa permit 35.0.0.0/8

Policy ControlPrefix-List (Configuration)

4/7/1999 Cisco Proprietary182ROUT/BGP4-PGD-1

• Prefix Length match– in 192/8, accept up to /24ip prefix-list aaa permit 192.0.0.0/8 le 24

– in 192/8, deny /25+ip prefix-list aaa deny 192.0.0.0/8 ge 25

– in all address space, permit /8 - /24ip prefix-list aaa permit 0.0.0.0/0 ge 8 le 24

– in all address space, deny /25+ip prefix-list aaa deny 0.0.0.0/0 ge 25

Policy ControlPrefix-List (Configuration)

4/7/1999 Cisco Proprietary183ROUT/BGP4-PGD-1

• Prefix Length match– in 10/8, deny allip prefix-list aaa deny 10.0.0.0/8 le 32

– in 204.70.1/24, deny /25+ip prefix-list aaa deny 204.70.1.0/24 ge 25

– permit allip prefix-list aaa permit 0.0.0.0/0 le 32

Policy ControlPrefix-List (Configuration)

Page 62: Routing Workshop for Internet Service Providers

62

4/7/1999 Cisco Proprietary184ROUT/BGP4-PGD-1

• In the following example, the BGP process only acceptsprefixes with a prefix length of /8 to /24 (from anyneighbor):

router bgp

network 101.20.20.0

distribute-list prefix max24 in

!

ip prefix-list max24 seq 5 permit 0.0.0.0/0 ge 8 le 24

Policy ControlPrefix-List (Configuration)

4/7/1999 Cisco Proprietary185ROUT/BGP4-PGD-1

A Word about Redistribution

• BGP to IGP– Very inefficient uses a lot of resources on router if full

routes used.

– Use transit path mechanism

– Synchronization conflict

• IGP to BGP– Not recommended because if “projects” instability.

– Filter to make sure routes originally redistributed fromBGP are no re-introduced to BGP.

4/7/1999186ROUT/BGP4-PGD-1

Administrativeand

iBGP Scaling

Page 63: Routing Workshop for Internet Service Providers

63

4/7/1999187ROUT/BGP4-PGD-1

Scaling

• Grouping of peers withsame inbound/outbound policy

• Simplicity of configuration

• Efficient updating

• Override options

Peer Groups

4/7/1999188ROUT/BGP4-PGD-1

ScalingPeer Groups - Restrictions Removed

• Members of peer group can now spanmultiple subnets

• Transiting of routing information can nowbe provided for peer-group members

• Reflector clients can participate in a peergroup

4/7/1999189ROUT/BGP4-PGD-1

Scaling

• Configuration:router bgp 100 neighbor internal peer-group neighbor internal remote-as 100 neighbor internal update-source loopback 0 neighbor internal route-map set-med out neighbor internal filter-list 1 out neighbor internal filter-list 2 in neighbor 171.69.232.53 peer-group internal neighbor 171.69.232.54 peer-group internal neighbor 171.69.232.55 peer-group internal neighbor 171.69.232.55 filter-list 3 in

Peer Groups - iBGP Peering

Page 64: Routing Workshop for Internet Service Providers

64

4/7/1999190ROUT/BGP4-PGD-1

Scaling

• Configuration:router bgp 100 neighbor external-peers peer-group neighbor external-peers route-map set-metric out neighbor external-peers filter-list 99 out neighbor external-peers filter-list 101 in neighbor 171.69.232.90 remote-as 200 neighbor 171.69.232.90 peer-group external-peers neighbor 171.69.232.100 remote-as 300 neighbor 171.69.232.100 peer-group external-peers neighbor 171.69.232.110 remote-as 400 neighbor 171.69.232.110 peer-group external-peers neighbor 171.69.232.110 filter-list 400 in

Peer Groups - eBGP Peering

4/7/1999191ROUT/BGP4-PGD-1

Scaling iBGP Connectivity

• Packet forwarding is not affected

• Normal BGP speaker (non-RR participant) andRR co-exist

• Easy migration

• Multiple reflectors for per-cluster redundancy

• Reflectors fully meshed

• Reflectors can be cascaded

Route Reflector

4/7/1999192ROUT/BGP4-PGD-1

• Reflector and Client

Subordinate to reflector in cluster.

• Non-client

Not participating in reflector but may peer with reflectors.

• Cluster

Group of reflector(s) and clients

• Cluster-id

Used when multiple reflectors in same cluster are present. Toprevent routing loops. Configured on reflectors.

• Originator-id

4-byte attribute identifying the originator of route in AS. Usesrouter ID of originator. Used for ignoring a route it originated incase a routing loop occurs which brings the route announcmenetback to the originator.

Route ReflectorScaling iBGP Connectivity

Page 65: Routing Workshop for Internet Service Providers

65

4/7/1999193ROUT/BGP4-PGD-1

• Reflector receives path from client andnon-client

• Selects best path

• Best path from client, reflect to non-client

• Best path from non-client, reflect toclient

Route Reflectors

Scaling iBGP Connectivity

4/7/1999194ROUT/BGP4-PGD-1

Route Reflectors (no reflection)

RTE

RTD RTC

RTB

RTA161.214.30.0/24

AS_Path

10744_203_204 161.214.30.0/24AS_Path

4695_204

145.108.1.0/24AS_Path 21_4056

145.108.1.0/24AS_Path 34_432_4056

Full iBGPmeshwithoutReflection

Scaling iBGP Connectivity

4/7/1999195ROUT/BGP4-PGD-1

Route Reflectors (with reflection)

RTERTD

RTC

RTB

RTA

161.214.30.0/24AS_Path

10744_203_204 161.214.30.0/24AS_Path

4695_204

145.108.1.0/24AS_Path 21_4056

145.108.1.0/24AS_Path 34_432_4056

RTC, acting asthe RouteReflector (RR),conducts best-path selection

RR

RRCRRC

Route ReflectorClients (RRC)

iBGP mesh issimplifiedconsiderably

Not reflectors or clients

Scaling iBGP Connectivity

Page 66: Routing Workshop for Internet Service Providers

66

4/7/1999196ROUT/BGP4-PGD-1

Route Reflectors (best path selection)

RTERTD

RTC

RTB

RTA

161.214.30.0/24AS_Path

10744_203_204 161.214.30.0/24AS_Path

4695_204

145.108.1.0/24AS_Path 21_4056

145.108.1.0/24AS_Path 34_432_4056

Best Path to161.214.30.0/24

Best Path to145.108.1.0/24

RTC, acting asthe RouteReflector (RR),conducts best-path selection

RR

RRCRRC

Route ReflectorClients (RRC)

Not reflectors or clients

Scaling iBGP Connectivity

4/7/1999197ROUT/BGP4-PGD-1

• At least one RR andfew clients per cluster

• Clients in a clustercould be fully meshed

• Single IGP to carrynext hop

BC

AS3

AS1

ARR

RRC RRC

AS1

Scaling iBGP ConnectivityRoute Reflectors

4/7/1999198ROUT/BGP4-PGD-1

• Loop avoidance– Clients should not peer outside the cluster

– Cluster list, use Cluster IDs

– Originator-ID

Scaling iBGP ConnectivityRoute Reflectors

Page 67: Routing Workshop for Internet Service Providers

67

4/7/1999199ROUT/BGP4-PGD-1

• Configuration for RRrouter bgp 2

neighbor 141.153.12.1 remote-as 2

neighbor 141.153.12.1 route-reflector-client

neighbor 141.153.17.2 remote-as 2

neighbor 141.153.17.2 route-reflector-client

B CAS2

AS1

A (RR)

AS3

Scaling iBGP ConnectivityRoute Reflectors

4/7/1999200ROUT/BGP4-PGD-1

B C

AS2 AS1

RR• sh ip bgp at router BRouterB#sh ip bgp 141.1.0.0

BGP routing table entry for141.1.0.0/16, version 10

Paths: (1 available, best #1)

3, (received and used)

141.153.14.2 (metric 138) from /

141.153.12.2 (141.153.17.2)

Origin IGP, metric 0,localpref 100, valid,internal, best

Originator: 141.153.17.2,Cluster list: 141.153.17.1

Router id141.153.17.1

Router id 141.153.17.2

141.153.14.2

141.1.0.0

Scaling iBGP ConnectivityRoute Reflectors

RRC

A

4/7/1999201ROUT/BGP4-PGD-1

• Hierarchical RRSh ip bgp at router B

RouterB>sh ip bgp 198.10.10.0

BGP routing table entry for 198.10.10.0/24, version 119

Paths: (1 available, best #1)

3

141.153.14.2 from 141.153.30.1 (141.153.17.2)

Origin IGP, metric 0, localpref 100, valid, internal, best

Originator : 141.153.17.2, Cluster list: 144.10.1.1, 141.153.17.1

C

RR

D

A RRRouter id141.153.17.1

Router id140.10.1.1

Sh at this Router

BGP Peer141.153.30.1

Next hop141.153.14.2

Router id141.153.17.2

198.10.0.0AS3

B

Scaling iBGP ConnectivityRoute Reflectors

RRC

RRC

Page 68: Routing Workshop for Internet Service Providers

68

4/7/1999202ROUT/BGP4-PGD-1

Scaling iBGP Connectivity

• Set clause on outgoing route maps is not functional oniBGP peering

• Next-hop-self only affects next-hop of eBGP learnedroutes (next-hop is preserved within the AS)

Route Reflectors

4/7/1999203ROUT/BGP4-PGD-1

• Collection of AS & sub-ASes

• Visible to outside world as single AS

• Sub-ASs are fully meshed (reserved“private” ASNs in the range 64512-65534)

• EBGP between sub-ASes

Confederation

Scaling iBGP Connectivity

4/7/1999204ROUT/BGP4-PGD-1

• Best path sent to neighbor

• IGP carries next hops

• Preserve next hop across the sub-AS

• Preserve local preference and MED

Scaling iBGP ConnectivityConfederation

Page 69: Routing Workshop for Internet Service Providers

69

4/7/1999205ROUT/BGP4-PGD-1

Sub-AS65532

Sub-AS65530

Sub-AS65531

B

141.153.12.1

141.153.17.2

Scaling iBGP ConnectivityConfederation

Configuration:

router bgp 65532

confederation identifier 2

bgp confederation peers 65530 65531

neighbor 141.153.12.1 remote-as 65530

neighbor 141.153.17.2 remote-as 65531

4/7/1999206ROUT/BGP4-PGD-1

• Sh ip bgp at router BBGP table version is 78, local router ID is 141.153.17.1

Status codes: s suppressed, d damped, h history,* valid, > best, i - internal

Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path

*> 10.0.0.0 141.153.14.3 0 100 0 (65531) 1 i

*> 141.153.0.0 141.153.30.2 0 100 0 (65530) i

*> 144.10.0.0 141.153.12.1 0 100 0 (65530) i

*> 199.10.10.0 141.153.29.2 0 100 0 (65530) 1 i

Scaling iBGP ConnectivityConfederation

4/7/1999207ROUT/BGP4-PGD-1

Other BGP4 Issues

Page 70: Routing Workshop for Internet Service Providers

70

4/7/1999208ROUT/BGP4-PGD-1

BGP Soft-Reconfiguration

• Allows policies to be changedwithout clearing the neighbor

• Both inbound and outbound

• Inbound requires additional memory

• Outbound more efficient

4/7/1999209ROUT/BGP4-PGD-1

BGP Soft-Reconfiguration

• Router does not keep information about prefixes which werefiltered out in BGP “in” process. Those which are not filteredout are kept in BGP table.

• Change in the filter policy requires a peer reset in order to getremote peer to exchange prefix information again to repeatfiltering with new policy.

• Peering reset means lost connectivity to that peer.

• With Soft-Reconfig, router will keep all prefix info regardlessof whether the prefix was filtered out or not.

• Requires considerably more memory for router to store theadditional information.

4/7/1999210ROUT/BGP4-PGD-1

BGP Soft-Reconfiguration (cont’d)

• Soft-Reconfig configured with command: neighbor<x.x.x.x> soft-reconfiguration in

• When network filtering policy changes admin simplyimplements the command: clear ip bgp x.x.x.x soft-in androuter re-scans table of retained information.

• Peer resetting does not take place.

• No clear ip bgp x.x.x.x soft-reconfig OUTBOUND necessarybecause router simply needs to re-send it’s updates whichgo through the new filters. This is done with the command:clear ip bgp x.x.x.x soft-out

• Outbound does not require additional memory.

Page 71: Routing Workshop for Internet Service Providers

71

4/7/1999211ROUT/BGP4-PGD-1

BGP Soft-Reconfiguration (cont’d)

• With this feature enabled, a show ip bgp <n.n.n.n>command will show all paths that have been received andwhether accepted or not. A path that has been acceptedwith no change in any attribute (from an inbound filter) willbe marked received & used. A path that has been denied orhas its attributes changed will be marked received-only. Apath which shows a changed attribute will not be markedwith anything but should be followed by a received-onlypath.

4/7/1999212ROUT/BGP4-PGD-1

BGP Soft-Reconfig

•Out bound does not requireany config

• Inbound configuration:router bgp 65530

no synchronization

bgp confederation identifier 2

bgp confederation peers 65531 65532

neighbor 141.153.12.2 remote-as 65532

neighbor 141.153.12.2 soft-reconfiguration inbound

neighbor 141.153.12.2 route-map foo

neighbor 141.153.30.2 remote-as 65531

4/7/1999213ROUT/BGP4-PGD-1

Multi-Path Support

• Router peering with multiple routers inneighboring AS

• Install multiple routes in IP routing table

• Routes should be identical

• Next-hop is set to self

690 1880

Page 72: Routing Workshop for Internet Service Providers

72

4/7/1999214ROUT/BGP4-PGD-1

Multi-Path Support

•Configuration for Multi-pathrouter bgp 65532

bgp confederation identifier 2

bgp confederation peers 65530 65531

neighbor 141.153.12.1 remote-as 65530

neighbor 141.153.12.1 send-community

neighbor 141.153.17.2 remote-as 65530

maximum-paths 2

•Sh ip routeB 144.10.0.0/16 [200/0] via 141.153.12.1, 00:03:29

[200/0] via 141.153.17.2, 00:03:29

4/7/1999215ROUT/BGP4-PGD-1

Route Flap Dampening

• Route flap

– particular path exhibits a state-change (“up todown” or “down to up”), possibly many times

– change in attribute

• Ripples through the entire Internet

• Wastes CPU

• Goal: Reduce scope of route flappropagation

4/7/1999216ROUT/BGP4-PGD-1

Flap Dampening: Operation

• Done only for external paths

• Alternate paths to same destination prefixstill usable

• Suppress-limit, reuse-limit and half-lifetime give control

• Implementation uses little overhead

Page 73: Routing Workshop for Internet Service Providers

73

4/7/1999217ROUT/BGP4-PGD-1

Flap Dampening: Operation• Penalty applied for each flap (1000 units)• Route is suppressed when cummulative penatly

exceeds suppress-limit.• Penalty is decayed by half every half-life period.

Reduction takes place at 5-second intervals.• Route is unsuppressed and re-announced once

penalty decays below reuse-limit. Routes areunsuppressed on 10-second intervals.

• Once the penalty drops below half the reuselimit, the flap information is deleted from the flaptable – the next flap will start counting from zeroagain.

4/7/1999218ROUT/BGP4-PGD-1

Route Flap Dampening

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

0

1

2

3

4

Suppress-Limit

Reuse-Limit

Pen

alty

Time

4/7/1999219ROUT/BGP4-PGD-1

Flap Dampening: Configuring

• router bgp 100

• bgp dampening 15 750 2000 30

Page 74: Routing Workshop for Internet Service Providers

74

4/7/1999220ROUT/BGP4-PGD-1

Flap Dampening: Granularity

router bgp 100

bgp dampening 15 750 2000 30 route-map damp-some

...

access-list 20 permit x.x.x.x x.x.x.x

...

route-map damp-some permit 10

match ip address 20

4/7/1999221ROUT/BGP4-PGD-1

Flap Dampening: Defaults

• 1000 units Penalty

• 15 mins. half-life (1 - 45 mins.)

• 750 units reuse (range 1 - 20000 units)

• 2000 units suppress limit (1 - 20000 units)

• 60 mins. max-suppress-time (1 - 20000 mins.) defaults to 4x half-life

4/7/1999222ROUT/BGP4-PGD-1

BGP4 Management

Page 75: Routing Workshop for Internet Service Providers

75

4/7/1999223ROUT/BGP4-PGD-1

BGP4 Show Commands

• show ip bgp• show ip bgp cidr-only• show ip bgp community

• show ip bgp community-list

• show ip bgp filter-list

• show ip bgp inconsistent-as

• show ip bgp neighbors

• show ip bgp paths

• show ip bgp peer-group

• show ip bgp regexp

• show ip bgp summary

4/7/1999224ROUT/BGP4-PGD-1

BGP4 Show Commands

RTC#sh ip bgp summary

BGP table version is 62, main routing table version 62

11 network entries (24/39 paths) using 2412 bytes of memory

14 BGP path attribute entries using 1900 bytes of memory

0 BGP route-map cache entries using 0 bytes of memory

0 BGP filter-list cache entries using 0 bytes of memory

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/DownState/PfxRcd

10.0.0.4 4 200 6689 4141 62 0 0 2d20h 2

10.0.0.6 4 999 8 10 0 0 0 2d20h Active

29.50.10.1 4 500 6698 4155 62 0 0 1d18h 9

161.214.10.1 4 500 4135 4147 62 0 0 1d19h 5

191.21.10.1 4 500 4141 4144 62 0 0 2d20h 3

4/7/1999225ROUT/BGP4-PGD-1

BGP4 Show Commands

RTC#sh ip bgpBGP table version is 62, local router ID is 25.10.10.1Status codes: s suppressed, d damped, h history, * valid, > best, i -

internalOrigin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path*> 0.0.0.0 171.68.73.129 0 32768 i* i11.0.0.0 10.0.0.4 2297856 100 0 200 i*> 10.0.0.4 2297856 0 200 i* i25.0.0.0 29.50.73.2 1573 100 0 i* i 161.214.10.1 0 100 0 i* i 191.21.10.1 0 100 0 i*> 0.0.0.0 0 32768 i* i29.50.0.0/16 29.50.10.1 0 100 0 i* i 161.214.10.1 0 100 0 i*> 0.0.0.0 74 32768 i*>i56.10.0.0/16 10.0.0.8 0 100 0 300 i*>i99.0.0.0 10.0.0.8 128256 100 0 300 i* i104.0.0.0 10.0.0.5 281600 100 0 400 i

Page 76: Routing Workshop for Internet Service Providers

76

4/7/1999226ROUT/BGP4-PGD-1

BGP4 Show Commands

RTC#sh ip bgp 161.214.0.0

BGP routing table entry for 161.214.0.0/16, version 5

Paths: (4 available, best #4, advertised over IBGP, EBGP)

Local

29.50.73.2 (metric 74) from 29.50.10.1

Origin IGP, metric 11, localpref 100, valid, internal, synchronized

Local

161.214.10.1 (metric 65) from 161.214.10.1

Origin IGP, metric 0, localpref 100, valid, internal, synchronized

Local

191.21.10.1 (metric 65) from 191.21.10.1 (191.21.10.2)

Origin IGP, metric 0, localpref 100, valid, internal, synchronized

Local

0.0.0.0

Origin IGP, metric 0, weight 32768, valid, sourced, local, best

4/7/1999227ROUT/BGP4-PGD-1

BGP4 Show Commands

RTC#sh ip bgp 204.20.0.0

BGP routing table entry for 204.20.0.0/16, version 62

Paths: (2 available, best #1)

400

10.0.0.5 from 29.50.10.1

Origin IGP, metric 0, localpref 100, valid, internal, best

400

104.70.23.9 from 161.214.10.1

Origin IGP, metric 0, localpref 100, valid, internal

4/7/1999228ROUT/BGP4-PGD-1

BGP4 Show Commands

RTC#sh ip bgp neighbor

BGP neighbor is 10.0.0.4, remote AS 200, external link

Index 1, Offset 0, Mask 0x2

BGP version 4, remote router ID 204.24.10.1

BGP state = Established, table version = 62, up for 2d20h

Last read 00:00:43, hold time is 180, keepalive interval is 60 seconds

Minimum time between advertisement runs is 30 seconds

Received 6693 messages, 0 notifications, 0 in queue

Sent 4143 messages, 0 notifications, 0 in queue

Connections established 1; dropped 0

No. of prefix received 2

Connection state is ESTAB, I/O status: 1, unread input bytes: 0

Local host: 10.0.0.3, Local port: 179

Foreign host: 10.0.0.4, Foreign port: 35793

...

Page 77: Routing Workshop for Internet Service Providers

77

4/7/1999229ROUT/BGP4-PGD-1

BGP4 Show Commands

RTC#sh ip bgp paths

Address Hash Refcount Metric Path

0x60700E58 0 7 0 i

0x606C07A0 0 3 0 i

0x606DFB58 11 1 11 i

0x6062F060 35 1 1573 i

0x606C10A0 46 1 0 300 i

0x606DFD1C 65 1 65 i

0x606DFAD8 74 1 74 i

0x60700DBC 99 1 1637 i

0x60700C90 146 3 0 400 i

0x6055AAB0 173 0 0 200 500 400 I

...

4/7/1999230ROUT/BGP4-PGD-1

Logging BGP4 Events Logging

ip route 25.0.0.0 255.0.0.0 Null0 210ip route 29.50.0.0 255.255.0.0 Null0 210ip route 161.214.0.0 255.255.0.0 Null0 210ip route 191.21.0.0 255.255.0.0 Null0 210ip http serverlogging trap debugginglogging facility local7logging 10.0.0.6!!line con 0 exec-timeout 0 0line aux 0line vty 0 exec-timeout 0 0

4/7/1999231ROUT/BGP4-PGD-1

Relevant BGP RFCs

• RFC 1771 - Border Gateway Protocol Version 4

• RFC 1772 - Application of BGP-4 in the Internet

• RFC 1773 - Experience with the BGP-4 protocol

• RFC 1930 - Guidelines for creation, selection, andregistration of an Autonomous System (AS)

• RFC 1965 - Autonomous System Confederations for BGP

• RFC 1966 - BGP Route Reflection

• RFC 1997 - BGP Communities Attribute

Page 78: Routing Workshop for Internet Service Providers

78

4/7/1999232ROUT/BGP4-PGD-1

Other BGP references

• http://www.ietf.org/html.charters/idr-charter.html (IETF InterDomain Routing Working Group web page)

• ftp://engr.ans.net/pub/slides/nanog-feb-1995-route-dampen.ps

A description of the route damping problem

• http://cio.cisco.com/warp/public/459/18.htmlA BGP Tutorial for configuring cisco routers

• http://www.cisco.com/univercd/data/doc/cintrnet/ics/icsbgp4.htm

“Using the Border Gateway Protocol for Interdomain Routing”

4/7/1999 Cisco Proprietary233ROUT/BGP4-PGD-1

Thank you forparticipating.