1 / 40

Network Layer Protocols

Network Layer Protocols. COMP 3270 Computer Networks. Computing Science Thompson Rivers University. Learning Objectives. List 5 issues that IPv4 has to solve. Analyze the packet header of an IPv4 packet, to determine if the packet carries an option.

bfrazier
Download Presentation

Network Layer Protocols

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Network Layer Protocols COMP 3270 Computer Networks Computing Science Thompson Rivers University

  2. Learning Objectives • List 5 issues that IPv4 has to solve. • Analyze the packet header of an IPv4 packet, to determine if the packet carries an option. • Describe how the tool, called traceroute, can be implemented, using the TTL field in IPv4 packets. • Indicate all the fields in an IPv4 packet, that are changed by every router till the packet arrives at the destination. • Determine the MTU with a given diagram of networks. • List the three advantages of using IPv6. • List the three transition strategies from IPv4 to IPv6. • Explain how ARP translates an IP address to its corresponding physical address. • List three types of error messages supported by ICMP.

  3. Unit Outline IPv4 – 19.1 (textbook) IPv6 Transition from IPv4 to IPv6 – 22.4 (textbook) Address Mapping (ARP) – 9.2.2 (textbook) Internet Control Message Protocol (ICMP) – 19.2 (textbook)

  4. 1. IPv4 The Internet Protocol version 4 (IPv4) is the delivery mechanism used by the TCP/IP protocols. IPv4 is an unreliable and connectionless datagram protocol – a best-effort delivery service. Topics discussed in this section: • Datagram • Fragmentation • Checksum • Options

  5. Position of IPv4 in TCP/IP protocol suite

  6. Issues • How to know if the IP packet is of version 4 or 6? • Can we send some information to routers? • What if the data layer link only can forward smaller packets? • How to deal with Caspers? • Do we really not need error checking, not even for packet header? • Source and destination addresses; payload type (i.e. protocol id); length • Other issues? • Shortage of address space -> Need to transit to IPv6 some day.

  7. Datagram IPv4 datagram format ☺ Excluding payload! Why? TTL TCP, UDP, ICMP, …

  8. The total length field defines the total length of the datagram including the header. ☺ What is the maximum length of the header? ☺ What is the default size of the header? ☺ How do we know if there is an option in the header?

  9. Protocol field and encapsulated data ARP?

  10. Protocol values

  11. Example: An IPv4 packet has arrived with the first 8 bits as shown: 01000010 The receiver discards the packet. Why? (You should remember that the unit for header length is 4B. The size of header: 20 – 60 bytes.) Solution: 0100 0010

  12. Example: In an IPv4 packet, the value of HLEN is 1000 in binary. How many bytes of options are being carried by this packet? Solution: 8 * 4 bytes – 20 bytes = 12 bytes

  13. Example: In an IPv4 packet, the value of HLEN is 8, and the value of the total length field is 0x0128. How many bytes of data are being carried by this packet? Solution: 296 bytes – 8 * 4 bytes = 264 bytes

  14. Example: An IPv4 packet has arrived with the first few hexadecimal digits as shown. 0x45000028000100000102. . . How many hops can this packet travel before being dropped? The data belong to what upper-layer protocol? Solution: 0x 4 5 00 0028 0001 0000 01 02. . . 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 IGMP. Each router reduces TTL by 1. If TTL becomes 0, then the router drops the packet and sends the ICMP error message to the sender. This is used to implement “tracert” or “traceroute” command.

  15. Fragmentation Maximum transfer unit (MTU) MTU: Maximum packet size that can be carried by all underlying networks from the source to the destination, without being fragmented MTU of Ethernet: 1500 bytes ☺ When the size of an IP packet is bigger than MTU, then? Fragmentation is required.

  16. MTUs for some networks

  17. 1000 1500 1200 X R1 R2 Y ☺ MTU between X and Y?

  18. Flags used in fragmentation ☺ What does 000 mean? Fragmentation is allowed, and No fragment, i.e., the last. Set by the sender

  19. Fragmentation example But total length field uses 16b. -> ☺ the unit is ??? 8 bytes Identification: 16b; for original packets Flags: 3b - Reserved - Do not fragment - More fragment Fragmentation offset: 13b Identification = A Flag = 001 Offset = 0 Identification = A Flag = ??? Identification = ??? Flag = ??? ☺ Where are the fragmented packets reassembled? Which protocol? At the destination host; IP

  20. Example: 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: ☺ How does the destination host know whether an IP packet was not fragmented? Fragmentation offset must be checked.

  21. Example: 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:

  22. Example: 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:

  23. Example: 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:

  24. Example: A packet has arrived in which the offset value is 100, the value of HLEN 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:

  25. Checksum The next figure 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. 16-bits checksum ???

  26. 2. 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

  27. Shortcomings of IPv4 • ☺ ??? • Shortage of address space • Slow packet forwarding at routers – Why? • No support of multimedia service • No support of security

  28. Advantages • Large address space • Simplified header format for faster packet switching at routers – header checksum is removed. • Flow label field for QoS support • An extension header for IPsec support = =

  29. 3. TRANSITION 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

  30. Three transition strategies There is no full accessibility from IPv4 realms to IPv6 realms.

  31. Dual Stack

  32. Tunneling IPv6 IPv4 Internet IPv6 IPv6

  33. Header Translation Accessibility from IPv6 realms to IPv4 realms. There is no full accessibility from IPv4 realms to IPv6 realms.

  34. 4. ADDRESS MAPPING The delivery of a packet to a host or a router requires two levels of addressing: logical and physical. We need to be able to map a logical address to its corresponding physical address and vice versa. This can be done by using either static or dynamic mapping. Topics discussed in this section: • Mapping Logical to Physical Address • Dynamic Address Allocation

  35. ARP (???)

  36. An ARP request is broadcast;an ARP reply is unicast. ☺ What protocol does ARP use?

  37. 5. ICMP The IP protocol has no error-reporting or error-correcting mechanism. The IP protocol also lacks a mechanism for host and management queries. The Internet Control Message Protocol (ICMP) has been designed to compensate for the above two deficiencies. It is a companion to the IP protocol.

  38. ICMP always reports error messages to the original source. ☺ How about the destination?

  39. Types of Error Messages Related applications Port scanning Who sends? Congestion control Who sends? Traceroute Who sends?

More Related