Topic7 IP Protocols 01
Topic7 IP Protocols 01
IP Protocols
IP Service
• Delivery service of IP is minimal
• IP provides an unreliable connectionless best effort
service (also called: “datagram service”).
– Unreliable: IP does not make an attempt to recover
lost packets
– Connectionless: Each packet (“datagram”) is handled
independently. IP is not aware that packets between
hosts may be sent in a logical sequence
– Best effort: IP does not make guarantees on the
service (no throughput guarantee, no delay
guarantee,…)
• Consequences:
• Higher layer protocols have to deal with losses or with duplicate
packets
source IP address
destination IP address
options (0 to 40 bytes)
payload
4 bytes
Fields of the IP Header
6 = TCP 17 = UDP
1 = ICMP 2 = IGMP
IP
Ethernet
FDDI
Ring
Host A Router Host B
• Fragmentation:
• IP router splits the datagram into several datagram
• Fragments are reassembled at receiver
Where is Fragmentation done?
Router
What’s involved in Fragmentation?
• The following fields in the IP
header are involved:
header
version
length
DS ECN total length (in bytes)
DM
Identification 0 Fragment offset
F F
time-to-live (TTL) protocol header checksum
Second Fragment:
Data remaining to be carried: 2380 – 976 = 1404 >Fragment
IP datagram 980 -->3 976 Fragment 2 Fragment 1
Third Fragment:
Data remaining to be transmitted = 2380 – 976 – 976 = 428Fragment 3
IP datagram Fragment 2 Fragment 1
H1 H2 H3 H4
10.0.1.1 10.0.1.1
Private network 1 Private network 1
Internet
R1 128.195.4.119 128.143.71.21 R2
213.168.112.3
H5
Network Address Translation (NAT)
With Port Address Translation (PAT), a single public IP address is used for all
internal private IP addresses, but a different port is assigned to each private
IP address. This type of NAT is also known as NAT Overload and is the typical
form of NAT used in today’s networks.
Dynamic Host Configuration
Protocol (DHCP)
Dynamic Assignment of IP addresses
DHCP Server
DHCP Client
• DCHP OFFER
00:a0:24:71:e4:44 DHCPOFFER DHCP Server
Sent by the server, which
DHCPOFFER
is also a broadcast frame
since the client who
requested it does not
have an IP address yet.
DHCP Server
DHCP Operation
Acknowledgment
message.
DHCP Operation
IP payload
ICMP message format
bit # 0 7 8 15 16 23 24 31
additional information
or
0x00000000
4 byte header:
• Type (1 byte): type of ICMP message
• Code (1 byte): subtype of ICMP message
• Checksum (2 bytes): similar to IP header checksum.
Checksum is calculated over entire ICMP message
If there is no additional data, there are 4 bytes set to zero.
each ICMP messages is at least 8 bytes long
ICMP Query message
ICMP query:
• Request sent by host to a router or host
• Reply sent back to querying host
Example of ICMP Queries
Type/Code: Description
The ping command
8/0 Echo Request uses Echo Request/
0/0 Echo Reply Echo Reply
Unused (0x00000000)
• If, in the destination host, the IP module cannot deliver the datagram
because the process port is not active, the destination host may send a
destination unreachable message to the source host.
• Scenario:
No process
is waiting
at port 80
Client Server
Wireshark Example of Host Unreachable