SlideShare a Scribd company logo
CH- 19 NETWORK-
LAYER PROTOCOLS
-Asst. Prof Meenakshi Paul
G. N. Khalsa College
Content
19.1 INTERNET PROTOCOL (IP)
19.1.1 Datagram Format
19.1.2 Fragmentation
19.1.3 Options
19.1.4 Security of IPv4 Datagrams
19.2 ICMPv4
19.2.1 MESSAGES
19.2.2 Debugging Tools
19.2.3 ICMP Checksum
19.3 MOBILE IP
19.3.1 Addressing
19.3.2 Agents
19.3.3 Three Phases
19.3.4 Inefficiency in Mobile IP
19.1 INTERNET PROTOCOL (IP)
19.1 INTERNET PROTOCOL (IP)
• The network layer in version 4 can be thought of as one main protocol
and three auxiliary ones.
• The main protocol, Internet Protocol version 4 (IPv4), is responsible for
packetizing, forwarding, and delivery of a packet at the network
layer.
• The Internet Control Message Protocol version 4 (ICMPv4) helps
IPv4 to handle some errors that may occur in the network-layer
delivery.
• The Internet Group Management Protocol (IGMP) is used to help IPv4
in multicasting.
• The Address Resolution Protocol (ARP) is used to glue the network
and data-link layers in mapping network-layer addresses to link-
layer addresses.
IPv4
• IPv4 is an unreliable datagram protocol—a best-effort delivery
service.
• The term best-effort means that IPv4 packets can be corrupted, be lost,
arrive out of order, or be delayed, and may create congestion for the
network.
• If reliability is important, IPv4 must be paired with a reliable transport-
layer protocol such as TCP.
• An example of a more commonly understood best-effort delivery service
is the post office.
• The post office does its best to deliver the regular mail but does not
always succeed.
• If an unregistered letter is lost or damaged, it is up to the sender or
would-be recipient to discover this.
IPv4 contd…..
• The post office itself does not keep track of every letter and
cannot notify a sender of loss or damage of one.
• IPv4 is also a connectionless protocol that uses the datagram
approach.
• This means that each datagram is handled independently, and
each datagram can follow a different route to the destination.
• This implies that datagrams sent by the same source to the
same destination could arrive out of order.
• Again, IPv4 relies on a higher-level protocol to take care of all
these problems.
19.1.1 Datagram Format
• Packets used by the IP are called datagrams.
• A datagram is a variable-length packet consisting of two parts: header and
payload (data).
• The header is 20 to 60 bytes in length and contains information essential to
routing and delivery.
19.1.1 Datagram Format
• Version Number. The 4-bit version number (VER) field defines the
version of the IPv4 protocol, which, obviously, has the value of 4.
• Header Length.
• The 4-bit header length (HLEN) field defines the total length of the datagram header in 4-
byte words.
• The IPv4 datagram has a variable-length header.
• This field is needed because the length of the header is variable (between 20 and 60
bytes).
• Service Type. This field was referred to as type of service (TOS), which
defined how the datagram should be handled.
• Total Length. This 16-bit field defines the total length (header plus data)
of the IP datagram in bytes. A 16-bit number can define a total length of up
to 65,535.
19.1.1 Datagram Format
• Identification, Flags, and Fragmentation Offset.
• These three fields are related to the fragmentation of the IP datagram
when the size of the datagram is larger than the underlying network
can carry.
• Time to live. It is duration that datagram has live in internet.
• Protocol.
• This 8-bit field defines the higher-level protocol that uses the services of
the IPv4 layer.
• A n IPv4 datagram can encapsulate data from several higher-level
protocols such as TCP, UDP, ICMP, and IGMP.
• This field specifies the final destination protocol to which the IPv4
datagram is delivered.
19.1.1 Datagram Format
• Protocol
19.1.1 Datagram Format
• Header Checksum.
• Source and Destination Addresses.
• These 32-bit source and destination address fields define the IP
address of the source and destination respectively.
• Options.
• A datagram header can have up to 40 bytes of options.
• Options can be used for network testing and debugging.
• Options are not a required part of the IP header, option processing
is required of the IP software.
19.1.1 Datagram Format
• Payload.
• Payload, or data, is the main reason for creating a datagram.
• Payload is the packet coming from other protocols that use the
service of IP.
• Comparing a datagram to a postal package, payload is the content
of the package;
• the header is only the information written on the package.
• https://www.youtube.com/watch?v=3Y70y6dM7Cs
19.1.2 FRAGMENTATION
19.1.2 Fragmentation
• A datagram can travel through different networks.
• Each router decapsulates the IP 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 by the physical network through which the
frame has just traveled.
19.1.2.1 Maximum Transfer Unit (MTU)
• Each link-layer protocol has its own frame format.
• One of the features of each format is the maximum size of
the payload that can be encapsulated.
• The total size of the datagram must be less than this
maximum size.
• The value of the MTU differs from one physical network
protocol to another.
Maximum transfer unit (MTU)
• For example, the value for a LAN is normally 1500 bytes,
but for a WAN it can be larger or smaller.
19.1.2.1 Maximum Transfer Unit (MTU)
• We must divide the datagram to make it possible for it to
pass through these networks. This is called
fragmentation.
• When a datagram is fragmented, each fragment has its
own header with most of the fields repeated, but some
have been changed.
• A fragmented datagram may itself be fragmented if it
encounters a network with an even smaller MTU.
19.1.2.1 Maximum Transfer Unit (MTU)
• In other words, a datagram may be fragmented several
times before it reaches the final destination.
• A datagram can be fragmented by the source host or any
router in the path.
• The reassembly of the datagram, however, is done only
by the destination host, because each fragment becomes
an independent datagram.
19.1.2.2 Fields Related to Fragmentation
• An IP datagram are related to fragmentation:
identification, flags, and fragmentation offset.
• Identification:
• The 16-bit identification field identifies a datagram originating from
the source host.
• The combination of the identification and source IP address must
uniquely define a datagram as it leaves the source host.
• To guarantee uniqueness, the IP protocol uses a counter to label
the datagrams.
• The counter is initialized to a positive number.
Flags
• The 3-bit flags field defines three flags.
• The leftmost bit is reserved (not used).
• If D=1 then do not fragment
• If D=0, the datagram can be fragmented if necessary
• If M=1, it means the datagram is not the last fragment; there are
more fragments after this one.
• If M=0, it means this is the last or only fragment.
Fragmentation offset
• The 13-bit fragmentation offset field
• It shows the relative position of this fragment with respect to the whole
datagram.
• It is the offset of the data in the original datagram measured in units of 8
bytes.
• This is done because the length of the offset field is only 13 bits long and
cannot represent a sequence of bytes greater than 8191.
• This forces hosts or routers that fragment datagrams to choose the size of
each fragment so that the first byte number is divisible by 8.
Detailed fragmentation example
Detailed fragmentation example
19.1.3 Options
• Options, as the name implies, are not required for a
datagram.
• They can be used for network testing and debugging.
• Options are divided into two broad categories: single-byte
options and multiple-byte options.
• Single-Byte Options
• No Operation
• End of Option
• Multliple-Byte Options
• Record Route
• Strict Source Route
• Loose Source Route
• Timestamp
Single-Byte Options
• No Operation: A no-operation option is a 1-byte option
used as a filler between options.
• End of Option: An end-of-option option is a 1-byte option
used for padding at the end of the option field. It, however,
can only be used as the last option.
Multliple-Byte Options
• Record Route
• It is used to record the Internet routers that handle the datagram. It
can list up to nine router addresses.
• Strict Source Route
• It is used by the source to predetermine a route for the datagram as
it travels through the Internet.
• Loose Source Route
• It is similar to the strict source route, but it is less rigid.
• Timestamp
• It is used to record the time of datagram processing by a router.
SECURITY OF IPV4
DATAGRAMS
19.1.4 Security of IPv4 Datagrams
• The IPv4 protocol, as well as the whole Internet, was
started when the Internet users trusted each other.
• No security was provided for the IPv4 protocol.
• Three security issues that are applicable to the IP protocol
• Packet sniffing
• Packet modification
• IP spoofing
19.1.4.1 Packet sniffing
• Packet sniffing is a passive attack.
• An intruder may intercept an IP packet and make a copy
of it.
• The attacker does not change the contents of the packet.
• This type of attack is very difficult to detect because the
sender and the receiver may never know that the packet
has been copied.
19.1.4.2 Packet Modification
• The second type of attack is to modify the packet.
• The attacker intercepts the packet, changes its contents,
and sends the new packet to the receiver.
• The receiver believes that the packet is coming from the
original sender.
• This type of attack can be detected using a data integrity
mechanism.
19.1.4.3 IP Spoofing
• An attacker can masquerade as somebody else and
create an IP packet that carries the source address of
another computer.
• An attacker can send an IP packet to a bank pretending
that it is coming from one of the customers.
• This type of attack can be prevented using an origin
authentication mechanism
ICMPV4
19.2 ICMPv4
• The IPv4 has no error-reporting or error-correcting mechanism.
• The Internet Control Message Protocol version 4 (ICMPv4) has
been designed to compensate for the above two deficiencies.
• It is used for reporting errors and management queries.
• The ICMPv4 is a message-oriented protocol.
• It is a supporting protocol and used by networks devices like routers
for sending the error messages and operations information.
• e.g. the requested service is not available or that a host or router
could not be reached.
19.2.1 MESSAGES
• The error-reporting messages report problems that a router or a
host (destination) may encounter when it processes an IP packet.
• The query messages, which occur in pairs, help a host or a network
manager get specific information from a router or another host.
General format of ICMP messages
General format of ICMP messages
• An ICMP message has an 8-byte header and a variable-size
data section.
• The first field, ICMP type, defines the type of the message.
• The code field specifies the reason for the particular message
type.
• The rest of the header is specific for each message type.
• The data section in error messages carries information for
finding the original packet that had the error.
• The data section in query messages carries extra information
based on the type of query.
19.2.2 Debugging Tools
• There are several tools that can be used in the Internet for
debugging.
• Ping
• We can use the ping program to find if a host is alive and
responding.
• We use ping here to see how it uses ICMP packets.
• The source host sends ICMP echo-request messages; the
destination, if alive, responds with ICMP echo-reply messages.
• Traceroute or Tracert
• The traceroute program is different from the ping program.
• The traceroute program gets help from two error-reporting
messages: time-exceeded and destination-unreachable.
19.2.3 ICMP Checksum
MOBILE IP
19.3 MOBILE IP
• Mobile IP (or MIP) is an Internet Engineering Task Force
(IETF) standard communications protocol.
• It is designed to allow mobile device users to move from
one network to another while maintaining a permanent IP
address.
• Mobile IP enables a computer(any wireless devices) to roam
freely on the Internet or an organization's network while still
maintaining the same home address.
19.3.1 Addressing
• The main problem that must be solved in providing mobile
communication using the IP protocol is addressing.
• Stationary Hosts
• The IP addresses are designed to work with stationary(not moving)
hosts because part of the address defines the network to which the
host is attached.
• Mobile Hosts
• When a host moves from one network to another, the IP addressing
structure needs to be modified.
• Several solutions have been proposed.
• Changing the Address
• Two Addresses
19.3.1.1 Changing the Address
• One simple solution is to let the mobile host change its
address as it goes to the new network.
• The host can use DHCP to obtain a new address to
associate it with the new network.
• This approach has several drawbacks like configuration
files need to update, system reboot, update DNS table,
etc..
19.3.1.2 Two Addresses
• The approach that is more feasible is the use of two addresses.
• The host has its original address, called the home address, and a
temporary address, called the care-of address.
• The home address is permanent; the care-of address changes as the
mobile host moves from one network to another.
19.3.2 Agents
• To make the change of address transparent to the rest of the Internet
requires a home agent and a foreign agent.
• The home and the foreign agents both work as routers and hosts.
Home Agent
• The home agent is usually a router attached to the home
network of the mobile host.
• The home agent acts on behalf of the mobile host when a
remote host sends a packet to the mobile host.
• The home agent receives the packet and sends it to the
foreign agent.
Foreign Agent
• The foreign agent is usually a router attached to the
foreign network.
• The foreign agent receives and delivers packets sent by
the home agent to the mobile host.
• The mobile host can also act as a foreign agent.
•
• When the mobile host acts as a foreign agent, the care-of
address is called a collocated care-of address.
19.3.3 Three Phases
• To communicate with a remote host, a mobile host goes through three
phases: agent discovery, registration, and data transfer,
19.3.3 Three Phases
• The first phase, agent discovery, involves the mobile host,
the foreign agent, and the home agent.
• The second phase, registration, also involves the mobile
host and the two agents.
• Finally, in the third phase, the remote host is also
involved.
Agent Discovery
• The first phase in mobile communication, agent discovery,
consists of two subphases.
• A mobile host must discover (learn the address of) a
home agent before it leaves its
• home network. A mobile host must also discover a foreign
agent after it has moved to a
• foreign network. This discovery consists of learning the
care-of address as well as the
• foreign agent’s address. The discovery involves two types
of messages: advertisement
• and solicitation.
Agent Advertisement
• When a router advertises its presence on a network using an ICMP
router advertisement, it can append an agent advertisement to the
packet if it acts as an agent.
• Figure 19.15 shows how an agent advertisement is piggybacked to
the router advertisement packet.
Agent Advertisement
• Type. The 8-bit type field is set to 16.
• Length. The 8-bit length field defines the total length of the extension
message (not the length of the ICMP advertisement message).
• Sequence number. The 16-bit sequence number field holds the
message number.
• The recipient can use the sequence number to determine if a message is
lost.
• Lifetime. The lifetime field defines the number of seconds that the agent
will accept requests. If the value is a string of 1s, the lifetime is infinite.
• Code. The code field is an 8-bit flag in which each bit is set (1) or unset
(0).
• Care-of Addresses. This field contains a list of addresses available for
use as care of addresses.
Agent Advertisement
Agent Solicitation
• When a mobile host has moved to a new network and has
not received agent advertisements, it can initiate an agent
solicitation.
• It can use the ICMP solicitation message to inform an
agent that it needs assistance.
Registration
• The second phase in mobile communication is
registration.
• After a mobile host has moved to a foreign network and
discovered the foreign agent, it must register.
• There are four aspects of registration:
1. The mobile host must register itself with the foreign agent.
2. The mobile host must register itself with its home agent. This is
normally done by the foreign agent on behalf of the mobile host.
3. The mobile host must renew registration if it has expired.
4. The mobile host must cancel its registration (deregistration) when
it returns home.
Registration Request
• A registration request is sent from the mobile host to the
foreign agent to register its care-of address and also to
announce its home address and home agent address.
•
• The foreign agent, after receiving and registering the
request, relays the message to the home agent.
• Note that the home agent now knows the address of the
foreign agent because the IP packet that is used for
relaying has the IP address of the foreign agent as the
source address.
Registration Request
• Type. The 8-bit type field defines the type of message. For a request
message the value of this field is 1.
• Flag. The 8-bit flag field defines forwarding information. The value of
each bit can be set or unset.
Registration Request
• Lifetime. This field defines the number of seconds the registration is valid. If the
field is a string of 0s, the request message is asking for deregistration. If the field
is a string of 1s, the lifetime is infinite.
• Home address. This field contains the permanent (first) address of the mobile
host.
• Home agent address. This field contains the address of the home agent.
• Care-of address. This field is the temporary (second) address of the mobile host.
• Identification. This field contains a 64-bit number that is inserted into the request
by the mobile host and repeated in the reply message. It matches a request with a
reply.
• Extensions. Variable length extensions are used for authentication. They allow a
home agent to authenticate the mobile agent.
Registration Reply
• A registration reply is sent from the home agent to the foreign agent
and then relayed to the mobile host.
• The reply confirms or denies the registration request.
Data Transfer
• After agent discovery and registration, a mobile host can
communicate with a remote host.

