SlideShare una empresa de Scribd logo
1 de 31
Section 1
 INTRO TO INTERNET PROTOCOL (IP).
 Datagram Format.
- header description.
 Fragmentation.
- Maximum Transfer Unit (MTU).
- Fields Related to Fragmentation.
 Options.
- Single-Byte Options.
- Multliple-Byte Options.
 Security of IPv4 Datagrams.
- Packet Sniffing.
- Packet Modification.
- IP Spoofing.
- IPSec.
The network layer in version 4 consist of one main
protocol and three auxiliary ones.
1. The main protocol(IPv4), is responsible for
packetizing, forwarding, and delivery of a packet at
the network layer.
2. (ICMPv4) helps IPv4 to handle some errors that may
occur in the network-layer delivery.
3. (IGMP) is used to help IPv4 in multicasting.
4. (ARP) is used to glue the network and data-link
layers in mapping network-layer addresses to link-
layer addresses.
 IPv4 is an (unreliable / best-effort) protocol of
datagram delivery service.
 Because Packets can be corrupted, be lost, arrive
out of order, or be delayed, and may create
congestion for the network.
 To make it reliable ,IPv4 must be paired with a
reliable transport-layer protocol such as TCP.
 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.
 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.
 Payload (data) is the main reason for creating a datagram.
 Payload is the packet coming from other protocols that use the
service of IP.
 Comparing : payload is the content of the package, the header is
only the information written on
the package.
 Version Number(VER): defines the version of the
IPv4, 4-bits length and has the value of 4.
 Header Length(HLEN): defines the total length of the
header divide by 4, 4-bits length, used to know when
the header stops and the data Start.
Header length = 4 * value of (HLEN)
 Service Type: defines how the datagram should
be handled, 8-bits length.
 Total Length: defines the total length of
datagram (header plus data) in bytes, 16-bits
length.
This field helps the receiving device to know when
the packet has completely arrived.
Length of data = Total length - Header length
 Identification: helps the destination in reassembling
the datagram, 16-bits length, It knows that all
fragments having the same identification value should
be assembled into one datagram.
 Flags: 3-bits length, defines three flags,
-leftmost bit is reserved (not used)
-The second bit (D bit): if its value 1, means that
packet not fragment , Otherwise fragment.
-The third bit (M bit): if its value 1, means that this
datagram is not the last fragment; there are more fragments
after this one.
 Fragmentation Offset: shows the relative
position of this fragment with respect to the
whole datagram,13-bits length,
Offset value = The first byte number is divisible by 8
 Time-to-live: used to control the maximum number
of hops(routers) visited by the datagram, 8-bits
length;
 When a source host sends the datagram, it stores a
number in this field.
 This value is approximately two times the maximum
number of routers between any two hosts.
 Each router that processes the datagram decrements
this number by one.
 If this value, after being decremented, is zero, the
router discards the datagram.
 Protocol: 8-bit, When the payload is encapsulated in
a datagram at the source IP, the corresponding
protocol number is inserted in this field;
 when the datagram arrives at the destination, the
value of this field helps to define to which protocol
the payload should be delivered.
 Header checksum: 16-bits field, header checksum
field to check the header, Because Errors in the IP
header can be a disaster.
 If the destination IP address is corrupted, the packet
can be delivered to the wrong host.
 If the protocol field is corrupted, the payload may
be delivered to the wrong protocol.
 If the fields related to the fragmentation are
corrupted, the datagram cannot be reassembled
correctly at the destination, and so on.
 Source Addresses: 32-bits , define the address of
the source.
 Destination Addresses: 32-bits , define the
address of the destination.
Note that the value of these fields must remain
unchanged during the time datagram travels
from the source host to the destination host.
Header length = 4 * value of (HLEN)
Header length = 4 * 5 = 20.
Length of data = Total length - Header length
Length of data = 40 - 20 =20
 When a machine (router or host) receives a
frame, it drops the header and the trailer,
leaving the datagram.
 in many cases we really do not need the
value in this field.
 However, there are occasions in which the
datagram is not the only thing encapsulated
in a frame;
 it may be that padding has been added.
 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.
 The format and size of the sent frame depend on the protocol
used by the physical network through which the frame is going
to travel.
 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.
 maximum length of the IP datagram equal to 65,535 bytes.
 A datagram can be fragmented by the source host or any router
in the path.
 When a datagram is fragmented, each fragment has its own
