Internetworking There is more than One Network Simple - - PowerPoint PPT Presentation

internetworking
SMART_READER_LITE
LIVE PREVIEW

Internetworking There is more than One Network Simple - - PowerPoint PPT Presentation

Internetworking There is more than One Network Simple Internetworking Two issues to be addressed when Best Effort Service Model Global Addressing Scheme connecting networks Datagram Forwarding in IP Address Translation


slide-1
SLIDE 1

1

Spring 2004 EE4272

Internetworking

Simple Internetworking

Best Effort Service Model Global Addressing Scheme Datagram Forwarding in IP Address Translation (ARP) ICMP- Error Reporting

Routing in IP

RIP OSPF

Global Internet

Subnetting Classless Routing Interdomain Routing

Multicast

Link State Multicast Distance Vector Multicast

Spring 2004 EE4272

There is more than One Network

Two issues to be addressed when

connecting networks

Heterogeneity: connectivity between hosts from

different network types (Ethernet, token rings, point-to-point links, switch networks, etc.), involving different addressing scheme, media access protocols, service model…

Scalability: Explosive growth of end users ->

routing, addressing

Spring 2004 EE4272

IP : An example of Internetwork

Concatenation of

Networks

network of networks

“physical networks” IP: “a single logical

internetwork” Logical Protocol Stack

Spring 2004 EE4272

Best Effort Service Model

  • Ideas: Undmanding
  • IP Service Model: “Addressing scheme” + “datagram model of data delivery”
  • Connectionless (datagram-based): simplest service -> fundamental to IP

Keeping the router as simple as possible is one of the design goals of IP The ability of “run over anything”: most important characteristics

  • Best-effort delivery (unreliable service) : no failure recovery effort

packets are lost; packets are delivered out of order; duplicate copies of a packet are

delivered; packets can be delayed for a long time

  • Datagram packet format

–Version (4): currently 4 –Hlen (4): number of 32-bit words in header –TOS (8): type of service (not widely used) –Length (16): number of bytes in this datagram –Ident (16): used by fragmentation –Flags/Offset (16): used by fragmentation –TTL (8): number of hops this datagram has traveled –Protocol (8): demux key (TCP=6, UDP=17) –Checksum (16): of the header only (Section 2.4) –DestAddr & SrcAddr (32)

slide-2
SLIDE 2

2

Spring 2004 EE4272

Fragmentation and Reassembly

Each network has some MTU (Maximum Transmission Unit)

  • e.g., Ethernet:1500; FDDI:4500

Strategy fragment when necessary (MTU < Datagram) try to avoid fragmentation at source host Re-fragmentation is possible fragments are self-contained datagrams use CS-PDU (not cells) for ATM delay reassembly until destination host do not recover from lost fragments

R1 ETH FDDI IP IP ETH TCP R2 FDDI PPP IP R3 PPP ETH IP H1 IP ETH TCP H8

MTU=1500 MTU=4500 MTU=532 MTU=1500

Spring 2004 EE4272

Example

Ident = x Offset = 0 Start of header Rest of header 1400 data bytes Ident = x Offset = 0 Start of header 1 Rest of header 512 data bytes Ident = x Offset = 512 Start of header 1 Rest of header 512 data bytes Ident = x Offset = 1024 Start of header Rest of header 376 data bytes

Note: Offset field counts 8-byte units of data, not individual bytes

Spring 2004 EE4272

Global Addresses

Properties

globally unique hierarchical: network + host

Dot Notation

10.3.2.4 128.96.33.81 192.12.69.77 Class D address specify a multicast group Class E are currently unused Note: It is more precise to think of IP address as belonging to interfaces than to hosts

Spring 2004 EE4272

Datagram Forwarding in IP

Forwarding: The process of taking a packet from an input & sending it out on

the appropriate output;

Routing: the process of building up the tables that allow the correct output for a

packet to be determined

Strategy

every datagram contains destination’s address if directly connected to destination network, then forward to host (check network part

  • f the IP address)

if not directly connected to destination network, then forward to some router forwarding table maps network number into next hop router each host has a default router each router maintains a forwarding table