More Related Content

What's hot

Transport layer
Transport layer Transport layer
Transport layer
Mukesh Chinta
 
Ch 19 Network-layer protocols Section 1
Ch 19  Network-layer protocols Section 1Ch 19  Network-layer protocols Section 1
Ch 19 Network-layer protocols Section 1
Hossam El-Deen Osama
 
Network address translation
Network address translationNetwork address translation
Network address translation
Varsha Honde
 
Classification of routing protocols
Classification of routing protocolsClassification of routing protocols
Classification of routing protocols
Menaga Selvaraj
 
Framing Protocols
Framing ProtocolsFraming Protocols
Framing Protocols
selvakumar_b1985
 
Computer Network - Network Layer
Computer Network - Network LayerComputer Network - Network Layer
Computer Network - Network Layer
Manoj Kumar
 
Mobile IP
Mobile IPMobile IP
Mobile IP
Mukesh Chinta
 
IPv4 Addressing
 IPv4 Addressing   IPv4 Addressing
IPv4 Addressing
TheGodfather HA
 
UDP - User Datagram Protocol
UDP - User Datagram ProtocolUDP - User Datagram Protocol
UDP - User Datagram Protocol
Peter R. Egli
 
Computer networks - Channelization
Computer networks - ChannelizationComputer networks - Channelization
Computer networks - Channelization
Elambaruthi Elambaruthi
 
