Internet Protocol

From Wikipedia, the free encyclopedia

Internet protocol suite
5. Application layer

DHCPDNSFTPHTTPIMAP4IRCMIMEPOP3SIPSMTPSNMPSSHTELNETTLS/SSLRPCRTPSDPSOAP

4. Transport layer

TCPUDPRSVPDCCPSCTP

3. Network layer

IP (IPv4IPv6) • ARPBGPICMPIGMPIGPRARP

2. Data link layer

ATMBluetooth (PAN-Profile)DTMEthernetFDDIFrame RelayGPRSModemsPPPWi-Fi

1. Physical layer

Bluetooth RFEthernet physical layerISDNModemsRS232SONET/SDHUSBWi-Fi

This box: view  talk  edit

The Internet Protocol (IP) is a data-oriented protocol used for communicating data across a packet-switched internetwork.

IP is a network layer protocol in the internet protocol suite and is encapsulated in a data link layer protocol (e.g., Ethernet). As a lower layer protocol, IP provides the service of communicable unique global addressing amongst computers. This implies that the data link layer need not provide this service. Ethernet provides globally unique addresses except it is not globally communicable (i.e., two arbitrarily chosen Ethernet devices will only be able to communicate if they are on the same bus). The difference is that IP is concerned with the final destination of data packets. Ethernet is concerned with only the next device (computer, router, etc.) in the chain. The final destination and next device could be one and the same (if they are on the same bus) but the final destination could be on the other side of the world.

Contents

[edit] Packetization

Encapsulation of user data in a UDP datagram inside an IP packet.
Enlarge
Encapsulation of user data in a UDP datagram inside an IP packet.
An example IP header as captured by ethereal.
Enlarge
An example IP header as captured by ethereal.

Data from an upper layer protocol is encapsulated inside one or more packets/datagrams (the terms are basically synonymous in IP). No circuit setup is needed before a host tries to send packets to a host it has previously not communicated with (this is the point of a packet-switched network), thus IP is a connectionless protocol. This is quite unlike Public Switched Telephone Networks that require the setup of a circuit before a phone call may go through (a connection-oriented protocol).

[edit] Services provided by IP

Because of the abstraction provided by encapsulation, IP can be used over a heterogeneous network (i.e., a network connecting two computers can be any mix of Ethernet, ATM, FDDI, Wi-fi, token ring, etc.) and it makes no difference to the upper layer protocols.

All the data link layers can (and do) have their own set of addressing (or possibly the complete lack of it) and the need to resolve IP addresses to data link addresses is needed. This resolving is addressed by the Address Resolution Protocol (ARP).

[edit] Reliability

IP provides an unreliable service (i.e., best effort delivery). This means that the network makes no guarantees about the packet and none, some,
or all of the following may apply:

  • data corruption
  • out of order (packet A may be sent before packet B, but B can arrive before A)
  • duplicate arrival
  • lost or dropped/discarded

In terms of reliability the only thing IP does is ensure the IP packet's header is error-free through the use of a checksum. This has the side-effect of discarding packets with bad headers on the spot, and with no required notification to either end (though an ICMP message may be sent).

To address any of these reliability issues, an upper layer protocol must handle it. For example, to ensure in-order delivery the upper layer may have to cache data until it can be passed up in order.

If the upper layer protocol does not self-police its own size by first looking at the Layer 2 MTU size, and sends the IP layer too much data, IP is forced to fragment the original datagram into smaller fragments for transmission. IP does provide re-ordering of any fragments that arrive out of order by using the fragmentation flags and offset.[1] TCP is a good example of a protocol that will adjust its segment size to be smaller than the MTU. UDP and ICMP are examples of protocols that disregard MTU size thereby forcing IP to fragment oversized datagrams.[2]

The primary reason for the lack of reliability is to reduce the complexity of routers. While this does give routers carte blanche to do as they please with packets, anything less than best effort yields a poorer experience for the user. So, even though no guarantees are made, the better the effort made by the network, the better the experience for the user.

[edit] IP addressing and routing

Perhaps the most complex aspects of IP are IP addressing and routing. Addressing refers to how end hosts become assigned IP addresses and how subnetworks of IP host addresses are divided and grouped together. IP routing is performed by all hosts, but most importantly by internetwork routers, which typically use either interior gateway protocols (IGPs) or external gateway protocols (EGPs) to help make IP datagram forwarding decisions across IP connected networks.

[edit] Version history

IP is the common element found in today's public Internet. The current and most popular network layer protocol in use today is IPv4; this version of the protocol is assigned version 4. IPv4 was adopted by the United States Department of Defense as MIL-STD-1778.

IPv6 is the proposed successor to IPv4 whose most prominent change is the addressing. IPv4 uses 32-bit addresses (~4 billion addresses) while IPv6 uses 128-bit addresses (~3.4×1038 addresses). Although adoption of IPv6 has been slow, as of 2008, all United States government systems must support IPv6.[3]

Versions 0 through 3 were either reserved or unused; version 5 was used for an experimental stream protocol. Other version numbers have been assigned, usually for experimental protocols, but have not been widely used.

[edit] See also

[edit] External links

  • go6 - IPv6 Knowledge Center, IPv6 Services and Applications, IPv6 News and Events, IPv6 Discussion Forums
  • RFC 791
  • Your IP Address
  • ShwIP a free software to read your IP Address.

[edit] References

  1. ^ Siyan, Karanjit. Inside TCP/IP, New Riders Publishing, 1997. ISBN 1-56205-714-6
  2. ^ http://www.securityfocus.com/infocus/1870
  3. ^ http://www.gcn.com/print/25_16/41051-1.html