Internet Protocol

Download as pdf or txt
Download as pdf or txt
You are on page 1of 42

Network Layer:

Internet Protocol

20.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
20-1 INTERNETWORKING

❑ Connecting networks together to make an


internetwork or an internet
❑ In the Internet model, the most important
network protocol is the Internet Protocol (IP)

20.2
Internet Protocol(IP)

❑ Responsible for delivering packets from the


source host to the destination host solely based
on the IP addresses in the packet headers.
❑ Defines packet structures that encapsulate the
data to be delivered.
❑ Defines addressing methods that are used to
label the datagram with source and destination
information

20.3
Versions of IP

◼ IPV4: Internet Protocol Version 4


◼ IPV6: Internet Protocol Version 6

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)

❑IP is the data delivery mechanism used in TCP/IP


protocol suit.
❑It is unreliable and connectionless datagram protocol, a
best-effort delivery service.
❑Unreliable: IP does not make an attempt to recover lost
packets.
❑Connectionless: Each packet is handled independently.
IP is not aware that packets between hosts may be sent in
a logical sequence
❑Best Effort: IP does its best to get a transmission
through to its destination, but with no guarantees.
20.10
Figure 20.4 Position of IPv4 in TCP/IP protocol suite

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

Tells the Used


router for
whether fragme
ntation
packet
should be
discarded.
or
forwarded

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

An IPv4 packet has arrived with the first 8 bits as shown:


01000010
The receiver discards the packet. Why?

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

In an IPv4 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.

20.21
Example 20.3

In an IPv4 packet, the value of HLEN is 5, and the value


of the total length field is 0x0028. 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).

20.22
Example 20.4

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

20.23
Fragmentation

◼ A datagram can travel through different


routers and networks.
◼ Each router decapsulates the IPv4
datagram from the frame it receives,
processes it, and then encapsulates it in
another frame.
◼ The format and size of the received frame
depend on the protocol used.

20.24
Maximum Transfer Unit (MTU)

◼ When a datagram is encapsulated in a


frame, the total size of the datagram must
be less than this maximum size, which is
defined by the restrictions imposed by the
hardware, software used in the network
and protocol.

20.25
Figure 20.9 Maximum transfer unit (MTU)

20.26
MTUs for some networks in bytes

20.27
IPv6

To overcome these deficiencies, IPv6 (Internetworking


Protocol, version 6), also known as IPng (Internetworking
Protocol, next generation), was proposed and is now a
standard.
20.28
20.29
Figure 20.15 IPv6 datagram header and payload

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

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.

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy