Flux rss

IP protocol

The role of IP protocol

IP protocol is part of the Internet layer of the TCP/IP protocol suite. It is one of the most important Internet protocols because it allows the development and transport of IP datagrams (data packets), without however ensuring their "delivery". In reality, IP protocol processes IP datagrams independently from each other by defining their representation, routing and forwarding.

IP protocol determines the recipient of the message using 3 fields:

  • The IP address field: machine address
  • The subnet mask field: a subnet mask enables the IP protocol to establish the part of the IP address which relates to the network
  • The default gateway field: enables the Internet protocol to know which machine to deliver a datagram to if ever the destination machine is not on the local area network.

Datagrams

Data circulates on the Internet in the form of datagrams (also known as packets). Datagrams are encapsulated data, i.e. data to which headers are added relating to information about their transport (such as the destination IP address).

The data contained within the datagram is analysed (and possibly modified) by the routers allowing their transit.

Here is what a datagram looks like:

<-- 32 bits -->
Version
(4 bits)
Header length
(4 bits)
Service type
(8 bits)
Total length
(16 bits)
Identification
(16 bits)
Flag
(3 bits)
Fragment offset
(13 bits)
Time to live
(8 bits)
Protocol
(8 bits)
Header checksum
(16 bits)
Source IP address (32 bits)
Destination IP address (32 bits)
Data

Here are the meanings of the different fields:

  • Version (4 bits): this is the version of IP protocol being used (currently version 4 IPv4 is being used) in order to verify the validity of the datagram. It is coded over 4 bits.
  • Header length or IHL for Internet Header Length (4 bits): this is the number of 32 bit words making up the header (NB: the minimum value is 5). This field is coded over 4 bits.
  • Service type (8 bits): indicates the way in which the datagram must be processed.
  • Total length (16 bits): indicates the total size of the datagram in bytes. The size of this field being 2 bytes, the total size of the datagram cannot exceed 65536 bytes. Used jointly with the header size, this field makes it possible to determine where the data is located.
  • Identification, flags and fragment offsetting are fields which enable datagram fragmentation, they are explained below.
  • TTL or Time to Live (8 bits): this field specifies the maximum number of routers through which the datagram may pass. So this field is decremented with each passage through a router and when it reaches the critical value of 0, the router destroys the datagram. This prevents the network being overloaded with lost datagrams.
  • Protocol (8 bits): this field, in decimal notation, makes it possible to find out which protocol the datagram comes from.
    • ICMP: 1
    • IGMP: 2
    • TCP: 6
    • UDP: 17
  • Header checksum (16 bits): this field contains a value coded over 16 bits which enables the integrity of the header to be monitored in order to establish whether it has been altered during transmission. The checksum is the addition of one to all the 16 bit words of the header (checksum field excluded). This is done so that when the header fields are added together (inclusive checksum), a number with all the bits positioned at 1 is obtained.
  • Source IP address (32 bits): This field represents the IP address of the originator machine, it enables the recipient to respond.
  • Destination IP address (32 bits): IP address of the message recipient

Fragmentation of IP datagrams

As we have previously seen, the maximum size of a datagram is 65536 bytes. However, this value is never reached because networks do not have sufficient capacity to send such large packets. In addition, networks on the Internet use different technologies and the maximum size of a datagram varies depending on the network type.
The maximum size of a frame is called the MTU (Maximum Transfer Unit); it will lead to the fragmentation of the datagram if it is larger than the network's MTU.

Network type MTU (in bytes)
Arpanet 1000
Ethernet 1500
FDDI 4470

Datagram fragmentation takes place at router level, i.e. during transition from a network with a large MTU to a network with a smaller MTU. If the datagram is too large to pass onto the network, the router will fragment it, i.e. cut it into fragments smaller than the network's MTU in such a way that the size of the fragment is a multiple of 8 bytes.

The router will then send these fragments independently and re-encapsulate them (add a header to each fragment) in such a way as to take into account the new size of the fragment. In addition, the router adds information so that the recipient machine can reassemble the fragments in the right order. However, there is nothing to say that the fragments will arrive in the right order, considering that they are routed independently from each other.

