Routing Protocols 1 Layer name Protocols Application DNS

  • Slides: 33
Download presentation
Routing Protocols 1 Layer name Protocols Application DNS Transport TCP, UDP Internet (Network )

Routing Protocols 1 Layer name Protocols Application DNS Transport TCP, UDP Internet (Network ) IP Link (Physical) 802. 11 Wi. Fi, Ethernet

Terminology 2 �An IP address followed by a slash(/) and a number (i. e.

Terminology 2 �An IP address followed by a slash(/) and a number (i. e. 127. 0. 0. 1/8 ) indicates a block of addresses named subnet. This includes all the addresses starting with the same 8 bits as the given address.

Flat network 3 �Flat network based on the idea that all the nodes know

Flat network 3 �Flat network based on the idea that all the nodes know each other. scale: with 50 million destinations: �can’t store all destinations in routing tables! �routing table exchange would swamp links

Hierarchical Routing 4 �internet = network of networks �Each administrative autonomy network admin may

Hierarchical Routing 4 �internet = network of networks �Each administrative autonomy network admin may want to control routing in its own network �Internet consists of Autonomous Systems interconnected with each other!

Internet AS Hierarchy 5 Inter-AS border (exterior gateway routers) Intra-AS (interior gateway routers)

Internet AS Hierarchy 5 Inter-AS border (exterior gateway routers) Intra-AS (interior gateway routers)

Static Routing 6 �Typically used in hosts To configure it, enter subnet mask and

Static Routing 6 �Typically used in hosts To configure it, enter subnet mask and the router (gateway) IP address. Perfect for cases with few connections, doesn’t change much � E. g. host with a single router connecting to the rest of the Internet IP: 128. 1. 1. 100 H 1 Internet R 1 H 2 H 3 For H 1 Next Hop: 128. 1. 1. 100

Dynamic Routing 7 �Most routers use dynamic routing Automatically build the routing tables There

Dynamic Routing 7 �Most routers use dynamic routing Automatically build the routing tables There are two major approaches � Distance Vector Algorithms � Link State Algorithms

Autonomous System 8 � Contiguous set of networks under one administrative authority � Common

Autonomous System 8 � Contiguous set of networks under one administrative authority � Common routing protocol � For example, The Hebrew university of Jerusalem � A connected network There is at least one route between any pair of nodes

Intra-AS Routing 9 �Named Interior Routing Protocol (IRP) or Interior Gateway Protocol (IGP) Passes

Intra-AS Routing 9 �Named Interior Routing Protocol (IRP) or Interior Gateway Protocol (IGP) Passes routing information between routers within AS Can use routing metric, e. g. hop count or administrative cost

Inter-AS Routing 10 �Named Exterior Routing Protocol (ERP) or Exterior Gateway Protocol (EGP) Passes

Inter-AS Routing 10 �Named Exterior Routing Protocol (ERP) or Exterior Gateway Protocol (EGP) Passes routing information between routers across AS Routing algorithms and tables may differ between different AS Finds a path, but can’t find an optimal path since it can’t compare routing metrics via multiple AS

11 Application of IRP and ERP

11 Application of IRP and ERP

Path Sub-optimality in Inter-AS Routing 12 1 2 2. 1 1. 1 2. 2.

Path Sub-optimality in Inter-AS Routing 12 1 2 2. 1 1. 1 2. 2. 1 1. 2. 1 start end 3. 2. 1 3 3 hop red path vs. 2 hop green path Lecture #13: 02 -24 -04 2. 2 3. 1 3. 2

Intra-AS Routing 13 �Also known as Interior Router Protocols (IRP) or Interior Gateway Protocols

Intra-AS Routing 13 �Also known as Interior Router Protocols (IRP) or Interior Gateway Protocols (IGP) �Most common: RIP: Routing Information Protocol OSPF: Open Shortest Path First IGRP: Interior Gateway Routing Protocol (Cisco proprietary)

Routing Information Protocol (RIP) 14 �Distance vector algorithm Each node contains a vector with

Routing Information Protocol (RIP) 14 �Distance vector algorithm Each node contains a vector with the distances of all the nodes in the AS. �Included in BSD-UNIX Distribution in 1982 routed �Distance metric: # of hops (max = 15 hops) �Distance vectors: exchanged every 30 sec via Response Message (update)

Routing Information Protocol (RIP) 15 z w A x D B y C Destination

Routing Information Protocol (RIP) 15 z w A x D B y C Destination Network Next Router Num. of hops to dest. y B 2 x--1 …. …. . . Routing table in D w. A 2 z. B 7

RIP: Link Failure and Recovery 16 If no advertisement heard after 180 sec neighbor/link

RIP: Link Failure and Recovery 16 If no advertisement heard after 180 sec neighbor/link declared dead routes via neighbor invalidated new responses sent to neighbors in turn send out new responses (if tables changed) link failure info quickly propagates to entire net

RIP Table processing 17 �RIP routing tables managed by application-level process called route-d (daemon)

RIP Table processing 17 �RIP routing tables managed by application-level process called route-d (daemon) �advertisements sent in UDP packets, periodically repeated

RIP Table example (continued) 18 Router: giroflee. eurocom. fr via: netstat -rn Destination ----------127.

RIP Table example (continued) 18 Router: giroflee. eurocom. fr via: netstat -rn Destination ----------127. 0. 0. 1 192. 168. 2. 193. 55. 114. 192. 168. 3. 224. 0. 0. 0 default Gateway Flags Ref Use Interface ---------- --------127. 0. 0. 1 UH 0 26492 lo 0 192. 168. 2. 5 U 2 13 fa 0 193. 55. 114. 6 U 3 58503 le 0 192. 168. 3. 5 U 2 25 qaa 0 193. 55. 114. 6 U 3 0 le 0 193. 55. 114. 129 UG 0 143454 • Router only knows routes to attached LANs • Default router used to “go up”

RIP Problems (1) 19 �Massive traffic burst every 30 seconds Because the networks grew

RIP Problems (1) 19 �Massive traffic burst every 30 seconds Because the networks grew in size �Very slow coverage time Failure takes at least 3 minutes to be observed If we have 15 routers in line-like order, the last router will be updated with a change of the first touter only after 14*30 seconds

RIP Problems (1) 20 �Slow recovery from loops. If C clopases, A tries to

RIP Problems (1) 20 �Slow recovery from loops. If C clopases, A tries to route via B, and B via A. the loop will persist until the metrics for C reach infinity �In most current networking environments, RIP is not the preferred choice for routing

OSPF (Open Shortest Path First) 21 �Available since 1998 for IPv 4 (for IPV

OSPF (Open Shortest Path First) 21 �Available since 1998 for IPv 4 (for IPV 6 since 2008). �Uses Link State algorithm Link State packet dissemination Topology map at each node Route computation using Dijkstra’s algorithm �OSPF update carries one entry per neighbor router �Updates disseminated to entire AS (via flooding) �Conceived as a successor to RIP

Link state protocols 22 D A 2 1 G E B 3 H I

Link state protocols 22 D A 2 1 G E B 3 H I C router 1 A, B, C, G, H router 3 H, I F router 2 D, E, F, G, I

OSPF “advanced” features (not in RIP) 23 �Security: all OSPF messages authenticated (to prevent

OSPF “advanced” features (not in RIP) 23 �Security: all OSPF messages authenticated (to prevent malicious intrusion); TCP connections used �Multiple same-cost paths allowed (only one path in RIP) �For each link, multiple cost metrics for different Type Of Service (e. g. , satellite link cost set “low” for best effort; high for real time) �Hierarchical OSPF in large domains. Reduces the routing traffic.

Hierarchical OSPF 24

Hierarchical OSPF 24

Distance vector algorithm vs Link state algorithm 25 �Distance vector algorithm pros Minimal configuration

Distance vector algorithm vs Link state algorithm 25 �Distance vector algorithm pros Minimal configuration required. Low CPU/memory overhead. �Link state algorithm pros Less updates Loops are essentially impossible in a link-state network. Fast convergence time.

IGRP (Interior Gateway Routing Protocol) 26 �CISCO proprietary; successor of RIP (mid 80 s)

IGRP (Interior Gateway Routing Protocol) 26 �CISCO proprietary; successor of RIP (mid 80 s) �Distance Vector, like RIP �Several cost metrics (delay, bandwidth, reliability, load etc) �Uses TCP to exchange routing updates �Loop-free routing via Distributed Updating Alg. (DUAL) based on diffused computation

Inter-AS routing (Exterior Route Protocols) 27

Inter-AS routing (Exterior Route Protocols) 27

Internet inter-AS routing: BGP 28 �BGP (Border Gateway Protocol): the de facto standard Version

Internet inter-AS routing: BGP 28 �BGP (Border Gateway Protocol): the de facto standard Version 4 the current standard �Path Vector protocol: similar to Distance Vector protocol each Border Gateway broadcast to neighbors (peers) entire path (i. e, sequence of ASs) to destination E. g. , Gateway X may send its path to dest. Z: Path (X, Z) = X, Y 1, Y 2, Y 3, …, Z

Internet inter-AS routing: BGP 29 Suppose: router X send its path to peer router

Internet inter-AS routing: BGP 29 Suppose: router X send its path to peer router W �W may or may not select path offered by X cost, policy (don’t route via competitors AS), loop prevention reasons, many other metrics �E. g. X advertises path to Z: XY 1 Y 2 Y 3 Z If W selects path advertised by X, then: Path (W, Z) = WXY 1 Y 2 Y 3 Z

Internet inter-AS routing: BGP 30 �BGP messages exchanged using TCP. �BGP messages: OPEN: opens

Internet inter-AS routing: BGP 30 �BGP messages exchanged using TCP. �BGP messages: OPEN: opens TCP connection to peer and authenticates sender UPDATE: advertises new path (or withdraws old) KEEPALIVE keeps connection alive in absence of UPDATES; NOTIFICATION: reports errors in previous msg; also used to close connection

Why different Interior/Exterior routing ? 31 Scale: � hierarchical routing saves table size, reduced

Why different Interior/Exterior routing ? 31 Scale: � hierarchical routing saves table size, reduced update traffic, hierarchical scheme allows different interior routing protocols Policy: � Intra-AS / Interior: single admin, so no policy decisions needed � Inter-AS / Exterior: admin wants control over how its traffic routed, who routes through its net. Performance: � Intra-AS / Interior: can focus on performance, customization � Inter-AS / Exterior: policy may dominate over performance

Policy with BGP 32 �BGP provides capability for enforcing various policies �Policies are not

Policy with BGP 32 �BGP provides capability for enforcing various policies �Policies are not part of BGP: they are provided to BGP as configuration information �BGP enforces policies by choosing paths from multiple alternatives and controlling advertisement (Updates) to other AS’s

Examples of BGP Policies 33 �A AS refuses to act as transit Limit path

Examples of BGP Policies 33 �A AS refuses to act as transit Limit path advertisement �A AS can become transit for some AS’s Only advertise paths to some AS’s �An AS can favor or disfavor certain AS’s for traffic transit from itself