TCP/IP Protocol Suite: Table Of Contents
Internet Protocol – Q&A
Questions
- What is IP?
- To which OSI layer does IP belong?
- Which RFC discusses IP?
- Which version of IP is discussed in this document?
- What do you mean by IP is an unreliable protocol?
- What do you mean by IP is a best-effort protocol?
- What do you mean by IP is a connection-less protocol?
- What is the role of IP in the TCP/IP protocol suite?
- What is an IP Datagram?
- How higher-level data is carried by IP to a destination
host?
- What is the minimum and maximum size of an IP datagram?
- What is the minimum and maximum size of an IP datagram
header?
- Is there a limitation on the minimum size of a IP datagram a
network can handle?
- What are the fields in an IP datagram header?
- What is the byte order used for transmitting datagram
headers in the TCP/IP protocol suite?
- Why there are two length fields (IP header length, IP
datagram length) in the IP header?
- How is the value for datagram identifier calculated?
- What is the use of datagram identifier field?
- Is the datagram identifier field unique for each IP
datagram?
- What is the use of Type Of Service field in the IP
header?
- What are the different types of criteria can be specified
using the TOS field?
- Which RFC discusses the Type Of Service (TOS) field?
- What is the use of the Time To Live (TTL) field in the IP
header?
- How is the TTL field used to prevent indefinite looping of
IP datagrams?
- What is the typical value for the TTL field?
- When is a datagram considered undeliverable?
- How a datagram becomes an undeliverable datagram?
- What happens to an undeliverable datagram?
- Is it possible for an IP datagram to be duplicated?
- Which part of the IP datagram is used for calculating the
checksum?
Answers
- What is IP?
- To which OSI layer does IP belong?
- Which RFC discusses IP?
- Which version of IP is discussed in this document?
- What do you mean by IP is an unreliable protocol?
- What do you mean by IP is a best-effort protocol?
- What do you mean by IP is a connection-less protocol?
- What is the role of IP in the TCP/IP protocol suite?
- Transmitting data from higher-level protocols like TCP, UDP in IP
datagrams, from one host to another host in the network.
- Identifying individual hosts in a network using an IP address.
- Routing datagrams through gateways and
- Fragmenting and reassembling datagrams based on the MTU of the underlying
network.
- What is an IP Datagram?
- How higher-level data is carried by IP to a destination host?
- What is the minimum and maximum size of an IP datagram?
- What is the minimum and maximum size of an IP datagram header?
- Is there a limitation on the minimum size of a IP datagram a network can
handle?
- What are the fields in an IP datagram header?
- What is the byte order used for transmitting datagram headers in the
TCP/IP protocol suite?
- Why there are two length fields (IP header length, IP datagram length)
in the IP header?
- How is the value for datagram identifier calculated?
- What is the use of datagram identifier field?
- Is the datagram identifier field unique for each IP datagram?
- What is the use of Type Of Service field in the IP header?
- What are the different types of criteria can be specified using the TOS
field?
- Minimize delay,
- Maximize throughput
- Maximize reliability
- Minimize cost and
- Normal service.
- Which RFC discusses the Type Of Service (TOS) field?
- What is the use of the Time To Live (TTL) field in the IP
header?
- How is the TTL field used to prevent indefinite looping of IP
datagrams?
- What is the typical value for the TTL field?
- When is a datagram considered undeliverable?
- How a datagram becomes an undeliverable datagram?
- The destination host is down.
- The route for the destination host is not found.
- A network in the route to the destination host is down.
- The Time To Live (TTL) value of the datagram becomes zero.
- What happens to an undeliverable datagram?
- Is it possible for an IP datagram to be duplicated?
- Which part of the IP datagram is used for calculating the
checksum?
Internet Protocol (IP) is an unreliable, best effort delivery, connection-less
protocol used for transmitting and receiving data between hosts in a TCP/IP
network.
IP belongs to the Network Layer (layer 3) in the OSI model.
RFC 791 discusses about the IP protocol version 4.
IP version 4 (IPv4) is discussed in this document.
IP is a unreliable protocol because it does not guarantee the delivery of a
datagram to its destination. The reliability must be provided by the upper
layer protocols like TCP. IP does not support flow control, retransmission,
acknowledgement and error recovery.
IP is a best-effort protocol, because it will make every effort to always
transmit a datagram and also datagrams will not be just discarded. However,
the delivery of the datagram to the destination is not guaranteed.
IP is a connection-less protocol because it does not maintain state information
about the connection to a destination host. Each datagram is handled
independent of other datagrams and also each datagram may reach the destination
through different network routes.
IP is used for
An IP datagram is a basic unit of information used by the IP layer to exchange
data between two hosts. A IP datagram consists of an IP header and data.
The data from higher-level protocols like TCP, UDP is encapsulated in an IP
datagram and transmitted to the destination host. IP will not modify the
higher-level data.
The minimum size of an IP datagram is 576 bytes and the maximum size is 65535
bytes.
The minimum size of an IP datagram header is 20 bytes. The maximum IP datagram
header size is 60 bytes.
Yes. All IP networks must be able to handle datagrams of at least 576 bytes in
length.
The various fields in an IP datagram header and their size in bits are shown
below:
+————-+
| Version | 4 bits
+————-+
| IP Header | 4 bits
| Length |
+————-+
| Type of | 8 bits
| Service |
+————-+
| Size of the | 16 bits
| Datagram |
+————-+
| Datagram ID | 16 bits
+————-+
| Control | 3 bits
| Flags |
+————-+
| Fragment | 13 bits
| Offset |
+————-+
| Time to | 8 bits
| Live |
+————-+
| Protocol | 8 bits
+————-+
| Header | 16 bits
| Checksum |
+————-+
| Source IP | 32 bits
| Address |
+————-+
| Destination | 32 bits
| IP Address |
+————-+
| Options | Variable Length
+————-+
The various fields are explained below:
+———–+—————————————————–+
| Version | IP protocol version. For IPv4, this value is 4. |
+———–+—————————————————–+
| IP Header | Length of the IP header in multiples of |
| Length | 32-bit words. |
+———–+—————————————————–+
| Type of | Quality of Service(QOS) requested for this datagram.|
| Service | |
| (TOS) | |
+———–+—————————————————–+
| Datagram | Length of the entire datagram in bytes, including |
| Size | the header and the payload. |
+———–+—————————————————–+
| Datagram | Current datagram identifier. |
| ID | |
+———–+—————————————————–+
| Control | Bit 0: Reserved |
| Flags | Bit 1: 0 – Allow fragment, 1 – Don’t fragment. |
| | Bit 2: 0 – Last fragment, 1 – More fragments. |
+———–+—————————————————–+
| Fragment | Specifies the offset in the original IP datagram, |
| Offset | where this fragment begins. This is a multiple of |
| | 32 bit words. |
+———–+—————————————————–+
| Time to | The time upto which this datagram can live in the |
| Live | network. |
| (TTL) | |
+———–+—————————————————–+
| Protocol | Indicates to which upper-layer protocol layer this |
| | datagram should be delivered. e.g. TCP, UDP |
+———–+—————————————————–+
| Header | IP header checksum. |
| Checksum | |
+———–+—————————————————–+
| Source IP | IP address of the source host sending this IP |
| Address | datagram. |
+———–+—————————————————–+
| Target IP | IP address of the destination host to which this |
| Address | IP datagram must be delivered. |
+———–+—————————————————–+
| Options | Used for timestamps, security, source routing, etc. |
+———–+—————————————————–+
All the datagram headers in the TCP/IP protocol suite are transmitted in the
“big endian” byte order. i.e. The most significant byte is transmitted first.
This is also called as “network byte order”.
The size of the IP header is not fixed. Depending on the IP options present,
the size of the IP header will vary. A separate field for the IP header length
is added, so that the destination system can separate the IP datagram header
from the payload.
The IP datagram identifier is just a sequence number assigned by the
transmitting host. The algorithm for assigning value to this field is not
specified by the IP protocol.
The IP datagram identifier field is used to uniquely identify and assemble the
different fragments of an IP datagram.
Yes. The IP datagram identifier field is different for each IP datagram
transmitted. The fragments of an IP datagram will have the same identifier
value.
The Type Of Service (TOS) field is used TCP to describe the desired quality of
service for an IP datagram by upper layer protocols like TCP. This field can
be used to specify the nature and priority of a IP datagram (like Network
Control, Immediate, Critical, etc) and the criteria for selecting a path for
forwarding a datagram by a gateway.
The different types of criteria that can be specified by the TOS field in an IP
datagram are:
RFC 1349 discusses the Type Of Service (TOS) field.
The TTL field is used to limit the lifetime of a IP datagram and to prevent
indefinite looping of IP datagrams.
The TTL field contains a counter value set by the source host. Each gateway
that processes this datagram, decreases the TTL value by one. When the TTL
value reaches zero, the datagram is discarded.
The typical value for a TTL field is 32 or 64.
If a datagram cannot be delivered to the destination host due to some reason,
it is considered an undeliverable datagram.
A datagram may become undeliverable, if
An undeliverable datagram is discarded and an ICMP error message is sent to the
source host.
Yes. A host may receive the same copy of an IP datagram twice. It is upto the
higher layer protocols to discard the duplicate copy of the datagram.
The checksum field in the IP header covers only the IP header. The payload
data is not used for calculating this checksum.