header with most of the fields repeated, but some have been
changed.
 The reassembly of the datagram, however, is done only by the
destination host, because each fragment becomes an
independent datagram.
 A datagram header can have up to 40 bytes of
options.
 Options can be used for network testing and
debugging.
 Although options are not a required part of the IP
header, option processing is required of the IP
software.
 This means that all implementations must be able to
handle options if they are present in the header.
 some options can be changed by routers, which
forces each router to recalculate the header
checksum.
 There are one-byte and multi-byte options.
 The header of the IPv4 datagram is made of two
parts:
 The fixed part is 20 bytes long
 The variable part comprises the options that can
be a maximum of 40 bytes to preserve the
boundary of the header.
 Options are divided into two broad categories:
single-byte options and multiple-byte options.
There are two single-byte options:
 No Operation: is a 1-byte option used as a
filler between options.
 End of Option: is a 1-byte option used for
padding at the end of the option field.
 Record Route: is used to record the Internet
routers that handle the datagram. It can list up
to nine router addresses. It can be used for
debugging and management purposes.
 Strict Source Route: is used by the source to
predetermine a route for the datagram, The
sender can choose a route with a specific type of
service, such as minimum delay or maximum
throughput.
 Loose Source Route: is similar to the strict source
route, but it is less rigid. Each router in the list
must be visited, but the datagram can visit other
routers as well.
 Timestamp: is used to record the time of datagram
processing by a router, We can estimate the time it
takes for a datagram to go from one router to
another.
There are three security issues that are particularly applicable to
the IP protocol:
1- Packet Sniffing:
 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.
 Although packet sniffing cannot be stopped, encryption of the
packet can make the attacker’s effort useless.
 The attacker may still sniff the packet, but the content is not
detectable.
Packet Modification:
 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.
IP Spoofing:
 An attacker can masquerade as somebody
else and create an IP packet that carries the
source address of another computer.
 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
The IP packets today can be protected from the previously
mentioned attacks using a protocol called IPSec.
 Defining Algorithms and Keys: The two entities that want to
create a secure channel between themselves can agree on some
available algorithms and keys to be used for security purposes.
 Packet Encryption: The packets exchanged between two parties
can be encrypted for privacy using one of the encryption
algorithms and a shared key agreed upon in the first step. This
makes the packet sniffing attack useless.
 Data Integrity: the packet is not modified during
the transmission. If the received packet does not
pass the data integrity test, it is discarded. This
prevents the second attack.
 Origin Authentication: IPSec can authenticate
the origin of the packet to be sure that the
packet is not created by an imposter. This can
prevent IP spoofing attacks .

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Quality of Service
Quality of ServiceQuality of Service
Quality of Service
 
TCP/IP – Transmission Control Protocol/ Internet Protocol
TCP/IP – Transmission Control Protocol/ Internet ProtocolTCP/IP – Transmission Control Protocol/ Internet Protocol
TCP/IP – Transmission Control Protocol/ Internet Protocol
 
Distance Vector Routing Protocols
Distance Vector Routing ProtocolsDistance Vector Routing Protocols
Distance Vector Routing Protocols
 
Data link layer
Data link layer Data link layer
Data link layer
 
Media Access Control
Media Access ControlMedia Access Control
Media Access Control
 
Transport layer protocol
Transport layer protocolTransport layer protocol
Transport layer protocol
 
Physical layer ppt
Physical layer pptPhysical layer ppt
Physical layer ppt
 
Unit 3 Network Layer PPT
Unit 3 Network Layer PPTUnit 3 Network Layer PPT
Unit 3 Network Layer PPT
 
User datagram protocol (udp)
User datagram protocol (udp)User datagram protocol (udp)
User datagram protocol (udp)
 
Distance vector routing
Distance vector routingDistance vector routing
Distance vector routing
 
5. icmp
5. icmp5. icmp
5. icmp
 
Network Layer design Issues.pptx
Network Layer design Issues.pptxNetwork Layer design Issues.pptx
Network Layer design Issues.pptx
 
Internet protocol
Internet protocol Internet protocol
Internet protocol
 
Address resolution protocol (ARP)
Address resolution protocol (ARP)Address resolution protocol (ARP)
Address resolution protocol (ARP)
 
Transport layer
Transport layer Transport layer
Transport layer
 
Reference models in Networks: OSI & TCP/IP
Reference models in Networks: OSI & TCP/IPReference models in Networks: OSI & TCP/IP
Reference models in Networks: OSI & TCP/IP
 
