Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 4: Internet Routing1 CS 5283: Internet Routing Venkatesh Sarangan.

Similar presentations

Presentation on theme: "Lecture 4: Internet Routing1 CS 5283: Internet Routing Venkatesh Sarangan."— Presentation transcript:

1 Lecture 4: Internet Routing1 CS 5283: Internet Routing Venkatesh Sarangan

2 Lecture 4: Internet Routing2 Schematic diagram of the Internet

3 Lecture 4: Internet Routing3 Overview Interior Routing Protocols RIP OSPF Pros and Cons Exterior Routing Protocols Why we need ERP ? BGP

4 Lecture 4: Internet Routing4 Internet Routing Intra-domain routing Information about the network outside the domain is ignored RIP (Routing Information Protocol) OSPF (Open Shortest Path First) protocol Inter-domain routing EGP (Exterior Gateway Protocol) BGP (Border Gateway Protocol)

5 Lecture 4: Internet Routing5 Distance Vector Protocols At each router, maintain a list/vector of distances to all possible destinations Periodically exchange this information with the neighbors Update the routing table based on information received from the neighbors

6 Lecture 4: Internet Routing6 X to B: 1 X to C: 1 X to A: 1

7 Lecture 4: Internet Routing7 Distance Vector Protocols On receiving an update from a neighbor Add the link cost to reach the neighbor to the neighbors distance vector Out of all possible neighbors, find which neighbor has the lowest distance/cost Include this neighbor has the next hop Include this distance as the cost of reaching the destination Can be implemented using Distributed Bellman-Ford algorithm

8 Lecture 4: Internet Routing8 Routing Information Protocol (RIP) DV; Link metric always set to 1 (hop count) Maximum hops allowed: is considered to be un-reachable or infinity Each router periodically sends its entire routing table to its neighbor every 30 sec UDP port # 520 is used Maximum RIP message size is 504 bytes

9 Lecture 4: Internet Routing9 RIP message format from

10 Lecture 4: Internet Routing10 RIP message processing RIP requests are made by routers that just booted up Also used for de-bugging purposes Routers on receiving the request send their entire routing table Received entries are checked one by one IP address, metric are checked Entries suitably updated; timers are re-started

11 Lecture 4: Internet Routing11 RIP message processing Updating tables Add any new destination network Replace existing routes with small delay ones If update from router R, update all routes using R as next hop Life time of a table entry is 180 sec If no update is received for 180 sec, crash is assumed Distance is set to 16 (infinity)

12 Lecture 4: Internet Routing12 RIP: Drawbacks Count to infinity Consider 1-2-3; If 3 fails, 2 updates & thinks there is a route through 1; 1 updates & thinks there is a route through 2 No clear solution! Split-horizon: Since 1 reaches 3 through 2, when it advertises to 2, it advertises infinity for 3. No authentication Black-hole If a router advertises by mistake (or knowingly) a distance of zero to several destinations, then all routes point to it!

13 Lecture 4: Internet Routing13 RIP: Drawbacks (contd.) No support for variable length subnet masking (what is this?) Slow convergence to topology changes

14 Lecture 4: Internet Routing14 RIP version 2 RIP v2 extends RIP v1 to remove some of the drawbacks Provides authentication Supports variable length subnet masking Uses multicasting instead on broadcasting requests Unused fields in RIP v1 are used for the above extensions

15 Lecture 4: Internet Routing15 RIP version 2 from

16 Lecture 4: Internet Routing16 Distance vector to Link state RIP, based on DV is simple, yet has slow convergence prone to count to infinity! not suitable for large networks, since maximum hop count is 16 doesnt allow multi-path routing Link state is relatively complex, yet doesn't have the above drawbacks of DV

17 Lecture 4: Internet Routing17 OSPF Principles Each node constructs a link state packet (LSP) by collecting the states of the incident links This LSP is then advertised to all other nodes in the network through flooding Each router acknowledges the receipt of LSP Generates a lot of traffic! Using the LSPs for all the routers, a DB of the entire network is maintained Using the DB a directed graph is constructed

18 Lecture 4: Internet Routing18 OSPF Principles Routes to all destinations are computed using the local instance of the graph Uses Dijkstras SPF algorithm Specifications were developed in an open fashion – hence OSPF! Size of DB, flooding overhead, complexity of route computation increase with network size Network is split in to various, independent areas, connected by a backbone area Backbone area glues the network together

