the network layer chapter 5. highlights network layer design issues routing algorithms congestion...

Post on 27-Dec-2015

231 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

The Network Layer

Chapter 5

Highlights

Network Layer Design Issues

Routing Algorithms

Congestion Control Algorithms

Quality of Service

Internetworking

The Network Layer in the Internet(ip)

Network Layer Design Isues

• Store-and-Forward Packet Switching• Services Provided to the Transport Layer• Implementation of Connectionless Service• Implementation of Connection-Oriented Service• Comparison of Virtual-Circuit and Datagram Subnets

Store-and-Forward Packet Switching

The environment of the network layer protocols.

fig 5-1

Services Provided to the Transport Layer

Design Goal:The services should be independent of the router technology.

The transport layer should be shielded from the number, type, and topology of the routers present.

The network addresses made available to the transport layer should use a uniform numbering plan, even across LANs and WANs.

Two classes service:

Connection-Oriented Service (Telephone companies)

Connectionless Service (Internet community)

Implementation of Connectionless Service

Routing within a diagram subnet.

Datagram(2)

B.3 B.2 B.1

C.3 C.2 C.1

C.3 C.1 C.2

B.1B.3

B.2

A

B

C

A 1

2

3

4

5

B

C

B.3 B.2

B.1

C.3 C.2

C.1

Implementation of Connection-Oriented Service

Routing within a virtual-circuit subnet.

Virtual Circuit(2)

1.3 1.2 1.1

2.3 2.2 2.1

2.3 2.2 2.1

1.31.2

1.1

A

B

C

A 1

2

3

4

5

B

C

vc1

vc2

vc1: A--1--2--4--B

vc2: A--1--3--5--C

Comparison of Virtual-Circuit and Datagram Subnets

5-4

Routing Algorithms

• The Optimality Principle• Shortest Path Routing• Flooding• Distance Vector Routing• Link State Routing• Hierarchical Routing

Routing Algorithms(2)

• If the subnet uses datagrams internally, routing decisions are made for every arriving data packet .

• Session Routing If the subnet uses virtual circuits internally, routing decisions are made only when a new virtual circuit is being set up. Thereafter, data packets just follow the previously-established route.

Routing Algorithms(3)

properties are desirable in a routing algorithm:

correctness

simplicity

robustness

stability

fairness

optimality

Routing Algorithms (4)

Conflict between fairness and optimality.

Routing Algorithms(5) Routing algorithms can be grouped into two major classes:

nonadaptive and adaptive.

Nonadaptive algorithms do not base their routing decisions on measurements or estimates of the current traffic and topology. Instead, the choice of the route to use to get from I to J (for all I and J) is computed in advance, off-line, and downloaded to the routers when the network is booted. This procedure is sometimes called static routing.

Adaptive algorithms, in contrast, change their routing decisions to reflect changes in the topology, and usually the traffic as well.

The Optimality Principle It states that if router J is on the optimal path from router I to router

K, then the optimal path from J to K also falls along the same route. To see this, call the part of the route from I to Jr1 and the rest of the route r2. If a route better than r2 existed from J to K, it could be concatenated with r1 to improve the route from I to K, contradicting our statement that r1r2 is optimal.

As a direct consequence of the optimality principle, we can see that the set of optimal routes from all sources to a given destination form a tree rooted at the destination. Such a tree is called a sink tree

I

K

Jr1

r2

rx r1+r2 r1+rx

The Optimality Principle(2)

(a) A subnet. (b) A sink tree for router B.

The goal of all routing algorithms is to discover and use the sink trees for all routers

Shortest Path Routing

The first 5 steps used in computing the shortest path from A to D. The arrows indicate the working node.

Exampleof SP

Initially

N D(B) D(C) D(D) D(E) D(F) D(G) D(H)

{ A } 2 6 { A, B } 9 4 6

9 6 5

9 6 9

9 8

9 10

{ A, B, E }

{ A, B, E, G }

{ A, B, E, G, F }

{ A, B, E, G, F, H }

{ A, B, E, G, F, H, C } 10

{ A, B, E, G, F, H, C, D }

Example of SP(2)

Shortest Path

Dest Next-hop

B B

C B

D B

B

BBB

E

FGH

Route Table of Node A

A

B C

E F

G H

D

FloodingNo network info required

Packet sent by node to every neighbor

Incoming packets retransmitted on every link except incoming link

Eventually a number of copies will arrive at destination

Each packet is uniquely numbered so duplicates can be discarded

Nodes can remember packets already forwarded to keep network load in bounds

Can include a hop count in packets

Flooding Example

Properties of FloodingAll possible routes are tried

– Very robustAt least one packet will have taken minimum hop count route

– Can be used to set up virtual circuitAll nodes are visited

– Useful to distribute information (e.g. routing)

Distance Vector Routing

Distance Vector: Each router sends a vector of

distances to its neighbors. The vector contains

distances to all nodes in the network.

