Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Kyung Hee University Part 4 : Network Layer. 2 Kyung Hee University Role and Position of Network Layer o Network layer in the Internet model is responsible.

Similar presentations


Presentation on theme: "1 Kyung Hee University Part 4 : Network Layer. 2 Kyung Hee University Role and Position of Network Layer o Network layer in the Internet model is responsible."— Presentation transcript:

1 1 Kyung Hee University Part 4 : Network Layer

2 2 Kyung Hee University Role and Position of Network Layer o Network layer in the Internet model is responsible for carrying a packet from one computer to another It is responsible for host-to-host delivery. o Position of network layer

3 3 Kyung Hee University Duties of Network Layer

4 4 Kyung Hee University Chapter 19 Host-to-host Delivery : Interworking, Addressing, and Routing

5 5 Kyung Hee University 19.1 Internetworks o The physical and data link layers of a network operate locally

6 6 Kyung Hee University Links in an Internetwork

7 7 Kyung Hee University Network Layer in an Internetwork

8 8 Kyung Hee University Network Layer at the Source

9 9 Kyung Hee University Network Layer at a Router

10 10 Kyung Hee University Network Layer at the Destination

11 11 Kyung Hee University Switching o Virtual circuit approach – relationship between all packets belonging to a message is preserved – a single route is chosen, and all packets take that route o Datagram approach – each packet is treated independently of all others – thus, packets in the same message can take different routes, and possibly arrive out of order

12 12 Kyung Hee University Datagram Approach

13 13 Kyung Hee University Internet as a Connectionless Network o In a connection-oriented service, the source first makes connection with the destination before sending a packet. They are sent on the same path in sequential order. o In a connectionless service, the network layer protocol treats each packet independently, with each packet having no relationship to any other packet.

14 14 Kyung Hee University 19.2 Addressing oFor a host to communicate with any other host Need a universal identification system Need to name each host oInternet address or IP address is a 32-bit address that uniquely defines a host or a router on the internet oThe IP addresses are unique in the sense that two devices can never have the same address. However, a device can have more one address.

15 15 Kyung Hee University Notation o Binary notation 01110101 1001010100011101 11101010 32 bit address, or a 4 octet address or a 4-byte address oDecimal point notation

16 16 Kyung Hee University Notation (cont’d) Hexadecimal Notation o Hexadecimal Notation - 8 hexadecimal digits - Used in network programming 0111 0101 1001 0101 0001 1101 1110 1010 75 95 1D EA 0x75951DEA

17 17 Kyung Hee University Classful Addressing oOccupation of address space In classful addressing, the address space is divided into five classes: A, B, C, D, and E. Finding the class in binary notation

18 18 Kyung Hee University Classful Addressing (cont’d) Finding the address class

19 19 Kyung Hee University Classful Addressing (cont’d) Finding the class in decimal notation

20 20 Kyung Hee University Example 4 oFind the class of each address: a.227.12.14.87 b.252.5.15.111 c.134.11.78.56 Solution a. The first byte is 227 (between 224 and 239); the class is D. b. The first byte is 252 (between 240 and 255); the class is E. c. The first byte is 134 (between 128 and 191); the class is B.

21 21 Kyung Hee University Netid and Hostid oEach IP address is made of two parts; netid and hostid. oNetid defines a network; hostid identifies a host on that network.

22 22 Kyung Hee University Netid and Hostid (cont’d) oIP addresses are divided into five different classes: A, B, C, D, and E

23 23 Kyung Hee University Classes and Blocks oBlocks in class A Class A is divided into 128 blocks with each block having a different netid. Millions of class A addresses are wasted.

24 24 Kyung Hee University Classes and Blocks (cont’d) o Class B is divided into 16,384 blocks with each block having a different netid Many class B addresses are wasted.

25 25 Kyung Hee University Classes and Blocks (cont’d) o Class C is divided into 2,097,152 blocks with each block having a different netid. The number of addresses in a class C block is smaller than the needs of most organizations

26 26 Kyung Hee University Classes and Blocks (cont’d) o Class D addresses are used for multicasting; there is only one block in this class. o Class E addresses are reserved for special purposes; most of the block is wasted.

27 27 Kyung Hee University Network Address o The network address is the first address. oThe network address defines the network to the rest of the Internet. o Given the network address, we can find the class of the address, the block, and the range of the addresses in the block o In classful addressing, the network address (the first address in the block) is the one that is assigned to the organization.

28 28 Kyung Hee University Network Address (cont’d) oNetwork address : an address with the hostid all set to 0s

29 29 Kyung Hee University A Sample Internet with Classful Address oToken Ring LAN (Class C), Ethernet LAN (Class B), Ethernet LAN (Class A), Point-to-point WAN, A Switched WAN

30 30 Kyung Hee University Subnetting and Supernetting oSubnetting A network is divided into several smaller networks with each subnetwork (or subnet) having its subnetwork address oSupernetting Combining several class C addresses to create a larger range of addresses o IP Addresses are designed with two levels of hierarchy

31 31 Kyung Hee University Subnetting oClasses A, B, C in IP addressing are designed with two levels of hierarchy (not subnetted) Netid and Hostid

