Presentation is loading. Please wait.

Presentation is loading. Please wait.

(C) All rights reserved by Professor Wen-Tsuen Chen1 ä The Network Layer deals with the end-to-end transmission of packets, possibly making many hops at.

Similar presentations


Presentation on theme: "(C) All rights reserved by Professor Wen-Tsuen Chen1 ä The Network Layer deals with the end-to-end transmission of packets, possibly making many hops at."— Presentation transcript:

1 (C) All rights reserved by Professor Wen-Tsuen Chen1 ä The Network Layer deals with the end-to-end transmission of packets, possibly making many hops at intermediate routers along the way. ä Types of subnet í Datagram (connectionless) í Virtual circuit (connection-oriented) ä Services provided í Connectionless: e.g. UDP í Connection-oriented: e.g. TCP Chapter 5 The Network Layer © All rights reserved. No part of these slides may be reproduced, in any form or by any means, without permission in writing from form or by any means, without permission in writing from Professor Wen-Tsuen Chen ( Professor Wen-Tsuen Chen (

2 (C) All rights reserved by Professor Wen-Tsuen Chen2

3 3

4 4 Design Issues: ä Routing ä Congestion Control ä Internetworking ä Examples: î The Network Layer in the Internet í The Network Layer in ATM networks

5 (C) All rights reserved by Professor Wen-Tsuen Chen5 Routing ä Requirements for routing ä Correctness ä Fairness ä Simplicity ä Optimality ä Robustness ä Efficiency ä Stability

6 (C) All rights reserved by Professor Wen-Tsuen Chen6 Types of Routing ä Static routing: í routes to destinations is predetermined and is not dependent on the current state (traffic, topology etc.) of the network. ä Dynamic routing (Adaptive routing): í routes being learned via exchange of routing information to reflect changes in the topology and traffic. ä Default Routing: í Traffic to destinations that are unknown to the router is sent to a default “outlet”.

7 (C) All rights reserved by Professor Wen-Tsuen Chen7 The Optimality Principle ä 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. ä This implies that the set of optimal routes from all sources to a destination form a tree, called a sink tree, rooted at the destination. ä The goal of all routing algorithms is to discover and use the sink trees for all routers.

8 (C) All rights reserved by Professor Wen-Tsuen Chen8 The goal of all routing algorithms is to discover and use the sink trees for all routers.

9 (C) All rights reserved by Professor Wen-Tsuen Chen9 Static Routing Algorithms ä Find the shortest path between a given pair of routers. ä Cost of a link may be a function of the distance, bandwidth, average traffic, communication cost, mean queue length, delay. etc. ä Use Dijkstra’s algorithm Shortest Path Routing

10 (C) All rights reserved by Professor Wen-Tsuen Chen10

11 (C) All rights reserved by Professor Wen-Tsuen Chen11 Dijkstra’s algorithm to compute the shortest path

12 (C) All rights reserved by Professor Wen-Tsuen Chen12 Flooding ä Every incoming packet is sent out on every outgoing line except the one it arrived on. ä Generate vast numbers of duplicate packets ä For robustness ä Concurrent updates of databases ä Shortest path is always choosed

13 (C) All rights reserved by Professor Wen-Tsuen Chen13 Flow-Based Routing

14 (C) All rights reserved by Professor Wen-Tsuen Chen14

15 (C) All rights reserved by Professor Wen-Tsuen Chen15 Dynamic Routing Algorithms ä Distance Vector Routing í Distributed routing algorithms, first used in APPANET until í Used in RIP (Routing Information Protocol) and BGP (Border Gateway Protocol) ä Routing Algorithm: í Each router maintains a routing table (i.e, a vector) giving the best known distance (number of hops, delay, queue length) to each destination and which link is used to get there. í These tables are updated by exchanging information with the (adjacent) neighbors.

16 (C) All rights reserved by Professor Wen-Tsuen Chen16 ä To determine the best link from router i to the destination j : í For each adjacent router k of router i, compute X ik +X kj, where X ik is the distance newly measured by router i and X kj is the most current distance computed by router k and sent to router j. í The best link is (i,k) such that X ik +X kj is minimum among all adjacent routers.

17 (C) All rights reserved by Professor Wen-Tsuen Chen17

18 (C) All rights reserved by Professor Wen-Tsuen Chen18 The Count-to-Infinity Problem (cont.)

19 (C) All rights reserved by Professor Wen-Tsuen Chen19 ä The distance vector algorithm reacts rapidly to good news, but leisurely to bad news. In Fig. 5-11(a), A is down initially and them comes up. In Fig. 5-11(b), A goes down. ä Due to its slow convergence, it is usually used in small networks. ä In RIP, the metric of distance is hop counts. A finite limit of hops (15) is used, after which a route is considered unreachable. The Count-to-Infinity Problem

20 (C) All rights reserved by Professor Wen-Tsuen Chen20 Link State Routing ä First used in ARPANET since ä Used in IS-IS (Intermediate System - Intermediate System), which was designed for DECnet and later adopted by ISO for the connectionless network layer protocol CLNP. IS-IS is also used in IP, CDPD, IPX. ä Also used in OSPF (Open Shortest Path First) interior routing protocol.

21 (C) All rights reserved by Professor Wen-Tsuen Chen21 Routing Algorithm For each router: Step 1. Discover its neighbors and learn their network addresses. Step 2. Measure the delay or cost to each of its neighbors. Step 3. Construct a link state packet.

22 (C) All rights reserved by Professor Wen-Tsuen Chen22 Step 4. Broadcast the link state packet to all other routers ä Sequence number: For discarding duplicates ä Age: Decreased once per second and discarded if the age hits zero. When a router is down, its link state packet will age out. ä Send flags: The packet must be sent on the indicated line. ä Acknowledgement flags: It must be acknowledged at the indicated routers.

23 (C) All rights reserved by Professor Wen-Tsuen Chen23 Step 5. Construct a new routing table ä Once the router has a full set of link state packets, it knows all the link states in the network. ä Use Dijkstra’s algorithm to compute the shortest path to all possible destinations. ä Update the routing table.

24 (C) All rights reserved by Professor Wen-Tsuen Chen24 Hierarchical Routing ä To avoid router routing tables grow too large as networks grow in size.

25 (C) All rights reserved by Professor Wen-Tsuen Chen25 Autonomous Systems in the Internet ä An autonomous system is a set of routers having a single routing policy, running under a single technical administration. ä Interior Gateway Protocol vs.Exterior Gateway Protocol. ä BGP4 is the de facto standard for exterior gateway protocol in the Internet. ä The main goal of an interior gateway protocol is to route efficiently, while the exterior gateway protocols have to worry about “politics”.

26 (C) All rights reserved by Professor Wen-Tsuen Chen26 Routing for Mobile Hosts ä Mobility Support

27 (C) All rights reserved by Professor Wen-Tsuen Chen27 Broadcast Routing ä Flooding ä Multi-destination routing í Each packet contains a list of desired destinations. í When a packet arrives, the router checks all the destinations to determine the set of output lines for forwarding the packet. An output line is selected if it is the best route to at least one of the destinations. í The router generates a new copy of the packet for selected output line, with a set of destinations that are to use the line.

28 (C) All rights reserved by Professor Wen-Tsuen Chen28 Spanning Tree Routing ä Assume each router has knowledge of a spanning tree (e.q. a sink tree) in the network. ä Each router copies an incoming broadcast packet onto all the spanning tree lines except the one it arrives on. ä Use minimum number of packets.

29 (C) All rights reserved by Professor Wen-Tsuen Chen29 Reverse Path Forwarding H

30 (C) All rights reserved by Professor Wen-Tsuen Chen30 ä No knowledge of a spanning tree. ä When a broadcast packet arrives at a router, on the line that is normally used for sending packets to the source of the broadcast (It is very likely that this is the first copy to arrive at the router). ä If so, forward the packet onto all lines except the one it arrived on; otherwise, discard it as a likely duplicate.

31 (C) All rights reserved by Professor Wen-Tsuen Chen31 Multicast Routing ä Each router computes a spanning tree covering all other routers in the subnet. ä When a multicast packet for a group arrives, the first router examines its spanning tree and prunes it, removing all lines that do not lead to hosts in the group. ä Multicast packets are forwarded only along the pruned tree. ä For a network of n groups, each with an average of m members, nm trees must be stored.

32 (C) All rights reserved by Professor Wen-Tsuen Chen32

33 (C) All rights reserved by Professor Wen-Tsuen Chen33 Core-base Tree for Multicast Routing ä A spanning tree for a group, with the root ( the core) near the middle of the group. ä To send a multicast packet, send it to the core, which then does the multicast along the spanning tree. ä The tree is not optimal. However only n trees need to be stored. ä RFC 2189, 2201.

34 (C) All rights reserved by Professor Wen-Tsuen Chen34 Congestion Control

35 (C) All rights reserved by Professor Wen-Tsuen Chen35 Policies that Affect Congestion

36 (C) All rights reserved by Professor Wen-Tsuen Chen36 Congestion Control Schemes ä Traffic Shaping ç Forcing the packets to transmitted at a more predicatable rate. ä Admission Control ç usually used in virtual circuit subnets, such as ATM networks. ç A virtual circuit is admitted only when it will not cause congestion.

37 (C) All rights reserved by Professor Wen-Tsuen Chen37 Congestion Control Schemes (cont.) ä Choke Packets ä If congested, the router sends a choke packets back to the source, with the packet destination. ä When the source gets the choke packet, it is required to reduce the traffic send to the specified destination by a certain percent. ä Load shedding ä Drop packets when routers are over drown.

38 (C) All rights reserved by Professor Wen-Tsuen Chen38 Internetworking ä Repeaters ä Bridges ä Multiprotocol Routers ä Transport gateways ä Application gateways

39 (C) All rights reserved by Professor Wen-Tsuen Chen39

40 (C) All rights reserved by Professor Wen-Tsuen Chen40

41 (C) All rights reserved by Professor Wen-Tsuen Chen41 Two Styles of Internetworking

42 (C) All rights reserved by Professor Wen-Tsuen Chen42

43 (C) All rights reserved by Professor Wen-Tsuen Chen43 Tunneling Packets ä Using encapsulation of IP packets

44 (C) All rights reserved by Professor Wen-Tsuen Chen44 Internetwork Routing ä Interior gateway protocol vs. Exterior gateway protocol

45 (C) All rights reserved by Professor Wen-Tsuen Chen45 Fragmentation ä IP protocol uses nontransparent fragmentation scheme.

46 (C) All rights reserved by Professor Wen-Tsuen Chen46 Firewalls ä Packet filter router is a router equipped with some extra functionality that allows every incoming or outgoing packet to be inspected. ä Application gateway (e.g.a mail gateway) may examine headers and/or contents of messages.

47 (C) All rights reserved by Professor Wen-Tsuen Chen47 The Network Layer in the Internet

48 (C) All rights reserved by Professor Wen-Tsuen Chen48

49 (C) All rights reserved by Professor Wen-Tsuen Chen49 The IP Protocol ä IHL: Header length in 32 bit words. ä Type of Service: Contains three-bit precedence field (packet priority), three flags, D(delay), T(throughput),and R(reliability), and 2 unused bits. ä Total length: Length of header plus data with the maximum length 64K bytes. ä Identification: To identify a datagram that the fragment belongs to.

50 (C) All rights reserved by Professor Wen-Tsuen Chen50 ä DF: Don’t fragment. ä MF: More fragment. ä Fragment Offset: Position of the fragment in the datagram.All fragments except the last one must be a multiple of 8 bytes. ä Time to live: Packet lifetimes in seconds. Decremted on each hop and in queue in a router. ä Protocol: Indicate the transport process that a datagram is given to. ä Header checksum: One’s complement computation on the header. ä Source address and Destination address indicate the network number and host number.

51 (C) All rights reserved by Professor Wen-Tsuen Chen51 Options

52 (C) All rights reserved by Professor Wen-Tsuen Chen52 IP Addressing ä Network numbers are assigned by the NIC (Network Information Center) to avoid conflicts. ä NIC: InterNIC in US, RIPE in Europe,and APNIC (in Asia Pacific rim). ä Each router only has to keep track of other network and local hosts, not(network,host) pairs,greatly reducing the size of its routing table.

53 (C) All rights reserved by Professor Wen-Tsuen Chen53

54 (C) All rights reserved by Professor Wen-Tsuen Chen54 Subneting ä Splitting a network into several subnets for internal use, but the network acts as a single network to the outside world. ä To reduce the size of the routing tables. An entry in a routing table is of the form(this-network, subnet, 0) and (this-network, this-subnet, host).

55 (C) All rights reserved by Professor Wen-Tsuen Chen5550,00040,000 30,000 20,000 10, ,500 20,500 34,000 42, Routing Table Growth Number of routes in the internet

56 (C) All rights reserved by Professor Wen-Tsuen Chen56 CIDR:Classless Inter-Domain Routing ä To solve the IP address depletion problem and the routing table explosion problem ä RFC 1519 ä The Basic idea behind CIDR is to allocate the remaining class C networks in variable size blocks ä The world was partitioned into zones, each given a portion of the class C address space: Addresses to for Europe Addresses to for Europe Addresses to for Others Addresses to for Others Addresses to for North America Addresses to for North America Addresses to for Central and South America Addresses to for Central and South America Addresses to for Asia and Pacific Addresses to for Asia and Pacific Addresses to for Others Addresses to for Others Addresses to reserved for future use Addresses to reserved for future use

57 (C) All rights reserved by Professor Wen-Tsuen Chen57 ä The address entry in a CIDR routing table contains a base address and a variable length mask.For example 2048 addresses from to ä base address: mask: mask: ie or /21 ie or /21

58 (C) All rights reserved by Professor Wen-Tsuen Chen58 Class C: Mask Mask Prefix Prefix length Supernet Natural mask / /16 A network is called a supernet when the prefix boundary contains fewer bits than the network’s natural mask.

59 (C) All rights reserved by Professor Wen-Tsuen Chen59 IP Address Allocation ä Class A address allocation is restricted. ä Class B address are also restricted.They will be allocated only if the need for them is justified. ä class C addresses are allocated with a contiguous block of addresses which consists of several contiguous class C addresses.Class C addresses are being distributed to ISPs so that the allocation could last at least two years. ä If a subscriber has a requirement for more than 4096 IP address, a Class B network number may be allocated. ä Organizations are encouraged to use Variable Length Subnet Mask for efficient use of address space.

60 (C) All rights reserved by Professor Wen-Tsuen Chen60 Internet Control Protocols ä I CMP(Internet Control Message Protocol) ä RFC 792 ä ARP(Address Resolution Protocol) ä RFC 826 ä For an IP address, find its hardware address. ä RARP ä RFC 903 ä For a hardware address, find its IP address. ä RARP server is needed on each network. ä Bootp ä RFC 951,1048,1084….

61 (C) All rights reserved by Professor Wen-Tsuen Chen61 Internet Control Message Protocol ä To report unexpected events or test the Internet

62 (C) All rights reserved by Professor Wen-Tsuen Chen62

63 (C) All rights reserved by Professor Wen-Tsuen Chen63 RARP:Reverse Address Resolution Protocol ä Allow a newly-booted (diskless) workstation (with a DLL address) to discover its IP address ä Need a RARP server on each network ä Bootp: ä Use UDP messages which are forwarded over routers to find the file server that holds the mapping

64 (C) All rights reserved by Professor Wen-Tsuen Chen64 ARP: Address Resolution Protocol ä To map an IP address onto data link layer address, such as Ethernet. ä An IP host runs the ARP protocol to inquiry the unknown data link layer address of a destination IP address before a datagram is sent. ä The ARP of a host may maintain a cache to record known IP address and DLL address pairs. ä The ARP may broadcast its own mapping when it boots.


Download ppt "(C) All rights reserved by Professor Wen-Tsuen Chen1 ä The Network Layer deals with the end-to-end transmission of packets, possibly making many hops at."

Similar presentations


Ads by Google