Example (R2) Network Number Next Hop 1 R3 2 R1 3 interface 1 4 interface 0

Benefits of hierarchical IP address->scalability Forwarding table of R2

slide-3
SLIDE 3

3

Spring 2004 EE4272

Address Translation

Problem: IP datagrams contain IP address, but physical interface

hardware on the host or router only understand the address scheme of the particular network

Map IP addresses into physical (link level) addresses of

destination host next hop router

Techniques

encode physical address in host part of IP address table-based: table of address pairs

ARP (Address Resolution Protocol):

table of IP to physical address bindings broadcast request (link level network’s feature) if IP address not in

table

target machine responds with its physical address table entries are discarded if not refreshed (every 15 minutes)

Spring 2004 EE4272

ARP Details

Request Packet Format HardwareType: type of physical network (e.g., Ethernet) ProtocolType: type of higher layer protocol (e.g., IP) HLEN & PLEN: length of physical and protocol addresses Operation: request or response Source/Target-Physical/Protocol addresses Spring 2004 EE4272

Internet Control Message Protocol (ICMP)

IP is always configured with a companion protocol,

ICMP

ICMP defines a collection of error messages that

are sent back to source host.

Destination unreachable (protocol, port, or host) TTL exceeded (so datagrams don’t cycle forever) Checksum failed Reassembly failed Cannot fragment

Redirect (from router to source host): for better

route control message

Spring 2004 EE4272

Routing in IP

Intradomain Routing

  • Distance Vector (RIP): Bellman-Ford algorithm
  • Link State (OSPF): Dijkstra’s shortest path algorithm

Note: Routing domain is an internetwork in which all the routers are under the same administrative control (e.g., a single university campus)

Routing of Global Internet

  • Classless Routing
  • Interdomain Routing (BGP)
slide-4
SLIDE 4

4

Spring 2004 EE4272

Intradomain Routing: Overview

Forwarding vs Routing

forwarding: to select an output port based on destination address

and routing table

routing: process by which routing table is built

Network as a Graph Objective: Find lowest cost path between two nodes

Static routing: centralized, failure unaware, fixed edge cost, non-scalable Distributed dynamic: running on each node -> e.g., stuck in loop 4 3 6 2 1 9 1 1 D A F E B C

Spring 2004 EE4272

Distance Vector Routing

  • Idea: each node constructs a one-dimensional array (vector) containing the distance/cost

to all other nodes and distributed that vector to its neighbors

  • Each node maintains a set of triples
  • (Destination, Cost, NextHop)
  • Initially, each node sets a cost of 1 to the direct link, to others
  • Exchange of distance vectors between neighbors

Each update is a list of pairs: (Destination, Cost)

  • periodically (on the order of several seconds)
  • whenever table changes (called triggered update)

Update the path based on whether its path to the destination via the these neighbors

improves the cost.

  • For fixed topology: few exchanges of information between neighbors provides each

node a complete routing table -> convergence

  • Keep updating till converge: more iterations bring no improvement
  • Periodically refresh existing routes: failure can be detected; delete if they time out

Note: assume each node knows the cost of links to its neighbors

Spring 2004 EE4272

Example

D G A F E B C

Spring 2004 EE4272

Count to infinity problem & Loop-Breaking Heuristics

Count to infinity problem for distance vector

algorithm: the routing tables for the network do not stabilize

  • >“split horizon” (reading assignment: p278)

Set infinity to 16 Split horizon: when a node sends a routing update to its neighbors, it

does not send those routes it learned from back to that neighbor

Split horizon with poison reverse

Routing Information Protocol (RIP)

A widely used routing protocols in IP networks based on distance-

vector algorithm

slide-5
SLIDE 5

5

Spring 2004 EE4272

Bellman-Ford Algorithm

Spring 2004 EE4272

Bellman-Ford Algorithm

Idea: Find the shortest paths from a given source node subject to the

constraint that the paths contain at most one link; then find the shortest paths with a constraint of at most two links, and so on. Algorithm terminates when the increase of the maximum link number brings no improvement. Define: S: source node W(i,j): link cost from node i to node j; W(i,i)=0; w(i,j)=∞ for two none directly connected nodes w(i,j) =c Lh(n): least cost path from node s to node n under the constraint of no more than h links

