4 Hierarchical routing Intra-AS routing uses Interior Gateway Protocols (IGP) knows only topology of it s s own AS outside of AS is reached using default sometimes has summary information about networks behind individual external links Limited by number of routes the protocol is capable to process efficiently OPSF, RIP, IGRP, Inter-AS routing uses Exterior Gateway Protocols Operates on graph of AS interconnection Does not know topology of other ASes,, works only with information about networks contained in individual ASes knows local next-hop border router to reach the destination Currently only BGP (Border Gateway Protocol) is used 4

5 Inter-AS routing The purpose of EGP is to provide information to deliver packet to the boundary router of the destination AS Boundary routers run both EGP and IGP Boundary router delivers the packet to the final destination using IGP Every AS propagates networks contained within it into EGP also networks reachable through it It is useful to limit number of routes propagated using summarization ation (internal networks should have common prefix) Note: For transit AS, packet has to be passed among border routers rs through AS internal routers 5

6 AS types Single-homed Multi-homed More links to the same ISP or different ISPs Transit Carries traffic not originated or destined to internal networks multi-homed Non-transit single-homed or multi-homed AS which doesn t t allow transit 6

7 Single-homed AS 7

8 Single-homed AS: How to propagate internal networks into BGP? ISP router has static routes to customer s networks and redistributes them into BGP IGP between ISP router and customer router ISP redistributes IGP into BGP BGP between ISP router and customer router If customer has it s s own AS number or uses private AS number 8

9 Propagation via IGP 9

10 Propagation via BGP 10

11 Private AS-es Used and known only in context of single provider s s AS Can be used only for AS connected to single provider (by one or more links) Outside of provider AS, private AS-es presents themselves like part of that s s provider AS 11

12 Private AS-es 12

13 Who has it s s own AS? Normally, customer s s networks are part of provider AS Sometimes private AS-es used Customer has to have it s s own AS number if he indents to connect to multiple providers Customer commonly needs it s s own AS number if it requires provider-independent independent addresses 13

14 Nontransit Multi-homed AS Packet filters can be used on ingress links to protect against injection of unwanted traffic ISP1 could use static route to route to ISP2 networks 14

16 Routing symmetry, load balancing Symmetry - the link used for outgoing traffic for some network is also used for returning traffic Load balancing some destinations reached by one link, others by another Often not possible to reach both 16

20 Path selection, routing policies BGP operates on AS interconnection graph Path = sequence of AS numbers to transit to get to particular network BGP does not have simple concept of metric to select best path Path has to be chosen with regard to business policy of individual AS operators BGP configuration has to reflect appointed routing policy Details of routing policy have to be configured manually Peer routers, prefix filtering and route preferences, Configuration more complicated than configuration of IGP s 20

21 Examples of routing policies Which destination we allow to transit packets to through our AS? From which source address we allow to transit traffic through our AS? Which external link will we use to reach particular external network? Which ingress link we want other ASes use for traffic destined for particular network inside our AS? 21

22 Suboptimal routing on the Internet Internet routing is not optimal from point of view of any metric There is no common metric, various IGPs use different metrics Optimality not reachable neither desired Hierarchical routing is suboptimal but limits the number of routes in routing table Need to respect routing policies 22

23 BGP Principle Path-vector routing algorithm from point of view of topology knowledge, BGP stands between distance-vector and link-state protocols Path vector = sequence of AS numbers to transit before getting to particular network Every route is propagated together with it s s path vector Path vector collects number of AS-es the route was passed through If AS receives route with path vector containing it s s own AS number, route is discarded (loop avoidance) Path vector serves as metric route with shorter path vector is preferred 23

24 Passing of BGP routes 24

25 Spreading of routing information Routing information exchanged between AS boundary routers Peer routers to exchange routing information with are configured manually Reliable exchange (TCP, port 179) When BGP session is established among peers, complete routing information is exchanged After initial exchange, only changes are sent 25

26 Peer reachability testing BGP router periodically checks reachability of every peer Keepalive message sent once per minute If some peer fails, the router has to remove all routes through that peer and inform other peers 26