To take into account fragmentation, each datagram has several fields permitting their reassembly:

  • Fragment offset field (13 bits): field providing the position of the beginning of the fragment in the initial datagram. The unit of measure for this field is 8 bytes (the first fragment having a zero value).
  • Identification field (16 bits): number allocated to each fragment in order to enable reassembly.
  • Total length field (16 bits): this is recalculated for each fragment.
  • Flag field (3 bits): this comprises of three bits:
    • The first is not used.
    • The second (called DF: Don't Fragment) indicates if the datagram can be fragmented or not. If a datagram has this bit positioned at one and the router cannot route it without fragmenting it, the datagram is rejected with an error message.
    • The second (called MF: More Fragments), indicates if the datagram is a fragment of data (1). If the indicator is at zero, this indicates that the fragment is the last (so the router must be in possession of all the previous fragments) or the datagram has not been subject to fragmentation.

IP routing

IP routing is an integral part of the Internet layer of the TCP/IP suite. Routing consists of providing the routing for an IP datagram across a network by taking the shortest path. This role is conducted by machines called routers, i.e. machines linked (linking) by at least two networks.

More information

For more information on ICMP protocol, please refer to RFC 791 which explains the IP protocol in detail:

This document entitled « IP protocol » from Kioskea (en.kioskea.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the licence, as this note appears clearly.

Résultats pour IP protocol

Internet - IPv6 protocol Document written by Nico VanHaute The days of IP protocol in its current format (IPv4) are numbered. From the middle of the 1990s the Internet was largely used by universities, high tech industries and the government, but the Internet increasingly... en.kioskea.net/internet/ipv6.php3
How do I install a TCP/IP protocol. Hello, I have a dell optiplex g260 and a gateway both running a windows xp pro operating system. Both computers says that we need a TCP/IP protocol installed. if we click install, it says that they can not find what is needed to install the protocol... en.kioskea.net/forum/affich-27000-how-do-i-install-a-tcp-ip-protocol
Internet - The TCP/IP suite TCP/IP is a suite of protocols. The acronym TCP/IP means "Transmission Control Protocol/Internet Protocol" and is pronounced "T-C-P-I-P". It comes from the names of the two major protocols in the suite of protocols, i.e. the TCP and IP protocols). In... en.kioskea.net/internet/tcpip.php3

Résultats pour IP protocol

The BitTorrent ProtocolThe BitTorrent Protocol What is the BitTorrent protocol? How does it work? Is BitTorrent legal? Downloading Torrent and sharing files BitTorrent Clients What is the BitTorrent protocol? The BitTorrent protocol was designed by the... en.kioskea.net/faq/sujet-226-the-bittorrent-protocol
Command to detect your IP address!Command to detect your IP address! IP address (Internet Protocol) is a numerical identification to detect your computer on a network. It is used to communicate between nodes on a computer network. Find below the commands to execute and provide... en.kioskea.net/faq/sujet-553-command-to-detect-your-ip-address
Differences between the UDP and TCP protocolsDifferences between the UDP and TCP protocols User Datagram Protocol (UDP) Transmission Control Protocol (TCP) User Datagram Protocol (UDP) It is part of the base protocols of the Internet Protocol Suite. Programs on networked computers... en.kioskea.net/faq/sujet-608-differences-between-the-udp-and-tcp-protocols

Résultats pour IP protocol

Enable IPX networkingHello, Which commands, at a minimum, must be used to enable IPX networking ? en.kioskea.net/forum/affich-2345-enable-ipx-networking
The Network layer protocolHello, What Protocol does PPP use to identify the Network layer protocol ? en.kioskea.net/forum/affich-2442-the-network-layer-protocol
Need help to setup a lan connection between 2Hello, can someone help me step by step to connect my laptop to my pc so i can take some files ? please i have tried all kind of stuff but to no result en.kioskea.net/forum/affich-2335-need-help-to-setup-a-lan-connection-between-2

Résultats pour IP protocol

Download Portable Adium Portable Adium is an instant messaging protocol that you can carry on your Ipod, usb device and many more portable device but that doesn't store your user name and password along..Be sure that you have a free space memory of at least 50Mb and use on... en.kioskea.net/telecharger/telecharger-228-portable-adium
Download Angry IP ScannerAngry IP Scanner is a software which allows to analyse a local network. With the aid of this program they can easily show the list of the address IP of every present PC on network.Endowed with an intuitive interface, application can be used by every... en.kioskea.net/telecharger/telecharger-295-angry-ip-scanner
Download Visual IP LocatorThey do not always know good addresses on the net to have the information which they want (whois, Traceroute, etc).Do not you ever have wanted to prove the place where is exactly your interlocutor during debates? With Visual IP Locator, it will be a... en.kioskea.net/telecharger/telecharger-774-visual-ip-locator

Résultats pour IP protocol

Gadget lovers flip over new iPhone 3GA customer shows Apple's new 3G iPhone mobile handset at the Softbank shop in Tokyo on July 11. Apple's international launch of its iPhone 3G has begun in several Asian countries as a freshly-opened "App Store" tempted fans with additional... en.kioskea.net/actualites/gadget-lovers-flip-over-new-iphone-3g-10529-actualite.php3
Apple opens online 'extras' shop on eve of iPhone 3G launchApple on Thursday threw open the virtual doors of an "App Store" brimming with independently created mini-programs promising to make iPhones even more coveted. Apple on Thursday threw open the virtual doors of an "App Store" brimming with... en.kioskea.net/actualites/apple-opens-online-extras-shop-on-eve-of-iphone-3g-launch-10522-actualite.php3
Newest BlackBerry aims to keep Apple iPhone at bayA visitor walks past a display of Blackberry "Smart Phones" at the CeBIT trade fair in Hanover. Research in Motion unveiled Monday its latest BlackBerry smartphone with new styling and technology that aims to bite into Apple's juicy iPhone... en.kioskea.net/actualites/newest-blackberry-aims-to-keep-apple-iphone-at-bay-10364-actualite.php3

Résultats pour IP protocol

Internet - Messaging protocols (SMTP,POP,IMAP) E-mail is considered as being the most widely used service on the Internet. So the TCP/IP protocol suite offers a range of protocols allowing the easy management of email routing over the network. The SMTP protocol (Simple Mail Transfer Protocol) is... en.kioskea.net/internet/smtp.php3
Internet - IP Addresses Computers communicate over the Internet using the IP protocol (Internet Protocol), which uses numerical addresses, called IP addresses, made up of four whole numbers (4 bytes) between 0 and 255 and written in the format xxx.xxx.xxx.xxx. For example,... en.kioskea.net/internet/ip.php3
Security - Network address translation (NAT) Network address translation or NAT was developed in order to respond to the shortage of IP addresses with IPv4 protocol (in time the IPv6 protocol will respond to this problem). In fact, in IPv4 addressing the number of routable IP addresses (which... en.kioskea.net/internet/nat.php3