Internet Protocol - IP IP Features
Internet Protocol - IP IP Features
IP Features
IP is a connectionless or datagram internetwork service, providing no end-toend delivery guarantees. IP datagrams may arrive at the destination host damaged, duplicated, out of order, or not at all.
All Internet transport protocols use the Internet Protocol (IP) to carry data from source host to destination host.
1
IP Features
The layers above IP are responsible for reliable delivery service when it is required. The IP protocol includes provision for addressing, type-of-service specification, fragmentation and re-assembly, and security. The datagram or connectionless nature of IP is a fundamental and characteristic feature of the Internet architecture.
3
Connectionless IP Internetworking
Advantages
Flexibility Robust No unnecessary overhead
Router-based Networking
Unreliable
Not guaranteed delivery Not guaranteed order of delivery
Packets can take different routes
Addressing.
Fragmentation.
Options
IP Datagram Format
10
VERS - Version
The version of the IP protocol. The current version is 4. 5 is experimental and 6 is IPng (see IP: The Next Generation (IPng)).
The version of the IP protocol
LEN - Length
The length of the IP header counted in 32bit quantities. This does not include the data field.
Type of Service
The type of service is an indication of the quality of service requested for this IP datagram.
quality of service??
Routine Priority Immediate Flash Flash override Critical Internetwork control Network control
14
16
Total Length
Total length of the IP datagram in bytes Maximum size is 64k because there are 16 bits for it That means a single IP datagram cannot be bigger than 65536 bytes including the header
17
18
Why Fragment?
When an IP datagram travels from one host to another, it can cross different physical networks. Physical networks have a maximum frame size, called the Maximum Transmission Unit (MTU), which limits the length of a datagram that can be placed in one physical frame. Therefore, a scheme has been put in place to fragment long IP datagrams into smaller ones, and to reassemble them at the destination host. IP requires that each link has an MTU of at least 68 bytes, so if any network provides a lower value than this, fragmentation and re-assembly must be implemented in the network interface layer in a way that is transparent to IP. 68 is the sum of the maximum IP header length of 60 bytes and the minimum possible length of data in a non-final fragment (8 bytes). IP implementations are not required to handle unfragmented datagrams larger than 576 bytes, but most implementations will handle larger values, typically slightly more than 8192 bytes or higher, and rarely less than 1500.
19
Why Fragment?
Host - A in LAN -1 is commnicating with Host - B in LAN -2 using IP Host - A Host - B
Router A
Router B
Router A has to perform fragmentation of IP datagrams when forwarding them from LAN-1 to WAN-1
20
Fragmentation Procedure
An unfragmented datagram has all-zero fragmentation information. That is, the more fragments flag bit is zero and the fragment offset is zero. When fragmentation is to be done, the following steps are performed:
Fragmentation Procedure
The DF flag bit is checked to see if fragmentation is allowed. If the bit is set, the datagram will be discarded and an error will be returned to the originator using ICMP. Based on the MTU value, the data field is split into two or more parts. All newly created data portions must have a length which is a multiple of 8 bytes, with the exception of the last data portion.
21 22
Fragmentation Example
Fragmentation Procedure - 2
All data portions are placed in IP datagrams. The header of these datagrams are copies of the original one, with some modifications: The more fragments flag bit is set in all fragments except the last. The fragment offset field in each is set to the location this data portion occupied in the original datagram, relative to the beginning of the original unfragmented datagram. The offset is measured in 8-byte units. If options were included in the original datagram, the high order bit of the option type byte determines whether or not they will be copied to all fragment datagrams or just to the first one. For instance, source route options have to be copied in all fragments and therefore they have this bit set. The header length field is of the new datagram is set. The total length field of the new datagram is set. The header checksum field is re-calculated.
23 24
Fragmentation Procedure - 3
Each of these fragmented datagrams is now forwarded as a normal IP datagram. IP handles each fragment independently, that is, the fragments may traverse different routers to the intended destination, and they may be subject to further fragmentation if they pass through networks that have smaller MTUs.
Reassembley Procedure
At the destination host, the data has to be reassembled into one datagram. The identification field of the datagram was set by the sending host to a unique number (for the source host, within the limits imposed by the use of a 16-bit number). As fragmentation doesn't alter this field, incoming fragments at the receiving side can be identified, if this ID field is used together with the Source and Destination IP addresses in the datagram. The Protocol field is also to be checked for this identification.
25 26
Reassembley Procedure - 2
In order to reassemble the fragments, the receiving host allocates a buffer in storage as soon as the first fragment arrives. A timer routine is then started. When the timer timeouts and not all of the fragments have been received, the datagram is discarded. The initial value of this timer is called the IP datagram time-to-live (TTL) value. It is implementation dependent, and some implementations allow it to be configured; for example AIX Version 3.2 provides an ipfragttl option with a default value of 60 seconds.
27
Re-assembly Procedure - 3
When subsequent fragments of the datagram arrive, before the timer expires, the data is simply copied into the buffer storage, at the location indicated by the fragment offset field. As soon as all fragments have arrived, the complete original unfragmented datagram is restored, and processing continues, just as for unfragmented datagrams.
28
Fragmentation Fields
Identification - A unique number assigned by the sender to aid in reassembling a fragmented datagram. Fragments of a datagram will have the same identification number. Fragment Offset - Used with fragmented datagrams, to aid in reassembly of the full datagram. The value is the number of 64-bit pieces (header bytes are not counted) that are contained in earlier fragments. In the first (or only) fragment, this value is always zero.
29
Flags
Where: 0 Reserved, must be zero DF Don't Fragment:
0 means allow fragmentation 1 means do not allow fragmentation
MF More Fragments: 0 means that this is the last fragment of this datagram, 1 means that this is not the last fragment.
30
Header Checksum
Is a checksum on the header only. It does not include the data. The checksum is calculated as the 16-bit one's complement of the one's complement sum of all 16-bit words in the header. For the purpose of this calculation, the checksum field is assumed to be zero. If the header checksum does not match the contents, the datagram is discarded because at least one bit in the header is corrupt, and the datagram may even have arrived at the wrong destination.
34
Options
Various options regarding this datagram, including how to route it, how to identify it (security labeling), how to trace the places through which it passes, how to timestamp it for delay measurement, etc.
Options
Options Up to 40 bytes of option data added by source host or intermediate routers 1 byte Option id, followed by an optional 1 byte Option length, followed by Option data Padded to a multiple of 4 bytes 5 options currently defined Security Security identifier Strict source routing Complete route specified Loose source routing List of required routers to pass through Record route Each router appends its address to the list Timestamp Each router appends address & timestamp stream id (used for voice) for reserved resources,
36