Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Network Layer Protocols COMP 3270 Computer Networks Computing Science Thompson Rivers University."— Presentation transcript:

1

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

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

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

5 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. Datagram Fragmentation Checksum Options Topics discussed in this section: 1. IPv4

6 Position of IPv4 in TCP/IP protocol suite

7 Issues 1.How to know if the IP packet is of version 4 or 6? 2.Can we send some information to routers? 3.What if the data layer link only can forward smaller packets? 4.How to deal with Caspers? 5.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.

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

9 Service type or differentiated services For multimedia servicesObsolete

10 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?

11 Protocol field and encapsulated data ARP?

12 Protocol values

13 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

14 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

15 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

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

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

18 MTUs for some networks

19 1500 1000 1200 XYR1R2 ☺ ☺ MTU between X and Y?

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

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

22

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

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

25 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:

26 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:

27 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:

28 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 Checksum ???

29 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. Advantages Topics discussed in this section:

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

31  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 Advantages = =

32 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. Dual Stack Tunneling Header Translation Topics discussed in this section:

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

34 Dual Stack

35 IPv6 IPv4 Internet Tunneling

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

37 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. Mapping Logical to Physical Address Dynamic Address Allocation Topics discussed in this section:

38 ARP (???)

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

40 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. 5. ICMP

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

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


Download ppt "Network Layer Protocols COMP 3270 Computer Networks Computing Science Thompson Rivers University."

Similar presentations


Ads by Google