Presentation is loading. Please wait.

Presentation is loading. Please wait.

COS 461 Fall 1997 Routing COS 461 Fall 1997 Typical Structure.

Similar presentations

Presentation on theme: "COS 461 Fall 1997 Routing COS 461 Fall 1997 Typical Structure."— Presentation transcript:


2 COS 461 Fall 1997 Routing

3 COS 461 Fall 1997 Typical Structure

4 COS 461 Fall 1997 Routing: Goals u avoid long paths u avoid congested paths u adapt to changes in topology u avoid centralized computation u keep memory requirements low

5 COS 461 Fall 1997 Routing Tables u each host has a routing table u table says where to forward packets destined for each network –forward only to directly connected hosts u Where do routing tables come from?

6 COS 461 Fall 1997 Simple Gateways outside u ordinary hosts send all packets destined for outside to the gateway machine u only gateway participates in the routing protocols gateway

7 COS 461 Fall 1997 Routing as a Graph Problem u each router becomes a vertex u each LAN link between routers becomes an edge u can label edges with “cost” of transmitting along that link

8 COS 461 Fall 1997 Hierarchical Routing u if part of graph is “tree-like” –each router needs to know only about the subtree below it –all traffic in or out of the tree is sent through the root –rest of network sees tree as collapsed to a single node u can make graph tree-link by deciding to ignore some links

9 COS 461 Fall 1997 Link-State Routing u three stages: –estimate “cost” for each link »based on bandwidth, congestion, reliability –communicate graph structure to all routers –each router solves shortest-path problem on graph u good: simple, gets the right answer u bad: scales poorly as routers are added

10 COS 461 Fall 1997 Distance-Vector Routing u iterative, distributed algorithm u nodes communicate with their neighbors, advertising available routing options u useful information diffuses through the graph destinationcostnext hop A13A B19A C3D D1D Einf-

11 COS 461 Fall 1997 Distance-Vector Algorithm u start with cost and next-hop for direct links –all other costs set to infinity u periodically, (dest, cost) pairs to neighbors u on receiving (dest, cost) from a neighbor, check whether it is a better path than the current one –it’s better if (cost to neighbor)+(neighbor’s cost to dest) < (my cost to dest)

12 COS 461 Fall 1997 Behavior of Distance-Vector u if network never changes, algorithm converges to optimum –time goes as O(longest path in hops) u if costs change or nodes are added, algorithm re-converges to new optimum u if nodes or links fail, bad things can happen –“count to infinity”

13 COS 461 Fall 1997 Count-to-Infinity Problem A C B 1 1 distance to C: 1 via C distance to C: 2 via A infinity3 via B4 via B5 via B6 via B solution: detect back-and-forth pattern misses cycles with 3 or more links

14 COS 461 Fall 1997 Routing in the Real Internet u two-level approach u divide Net into Autonomous Systems (AS) –each AS within one organization u routing within AS done locally –any algorithm is OK u routing between ASes uses BGP protocol

15 COS 461 Fall 1997 Routing within an AS u many approaches are viable –static routing tables –RIP (Routing Information Protocol) uses distance-vector approach –OPSF (Open Shortest Path First) uses link-state approach, with some optimizations

16 COS 461 Fall 1997 Inter-AS Routing u use Boundary Gateway Protocol (BGP) –each AS designates a single “BGP speaker” to represent it in the protocol –speakers advertise which ASes they can reach »also include path –like distance vector, but everybody knows the paths »each AS can choose paths by its own criteria »routing cycles avoided

17 COS 461 Fall 1997 Classless Routing u Inter-AS routing requires state for each network –uses too much space as more networks added u solution: aggregate routing information u example: if all nets whose numbers are 10110011010111xx use the same route, store only one record

18 COS 461 Fall 1997 Classless Routing u generalization: treat network number as having a variable number of bits u saves space in routing tables u allows variable number of hosts in a network, so uses network numbers more efficiently u but we’ll still run out of IP addresses before too long

19 COS 461 Fall 1997 IPv6 u upcoming version of IP u features –128-bit addresses –better control over routing offered to end hosts –security (crypto) –clean up mistakes in IPv4 –extensible (can add options) –can coexist with IPv4 »expect ten-year transition period

20 COS 461 Fall 1997 IPv6 Addressing u 128-bit host addresses u allocation of possible addresses –72% reserved for later use –provider-allocated range –geographically-allocated range –local-use-only addresses –wrapped IPv4 addresses –multicast addresses

21 COS 461 Fall 1997 IPv6 Header Format versionpriorityflow label payload lengthnext headerhop limit destination address next header or data 32 bits source address

22 COS 461 Fall 1997 IPv6 Header Fields u version: set to 6 u priority: 0-15 –higher priority gets preferential service –7 or lower means endpoints can slow down u flow label –experimental feature allows different treatment of different data flows between a pair of hosts

23 COS 461 Fall 1997 IPv6 Header Fields u payload length: excludes header u hop limit: decremented when packet is forwarded; packet dropped if this reaches 0 u next header: either –which of the defined extension headers comes next, or –which higher-level protocol should get this packet

24 COS 461 Fall 1997 Header Extensions u six currently defined (hop-by-hop options, routing, fragmentation, authentication, encrypted security payload, destination options) –more will be defined later (probably) u must appear in a fixed order u each has its own format

25 COS 461 Fall 1997 Differences with IPv4 u fragmentation done by sender only –too-large fragment causes ICMP error message back to sender; sender can refragment and try again u no checksum –higher level protocol should have one u support for crypto and authentication

26 COS 461 Fall 1997 Transition: From IPv4 to IPv6 u people will switch little by little –might take ten years u during transition, the two protocols will coexist –hosts and routers can run two-headed IP software –IPv6 packets can “tunnel” through IPv4 regions

Download ppt "COS 461 Fall 1997 Routing COS 461 Fall 1997 Typical Structure."

Similar presentations

Ads by Google