CLICK HERE TO DOWNLOAD PPT ON Internet Protocol
Internet Protocol Presentation Transcript
1.Internet Protocol
Understand the format and fields of a datagram
Understand the need for fragmentation and the fields involved
Understand the options available in an IP datagram
Be able to perform a checksum calculation
Understand the components and interactions of an IP package
Understand the format and fields of a datagram
Understand the need for fragmentation and the fields involved
Understand the options available in an IP datagram
Be able to perform a checksum calculation
Understand the components and interactions of an IP package
2.Position of IP in TCP/IP protocol suite
3.DATAGRAM
A packet in the IP layer is called a datagram, a variable-length packet consisting of two parts: header and data. The header is 20 to 60 bytes in length and contains information essential to routing and delivery.
A packet in the IP layer is called a datagram, a variable-length packet consisting of two parts: header and data. The header is 20 to 60 bytes in length and contains information essential to routing and delivery.
4.IP datagram
5.Service type or differentiated services
6.The precedence subfield was designed, but never used in version
7.Types of service
8.Default types of service
9.Values for codepoints
10.The total length field defines the total length of the datagram including the header.
11.Encapsulation of a small datagram in an Ethernet frame
12.Multiplexing
13.Protocols
14.An IP packet has arrived with the first 8 bits as shown:
Solution There is an error in this packet. The 4 left-most bits (0100) show the version, which is correct. The next 4 bits (0010) show the header length; which means (2 × 4 = 8), which is wrong. The minimum number of bytes in the header must be 20. The packet has been corrupted in transmission.
Solution There is an error in this packet. The 4 left-most bits (0100) show the version, which is correct. The next 4 bits (0010) show the header length; which means (2 × 4 = 8), which is wrong. The minimum number of bytes in the header must be 20. The packet has been corrupted in transmission.
15.In an IP 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 × 4 or 32 bytes. The first 20 bytes are the base header, the next 12 bytes are the options.
Solution The HLEN value is 8, which means the total number of bytes in the header is 8 × 4 or 32 bytes. The first 20 bytes are the base header, the next 12 bytes are the options.
16.In an IP packet, the value of HLEN is 516 and the value of the total length field is 002816 . 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 × 4 or 20 bytes (no options). The total length is 40 bytes, which means the packet is carrying 20 bytes of data (40 - 20).
Solution The HLEN value is 5, which means the total number of bytes in the header is 5 × 4 or 20 bytes (no options). The total length is 40 bytes, which means the packet is carrying 20 bytes of data (40 - 20).
17.Solution To find the time-to-live field, we skip 8 bytes (16 hexadecimal digits). 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 (see Table 8.4).
18.FRAGMENTATION
The format and size of a frame depend on the protocol used by the physical network. A datagram may have to be fragmented to fit the protocol regulations.
Maximum Transfer Unit (MTU)
Fields Related to Fragmentation
The format and size of a frame depend on the protocol used by the physical network. A datagram may have to be fragmented to fit the protocol regulations.
Maximum Transfer Unit (MTU)
Fields Related to Fragmentation
19.MTUs for some networks
20.Flags field
21.Fragmentation example
22.Detailed fragmentation example
23.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 nonfragmented packet is considered the last fragment.
24.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). See also the next example.
25.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.
26.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 of the data.
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 of the data.
27.Solution The first byte number is 100 × 8 = 800. The total length is 100 bytes and the header length is 20 bytes (5 × 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.
28.OPTIONS
The header of the IP datagram is made of two parts: a fixed part and a variable part. The variable part comprises the options that can be a maximum of 40 bytes.
The topics discussed in this section include:
Format
Option Types
The header of the IP datagram is made of two parts: a fixed part and a variable part. The variable part comprises the options that can be a maximum of 40 bytes.
The topics discussed in this section include:
Format
Option Types
29.Option format
30.Categories of options
31.No operation option
32.End of option option
33.Record route option
34.Record route concept
35.Strict source route option
36.Strict source route concept
37.Loose source route option
38.Timestamp option
39.Use of flag in timestamp
40.Timestamp concept
41.Solution We look at the first (left-most) bit of the code for each option.
No operation: Code is 00000001; not copied. b. End of option: Code is 00000000; not copied. c. Record route: Code is 00000111; not copied. d. Strict source route: Code is 10001001; copied. e. Loose source route: Code is 10000011; copied. f. Timestamp: Code is 01000100; not copied.
No operation: Code is 00000001; not copied. b. End of option: Code is 00000000; not copied. c. Record route: Code is 00000111; not copied. d. Strict source route: Code is 10001001; copied. e. Loose source route: Code is 10000011; copied. f. Timestamp: Code is 01000100; not copied.
42.Which of the six options are used for datagram control and which are used for debugging and management?
43.One of the utilities available in UNIX to check the travelling of the IP packets is ping. In the next chapter, we talk about the ping program in more detail. In this example, we want to show how to use the program to see if a host is available. We ping a server at De Anza College named fhda.edu. The result shows that the IP address of the host is 153.18.8.1.
44.We can also use the ping utility with the -R option to implement the record route option.
$ ping -R fhda.edu PING fhda.edu (153.18.8.1) 56(124) bytes of data. 64 bytes from tiptoe.fhda.edu (153.18.8.1): icmp_seq=0 ttl=62 time=2.70 ms RR: voyager.deanza.fhda.edu (153.18.17.11) Dcore_G0_3-69.fhda.edu (153.18.251.3) Dbackup_V13.fhda.edu (153.18.191.249) tiptoe.fhda.edu (153.18.8.1) Dbackup_V62.fhda.edu (153.18.251.34) Dcore_G0_1-6.fhda.edu (153.18.31.254) voyager.deanza.fhda.edu (153.18.17.11)
$ ping -R fhda.edu PING fhda.edu (153.18.8.1) 56(124) bytes of data. 64 bytes from tiptoe.fhda.edu (153.18.8.1): icmp_seq=0 ttl=62 time=2.70 ms RR: voyager.deanza.fhda.edu (153.18.17.11) Dcore_G0_3-69.fhda.edu (153.18.251.3) Dbackup_V13.fhda.edu (153.18.191.249) tiptoe.fhda.edu (153.18.8.1) Dbackup_V62.fhda.edu (153.18.251.34) Dcore_G0_1-6.fhda.edu (153.18.31.254) voyager.deanza.fhda.edu (153.18.17.11)
45.The traceroute utility can also be used to keep track of the route of a packet.
46.The traceroute program can be used to implement loose source routing. The -g option allows us to define the routers to be visited, from the source to destination. The following shows how we can send a packet to the fhda.edu server with the requirement that the packet visit the router 153.18.251.4.
47.The traceroute program can also be used to implement strict source routing. The -G option forces the packet to visit the routers defined in the command line. The following shows how we can send a packet to the fhda.edu server and force the packet to visit only the router 153.18.251.4, not any other one.
48.CHECKSUM
The error detection method used by most TCP/IP protocols is called the checksum. The checksum protects against the corruption that may occur during the transmission of a packet. It is redundant information added to the packet.
The error detection method used by most TCP/IP protocols is called the checksum. The checksum protects against the corruption that may occur during the transmission of a packet. It is redundant information added to the packet.
49.To create the checksum the sender does the following:
? The packet is divided into k sections, each of n bits. ? All sections are added together using 1’s complement arithmetic. ? The final result is complemented to make the checksum.
? The packet is divided into k sections, each of n bits. ? All sections are added together using 1’s complement arithmetic. ? The final result is complemented to make the checksum.
50.Checksum concept
51.Checksum in one’s complement arithmetic
52.Figure 8.24 shows an example of a checksum calculation for an IP 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.
53.Example of checksum calculation in binary
54.Let us do the same example in hexadecimal. Each row has four hexadecimal digits. We calculate the sum first. Note that if an addition results in more than one hexadecimal digit, the right-most digit becomes the current-column digit and the rest are carried to other columns. From the sum, we make the checksum by complementing the sum. However, note that we subtract each digit from 15 in hexadecimal arithmetic (just as we subtract from 1 in binary arithmetic). This means the complement of E (14) is 1 and the complement of 4 is B (11). Figure 8.25 shows the calculation. Note that the result (8BB1) is exactly the same as in Example 17.
55.Example of checksum calculation in hexadecimal
56.Check Appendix C for a detailed description of checksum calculation and the handling of carries.
57.IP PACKAGE
We give an example of a simplified IP software package to show its components and the relationships between the components. This IP package involves eight modules.
The topics discussed in this section include:
Header-Adding Module
Processing Module
Queues
Routing Table
Forwarding Module
MTU Table
Fragmentation Module
Reassembly Table
Reassembly Module
We give an example of a simplified IP software package to show its components and the relationships between the components. This IP package involves eight modules.
The topics discussed in this section include:
Header-Adding Module
Processing Module
Queues
Routing Table
Forwarding Module
MTU Table
Fragmentation Module
Reassembly Table
Reassembly Module
58.IP components
59.MTU table
60.Reassembly table
0 comments