Distance Vector Routing(2)

Each node maintains a set of triples

(Destination, Cost, NextHop)Exchange updates directly connected neighbors

periodically (on the order of several seconds<30s>)

whenever table changes (called triggered update)

Each update is a list of pairs:

(Destination, Cost)Update local table if receive a “better” route

Refresh existing routes; delete if they time out

Distance Vector Routing(3)

(a) A subnet. (b) Input from A, I, H, K, and the new routing table for J.

Distance Vector Routing (4)

The count-to-infinity problem.

Set infinity to 16

rapidly to good news, but leisurely to bad news.

Distance Vector Routing(5)

A

B

C

D

2 B

1 B

0 --

1 D

Dest Dist Nexthop

Route of C

A

B

C

D

1

0

1

Dest Dist

Vector to B

A

B

C

D

1

0

1

Dest Dist

Vector to D

Split Horizon :

A B C D

2

Distance Vector Routing(6)

Split Horizon :

A B C D E

1 2 3 4 initially

2 3 4 1 exchange

3 4 2 exchange

4 3 exchange

4 exchange

Distance Vector Routing(7)Split Horizon

Distance Vector Routing(8)

The problem is that when X tells Y that it has a path somewhere, Y has no way of knowing whether it itself is on the path

Link State Routing

Each router must do the following:

1. Discover its neighbors, learn their network address.

2. Measure the delay or cost to each of its neighbors.

3. Construct a packet telling all it has just learned.

4. Send this packet to all other routers.

5. Compute the shortest path to every other router.

Learning about the Neighbors It accomplishes this goal by sending a special HELLO packet on each point-to-point line. The router on the other end is expected to send back a reply telling who it is. These names must be globally unique

When two or more routers are connected by a LAN, the situation is slightly more complicated

Learning about the Neighbors(2)

(a) Nine routers and a LAN. (b) A graph model of (a).

Measuring Line Cost

The most direct way to determine this delay is to send

over the line a special ECHO packet that the other side

is required to send back immediately. By measuring the

round-trip time and dividing it by two, the sending router

can get a reasonable estimate of the delay

One issue is whether to take the load into account when

measuring the delay

Measuring Line Cost(2)

A subnet in which the East and West parts are connected by two lines.

Building Link State Packets

(a) A subnet. (b) The link state packets for this subnet.

Distributing the Link State Packets• Use flooding to distribute LSP• Each LSP labeled with a 32-bits sequence• Each LSP protected by a checksum • Each LSP stamped by a age

Distributing the LSPs Some refinements to this algorithm make it more robust. When a link state packet comes in

to a router for flooding, it is not queued for transmission immediately. Instead it is first put in a holding area to wait a short while

Distributing the Link State Packets(2)

The packet buffer for router B (Fig. 5-14).

Computing the New Route Use Dijkstra's algorithm

Examples of Link State Routing

OSPF(Open Shortest Path First)

IS-IS (Intermediate System-Intermediate System),

Hierarchical Routing

Hierarchical routing.

Congestion Control Algorithms

• General Principles of Congestion Control

• Congestion Prevention Policies

• Congestion Control in Virtual-Circuit Subnets

• Congestion Control in Datagram Subnets

• Load Shedding

• Jitter Control

Congestion

When too much traffic is offered, congestion sets in and performance degrades sharply.

Congestion Reason• Burst data

• packets come from different lines are routed to the same output line, have to be queued before sending

• If memory is insufficient, some packets will be lost

• Adding too much memory may gets worse

• Slow processors• Low bandwidth• Congestion tends to be spreaded

Comparison of congestion control and flow control

• Congestion control is a global issue, it concerns the carrying capacity of subnet

• Sometimes use feedback

• Flow control relates to the point-to-point traffic, it make sure that a fast sender cannot continually transmit data faster than the receiver is able to absorb it.

• Always use feedback

• A host can get a “slow down” indication either because of receiver or subnet

General Principles of Congestion Control

open loop

attempt to solve the problem by good design, in essence, to make sure it does not occur in the first place. Once the system is up and running, midcourse corrections are not made

closed loop

based on the concept of a feedback loop

explicit feedback, implicit feedback

General Principles of Congestion Control(closed loop)

1. Monitor the system .

– detect when and where congestion occurs.

2. Pass information to where action can be taken.

3. Adjust system operation to correct the problem.

Congestion Prevention Policies (open loop)

Policies that affect congestion.

5-26

Congestion Control in Virtual-Circuit Subnets

(a) A congested subnet. (b) A redrawn subnet, eliminates congestion and a virtual circuit from A to B.

Congestion Control in Datagrams Subnets

• Warning bit• Router in congestion set the warning bit in the packet’s header

• Choke packets• When the source host receive choke, it should reduce the traffic

sharply.

• If no choke packets arrive for a period, the host may increase the flow slowly.

Hop-by-Hop Choke Packets

(a) A choke packet that affects only the source.