Unicast multicast & broadcast
Unicast multicast & broadcastUnicast multicast & broadcast
Unicast multicast & broadcast
NetProtocol Xpert
 
OFDM
OFDMOFDM
TCP-IP Reference Model
TCP-IP Reference ModelTCP-IP Reference Model
TCP-IP Reference Model
Mukesh Tekwani
 
CoAP - Web Protocol for IoT
CoAP - Web Protocol for IoTCoAP - Web Protocol for IoT
CoAP - Web Protocol for IoT
Aniruddha Chakrabarti
 
Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)
k33a
 
Hiperlan
HiperlanHiperlan
TCP protocol flow control
TCP protocol flow control TCP protocol flow control
TCP protocol flow control
anuragjagetiya
 
Computer Networks Unit 1 Introduction and Physical Layer
Computer Networks Unit 1 Introduction and Physical Layer Computer Networks Unit 1 Introduction and Physical Layer
Computer Networks Unit 1 Introduction and Physical Layer
Dr. SELVAGANESAN S
 

What's hot (20)

Ipv6
Ipv6Ipv6
Ipv6
 
Transport layer
Transport layer Transport layer
Transport layer
 
Ch 19 Network-layer protocols Section 1
Ch 19  Network-layer protocols Section 1Ch 19  Network-layer protocols Section 1
Ch 19 Network-layer protocols Section 1
 