Arp and rarp
Arp and rarpArp and rarp
Arp and rarp
 
Computer Network - Network Layer
Computer Network - Network LayerComputer Network - Network Layer
Computer Network - Network Layer
 
IPV4 Frame Format
IPV4 Frame FormatIPV4 Frame Format
IPV4 Frame Format
 
The medium access sublayer
 The medium  access sublayer The medium  access sublayer
The medium access sublayer
 

Destacado

Destacado (20)

Ch 18 intro to network layer - section 1
Ch 18   intro to network layer - section 1Ch 18   intro to network layer - section 1
Ch 18 intro to network layer - section 1
 
Ch 18 intro to network layer - section 3
Ch 18   intro to network layer - section 3Ch 18   intro to network layer - section 3
Ch 18 intro to network layer - section 3
 
Ch 18 intro to network layer - section 4
Ch 18   intro to network layer - section 4Ch 18   intro to network layer - section 4
Ch 18 intro to network layer - section 4
 
Ch 19 Network-layer protocols - section 2
Ch 19   Network-layer protocols - section 2Ch 19   Network-layer protocols - section 2
Ch 19 Network-layer protocols - section 2
 
Ch 18 intro to network layer - section 5
Ch 18   intro to network layer - section 5Ch 18   intro to network layer - section 5
Ch 18 intro to network layer - section 5
 
Ch 18 intro to network layer - section 2
Ch 18   intro to network layer - section 2Ch 18   intro to network layer - section 2
Ch 18 intro to network layer - section 2
 
Ch 20 UNICAST ROUTING SECTION 2
Ch 20   UNICAST ROUTING  SECTION  2Ch 20   UNICAST ROUTING  SECTION  2
Ch 20 UNICAST ROUTING SECTION 2
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithm
 
Network Layer,Computer Networks
Network Layer,Computer NetworksNetwork Layer,Computer Networks
Network Layer,Computer Networks
 
Chapter4 l4
Chapter4 l4Chapter4 l4
Chapter4 l4
 
CCNAv5 - S1: Chapter 6 - Network Layer
CCNAv5 - S1: Chapter 6 - Network LayerCCNAv5 - S1: Chapter 6 - Network Layer
CCNAv5 - S1: Chapter 6 - Network Layer
 
Congetion Control.pptx
Congetion Control.pptxCongetion Control.pptx
Congetion Control.pptx
 
Network Layer
Network LayerNetwork Layer
Network Layer
 
Internet protocol (ip) ppt
Internet protocol (ip) pptInternet protocol (ip) ppt
Internet protocol (ip) ppt
 
Chapter4 Network
Chapter4 NetworkChapter4 Network
Chapter4 Network
 
Ch08
Ch08Ch08
Ch08
 
Computer Networks Homework Help
Computer Networks Homework HelpComputer Networks Homework Help
Computer Networks Homework Help
 
Week9 lec1
Week9 lec1Week9 lec1
Week9 lec1
 
GOOGLE CAR(autonomous car)
GOOGLE CAR(autonomous  car)GOOGLE CAR(autonomous  car)
GOOGLE CAR(autonomous car)
 
Ppt 01 10
Ppt 01 10Ppt 01 10
Ppt 01 10
 

Similar a Ch 19 Network-layer protocols Section 1

Custom_IP_Network_Protocol_and_Router
Custom_IP_Network_Protocol_and_RouterCustom_IP_Network_Protocol_and_Router
Custom_IP_Network_Protocol_and_Router
Vishal Vasudev
 
Ip protocol
Ip protocolIp protocol
Ip protocol
H K
 

Similar a Ch 19 Network-layer protocols Section 1 (20)

IP Datagram Structure
IP Datagram StructureIP Datagram Structure
IP Datagram Structure
 
Network Layer & Transport Layer
Network Layer & Transport LayerNetwork Layer & Transport Layer
Network Layer & Transport Layer
 
Introduction to IP
Introduction to IPIntroduction to IP
Introduction to IP
 
C. N. II Lec.4.pdf h
C. N. II Lec.4.pdf                      hC. N. II Lec.4.pdf                      h
C. N. II Lec.4.pdf h
 
Internet Protocol
Internet ProtocolInternet Protocol
Internet Protocol
 
Final Presentation
Final PresentationFinal Presentation
Final Presentation
 
