Internet Protocol
Internet Protocol
Internet Protocol
Internet Protocol
20.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
20-1 INTERNETWORKING
20.2
Internet Protocol(IP)
20.3
Versions of IP
20.4
Figure 20.1 Links between two hosts
20.5
Figure 20.2 Network layer in an internetwork
20.6
Figure 20.3 Network layer at the source, router, and destination
20.7
Figure 20.3 Network layer at the source, router, and destination (continued)
20.8
Note
❑Switching at the network layer in the
Internet uses the datagram approach to
packet switching.
❑Communication at the network layer
in the Internet is connectionless.
20.9
Internet Protocol Version 4(IPv4)
20.11
Defines the
Figure 20.5 IPv4 datagram format total length of
the datagram
Define priority
Identifies a and type of
datagram service
originating from
the source host
20.12
❑Version (VER): 4-bit field defines the
version of the IPv4 protocol.
❑Header length (HLEN): 4-bit field defines
the total length of the datagram header.
❑Services: 8-bit field, Define priority and
type of service.
20.13
Service Type
❑The first 3 bits are called precedence bits. The next 4 bits are
called type of service (TOS) bits, and the last bit is not used.
❑Precedence is a 3-bit subfield ranging from 0 (000 in binary) to 7
(111 in binary).
❑The precedence defines the priority of the datagram in issues
such as congestion.
❑If a router is congested and needs to discard some datagrams,
those datagrams with lowest precedence are discarded first.
Defines
the
priority
20.14
Table 20.1 Types of service
20.15
Table 20.2 Default Types of Service
20.16
Total Length of IPV4 Datagram
◼ The total length field defines the total length of
the datagram including the header.
◼ 16 bit used
◼ Total length may be up to 216-1=65535 bytes
◼ Header length =4*value at HLEN
◼ The minimum number of bytes in the header
must be 20 or more
◼ The first 20 bytes are the base header, the next
bytes are the options.
◼ Length of data=Total length-header length
20.17
Figure 20.8 Protocol field and encapsulated data
20.18
Table 20.4 Protocol values
20.19
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.
20.20
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.
20.21
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.22
Example 20.4
20.23
Fragmentation
20.24
Maximum Transfer Unit (MTU)
20.25
Figure 20.9 Maximum transfer unit (MTU)
20.26
MTUs for some networks in bytes
20.27
IPv6
20.30
Figure 20.16 Format of an IPv6 datagram
20.31
Packet Format
20.32
20.33
Figure 20.17 Extension header types
20.34
20-4 TRANSITION FROM IPv4 TO IPv6
20.35
Figure 20.18 Three transition strategies
20.36
Dual Stack
◼ It is recommended that all hosts,
before migrating completely to
version 6, have a dual stack of
protocols.
◼ In other words, a station must run
IPv4 and IPv6 simultaneously until all
the Internet uses IPv6.
20.37
Figure 20.19 Dual stack
20.38
Tunneling
◼ Tunneling is a strategy used when two
computers using IPv6 want to communicate
with each other and the packet must pass
through a region that uses IPv4.
◼ To pass through this region, the packet must
have an IPv4 address. So the IPv6 packet is
encapsulated in an IPv4 packet when it enters
the region, and it leaves its capsule when it
exits the region.
◼ It seems as if the IPv6 packet goes through a
tunnel at one end and emerges at the other end
20.39
Figure 20.20 Tunneling strategy
20.40
Header Translation
◼ Header translation is necessary when the majority
of the Internet has moved to IPv6 but some
systems still use IPv4.
◼ The sender wants to use IPv6, but the receiver
does not understand IPv6. Tunneling does not
work in this situation because the packet must be
in the IPv4 format to be understood by the
receiver.
◼ In this case, the header format must be totally
changed through header translation. The header
of the IPv6 packet is converted to an IPv4 header
20.41
Figure 20.21 Header translation strategy
20.42