19 Lecture 4: Internet Routing19 OSPF Principles (contd.) Each area behaves like a independent network DB includes only intra-area links LSP Flooding stops at area boundary Only intra-area route computation Intra-area routing relies only on local link state info. Inter-area routing consists of three legs 1. Within source area: Intra-area 2. Through backbone (which has properties of an area) Uses link state routing algorithm for inter-area routing 3. Within destination area: Intra-area

20 Lecture 4: Internet Routing20 Routers in an OSPF AS AS 1 AS 2 Internal router AS 3 AS 4 Area Backbone router Backbone Area border router AS boundary router BGP protocol connects the ASes

21 Lecture 4: Internet Routing21 OSPF Principles (contd.) Area Border Routers connect given area(s) to the backbone maintain databases for each area they are attached to act as gateway for their area Backbone Routers may be connected to other Area Border routers AS Boundary routers Connect the AS to other ASes - gateway for the entire AS Inject external routes in to the OSPF database, which is advertised throughout the AS

22 Lecture 4: Internet Routing22 OSPF Protocols OSPF runs directly on top of IP and has three sub- protocols Hello Protocol To check if links are operational and establish adjacency To elect designated router on broad cast networks Exchange Protocol To synchronize databases between two routers that have just become adjacent

23 Lecture 4: Internet Routing23 OSPF Protocols Flooding Protocol Responsible for disseminating link states Uses sequence numbers to distinguish older updates from newer ones All updates are acknowledged Unacknowledged updates are re-sent Updates are sent out on all interfaces apart from the incoming one

24 Lecture 4: Internet Routing24 Link State Record types Router links Summarize all the links that start from the advertising router Network links Advertised by the designated router for transit networks Summary links Advertised by area border routers summarizing the routes for the destinations in an area External links Links advertised by the AS border routers for destinations outside the domain

25 Lecture 4: Internet Routing25 OSPF Link Costs Cost of each hop is called routing metric OSPF provides flexible metric scheme based on type of service (TOS) Normal (TOS) 0 Minimize monetary cost (TOS 2) Maximize reliability (TOS 4) Maximize throughput (TOS 8) Minimize delay (TOS 16) Each router generates 5 spanning trees (and 5 routing tables)

26 Lecture 4: Internet Routing26 Advantages of OSPF Fast, loopless convergence Any change is disseminated fast through flooding Consistent databases stored in local routers; hence loopless Support for multiple metrics such as throughput, delay, and reliability Support multi-path routing - better link utilization, lower queueing delays, etc.

27 Lecture 4: Internet Routing27 Drawbacks of OSPF For the traffic to travel between two areas, it must be first routed to the backbone (area 0). this may result in non-optimal routing Dividing an AS into areas adds more complexity

28 Lecture 4: Internet Routing28 Inter-AS Routing: Limitations of IRPs Distance Vector Assume a common distance metric across all routers may not be true for different domains Routing table doesnt list the entire path An AS may have some restrictions in forwarding packets through another AS Link State Assume a common distance metric across all routers may not be true for different domains Involves flooding updates to all routers Is certainly not manageable across multiple domains !

29 Lecture 4: Internet Routing29 Path Vector Routing Do away with distance metrics Just provide the reachability information, and the list of domains that should be crossed Removes the difficulty associated with DV and LS routing Since entire path is enumerated, loops can be avoided

30 Lecture 4: Internet Routing30 BGP (Border Gateway Protocol) ERP based on on path vector routing No cost information; each BGP router keeps track of the exact path used BGP peers initially exchange their full routing tables Later on, only routing updates are exchanged Uses TCP A BGP router views the world as a collection of other BGP routers, and the lines connecting them

31 Lecture 4: Internet Routing31 BGP Messages OpenUsed to open a neighbor relationship with another router UpdateUsed to (a) transmit information about a single route and/or (2) list multiple routes to be withdrawn KeepaliveUsed to (1) ack. an Open message, and (2) periodically confirm the neighbor relationship NotificationSent when an error condition is detected.

32 Lecture 4: Internet Routing32 BGP Operation Neighbors/Peers - two BGP routers in different AS that wish to exchange routing information Three functionalities in BGP Neighbor acquisition Neighbor reachability Network reachability