28 BGP database BGP database contains all routes learned from peers For every destination, one route is chosen based on routing policy criteria No support for load balancing Chosen routes are placed into routing table Only routes used by router itself (i.e. those chosen into routing table) are propagated to other neighbors 28

29 External and Internal BGP 29

30 External and Internal BGP If there is more than one boundary router in some AS, BGP information has to be passed between them Special case, exchange between routers in the same AS Boundary routers can possibly be separated by internal structure of routers (running IGP) Solution: there exists two types of BGP session External BGP (EBGP) Internal BGP (IBGP) Peers do not have to be physically connected 30

31 EBGP and IBGP 31

32 Passing of routes in IBGP sessions Need to avoid loops when passing routes through IBGP Test for presence of receiving peer s s AS number in path vector doesn t t work Special rules defined for passing of routes in IBGP session Information from IBGP is passed to EBGP peers, but not to other IBGP peers. Information from EBGP is passed to other EBGP peers and all IBGP peers 32

33 Full mesh of IBGP sessions 33

34 Definition of BGP Routing Policy 34

35 BGP Attributes Mechanism of implementation of routing policies Every route passed between peers can be assigned one or more attributes Routes are processed and selected based on values of attributes they carry 35

36 Attribute Types Well-known - understood by every BGP implementation Mandatory must be appended to each route Discretionary may be appended to route Optional - not every BGP implementation must understand it Transitive if implementation doesn t t understand the attribute, it passes it next unchanged Nontransitive if implementation doesn t t understand the attribute, it doesn t t pass it next 36

37 Most commonly used Attributes 37

38 How to influence routing policy using attributes? Manipulation with attributes received from individual peers Input Policy Engine Includes filtering of routes received from individual peers Manipulation with attributes of routes propagated to individual peers Output Policy Engine Includes filtering of routes propagated to individual peers Route used (and propagated next) by BGP router is determined by candidate route s s attribute values 38

41 Definition of Routing Policies Separately for each peer Separately for incoming and outgoing routes 41

42 BGP Table (BGP database) Contains routes passed through (and possibly manipulated by) input policy engine Routes from every peer For every destination (prefix), one best route is chosen Selection is based on attribute values Standardized algorithm (will be discussed next) Best route placed into routing table Best route passed next to Output Policy Engine 42

43 Well-known Mandatory Attributes 43

44 AS-PATH Necessary for path-vector algorithm function AS which gets the route prepends it s s number to the beginning AS doesn t t accept route if AS-PATH already contains it s s own AS number Route with shorter AS-PATH is preferred 44

45 AS-PATH manipulation AS-PATH handled as string (AS numbers separated by spaces) Regular expression used to test presence of some pattern (AS sequence) Originating AS, AS in path, Inserting AS number multiple times makes AS- PATH longer and route less preferred Router can insert only it s s own AS number (possibly multiple times) 45

46 NEXT-HOP Next hop of BGP route is boundary router which propagated that route into AS Difference from IGP not neighbor on the same link Router has to know route to next-hop address from IGP (or IBGP) Otherwise, BGP route is not accepted Recursive routing table lookup when routing packets 46

51 Route synchronization Route is synchronized, if router can see it both from BGP and IGP Only synchronized routes are propagated out of AS Otherwise, traffic would have to be discarded by internal routers When IBGP is ran on every router, switch off the synchronization test 51

52 Transit system routing implementation choices BGP on every router (IBGP) At least on every transit router Common solution of ISPs Redistribution of BGP routes into IGP But IGPs are not capable to handle so many routes 52

53 Route aggregation in BGP 53

54 Aggregation Attributes Router can aggregate more routes into one with shorter prefix Only when aggregator owns whole address range ATOMIC-AGGREGATE=True AGGREGATE=True AGGREGATOR: ID of aggregating router AS-SET= SET= AS-PATH_1+AS PATH_1+AS-PATH_2PATH_2 AS-PATH: set as if route originated from AS of aggregating router 54

55 Aggregation Example 55

56 How to influence route selection using attributes 56

57 LOCAL_PREFERENCE Well-known discretionary Allows routers of one AS to unify exit link they will use to reach some particular external network Route with higher LOCAL_PREFERENCE is preferred Never passed behind AS boundary 57