The Internet Protocol version 4 (IPv4)
The Internet Protocol version 4 (IPv4)The Internet Protocol version 4 (IPv4)
The Internet Protocol version 4 (IPv4)
 
Custom_IP_Network_Protocol_and_Router
Custom_IP_Network_Protocol_and_RouterCustom_IP_Network_Protocol_and_Router
Custom_IP_Network_Protocol_and_Router
 
Network Layer
Network LayerNetwork Layer
Network Layer
 
Tcp header/IP Header/Authentication header
Tcp header/IP Header/Authentication headerTcp header/IP Header/Authentication header
Tcp header/IP Header/Authentication header
 
tcpheader-151221111244.pdf
tcpheader-151221111244.pdftcpheader-151221111244.pdf
tcpheader-151221111244.pdf
 
Ip protocol
Ip protocolIp protocol
Ip protocol
 
TCP/IP 3RD SEM.2012 AUG.ASSIGNMENT
TCP/IP 3RD SEM.2012 AUG.ASSIGNMENTTCP/IP 3RD SEM.2012 AUG.ASSIGNMENT
TCP/IP 3RD SEM.2012 AUG.ASSIGNMENT
 
Ip and icmp
Ip and icmpIp and icmp
Ip and icmp
 
Internetworking - IP
Internetworking - IPInternetworking - IP
Internetworking - IP
 
Unit-2_CN.pdf
Unit-2_CN.pdfUnit-2_CN.pdf
Unit-2_CN.pdf
 
I.p. protocol
I.p. protocolI.p. protocol
I.p. protocol
 
Tcp ip
Tcp ipTcp ip
Tcp ip
 
TCP/IP Protocal Suite
TCP/IP Protocal SuiteTCP/IP Protocal Suite
TCP/IP Protocal Suite
 
Mod5
Mod5Mod5
Mod5
 

Último

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
MateoGardella
 

Último (20)

Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 