Spring 2004 EE4272

Bellman-Ford Algorithm

Algorithm: Step 1: Initialization

L0(n) = ∞, for all n ≠ s Lh(s) = 0, for all h Step 1: Update when Lh+1(n) less than Lh(n) For each successive h ≥ 0: For each n ≠ s, compute Lh+1(n) = min [ Lh(j) + w(j,n)] for all predecessor node j Step 3: Terminate when increase of h brings no improvement

Spring 2004 EE4272

slide-6
SLIDE 6

6

Spring 2004 EE4272

Link State Routing

Strategy

send to all nodes (not just neighbors) information about directly

connected links (not entire routing table)

every node is able to build a complete map of the network

Rely on two mechanism:

Reliable dissemination of link-state information Calculation of routes from the sum of all the accumulated link-state

information

Link State Packet (LSP) : an update packet created by

every node which contains the following infor.

id of the node that created the LSP cost of link to each directly connected neighbor sequence number (SeqNo) time-to-live (TTL) for this packet

Spring 2004 EE4272

Link State (cont)

Reliable flooding

store most recent LSP from each node forward LSP to all nodes but one that sent it generate new LSP periodically; increment SeqNo (64 bits) start SeqNo at 0 when reboot decrement TTL of each stored LSP; discard when TTL=0

Spring 2004 EE4272

Route Calculation

Dijkstra’s shortest path algorithm Let N denotes set of nodes in the graph l (i, j) denotes non-negative cost (weight) for edge (i, j) s denotes this node M denotes the set of nodes incorporated so far C(n) denotes cost of the path from s to node n

M = {s} for each n in N - {s} C(n) = l(s, n) while (N != M) M = M union {w} such that C(w) is the minimum for all w in (N - M) for each n in (N - M) C(n) = MIN(C(n), C (w) + l(w, n ))

5 3 2 10 11

A B C D Example

Spring 2004 EE4272

Link State Routing (Con’t)

Properties of link-state routing

stabilized quickly does not generate much traffic responds rapidly to topology changes or node failures

  • infor. (LSP for every other nodes) stored at each node

can be large -> scalability

OSPF (open shortest path first) protocol

based on link-state routing with additional features: Authentication; additional

hierarchy (e.g., areas within domain); Load balancing

slide-7
SLIDE 7

7

Spring 2004 EE4272

Dijkstra’s Algorithm

  • A greedy algorithm finding shortest paths from source

node to all other nodes

  • Define:

N: set of nodes in the network S: source node T: set of nodes so far incorporated in the algorithm W(i,j): link cost from node i to node j; W(i,i)=0; w(i,j)=∞ for two none directly connected nodes w(i,j) =c L(n): least cost path from node s to node n that is currently known to the algorithm. At the end, this is the final least cost path

Spring 2004 EE4272

Dijkstra’s Algorithm (Con’t)

Step 1: Initialization T = {s} : at initial stage, only source node included L(n) = w(i,j) for all n ≠s Step 2: Find the neighboring node x not in T that has the least-cost path from source node s and include that node into T, i.e., add node x to set T Step 3: Update least-cost paths due to node x included L(n) = min [L(n), L(x) +w(x,n)] Step 4: algorithm terminates when all nodes included in T, otherwise, go back to step 2

Spring 2004 EE4272

Dijkstra’s Algorithm (con’t)

Source node

Spring 2004 EE4272

Example for Dijkstra’s Algorithm

∞ ∞ ∞ 4 1→4→5→6 4 1→4→5→6 ∞ 2 1→4→5 2 1→4→5 1 1→4 5 1→3 4 1→4→3 4 1→4→3 3 1→4→5→3 2 1→2 2 1→2

1

{1}

2

{1,4}

3

{1,2,4}

4

{1,2,4,5}

5

{1,2,3,4,5}

6

{1,2,3,4,5,6}

L(6) Path L(5) Path L(4) Path L(3) Path L(2) Path Iteration T