Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 4: Internet Routing

Similar presentations

Presentation on theme: "Lecture 4: Internet Routing"— Presentation transcript:

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

2 Schematic diagram of the Internet
Lecture 4: Internet Routing

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

4 Lecture 4: 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) Lecture 4: Internet Routing

5 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 Lecture 4: Internet Routing

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

7 Distance Vector Protocols
On receiving an update from a neighbor Add the link cost to reach the neighbor to the neighbor’s 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 Lecture 4: Internet Routing

8 Routing Information Protocol (RIP)
DV; Link metric always set to 1 (hop count) Maximum hops allowed: 15 16 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 Lecture 4: Internet Routing

9 RIP message format Lecture 4: Internet Routing
from Lecture 4: Internet Routing

10 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 Lecture 4: Internet Routing

11 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) Lecture 4: Internet Routing

12 Lecture 4: Internet Routing
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! Lecture 4: Internet Routing

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

14 Lecture 4: Internet Routing
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 Lecture 4: Internet Routing

15 RIP version 2 Lecture 4: Internet Routing
from Lecture 4: Internet Routing

16 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 doesn’t allow multi-path routing Link state is relatively complex, yet doesn't have the above drawbacks of DV Lecture 4: Internet Routing

17 Lecture 4: Internet Routing
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 Lecture 4: Internet Routing

18 Lecture 4: Internet Routing
OSPF Principles Routes to all destinations are computed using the local instance of the graph Uses Dijkstra’s 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 Lecture 4: Internet Routing

19 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 Within source area: Intra-area Through backbone (which has properties of an area) Uses link state routing algorithm for inter-area routing Within destination area: Intra-area Lecture 4: Internet Routing

20 Lecture 4: Internet Routing
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 Lecture 4: Internet Routing

21 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 Lecture 4: Internet Routing

22 Lecture 4: Internet Routing
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 Lecture 4: Internet Routing

23 Lecture 4: Internet Routing
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 Lecture 4: Internet Routing

24 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 Lecture 4: Internet Routing

25 Lecture 4: Internet Routing
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) Lecture 4: Internet Routing

26 Lecture 4: Internet Routing
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. Lecture 4: Internet Routing

27 Lecture 4: Internet Routing
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 Lecture 4: Internet Routing

28 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 doesn’t list the entire path An AS may have some restrictions in forwarding packets through another AS Link State Involves flooding updates to all routers Is certainly not manageable across multiple domains! Lecture 4: Internet Routing

29 Lecture 4: Internet Routing
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 Lecture 4: Internet Routing

30 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 Lecture 4: Internet Routing

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

32 Lecture 4: Internet Routing
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 Lecture 4: Internet Routing

33 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 Lecture 4: Internet Routing

34 Lecture 4: Internet Routing
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 Lecture 4: Internet Routing

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

36 Lecture 4: Internet Routing
BGP Messages Keepalive Notification Message 16 Marker 16 Marker 2 Length 2 Length 1 Type 1 Type 1 Error code 1 Error subcode var Data Lecture 4: Internet Routing

37 Lecture 4: Internet Routing
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 Lecture 4: Internet Routing

38 Lecture 4: Internet Routing
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 sender’s IP address Keepalive: Used for preventing the hold timer from expiring Lecture 4: Internet Routing

39 Lecture 4: Internet Routing
BGP Messages Update Communicates information about a single route, which may be added to the recipient’s 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 Lecture 4: Internet Routing

40 Lecture 4: Internet Routing
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 Lecture 4: Internet Routing

41 Lecture 4: Internet Routing
BGP: Example 2.1 1.2 AS 2 R3 R6 R2 AS 1 1.3 1.1 R5 2.2 R7 BGP peers R4 R8 R1 2.4 1.4 2.3 Lecture 4: Internet Routing

42 Lecture 4: Internet Routing
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 Lecture 4: Internet Routing

43 Lecture 4: Internet Routing
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 Lecture 4: Internet Routing

44 Lecture 4: Internet Routing
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} Lecture 4: Internet Routing

45 Lecture 4: Internet Routing
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 Lecture 4: Internet Routing

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

Download ppt "Lecture 4: Internet Routing"

Similar presentations

Ads by Google