32 32 Kyung Hee University Subnetting (cont’d) oFurther division of a network into smaller networks called subnetworks oR1 differentiating subnets

33 33 Kyung Hee University Subnetting (cont’d) oThree levels of hierarchy : netid, subnetid, and hostid

34 34 Kyung Hee University Subnetting (cont’d) oThree steps of the routing for an IP datagram Delivery to the site, delivery to the subnetwork, and delivery to the host oHierarchy concept in a telephone number 031

35 35 Kyung Hee University Default Masks o Class In Binary In Dotted- Decimal Using Slash A 11111111 00000000 00000000 00000000255.0.0.0/8 B 11111111 11111111 00000000 00000000255.255.0.0/16 C 11111111 111111111 11111111 00000000255.255.255.0/24 When a router receives a packet, it needs to route it Uses mask to determine the subnetwork address Routers outside the organization use default mask Routers inside use a subnet mask

36 36 Kyung Hee University Comparison of a default mask and a subnet mask o Number of subnets is determined by number of extra 1s in the subnet mask. 2 n = 2 3 = 8 subnets

37 37 Kyung Hee University Supernetting oA block of class x addresses oFor example, An organization that needs 1,000 addresses can be granted four class C addresses

38 38 Kyung Hee University Supernetting (cont’d) o4 class C addresses combine to make one supernetwork

39 39 Kyung Hee University 19.3 Routing o Next-hop routing

40 40 Kyung Hee University Routing (cont’d) o Network-specific routing Don’t have an entry for every host connected to the same physical network Instead, only have one entry to define the destination network

41 41 Kyung Hee University Routing (cont’d) o Host-specific routing

42 42 Kyung Hee University Routing (cont’d) o Default routing

43 43 Kyung Hee University Static and Dynamic Routing Tables o Static routing table : containing information entered manually o Dynamic routing table updating periodically using one of the dynamic routing protocols such as RIP, OSPF, or BGP Whenever there is a change in the Internet, the dynamic routing protocols update all the tables in the routers.

44 44 Kyung Hee University 20.2 IP datagram

45 45 Kyung Hee University IP Datagram (cont’d) o Version : for IP version4, it is 4 o Header Length : Defining the length of the datagram header in 4 byte words

46 46 Kyung Hee University IP Datagram (cont’d) o Differentiated Services The first 6 bits : codepoint subfield (DSCP : differentiated services code point) Values for codepoints CategoryCodepointAssigning Authority 1XXXXX0Internet 2XXXX11Local 3XXXX01Temporary or experiment

47 47 Kyung Hee University IP Datagram (cont’d) oTotal Length : head + data Defining the total length of the datagram including the header Length of data = total length – header length Limited to 65,535 (2 16 – 1) bytes Encapsulation of a small datagram in an Ethernet Frame

48 48 Kyung Hee University IP Datagram (cont’d) oFields related to fragmentation Identification : 16 bit-field l Datagram id that is originated by the source host – Therefore, Source IP address + datagram id (identification) l All fragments having same identification number l Identification No. to be used for the destination in reassembling the datagram Flags : 3 bit-field l D : Do not fragment (1) – If it can not pass the datagram through any available physical network, it discards the datagram and send ICMP error message to the source host l M : More fragment (0) – 0 : last fragment or only fragment

49 49 Kyung Hee University IP Datagram (cont’d) oFragmentation offset : 13-bit field Showing relative position of this fragment with respect to the whole datagram Measured in units of 8 bytes : forcing hosts or routers that fragment datagrams to choose the size of each fragment so that the first byte number is divisible by eight

50 50 Kyung Hee University IP Datagram (cont’d) Time to live l Used to control the maximum number of hops (routers) visited by the datagram l If the value is Zero, the routers discarded l If the source wants to confine the packet to the local network, it can store 1 in this field

51 51 Kyung Hee University IP Datagram (cont’d) o Fragmentation The format and size of the received frame depend on the protocol used by the physical network * MTU (Maximum Transfer Unit) : When a datagram is encapsulated in a frame, the total size of the datagram must be less than this maximum size

52 52 Kyung Hee University IP Datagram (cont’d) o MTUs for different networks ProtocolMTU Hyperchannel65,535 Token ring (16Mbps)17,914 Token ring (4Mbps)4,464 FDDI4,352 Ethernet1,500 X.25576 PPP296 Hyperchannel : Network Systems Corporation, 1988 (RFC 1044)

53 53 Kyung Hee University IP Datagram (cont’d) ValueProtocol 1ICMP 2IGMP 6TCP 8EGP 17UDP 89 OSPF o Protocol Defining the higher level protocol that uses the services of the IP layer l TCP, UDP, ICMP, and IGMP l Multiplexing data from different higher level protocols

54 54 Kyung Hee University IP Datagram (cont’d) o Example of Checksum Calculation

55 55 Kyung Hee University

56 56 20.4 IPv6 Address o IPv6 address consists of 16 octets; it is 128 bits long


Download ppt "1 Kyung Hee University Part 4 : Network Layer. 2 Kyung Hee University Role and Position of Network Layer o Network layer in the Internet model is responsible."

Similar presentations


Ads by Google