58 LOCAL_PREFERENCE Example 58

59 WEIGHT Proprietary (Cisco, ) Used to increase/decrease preference of some route in Input Policy Engine Higher Weight is preferred Only local significance, does not passed outside of single router In fact, not a standard-defined defined attribute 59

60 WEIGHT example 60

61 Multi-Exit Discriminator (MED) Influences other AS s s decision which link to use when routing packets into networks inside our AS Lower MED is preferred treated similary like IGP metric MED value can be set manually or taken from IGP metric Normally, only MEDs from the same AS may be compared 61

Module 7 Routing and Congestion Control Lesson 4 Border Gateway Protocol (BGP) Specific Instructional Objectives On completion of this lesson, the students will be able to: Explain the operation of the

Border Gateway Protocol Exterior routing protocols created to: control the expansion of routing tables provide a structured view of the Internet by segregating routing domains into separate administrations

basic BGP in Huawei CLI BGP stands for Border Gateway Protocol. It is widely used among Internet Service Providers to make core routing decisions on the Internet. The current BGP version is BGP-4 defined

Routing in Small Networks Internet Routing Overview AS, IGP,, BGP in small networks distance vector or link state protocols like RIP or OSPF can be used for dynamic routing it is possible that every router

BGP4 Case Studies/Tutorial Sam Halabi-cisco Systems The purpose of this paper is to introduce the reader to the latest in BGP4 terminology and design issues. It is targeted to the novice as well as the

C H A P T E R12 Border Gateway Protocol, Route Manipulation, and IP Multicast This chapter covers the Border Gateway Protocol (BGP), which is used to exchange routes between autonomous systems. It is most

Advanced Networking Routing: RIP, OSPF, Hierarchical routing, BGP Renato Lo Cigno Routing Algorithms: One or Many? Is there a single routing protocol in the Internet? How can different protocols and algorithms

DD2491 p1 2008 Load balancing BGP Johan Nicklasson KTHNOC/NADA Dual home When do you need to be dual homed? How should you be dual homed? Same provider. Different providers. What do you need to have in

Configuring BGP This chapter describes how to configure Border Gateway Protocol (BGP). For a complete description of the BGP commands in this chapter, refer to the BGP s chapter of the Network Protocols

The ISP Column An occasional column on things Internet May 2006 Geoff Huston An Introduction to BGP the Protocol Routing in the Internet is divided into two parts fine-grained topological detail of connected

Border Gateway Protocol Best Practices By Clifton Funakura The Internet has grown into a worldwide network supporting a wide range of business applications. Many companies depend on the Internet for day-to-day

Mikrotik Routing Static Dynamic Routing To Be Discussed RIP Quick Discussion OSPF BGP What is Routing Wikipedia has a very lengthy explanation http://en.wikipedia.org/wiki/routing In the context of this

Policy Based QoS support using BGP Routing Priyadarsi Nanda and Andrew James Simmonds Department of Computer Systems Faculty of Information Technology University of Technology, Sydney Broadway, NSW Australia

Interdomain traffic engineering with BGP B. Quoitin, S. Uhlig, C. Pelsser, L. Swinnen and O. Bonaventure Abstract Traffic engineering is performed by means of a set of techniques that can be used to better

The Border Gateway Protocol (BGP) Link Bandwidth feature is used to advertise the bandwidth of an autonomous system exit link as an extended community. This feature is configured for links between directly

The BGP (Border Gateway Protocol) Link Bandwidth feature is used to advertise the bandwidth of an autonomous system exit link as an extended community. This feature is configured for links between directly

Transitioning to BGP ISP Workshops Last updated 24 April 2013 1 Scaling the network How to get out of carrying all prefixes in IGP 2 Why use BGP rather than IGP? p IGP has Limitations: n The more routing

CHAPTER 3 Introduction to Dynamic Routing Protocols Objectives Upon completion of this chapter, you should be able to answer the following questions: Can you describe the role of dynamic routing protocols

Interdomain traffic engineering with BGP B. Quoitin, S. Uhlig, C. Pelsser, L. Swinnen and O. Bonaventure Abstract Traffic engineering is performed by means of a set of techniques that can be used to better