Internet Protocol: Chapter 18 Internetwork Protocols (Chapter 20 Network Layer: Internet Protocol
Internet Protocol: Chapter 18 Internetwork Protocols (Chapter 20 Network Layer: Internet Protocol
Internet Protocol: Chapter 18 Internetwork Protocols (Chapter 20 Network Layer: Internet Protocol
Internet Protocol
2
20-1 INTERNETWORKING
3
Figure 20.1 Links between two hosts
9
Figure 20.5 IPv4 datagram format
11
Table 20.1 Types of service
13
Table 20.3 Values for codepoints
14
Figure 20.7 Encapsulation of a small datagram in an Ethernet frame
15
Figure 20.8 Protocol field and encapsulated data
17
Example 20.1
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 × 4 = 8). The minimum
number of bytes in the header must be 20. The packet has
been corrupted in transmission.
18
Example 20.2
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.
19
Example 20.3
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).
20
Example 20.4
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
IGMP. 21
Figure 20.9 Maximum transfer unit (MTU)
22
Table 20.5 MTUs for some networks
24
Figure 20.11 Fragmentation example
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.
27
Example 20.6
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).
28
Example 20.7
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.
29
Example 20.8
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.
30
Example 20.9
31
Example 20.10
32
Figure 20.5 IPv4 datagram format
• Checksum is
used to detect
error in header
• Save on
processing
time
34
Figure 20.14 Taxonomy of options in IPv4
Filler
Padding
36
IPv6 Advantages
• Larger address space
• Better header format allows routers to ignore options
• New options
• Allowance for protocol extensions
• Support for resource allocation and reservation
— Enabling source to request special handling
— Good for real-time audio and video
• Support for more security
— Encryption and Authentication options
• Integrate other protocols (ARP, RARP, IGMP) into
ICMPv6
37
Figure 20.15 IPv6 datagram header and payload
38
Figure 20.16 Format of an IPv6 datagram
39
IPv6 Flow Label
• Flow label provides special handling for a
particular data flow
• Flow shares the same path, uses the same
resource, and has the same kind of security
—Separate protocol is needed to setup how router treat
each flow, such as Real-Time Protocol (RTP) or
Resource Reservation Protocol (RSVP)
—Special treatment for each flow such as high
bandwidth, large buffer, long processing time, and
resource reservation
• Flow can also be used to speed up processing
• Use a random 24-bit number or zero if not
supported
40
IPv6 Fields
• Payload length excludes base header
• Next header indicates optional extension
headers of header of encapsulated packet (UDP)
—Also exist in each extension header
• Hop limit is the same as Time-to-live field
• Source and destination addresses are 128 bits
—Destination address = next router for source routing
41
Table 20.6 Next header codes for IPv6
42
IPv6 Priority
• Indicate packet priority with respect to other
packets from the same source
• Two sets of values
—Congestion-controlled traffic if source can adapt itself
to traffic slowdown when there is congestion
—Noncongestion-controlled traffic if retransmission is
mostly impossible
43
Table 20.7 Priorities for congestion-controlled traffic
44
Table 20.8 Priorities for noncongestion-controlled traffic
45
Table 20.9 Comparison between IPv4 and IPv6 packet headers
lower
46
Figure 20.17 Extension header types
48
20-4 Transition from IPv4 to IPv6
50
Figure 20.19 Dual stack
52
Figure 20.21 Header translation strategy
53
Figure 19.18 Reserved addresses in IPv6
55