Network address translation
Network address translationNetwork address translation
Network address translation
 
Classification of routing protocols
Classification of routing protocolsClassification of routing protocols
Classification of routing protocols
 
Framing Protocols
Framing ProtocolsFraming Protocols
Framing Protocols
 
Computer Network - Network Layer
Computer Network - Network LayerComputer Network - Network Layer
Computer Network - Network Layer
 
Mobile IP
Mobile IPMobile IP
Mobile IP
 
IPv4 Addressing
 IPv4 Addressing   IPv4 Addressing
IPv4 Addressing
 
UDP - User Datagram Protocol
UDP - User Datagram ProtocolUDP - User Datagram Protocol
UDP - User Datagram Protocol
 
Computer networks - Channelization
Computer networks - ChannelizationComputer networks - Channelization
Computer networks - Channelization
 
Line coding
Line codingLine coding
Line coding
 
Unicast multicast & broadcast
Unicast multicast & broadcastUnicast multicast & broadcast
Unicast multicast & broadcast
 
OFDM
OFDMOFDM
OFDM
 
TCP-IP Reference Model
TCP-IP Reference ModelTCP-IP Reference Model
TCP-IP Reference Model
 
CoAP - Web Protocol for IoT
CoAP - Web Protocol for IoTCoAP - Web Protocol for IoT
CoAP - Web Protocol for IoT
 
Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)
 
Hiperlan
HiperlanHiperlan
Hiperlan
 
TCP protocol flow control
TCP protocol flow control TCP protocol flow control
TCP protocol flow control
 
Computer Networks Unit 1 Introduction and Physical Layer
Computer Networks Unit 1 Introduction and Physical Layer Computer Networks Unit 1 Introduction and Physical Layer
Computer Networks Unit 1 Introduction and Physical Layer
 

Similar to 19 Network Layer Protocols

networking IPv4.pdf
networking IPv4.pdfnetworking IPv4.pdf
networking IPv4.pdf
omgupta189586
 
Internet Protocol Version 4
Internet Protocol Version 4Internet Protocol Version 4
Internet Protocol Version 4
Purushottam Kamble
 
10 coms 525 tcpip - internet protocol - ip
10   coms 525 tcpip -  internet protocol - ip10   coms 525 tcpip -  internet protocol - ip
10 coms 525 tcpip - internet protocol - ip
Palanivel Kuppusamy
 
The Internet Protocol version 4 (IPv4)
The Internet Protocol version 4 (IPv4)The Internet Protocol version 4 (IPv4)
The Internet Protocol version 4 (IPv4)
Thesis Scientist Private Limited
 
Final Presentation on the Network layer
Final Presentation on the Network layerFinal Presentation on the Network layer
Final Presentation on the Network layer
Zee Haak
 
Ip and icmp
Ip and icmpIp and icmp
Ip and icmp
Programmer
 
TCP/IP model
TCP/IP modelTCP/IP model
TCP/IP model
Krishnkant Pandey
 
TCP/IP Protocols
TCP/IP ProtocolsTCP/IP Protocols
TCP/IP Protocols
Danial Mirza
 
Internet protocols Report Slides
Internet protocols Report SlidesInternet protocols Report Slides
Internet protocols Report SlidesBassam Kanber
 
REMnux tutorial 4.1 - Datagrams, Fragmentation & Anomalies
REMnux tutorial 4.1 - Datagrams, Fragmentation & AnomaliesREMnux tutorial 4.1 - Datagrams, Fragmentation & Anomalies
REMnux tutorial 4.1 - Datagrams, Fragmentation & Anomalies
Rhydham Joshi
 
Internet Protocol.pdf
Internet Protocol.pdfInternet Protocol.pdf
Internet Protocol.pdf
BIT DURG
 
Tcp/ip
Tcp/ipTcp/ip
Tcp/ip
Mohd Saleem
 
IP Routing.pptx
IP Routing.pptxIP Routing.pptx
IP Routing.pptx
ssuser957b41
 
ip nnnnnnnnnnnnnnnnnnbbbbbbblecture06.ppt
ip nnnnnnnnnnnnnnnnnnbbbbbbblecture06.pptip nnnnnnnnnnnnnnnnnnbbbbbbblecture06.ppt
ip nnnnnnnnnnnnnnnnnnbbbbbbblecture06.ppt
VINAYTANWAR18
 
