Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 5 The Network Layer.

Similar presentations


Presentation on theme: "Chapter 5 The Network Layer."— Presentation transcript:

1 Chapter 5 The Network Layer

2 Highlights Network Layer Design Issues Routing Algorithms
Congestion Control Algorithms Quality of Service Internetworking The Network Layer in the Internet(ip)

3 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

4 Store-and-Forward Packet Switching
fig 5-1 The environment of the network layer protocols.

5 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)

6 Implementation of Connectionless Service
Routing within a diagram subnet.

7 Datagram(2) B B.1 B.3 B.2 B.3 B.2 B.1 A C.3 C.2 C.1 C.3 C.1 C.2 C B
4 C.1 A 1 B.1 3 5 C.3 C.2 C

8 Implementation of Connection-Oriented Service
Routing within a virtual-circuit subnet.

9 Virtual Circuit(2) vc1: A--1--2--4--B vc2: A--1--3--5--C vc1 vc2 1.1
1.3 1.2 1.1 1.3 1.2 1.1 A 2.3 2.2 2.1 2.3 2.2 2.1 C vc1 B vc1: A B vc2: A C 2 4 A 1 3 5 vc2 C

10 Comparison of Virtual-Circuit and Datagram Subnets
5-4

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

12 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.

13 Routing Algorithms(3) simplicity robustness stability fairness
properties are desirable in a routing algorithm: correctness simplicity robustness stability fairness optimality

14 Conflict between fairness and optimality.
Routing Algorithms (4) Conflict between fairness and optimality.

15 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.

16 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 r1 J rx r1+r2 r1+rx r2 K

17 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

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

19 Example of SP N D(B) D(C) D(D) D(E) D(F) D(G) D(H) Initially { A }
     { A, B }    { 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 }

20 Example of SP(2) Route Table of Node A Shortest Path Dest Next-hop B B
C B D B C E B F B A E F D G B H B G H

21 Flooding No 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

22 Flooding Example

23 Properties of Flooding
All possible routes are tried Very robust At least one packet will have taken minimum hop count route Can be used to set up virtual circuit All nodes are visited Useful to distribute information (e.g. routing)

24 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.

25 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

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

27 Distance Vector Routing (4)
rapidly to good news, but leisurely to bad news. The count-to-infinity problem. Set infinity to 16

28 Distance Vector Routing(5)
 Split Horizon: A B C D Route of C Vector to B Vector to D Dest Dist Nexthop Dest Dist Dest Dist A B A A 2 B B B 1 B 1 C C C D D D 1 D 1

29 Distance Vector Routing(6)
 Split Horizon: A B C D E initially  exchange   exchange    exchange     exchange

30 Distance Vector Routing(7)
Split Horizon

31 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

32 Link State Routing Each router must do the following:
Discover its neighbors, learn their network address. Measure the delay or cost to each of its neighbors. Construct a packet telling all it has just learned. Send this packet to all other routers. Compute the shortest path to every other router.

33 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

34 Learning about the Neighbors(2)
(a) Nine routers and a LAN. (b) A graph model of (a).

35 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

36 A subnet in which the East and West parts are connected by two lines.
Measuring Line Cost(2) A subnet in which the East and West parts are connected by two lines.

37 Building Link State Packets
(a) A subnet. (b) The link state packets for this subnet.

38 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

39 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

40 Distributing the Link State Packets(2)
The packet buffer for router B (Fig ).

41 Computing the New Route
Use Dijkstra's algorithm

42 Examples of Link State Routing
OSPF(Open Shortest Path First) IS-IS (Intermediate System-Intermediate System),

43 Hierarchical Routing Hierarchical routing.

44 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

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

46 Congestion Reason Burst data Slow processors Low bandwidth
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

47 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

48 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

49 General Principles of Congestion Control (closed loop)
Monitor the system . detect when and where congestion occurs. Pass information to where action can be taken. Adjust system operation to correct the problem.

50 Congestion Prevention Policies (open loop)
5-26 Policies that affect congestion.

51 Congestion Control in Virtual-Circuit Subnets
(a) A congested subnet. (b) A redrawn subnet, eliminates congestion and a virtual circuit from A to B.

52 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.

53 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.

54 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.

55 Jitter Control The variation in the packet arrival times is called
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.

56 Jitter Control(2) (a) High jitter (b) Low jitter.

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

58 How stringent the quality-of-service requirements are.
5-30 How stringent the quality-of-service requirements are.

59 Smoothing the output stream by buffering packets.

60 The Leaky Bucket Algorithm
(a) Input to a leaky bucket. (b)Output from a leaky bucket.

61 The Leaky Bucket Algorithm
(a) A leaky bucket with water. (b) a leaky bucket with packets.

62 Traffic Shaping- The Token Bucket Algorithm
(a) A leaky bucket with water. (b) a leaky bucket with packets.

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

64 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 r bytes/sec, and the maximum output rate M bytes/sec, we see that an output burst contains a maximum of C + rS bytes. We also know that the number of bytes in a maximum-speed burst of length S seconds is MS. Hence we have: C + rS = MS S = C/(M - r). For our parameters of C = 250 KB, M = 25 MB/sec, and r=2 MB/sec, we get a burst time of about 11 msec

65 The Leaky Bucket +Token Bucket

66 Internetworking How Networks Differ Concatenated Virtual Circuits
Connectionless Internetworking Tunneling Internetwork Routing Fragmentation Firewalls

67 A collection of interconnected networks.
Connecting Networks A collection of interconnected networks.

68 Some of the many ways networks can differ.
How Networks Differ Some of the many ways networks can differ.

69 How Networks Can Be Connected
(a) Two Ethernets connected by a switch. (b) Two Ethernets connected by routers.

70 Concatenated Virtual Circuits
Internetworking using concatenated virtual circuits.

71 Connectionless Internetworking
A connectionless internet.

72 Tunneling a packet from Paris to London.

73 Tunneling a car from France to England.

74 Internetwork Routing An internetwork. (b) A graph of the internetwork.
interior gateway protocol exterior gateway protocol

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

76 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.

77 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

78 Design Principles for Internet
Make sure it works. Keep it simple. Make clear choices. Exploit modularity. Expect heterogeneity. Avoid static options and parameters. Look for a good design; it need not be perfect. Be strict when sending and tolerant when receiving. Think about scalability. Consider performance and cost.

79 Collection of Subnetworks
The Internet is an interconnected collection of many networks.

80 The IPv4 (Internet Protocol) header.
The IP Protocol The IPv4 (Internet Protocol) header.

81 The IP Protocol (2) 5-54 Some of the IP options.

82 IP Addresses IP address formats.

83 IP Addresses (2) Special IP addresses.

84 A campus network consisting of LANs for various departments.
Subnets A campus network consisting of LANs for various departments.

85 A class B network subnetted into 64 subnets.

86 CIDR – Classless InterDomain Routing
5-59 A set of IP address assignments.

87 NAT – Network Address Translation
Placement and operation of a NAT box.

88 Internet Control Message Protocol
5-61 The principal ICMP message types.

89 ARP– The Address Resolution Protocol
Three interconnected /24 networks: two Ethernets and an FDDI ring.

90 Dynamic Host Configuration Protocol
Operation of DHCP.

91 OSPF – The Interior Gateway Routing Protocol
(a) An autonomous system. (b) A graph representation of (a).

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

93 The five types of OSPF messeges.
5-66 The five types of OSPF messeges.

94 BGP – The Exterior Gateway Routing Protocol
(a) A set of BGP routers (b) Information sent to F.

95 The IPv6 fixed header (required).
The Main IPv6 Header The IPv6 fixed header (required).

96 Extension Headers 5-69 IPv6 extension headers.

97 The hop-by-hop extension header for large datagrams (jumbograms).
Extension Headers (2) The hop-by-hop extension header for large datagrams (jumbograms).

98 The extension header for routing.
Extension Headers (3) The extension header for routing.


Download ppt "Chapter 5 The Network Layer."

Similar presentations


Ads by Google