Looking for a Tutor Near You?

Post Learning Requirement »
x
x

Direction

x

Ask a Question

x

Hire a Tutor

Network Layer: Internet Protocol

Loading...

Published in: Networking
6,672 Views

In this PPT, we discuss internetworking, connecting networks together to make an internetwork or the internet. 

Muhammad R / Dubai

4 years of teaching experience

Qualification: Bachelor of Science, CCNA Certified, Nebosh Certified, Flash Certified.

Teaches: CCNA Certification, Flash, Networking, Graphic Design, Computer, Science, Maths, Computer Science, Mathematics, Physics

Contact this Tutor
  1. 20.1 Data Communications Forouzan and Networking Fourth Edition Chapter 20 Network Layer: Internet Protocol Copyright O The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
  2. 20-1 INTERNETWORKING In this section, we discuss internetworking, connecting networks together to make an internetwork or an internet. Topics discussed in this section: Need for Network Layer Internet as a Datagram Network Internet as a Connectionless Network 20.2
  3. Figure 20.1 Data link Links between two hosts Sl Data link Physical Physical Hop-to-hop delivery Link 1 LAN Sl fl f3 f2 LAN 20.3 Hop-to-hop delivery WAN Link 2 fl fl f2 f2 Hop-to-hop delivery LAN LAN Link 3 D
  4. Figure 20.2 Network layer in an internetwork Network Data link Physical LAN Network Data link Physical fl f3 f2 LAN WAN fl fl f2 f2 LAN LAN Host-to-host path 20.4
  5. Figure 20.3 Network layer at the source, router, and destination Data from another protocol Source Destination Processing To data link layer Routing ta ble IP packet and routing information Network layer Data to another protocol Processing packet Network laye r From data link layer a. Network layer at source 20.5 b. Network layer at destination
  6. Figure 20.3 Network layer at the source, router, and destination (continued) Router Routing table Processing IP packet packet From data link layer and routing information I Network layer To data link layer c. Network layer at a router 20.6
  7. Note Switching at the network layer in the Internet uses the datagram approach to packet switching. 20.7
  8. Note Communication at the network layer in the Internet is connectionless. 20.8
  9. 20-2 IPv4 The Internet Protocol version 4 ( ) is the delivery IPv4 mechanism used by the TCP/IP protocols. Topics discussed in this section: Datagram Fragmentation Checksum Options 20.9
  10. Figure 20.4 Position ofIPv4 in TCP/IP protocol suite Application layer Transport layer Network layer Data link layer Physical layer 20.10 SCTP TCP I pv4 Underlying LAN or WAN technology UDP
  11. Figure 20.5 VER 4 bits IPv4 datagram format 20-65,536 bytes 20-60 bytes I-ILEN 4 bits Header Service 8 bits Data Flags 3 bits Identification 16 bits Time to live 8 bits 20.11 Total length 16 bits Fragmentation offset 13 bits Header checksum 16 bits Protocol 8 bits Source IP address Destination IP address Option 32 bits
  12. Figure 20.6 Service type or differentiated services D: Minimize delay R: Maximize reliability T: Maximize throughput C: Minimize cost Precedence TOS bits Codepoint Differentiated services Service type 20.12
  13. Note The precedence subfield was part of version 4, but never used. 20.13
  14. Table 20.1 Types of service TOS Bits 0000 0001 0010 0100 1000 20.14 Description Normal (default) Minimize cost Maximize reliability Maximize throughput Minimize delay
  15. Table 20.2 Protocol ICMP BOOTP NNTP IGP SNMP TELNET FTP (data) FTP (control) TFTP Default types QT service SMTP (command) SMTP (data) DNS (UDP query) DNS (TCP query) DNS (zone) 20.15 TOS Bits 0000 0000 0001 0010 0010 1000 0100 1000 1000 1000 0100 1000 0000 0100 Description Normal Normal Minimize cost Maximize reliability Maximize reliability Minimize delay Maximize throughput Minimize delay Minimize delay Minimize delay Maximize throughput Minimize delay Normal Maximize throughput
  16. Table 20.3 Values for codepoints Value 1 2 6 17 89 20.16 Protocol ICMP IGMP TCP UDP OSPF
  17. Note The total length field defines the total length of the datagram including the header. 20.17
  18. Figure 20.7 Encapsulation of a small datagram in an Ethernet frame Length: Minimum 46 bytes Data < 46 bytes Header 20.18 Padding Trailer
  19. Figure 20.8 Protocol field and encapsulated data Transport layer ICMP Network layer 20.19 SCTP IGMP Header TCP UDP OSPF The value of the protocol field defines to which protocol the data belong.
  20. Table 20.4 Protocol values Value 1 2 6 17 89 20.20 Protocol ICMP IGMP TCP UDP OSPF
  21. Example 20.1 An IPv4 packet has arrived with the first 8 bits as shown: 01000010 The receiver discards the packet. Why? Solution There is an error in this packet, The 4 leftmost bits (0100) show the version, which is correct, The next 4 bits (0010) show an invalid header length (2 x 4 = 8), The minimum number of bytes in the header must be 20, The packet has been corrupted in transmission, 20.21
  22. Example 20.2 In an IPv4 packet, the value of HLEN is 1000 in binary. How many bytes of options are being carried by this packet? Solution The HLEN value is 8, which means the total number of bytes in the header is 8 x 4, or 32 bytes, The first 20 bytes are the base header, the next 12 bytes are the options, 20.22
  23. Example 20.3 In an IPv4 packet, the value of HLEN is 5, and the value of the total length field is Ox0028. How many bytes of data are being carried by this packet? Solution The HLEN value is 5, which means the total number of bytes in the header is 5 x 4, or 20 bytes (no options), The total length is 40 bytes, which means the packet is carrying 20 bytes of data (40 — 20), 20.23
  24. Example 20.4 An IPv4 packet has arrived with the first few hexadecimal digits as shown. ox45000028000100000102 . . , How many hops can this packet travel before being dropped? The data belong to what upper-layer protocol? Solution To find the time-to-live field, we skip 8 bytes, The time-to- live field is the ninth byte, which is 01, This means the packet can travel only one hop, The protocol field is the next byte (02), which means that the upper-layer protocol is IGM2 20.24
  25. Figure 20.9 Maximum transfer unit (MTU) IP datagram [VITU Header Maximum length of data to be encapsulated in a frame Frame 20.25 Trailer
  26. Table 20.5 MTUs for some networks Protocol Hyperchannel Token Ring (16 Mbps) Token Ring (4 Mbps) FDDI Ethernet x.25 PPP 20.26 MTU 65,535 17,914 4,464 4,352 1,500 576 296
  27. Figure 20.10 Flags used in fragmentation D 20.27 D: Do not fragment M M: More fragments
  28. Figure 20.11 Fragmentation example -o Offset = 0000/8 Byte 0000 20.28 0000 1 400 Byte 3999 2800 Offset — 0000/8 - o 1 399 Offset — - 1400/8 = 175 2799 Offset = 2800/8 = 350 3999
  29. Figure 20.12 Detailed fragmentation example 1 4,567 1420 1 000 Bytes 0000-1399 Fragment 1 1 4,567 820 175 1 4,567 4020 0 000 1 4,567 1420 175 Bytes 1400-2199 Fragment 2.1 1 4,567 620 275 Bytes 0000-3999 Original datagram 20.29 Bytes 1400-2799 Fragment 2 14,567 1220 0 350 Bytes 2200-2799 Fragment 2.2 Bytes 2800-3999 Fragment 3
  30. Example 20.5 A packet has arrived with an M bit value of 0. Is this the first fragment, the last fragment, or a middle fragment? Do we know if the packet was fragmented? Solution If the M bit is 0, it means that there are no more fragments; the fragment is the last one, However, we cannot say if the original packet was fragmented or not, A non-fragmented packet is considered the last fragment, 20.30
  31. Example 20.6 A packet has arrived with an M bit value of 1. Is this the first fragment, the last fragment, or a middle fragment? Do we know if the packet was fragmented? Solution If the M bit is 1, it means that there is at least one more fragment, This fragment can be the first one or a middle one, but not the last one, We don't know if it is the first one or a middle one; we need more information (the value of the fragmentation offset), 20.31
  32. Example 20.7 A packet has arrived with an M bit value of 1 and a fragmentation offset value of 0, Is this the first fragment, the last fragment, or a middle fragment? Solution Because the M bit is 1, it is either the first fragment or a middle one, Because the offset value is 0, it is the first fragment, 20.32
  33. Example 20.8 A packet has arrived in which the offset value is 100. What is the number of the first byte? Do we know the number of the last byte? Solution To find the number of the first byte, we multiply the offset value by 8. This means that the first byte number is 800. We cannot determine the number of the last byte unless we know the length. 20.33
  34. Example 20.9 A packet has arrived in which the offset value is 100, the value ofHLEN is 5, and the value of the total length field is 100. What are the numbers of the first byte and the last byte ? Solution The first byte number is 100 x 8 = 800, The total length is 100 bytes, and the header length is 20 bytes (5 x 4), which means that there are 80 bytes in this datagram, If the first byte number is 800, the last byte number must be 879, 20.34
  35. Example 20.10 Figure 20.13 shows an example of a checksum calculation for an IPv4 header without options. The header is divided into 16-bit sections. All the sections are added and the sum is complemented. The result is inserted in the checksum field. 20.35
  36. Figure 20.13 Example of checksum calculation in IPv4 4 4 5 1 10.12.14.5 12.6.7.9 4, 5, and O 28 0 and O 4and 17 10.12 14.5 12.6 7.9 Sum Checksum 20.36 4 o o o 0 o o o 7 8 5 o o o 4 o A E c 7 4 B o O o 1 o o o O 4 B 28 o c 1 o 1 o c 5 6 9
  37. Figure 20.14 Taxonomy of options in IPv4 Single-byte Options Multiple-byte 20.37 No operation End of option Record route Strict source route Loose source route Timestamp
  38. 20-3 IPv6 The network layer protocol in the TCP/IP protocol suite is currently IPv4. Although IPv4 is well designed, data communication has evolved since the inception of IPv4 in the 1970s. IPv4 has some deficiencies that make it unsuitable for the fast-growing Internet. Topics discussed in this section: Advantages Packet Format Extension Headers 20.38
  39. Figure 20.15 IPv6 datagram header and payload 40 bytes Base header Extension headers (optional) 20.39 Up to 65,535 bytes Payload Data packet from upper layer
  40. Figure 20.16 Format of an IPv6 datagram 4 bits VER 4 bits PRI Payload length 8 bits 8 bits Flow label Next header 8 bits Hop limit Next header Next header Next header 20.40 Source address Destination address Header length Header length Header length
  41. Table 20.6 Next header codes for IPv6 Code 0 2 6 17 43 44 50 51 59 60 20.41 Next Header Hop-by-hop option ICMP TCP UDP Source routing Fragmentation Encrypted security payload Authentication Null (no next header) Destination option
  42. Table 20.7 Priorities for congestion-controlled traffic Priority O 1 2 3 4 5 6 7 20.42 Meaning No specific traffic Background data Unattended data traffic Reserved Attended bulk data traffic Reserved Interactive traffic Control traffic
  43. Table 20.8 Priorities for noncongestion-controlled traffic Priority 8 15 20.43 Meaning Data with greatest redundancy Data with least redundancy
  44. Table 20.9 Comparison between IPv4 and IPv6 packet headers Comparison l. The header length field is eliminated in IPv6 because the length of the header is fixed in this version. 2. The service type field is eliminated in IPv6. The priority and flow label fields together take over the function of the service type field. 3. The total length field is eliminated in IPv6 and replaced by the payload length field. 4. The identification, flag, and offset fields are eliminated from the base header in IPv6. They are included in the fragmentation extension header. 5. The TTL field is called hop limit in IPv6. 6. The protocol field is replaced by the next header field. The header checksum is eliminated because the checksum is provided by upper-layer 7. protocols; it is therefore not needed at this level. 8. The option fields in IPv4 are implemented as extension headers in IPv6. 20.44
  45. Figure 20.17 Extension header types Hop-by-hop option Source routing Fragme ntation Extension headers Authentication Encrypted security payload Destination option 20.45 Padl PadN Jumbo payload
  46. Table 20.10 Comparison between IPv4 options and IPv6 extension headers 1. 2. 3. 4. 5. 6. 7. Comparison The no-operation and end-of-option options in IPv4 are replaced by Padl and PadN options in IPv6. The record route option is not implemented in IPv6 because it was not used. The timestamp option is not implemented because it was not used. The source route option is called the source route extension header in IPv6. The fragmentation fields in the base header section of IPv4 have moved to the fragmentation extension header in IPv6. The authentication extension header is new in IPv6. The encrypted security payload extension header is new in IPv6. 20.46
  47. 20-4 TRANSITION FROM IPv4 TO IPv6 Because of' the huge number of • systems on the Internet, the transition from IPv4 to IPv6 cannot happen suddenly. It takes a considerable amount of time before every system in the Internet can move from IPv4 to IPv6. The transition must be smooth to prevent any problems between IPv4 and IPv6 systems. Topics discussed in this section: Dual Stack Tunneling Header Translation 20.47
  48. Figure 20.18 Three transition strategies Transition strategies Tunneling Dual stack 20.48 Header translation
  49. Figure 20.19 Dual stack Trans port and application layers I pv4 Underlying LAN orWAN technology To IPv4 system 20.49 IPv6 To IPv6 system
  50. Figure 20.20 Tunneling strategy I Pv6 host 20.50 IPv6 header Payload IPv4 header IPv6 header Payload Tunne IPv4 region IPv6 header Payload IPv6 host
  51. Figure 20.21 Header translation strategy IPv6 header Payload host 20.51 IPv6 header Payload IPv6 region IPv4 header Pv4 Payload host Header translation done here
  52. Table 20.11 Header translation l. 2. 3. 4. 5. 6. 7. 8. 20.52 Header Translation Procedure The IPv6 mapped address is changed to an IPv4 address by extracting the rightmost 32 bits. The value of the IPv6 priority field is discarded. The type of service field in IPv4 is set to zero. The checksum for IPv4 is calculated and inserted in the corresponding field. The IPv6 flow label is ignored. Compatible extension headers are converted to options and inserted in the IPv4 header. Some may have to be dropped. The length of IPv4 header is calculated and inserted into the corresponding field. The total length of the IPv4 packet is calculated and inserted in the corresponding field.