Network Layer & Transport Layer
Network Layer & Transport LayerNetwork Layer & Transport Layer
Network Layer & Transport Layer
Sweta Kumari Barnwal
 

Similar to 19 Network Layer Protocols (20)

networking IPv4.pdf
networking IPv4.pdfnetworking IPv4.pdf
networking IPv4.pdf
 
Unit-2_CN.pdf
Unit-2_CN.pdfUnit-2_CN.pdf
Unit-2_CN.pdf
 
Internet Protocol Version 4
Internet Protocol Version 4Internet Protocol Version 4
Internet Protocol Version 4
 
10 coms 525 tcpip - internet protocol - ip
10   coms 525 tcpip -  internet protocol - ip10   coms 525 tcpip -  internet protocol - ip
10 coms 525 tcpip - internet protocol - ip
 
The Internet Protocol version 4 (IPv4)
The Internet Protocol version 4 (IPv4)The Internet Protocol version 4 (IPv4)
The Internet Protocol version 4 (IPv4)
 
Final Presentation on the Network layer
Final Presentation on the Network layerFinal Presentation on the Network layer
Final Presentation on the Network layer
 
Ip and icmp
Ip and icmpIp and icmp
Ip and icmp
 
Tcp ip
Tcp ipTcp ip
Tcp ip
 
TCP/IP model
TCP/IP modelTCP/IP model
TCP/IP model
 
TCP/IP Protocols
TCP/IP ProtocolsTCP/IP Protocols
TCP/IP Protocols
 
I pv4 format
I pv4 formatI pv4 format
I pv4 format
 
Internet protocols Report Slides
Internet protocols Report SlidesInternet protocols Report Slides
Internet protocols Report Slides
 
Tcp ip
Tcp ipTcp ip
Tcp ip
 
REMnux tutorial 4.1 - Datagrams, Fragmentation & Anomalies
REMnux tutorial 4.1 - Datagrams, Fragmentation & AnomaliesREMnux tutorial 4.1 - Datagrams, Fragmentation & Anomalies
REMnux tutorial 4.1 - Datagrams, Fragmentation & Anomalies
 
Internet Protocol.pdf
Internet Protocol.pdfInternet Protocol.pdf
Internet Protocol.pdf
 
Tcp/ip
Tcp/ipTcp/ip
Tcp/ip
 
Internet Protocols
Internet ProtocolsInternet Protocols
Internet Protocols
 
IP Routing.pptx
IP Routing.pptxIP Routing.pptx
IP Routing.pptx
 
ip nnnnnnnnnnnnnnnnnnbbbbbbblecture06.ppt
ip nnnnnnnnnnnnnnnnnnbbbbbbblecture06.pptip nnnnnnnnnnnnnnnnnnbbbbbbblecture06.ppt
ip nnnnnnnnnnnnnnnnnnbbbbbbblecture06.ppt
 
Network Layer & Transport Layer
Network Layer & Transport LayerNetwork Layer & Transport Layer
Network Layer & Transport Layer
 

More from Meenakshi Paul

Introduction to Artificial Intelligences
Introduction to Artificial IntelligencesIntroduction to Artificial Intelligences
Introduction to Artificial Intelligences
Meenakshi Paul
 
Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
Meenakshi Paul
 
Other Wireless Networks
Other Wireless NetworksOther Wireless Networks
Other Wireless Networks
Meenakshi Paul
 
Wireless LANs
Wireless LANsWireless LANs
Wireless LANs
Meenakshi Paul
 
Wired LANs
Wired LANsWired LANs
Wired LANs
Meenakshi Paul
 
Codes
CodesCodes
Number System
Number SystemNumber System
Number System
Meenakshi Paul
 
Media Access Control (MAC Layer)
Media Access Control (MAC Layer)Media Access Control (MAC Layer)
Media Access Control (MAC Layer)
Meenakshi Paul
 
Data Link Control
Data Link ControlData Link Control
Data Link Control
Meenakshi Paul
 
Introduction to the Data Link Layer
Introduction to the Data Link LayerIntroduction to the Data Link Layer
Introduction to the Data Link Layer
Meenakshi Paul
 
Switching
SwitchingSwitching
Switching
Meenakshi Paul
 
Transmission Media
Transmission MediaTransmission Media
Transmission Media
Meenakshi Paul
 
Bandwidth Utilization Multiplexing and Spectrum Spreading
Bandwidth Utilization Multiplexing and Spectrum SpreadingBandwidth Utilization Multiplexing and Spectrum Spreading
Bandwidth Utilization Multiplexing and Spectrum Spreading
Meenakshi Paul
 
IP classes
IP classesIP classes
IP classes
Meenakshi Paul
 
Theory building
Theory buildingTheory building
Theory building
Meenakshi Paul
 
Information Systems and Knowledge Management
 Information Systems and Knowledge Management Information Systems and Knowledge Management
Information Systems and Knowledge Management
Meenakshi Paul
 
Ch01 The Role of Business Research
Ch01 The Role of Business ResearchCh01 The Role of Business Research
Ch01 The Role of Business Research
Meenakshi Paul
 
05 analog transmission
05 analog transmission05 analog transmission
05 analog transmission
Meenakshi Paul
 
04 digital transmission
04 digital transmission04 digital transmission
04 digital transmission
Meenakshi Paul
 
03 Introduction to Physical layer
03  Introduction to Physical layer03  Introduction to Physical layer
03 Introduction to Physical layer
Meenakshi Paul
 

More from Meenakshi Paul (20)

Introduction to Artificial Intelligences
Introduction to Artificial IntelligencesIntroduction to Artificial Intelligences
Introduction to Artificial Intelligences
 
Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
 
Other Wireless Networks
Other Wireless NetworksOther Wireless Networks
Other Wireless Networks
 
Wireless LANs
Wireless LANsWireless LANs
Wireless LANs
 