33 Lecture 4: Internet Routing33 BGP Operation: Neighbor Acquisition When two routers in different ASes agree to peer Formal request is necessary, since one router may be overloaded, and may not wish to be a peer One router sends a request to other May be turned down The existence of other router should be manually fed If accepted, Keepalive message is sent as a response

34 Lecture 4: Internet Routing34 BGP Operation (contd.) Neighbor reachability: Maintaining the peer relationship Periodically send Keepalive messages Network Reachability Each BGP router maintains a database of reachable networks, and the preferred paths for reaching them Any updates to this database is exchanged among BGP peers

35 Lecture 4: Internet Routing35 BGP Messages Marker Length Type Version Domain id Hold time BGP id Optional parameter len Optional Parameters var Marker Length Type Unfeasible routes length Total Path Attr. length Withdrawn routes Path Attributes Net. Layer reach. info var 2 Open MessageUpdate Message

36 Lecture 4: Internet Routing36 BGP Messages Marker Length Type Marker Length Type Error code Data var KeepaliveNotification Message 1Error subcode

37 Lecture 4: Internet Routing37 BGP Messages All messages have a header with three fields Marker: Reserved for authentication Sender may insert a value which the recipient may use for authenticating the sender Length: Length of the message in octets Type: Type of the BGP message Open, Keepalive, Update, Notification

38 Lecture 4: Internet Routing38 BGP Messages Open: Used for acquiring a neighbor with a TCP connection Version: version of the BGP used My domain id: AS identifier Hold time: Value proposed by the sender for Keepalive message interval BGP id: Usually the senders IP address Keepalive: Used for preventing the hold timer from expiring

39 Lecture 4: Internet Routing39 BGP Messages Update Communicates information about a single route, which may be added to the recipients database Withdraws a list of routes previously advertised to the recipient Fields in the Update message: Unfeasible routes length Withdrawn routes Total path attributes length Path attributes NLRI: A list of networks that can be reached by this route

40 Lecture 4: Internet Routing40 BGP: Path attributes Origin: Indicates whether this information was generated by an IGRP or EGRP AS_Path: A list of domains traversed in this route Next_Hop: IP address of the next hop border router to be used for reaching destinations listed in NLRI Multi_Exit_Disc: Used to communicate preferences among the intra-domain routes (explained later) Local_Pref: Used by a router to inform other routers within the domain about its own preferences no significance outside the domain

41 Lecture 4: Internet Routing41 BGP: Example R3 R2 R1 R4 R8 R7 R6 R AS 1 AS 2 BGP peers

42 Lecture 4: Internet Routing42 BGP: Example Consider R1 Using OSPF, R1 constructs an image of the topology of the sub-networks in Domain 1 Using BGP Open message it acquires neighborhood with R5 in domain 2 It then sends an Update message to R5 with AS_Path: It has the id of domain 1 Next_Hop: The IP address of R1 NLRI: List of all subnetworks in domain 1 above message informs R5 that all subnets listed in NLRI are reachable via R1, and the only domain traversed is 1

43 Lecture 4: Internet Routing43 BGP: Example Let R5 have a BGP relation with R9 in domain 3 In the Update message sent by R5 to R9, AS_Path: {IDs of AS2, AS1} Next_Hop: IP address of R5 NLRI: List of subnets in Domain 1 above message informs R9 that all subnets listed in NLRI are reachable via R5, and the domains traversed are 1 & 2

44 Lecture 4: Internet Routing44 BGP: Example R9 may have alternate routes to the subnets in domain 1 If R9 prefers the route advertised by R5, it updates its database, and sends an Update message to its other peers New Update message will have AS_Path field of {AS3, AS2, AS1}

45 Lecture 4: Internet Routing45 BGP: Path Attributes Multi_Exit_Disc attribute: Used to choose one among many entry points into a domain Attribute contains a number that reflects some internal metric for reaching destinations within AS Let both R1 and R2 have BGP relation with R5 Each provides an Update message for subnetwork 1.3 that includes a routing metric used internal to AS 1 R5 could use these two values as the basis for choosing between the two routes for reaching the subnet 1.3

46 Lecture 4: Internet Routing46 Summary: Internet Routing Basics Routing table structure Distance vector, Link state, Path vector Intra-domain: RIP, OSPF Inter-domain: BGP

Download ppt "Lecture 4: Internet Routing1 CS 5283: Internet Routing Venkatesh Sarangan."

Similar presentations

Ads by Google