Ch 19 Network-layer protocols Section 1

  • 2.  INTRO TO INTERNET PROTOCOL (IP).  Datagram Format. - header description.  Fragmentation. - Maximum Transfer Unit (MTU). - Fields Related to Fragmentation.  Options. - Single-Byte Options. - Multliple-Byte Options.  Security of IPv4 Datagrams. - Packet Sniffing. - Packet Modification. - IP Spoofing. - IPSec.
  • 3. The network layer in version 4 consist of one main protocol and three auxiliary ones. 1. The main protocol(IPv4), is responsible for packetizing, forwarding, and delivery of a packet at the network layer. 2. (ICMPv4) helps IPv4 to handle some errors that may occur in the network-layer delivery. 3. (IGMP) is used to help IPv4 in multicasting. 4. (ARP) is used to glue the network and data-link layers in mapping network-layer addresses to link- layer addresses.
  • 4.  IPv4 is an (unreliable / best-effort) protocol of datagram delivery service.  Because Packets can be corrupted, be lost, arrive out of order, or be delayed, and may create congestion for the network.  To make it reliable ,IPv4 must be paired with a reliable transport-layer protocol such as TCP.
  • 5.  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.
  • 6.  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.  Payload (data) is the main reason for creating a datagram.  Payload is the packet coming from other protocols that use the service of IP.  Comparing : payload is the content of the package, the header is only the information written on the package.
  • 7.
  • 8.  Version Number(VER): defines the version of the IPv4, 4-bits length and has the value of 4.  Header Length(HLEN): defines the total length of the header divide by 4, 4-bits length, used to know when the header stops and the data Start. Header length = 4 * value of (HLEN)
  • 9.  Service Type: defines how the datagram should be handled, 8-bits length.  Total Length: defines the total length of datagram (header plus data) in bytes, 16-bits length. This field helps the receiving device to know when the packet has completely arrived. Length of data = Total length - Header length
  • 10.  Identification: helps the destination in reassembling the datagram, 16-bits length, It knows that all fragments having the same identification value should be assembled into one datagram.  Flags: 3-bits length, defines three flags, -leftmost bit is reserved (not used) -The second bit (D bit): if its value 1, means that packet not fragment , Otherwise fragment. -The third bit (M bit): if its value 1, means that this datagram is not the last fragment; there are more fragments after this one.
  • 11.  Fragmentation Offset: shows the relative position of this fragment with respect to the whole datagram,13-bits length, Offset value = The first byte number is divisible by 8
  • 12.  Time-to-live: used to control the maximum number of hops(routers) visited by the datagram, 8-bits length;  When a source host sends the datagram, it stores a number in this field.  This value is approximately two times the maximum number of routers between any two hosts.  Each router that processes the datagram decrements this number by one.  If this value, after being decremented, is zero, the router discards the datagram.
  • 13.  Protocol: 8-bit, When the payload is encapsulated in a datagram at the source IP, the corresponding protocol number is inserted in this field;  when the datagram arrives at the destination, the value of this field helps to define to which protocol the payload should be delivered.
  • 14.  Header checksum: 16-bits field, header checksum field to check the header, Because Errors in the IP header can be a disaster.  If the destination IP address is corrupted, the packet can be delivered to the wrong host.  If the protocol field is corrupted, the payload may be delivered to the wrong protocol.  If the fields related to the fragmentation are corrupted, the datagram cannot be reassembled correctly at the destination, and so on.
  • 15.  Source Addresses: 32-bits , define the address of the source.  Destination Addresses: 32-bits , define the address of the destination. Note that the value of these fields must remain unchanged during the time datagram travels from the source host to the destination host.
  • 16. Header length = 4 * value of (HLEN) Header length = 4 * 5 = 20. Length of data = Total length - Header length Length of data = 40 - 20 =20
  • 17.
  • 18.  When a machine (router or host) receives a frame, it drops the header and the trailer, leaving the datagram.  in many cases we really do not need the value in this field.  However, there are occasions in which the datagram is not the only thing encapsulated in a frame;  it may be that padding has been added.
  • 19.  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.  The format and size of the sent frame depend on the protocol used by the physical network through which the frame is going to travel.
  • 20.  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.  maximum length of the IP datagram equal to 65,535 bytes.
  • 21.  A datagram can be fragmented by the source host or any router in the path.  When a datagram is fragmented, each fragment has its own header with most of the fields repeated, but some have been changed.  The reassembly of the datagram, however, is done only by the destination host, because each fragment becomes an independent datagram.
  • 22.  A datagram header can have up to 40 bytes of options.  Options can be used for network testing and debugging.  Although options are not a required part of the IP header, option processing is required of the IP software.  This means that all implementations must be able to handle options if they are present in the header.  some options can be changed by routers, which forces each router to recalculate the header checksum.  There are one-byte and multi-byte options.
  • 23.  The header of the IPv4 datagram is made of two parts:  The fixed part is 20 bytes long  The variable part comprises the options that can be a maximum of 40 bytes to preserve the boundary of the header.  Options are divided into two broad categories: single-byte options and multiple-byte options.
  • 24. There are two single-byte options:  No Operation: is a 1-byte option used as a filler between options.  End of Option: is a 1-byte option used for padding at the end of the option field.
  • 25.  Record Route: is used to record the Internet routers that handle the datagram. It can list up to nine router addresses. It can be used for debugging and management purposes.  Strict Source Route: is used by the source to predetermine a route for the datagram, The sender can choose a route with a specific type of service, such as minimum delay or maximum throughput.
  • 26.  Loose Source Route: is similar to the strict source route, but it is less rigid. Each router in the list must be visited, but the datagram can visit other routers as well.  Timestamp: is used to record the time of datagram processing by a router, We can estimate the time it takes for a datagram to go from one router to another.
  • 27. There are three security issues that are particularly applicable to the IP protocol: 1- Packet Sniffing:  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.  Although packet sniffing cannot be stopped, encryption of the packet can make the attacker’s effort useless.  The attacker may still sniff the packet, but the content is not detectable.
  • 28. Packet Modification:  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.
  • 29. IP Spoofing:  An attacker can masquerade as somebody else and create an IP packet that carries the source address of another computer.  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
  • 30. The IP packets today can be protected from the previously mentioned attacks using a protocol called IPSec.  Defining Algorithms and Keys: The two entities that want to create a secure channel between themselves can agree on some available algorithms and keys to be used for security purposes.  Packet Encryption: The packets exchanged between two parties can be encrypted for privacy using one of the encryption algorithms and a shared key agreed upon in the first step. This makes the packet sniffing attack useless.
  • 31.  Data Integrity: the packet is not modified during the transmission. If the received packet does not pass the data integrity test, it is discarded. This prevents the second attack.  Origin Authentication: IPSec can authenticate the origin of the packet to be sure that the packet is not created by an imposter. This can prevent IP spoofing attacks .