Wired LANs
Wired LANsWired LANs
Wired LANs
 
Codes
CodesCodes
Codes
 
Number System
Number SystemNumber System
Number System
 
Media Access Control (MAC Layer)
Media Access Control (MAC Layer)Media Access Control (MAC Layer)
Media Access Control (MAC Layer)
 
Data Link Control
Data Link ControlData Link Control
Data Link Control
 
Introduction to the Data Link Layer
Introduction to the Data Link LayerIntroduction to the Data Link Layer
Introduction to the Data Link Layer
 
Switching
SwitchingSwitching
Switching
 
Transmission Media
Transmission MediaTransmission Media
Transmission Media
 
Bandwidth Utilization Multiplexing and Spectrum Spreading
Bandwidth Utilization Multiplexing and Spectrum SpreadingBandwidth Utilization Multiplexing and Spectrum Spreading
Bandwidth Utilization Multiplexing and Spectrum Spreading
 
IP classes
IP classesIP classes
IP classes
 
Theory building
Theory buildingTheory building
Theory building
 
Information Systems and Knowledge Management
 Information Systems and Knowledge Management Information Systems and Knowledge Management
Information Systems and Knowledge Management
 
Ch01 The Role of Business Research
Ch01 The Role of Business ResearchCh01 The Role of Business Research
Ch01 The Role of Business Research
 
05 analog transmission
05 analog transmission05 analog transmission
05 analog transmission
 
04 digital transmission
04 digital transmission04 digital transmission
04 digital transmission
 
03 Introduction to Physical layer
03  Introduction to Physical layer03  Introduction to Physical layer
03 Introduction to Physical layer
 

Recently uploaded

Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
BrazilAccount1
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 

Recently uploaded (20)

Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 