(b) A choke packet that affects each hop it passes through.

Loading Shedding

When routers are being inundated by packets that they cannot handle,

they just throw them away.

(old is better than new) is often called wine and (new is better than old) is often called milk.

Jitter Control

The variation in the packet arrival times is called

jitter;

High jitter, for example, having some packets taking

20 msec and others taking 30 msec to arrive will give

an uneven quality to the sound or movie.

Jitter Control(2)

(a) High jitter. (b) Low jitter.

Quality of Service

• Requirements• Techniques for Achieving Good Quality of Service• Integrated Services• Differentiated Services• Label Switching and MPLS

Requirements

How stringent the quality-of-service requirements are.

5-30

Buffering

Smoothing the output stream by buffering packets.

The Leaky Bucket Algorithm

(a) Input to a leaky bucket. (b)Output from a leaky bucket.

The Leaky Bucket Algorithm

(a) A leaky bucket with water. (b) a leaky bucket with packets.

Traffic Shaping- The Token Bucket Algorithm

(a) A leaky bucket with water. (b) a leaky bucket with packets.

The Token Bucket Algorithm

Output from a token bucket with capacities of (c) 250 KB, (d) 500 KB, and (e) 750 KB.

Calculating the length of the maximum rate burst

If we call the burst length S sec, the token bucket capacity C bytes, the token arrival rate bytes/sec, and the maximum output rate M bytes/sec, we see that an output burst contains a maximum of C + S bytes. We also know that the number of bytes in a maximum-speed burst of length S seconds is MS. Hence we have:

C + S = MS

S = C/(M - ). For our parameters of C = 250 KB, M = 25 MB/sec, and =2 MB/sec, we get a burst time of about 11 msec

The Leaky Bucket +Token Bucket

Internetworking

• How Networks Differ

• Concatenated Virtual Circuits

• Connectionless Internetworking

• Tunneling

• Internetwork Routing

• Fragmentation

• Firewalls

Connecting Networks

A collection of interconnected networks.

How Networks Differ

Some of the many ways networks can differ.

How Networks Can Be Connected

(a) Two Ethernets connected by a switch. (b) Two Ethernets connected by routers.

Concatenated Virtual Circuits

Internetworking using concatenated virtual circuits.

Connectionless Internetworking

A connectionless internet.

Tunneling

Tunneling a packet from Paris to London.

Tunneling (2)

Tunneling a car from France to England.

Internetwork Routing

(a) An internetwork. (b) A graph of the internetwork.

interior gateway protocol

exterior gateway protocol

Fragmentation

(a) Transparent fragmentation. (b) Nontransparent fragmentation.

Fragmentation (2)

Fragmentation when the elementary data size is 1 byte.(a) Original packet, containing 10 data bytes.(b) Fragments after passing through a network with maximum

packet size of 8 payload bytes plus header.(c) Fragments after passing through a size 5 gateway.

The Network Layer in the Internet

• The IP Protocol

• IP Addresses

• Subnets

• Internet Control Protocols

• OSPF – The Interior Gateway Routing Protocol

• BGP – The Exterior Gateway Routing Protocol

• CIDR-Classless InterDomain Routing

• IPv6

Design Principles for Internet

1. Make sure it works.

2. Keep it simple.

3. Make clear choices.

4. Exploit modularity.

5. Expect heterogeneity.

6. Avoid static options and parameters.

7. Look for a good design; it need not be perfect.

8. Be strict when sending and tolerant when receiving.

9. Think about scalability.

10. Consider performance and cost.

Collection of Subnetworks

The Internet is an interconnected collection of many networks.

The IP Protocol

The IPv4 (Internet Protocol) header.

The IP Protocol (2)

Some of the IP options.

5-54

IP Addresses

IP address formats.

IP Addresses (2)

Special IP addresses.

Subnets

A campus network consisting of LANs for various departments.

Subnets (2)

A class B network subnetted into 64 subnets.

CIDR – Classless InterDomain Routing

A set of IP address assignments.

5-59

NAT – Network Address Translation

Placement and operation of a NAT box.

Internet Control Message Protocol

The principal ICMP message types.

5-61

ARP– The Address Resolution Protocol

Three interconnected /24 networks: two Ethernets and an FDDI ring.

Dynamic Host Configuration Protocol

Operation of DHCP.

OSPF – The Interior Gateway Routing Protocol

(a) An autonomous system. (b) A graph representation of (a).

OSPF (2)

The relation between ASes, backbones, and areas in OSPF.

OSPF (3)

The five types of OSPF messeges.

5-66

BGP – The Exterior Gateway Routing Protocol

(a) A set of BGP routers. (b) Information sent to F.

The Main IPv6 Header

The IPv6 fixed header (required).

Extension Headers

IPv6 extension headers.

5-69

Extension Headers (2)

The hop-by-hop extension header for large datagrams (jumbograms).

Extension Headers (3)

The extension header for routing.

top related