19 Network Layer Protocols

  • 1. CH- 19 NETWORK- LAYER PROTOCOLS -Asst. Prof Meenakshi Paul G. N. Khalsa College
  • 2. Content 19.1 INTERNET PROTOCOL (IP) 19.1.1 Datagram Format 19.1.2 Fragmentation 19.1.3 Options 19.1.4 Security of IPv4 Datagrams 19.2 ICMPv4 19.2.1 MESSAGES 19.2.2 Debugging Tools 19.2.3 ICMP Checksum 19.3 MOBILE IP 19.3.1 Addressing 19.3.2 Agents 19.3.3 Three Phases 19.3.4 Inefficiency in Mobile IP
  • 4. 19.1 INTERNET PROTOCOL (IP) • The network layer in version 4 can be thought of as one main protocol and three auxiliary ones. • The main protocol, Internet Protocol version 4 (IPv4), is responsible for packetizing, forwarding, and delivery of a packet at the network layer. • The Internet Control Message Protocol version 4 (ICMPv4) helps IPv4 to handle some errors that may occur in the network-layer delivery. • The Internet Group Management Protocol (IGMP) is used to help IPv4 in multicasting. • The Address Resolution Protocol (ARP) is used to glue the network and data-link layers in mapping network-layer addresses to link- layer addresses.
  • 5. IPv4 • IPv4 is an unreliable datagram protocol—a best-effort delivery service. • The term best-effort means that IPv4 packets can be corrupted, be lost, arrive out of order, or be delayed, and may create congestion for the network. • If reliability is important, IPv4 must be paired with a reliable transport- layer protocol such as TCP. • An example of a more commonly understood best-effort delivery service is the post office. • The post office does its best to deliver the regular mail but does not always succeed. • If an unregistered letter is lost or damaged, it is up to the sender or would-be recipient to discover this.
  • 6. IPv4 contd….. • The post office itself does not keep track of every letter and cannot notify a sender of loss or damage of one. • IPv4 is also a connectionless protocol that uses the datagram approach. • This means that each datagram is handled independently, and each datagram can follow a different route to the destination. • This implies that datagrams sent by the same source to the same destination could arrive out of order. • Again, IPv4 relies on a higher-level protocol to take care of all these problems.
  • 7. 19.1.1 Datagram Format • Packets used by the IP are called datagrams. • A datagram is a variable-length packet consisting of two parts: header and payload (data). • The header is 20 to 60 bytes in length and contains information essential to routing and delivery.
  • 8. 19.1.1 Datagram Format • Version Number. The 4-bit version number (VER) field defines the version of the IPv4 protocol, which, obviously, has the value of 4. • Header Length. • The 4-bit header length (HLEN) field defines the total length of the datagram header in 4- byte words. • The IPv4 datagram has a variable-length header. • This field is needed because the length of the header is variable (between 20 and 60 bytes). • Service Type. This field was referred to as type of service (TOS), which defined how the datagram should be handled. • Total Length. This 16-bit field defines the total length (header plus data) of the IP datagram in bytes. A 16-bit number can define a total length of up to 65,535.
  • 9. 19.1.1 Datagram Format • Identification, Flags, and Fragmentation Offset. • These three fields are related to the fragmentation of the IP datagram when the size of the datagram is larger than the underlying network can carry. • Time to live. It is duration that datagram has live in internet. • Protocol. • This 8-bit field defines the higher-level protocol that uses the services of the IPv4 layer. • A n IPv4 datagram can encapsulate data from several higher-level protocols such as TCP, UDP, ICMP, and IGMP. • This field specifies the final destination protocol to which the IPv4 datagram is delivered.
  • 11. 19.1.1 Datagram Format • Header Checksum. • Source and Destination Addresses. • These 32-bit source and destination address fields define the IP address of the source and destination respectively. • Options. • A datagram header can have up to 40 bytes of options. • Options can be used for network testing and debugging. • Options are not a required part of the IP header, option processing is required of the IP software.
  • 12. 19.1.1 Datagram Format • Payload. • Payload, or data, is the main reason for creating a datagram. • Payload is the packet coming from other protocols that use the service of IP. • Comparing a datagram to a postal package, payload is the content of the package; • the header is only the information written on the package. • https://www.youtube.com/watch?v=3Y70y6dM7Cs
  • 13.
  • 14.
  • 16. 19.1.2 Fragmentation • A datagram can travel through different networks. • Each router decapsulates the IP 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 by the physical network through which the frame has just traveled.
  • 17. 19.1.2.1 Maximum Transfer Unit (MTU) • Each link-layer protocol has its own frame format. • One of the features of each format is the maximum size of the payload that can be encapsulated. • The total size of the datagram must be less than this maximum size. • The value of the MTU differs from one physical network protocol to another.
  • 18. Maximum transfer unit (MTU) • For example, the value for a LAN is normally 1500 bytes, but for a WAN it can be larger or smaller.
  • 19. 19.1.2.1 Maximum Transfer Unit (MTU) • We must divide the datagram to make it possible for it to pass through these networks. This is called fragmentation. • When a datagram is fragmented, each fragment has its own header with most of the fields repeated, but some have been changed. • A fragmented datagram may itself be fragmented if it encounters a network with an even smaller MTU.
  • 20. 19.1.2.1 Maximum Transfer Unit (MTU) • In other words, a datagram may be fragmented several times before it reaches the final destination. • A datagram can be fragmented by the source host or any router in the path. • The reassembly of the datagram, however, is done only by the destination host, because each fragment becomes an independent datagram.
  • 21. 19.1.2.2 Fields Related to Fragmentation • An IP datagram are related to fragmentation: identification, flags, and fragmentation offset. • Identification: • The 16-bit identification field identifies a datagram originating from the source host. • The combination of the identification and source IP address must uniquely define a datagram as it leaves the source host. • To guarantee uniqueness, the IP protocol uses a counter to label the datagrams. • The counter is initialized to a positive number.
  • 22. Flags • The 3-bit flags field defines three flags. • The leftmost bit is reserved (not used). • If D=1 then do not fragment • If D=0, the datagram can be fragmented if necessary • If M=1, it means the datagram is not the last fragment; there are more fragments after this one. • If M=0, it means this is the last or only fragment.
  • 23. Fragmentation offset • The 13-bit fragmentation offset field • It shows the relative position of this fragment with respect to the whole datagram. • It is the offset of the data in the original datagram measured in units of 8 bytes. • This is done because the length of the offset field is only 13 bits long and cannot represent a sequence of bytes greater than 8191. • This forces hosts or routers that fragment datagrams to choose the size of each fragment so that the first byte number is divisible by 8.
  • 26.
  • 27.
  • 28.
  • 29. 19.1.3 Options • Options, as the name implies, are not required for a datagram. • They can be used for network testing and debugging. • Options are divided into two broad categories: single-byte options and multiple-byte options. • Single-Byte Options • No Operation • End of Option • Multliple-Byte Options • Record Route • Strict Source Route • Loose Source Route • Timestamp
  • 30. Single-Byte Options • No Operation: A no-operation option is a 1-byte option used as a filler between options. • End of Option: An end-of-option option is a 1-byte option used for padding at the end of the option field. It, however, can only be used as the last option.
  • 31. Multliple-Byte Options • Record Route • It is used to record the Internet routers that handle the datagram. It can list up to nine router addresses. • Strict Source Route • It is used by the source to predetermine a route for the datagram as it travels through the Internet. • Loose Source Route • It is similar to the strict source route, but it is less rigid. • Timestamp • It is used to record the time of datagram processing by a router.
  • 33. 19.1.4 Security of IPv4 Datagrams • The IPv4 protocol, as well as the whole Internet, was started when the Internet users trusted each other. • No security was provided for the IPv4 protocol. • Three security issues that are applicable to the IP protocol • Packet sniffing • Packet modification • IP spoofing
  • 34. 19.1.4.1 Packet sniffing • Packet sniffing is a passive attack. • An intruder may intercept an IP packet and make a copy of it. • The attacker does not change the contents of the packet. • This type of attack is very difficult to detect because the sender and the receiver may never know that the packet has been copied.
  • 35. 19.1.4.2 Packet Modification • The second type of attack is to modify the packet. • The attacker intercepts the packet, changes its contents, and sends the new packet to the receiver. • The receiver believes that the packet is coming from the original sender. • This type of attack can be detected using a data integrity mechanism.
  • 36. 19.1.4.3 IP Spoofing • An attacker can masquerade as somebody else and create an IP packet that carries the source address of another computer. • An attacker can send an IP packet to a bank pretending that it is coming from one of the customers. • This type of attack can be prevented using an origin authentication mechanism
  • 38. 19.2 ICMPv4 • The IPv4 has no error-reporting or error-correcting mechanism. • The Internet Control Message Protocol version 4 (ICMPv4) has been designed to compensate for the above two deficiencies. • It is used for reporting errors and management queries. • The ICMPv4 is a message-oriented protocol. • It is a supporting protocol and used by networks devices like routers for sending the error messages and operations information. • e.g. the requested service is not available or that a host or router could not be reached.
  • 39. 19.2.1 MESSAGES • The error-reporting messages report problems that a router or a host (destination) may encounter when it processes an IP packet. • The query messages, which occur in pairs, help a host or a network manager get specific information from a router or another host.
  • 40. General format of ICMP messages
  • 41. General format of ICMP messages • An ICMP message has an 8-byte header and a variable-size data section. • The first field, ICMP type, defines the type of the message. • The code field specifies the reason for the particular message type. • The rest of the header is specific for each message type. • The data section in error messages carries information for finding the original packet that had the error. • The data section in query messages carries extra information based on the type of query.
  • 42.
  • 43. 19.2.2 Debugging Tools • There are several tools that can be used in the Internet for debugging. • Ping • We can use the ping program to find if a host is alive and responding. • We use ping here to see how it uses ICMP packets. • The source host sends ICMP echo-request messages; the destination, if alive, responds with ICMP echo-reply messages. • Traceroute or Tracert • The traceroute program is different from the ping program. • The traceroute program gets help from two error-reporting messages: time-exceeded and destination-unreachable.
  • 46. 19.3 MOBILE IP • Mobile IP (or MIP) is an Internet Engineering Task Force (IETF) standard communications protocol. • It is designed to allow mobile device users to move from one network to another while maintaining a permanent IP address. • Mobile IP enables a computer(any wireless devices) to roam freely on the Internet or an organization's network while still maintaining the same home address.
  • 47. 19.3.1 Addressing • The main problem that must be solved in providing mobile communication using the IP protocol is addressing. • Stationary Hosts • The IP addresses are designed to work with stationary(not moving) hosts because part of the address defines the network to which the host is attached. • Mobile Hosts • When a host moves from one network to another, the IP addressing structure needs to be modified. • Several solutions have been proposed. • Changing the Address • Two Addresses
  • 48. 19.3.1.1 Changing the Address • One simple solution is to let the mobile host change its address as it goes to the new network. • The host can use DHCP to obtain a new address to associate it with the new network. • This approach has several drawbacks like configuration files need to update, system reboot, update DNS table, etc..
  • 49. 19.3.1.2 Two Addresses • The approach that is more feasible is the use of two addresses. • The host has its original address, called the home address, and a temporary address, called the care-of address. • The home address is permanent; the care-of address changes as the mobile host moves from one network to another.
  • 50. 19.3.2 Agents • To make the change of address transparent to the rest of the Internet requires a home agent and a foreign agent. • The home and the foreign agents both work as routers and hosts.
  • 51. Home Agent • The home agent is usually a router attached to the home network of the mobile host. • The home agent acts on behalf of the mobile host when a remote host sends a packet to the mobile host. • The home agent receives the packet and sends it to the foreign agent.
  • 52. Foreign Agent • The foreign agent is usually a router attached to the foreign network. • The foreign agent receives and delivers packets sent by the home agent to the mobile host. • The mobile host can also act as a foreign agent. • • When the mobile host acts as a foreign agent, the care-of address is called a collocated care-of address.
  • 53. 19.3.3 Three Phases • To communicate with a remote host, a mobile host goes through three phases: agent discovery, registration, and data transfer,
  • 54. 19.3.3 Three Phases • The first phase, agent discovery, involves the mobile host, the foreign agent, and the home agent. • The second phase, registration, also involves the mobile host and the two agents. • Finally, in the third phase, the remote host is also involved.
  • 55. Agent Discovery • The first phase in mobile communication, agent discovery, consists of two subphases. • A mobile host must discover (learn the address of) a home agent before it leaves its • home network. A mobile host must also discover a foreign agent after it has moved to a • foreign network. This discovery consists of learning the care-of address as well as the • foreign agent’s address. The discovery involves two types of messages: advertisement • and solicitation.
  • 56. Agent Advertisement • When a router advertises its presence on a network using an ICMP router advertisement, it can append an agent advertisement to the packet if it acts as an agent. • Figure 19.15 shows how an agent advertisement is piggybacked to the router advertisement packet.
  • 57. Agent Advertisement • Type. The 8-bit type field is set to 16. • Length. The 8-bit length field defines the total length of the extension message (not the length of the ICMP advertisement message). • Sequence number. The 16-bit sequence number field holds the message number. • The recipient can use the sequence number to determine if a message is lost. • Lifetime. The lifetime field defines the number of seconds that the agent will accept requests. If the value is a string of 1s, the lifetime is infinite. • Code. The code field is an 8-bit flag in which each bit is set (1) or unset (0). • Care-of Addresses. This field contains a list of addresses available for use as care of addresses.
  • 59. Agent Solicitation • When a mobile host has moved to a new network and has not received agent advertisements, it can initiate an agent solicitation. • It can use the ICMP solicitation message to inform an agent that it needs assistance.
  • 60. Registration • The second phase in mobile communication is registration. • After a mobile host has moved to a foreign network and discovered the foreign agent, it must register. • There are four aspects of registration: 1. The mobile host must register itself with the foreign agent. 2. The mobile host must register itself with its home agent. This is normally done by the foreign agent on behalf of the mobile host. 3. The mobile host must renew registration if it has expired. 4. The mobile host must cancel its registration (deregistration) when it returns home.
  • 61. Registration Request • A registration request is sent from the mobile host to the foreign agent to register its care-of address and also to announce its home address and home agent address. • • The foreign agent, after receiving and registering the request, relays the message to the home agent. • Note that the home agent now knows the address of the foreign agent because the IP packet that is used for relaying has the IP address of the foreign agent as the source address.
  • 62. Registration Request • Type. The 8-bit type field defines the type of message. For a request message the value of this field is 1. • Flag. The 8-bit flag field defines forwarding information. The value of each bit can be set or unset.
  • 63. Registration Request • Lifetime. This field defines the number of seconds the registration is valid. If the field is a string of 0s, the request message is asking for deregistration. If the field is a string of 1s, the lifetime is infinite. • Home address. This field contains the permanent (first) address of the mobile host. • Home agent address. This field contains the address of the home agent. • Care-of address. This field is the temporary (second) address of the mobile host. • Identification. This field contains a 64-bit number that is inserted into the request by the mobile host and repeated in the reply message. It matches a request with a reply. • Extensions. Variable length extensions are used for authentication. They allow a home agent to authenticate the mobile agent.
  • 64. Registration Reply • A registration reply is sent from the home agent to the foreign agent and then relayed to the mobile host. • The reply confirms or denies the registration request.
  • 65. Data Transfer • After agent discovery and registration, a mobile host can communicate with a remote host.