Personal tools

Internet Protocol (IPv4 and IPv6)

The_Internet_Protocol_Stack_061020A
(The Internet Procol Stack - The World Wide Web Consortium)

 

- The Internet Protocol (IP)

The Internet Protocol (IP) is a set of requirements for addressing and routing data on the Internet. IP can be used with several transport protocols, including TCP and UDP.

The Internet Protocol (IP) is a protocol, or set of rules, for routing and addressing packets of data so that they can travel across networks and arrive at the correct destination. In networking, a protocol is a standardized way of doing certain actions and formatting data so that two or more devices are able to communicate with and understand each other.

IP is responsible for encapsulating all upper layer transport and application protocols. The IP network layer incorporates the necessary elements for addressing and subnetting (dividing the network into subnets), which enables TCP/IP packets to be routed across the network to their destinations. At a parallel level, the ARP serves as a helper protocol, mapping physical layer addresses typically referred to as MAC-layer addresses to network layer (IP) addresses. 

Data traversing the Internet is divided into smaller pieces, called packets. IP information is attached to each packet, and this information helps routers to send packets to the right place. All IP data packets must present certain information in a certain order, and all IP addresses follow a standardized format.

Every device or domain that connects to the Internet is assigned an IP address, and as packets are directed to the IP address attached to them, data arrives where it is needed. Once the packets arrive at their destination, they are handled differently depending on which transport protocol is used in combination with IP. The most common transport protocols are TCP and UDP.

 

- Packets, Datagrams, and Frames

The most common terms that are used for messages are the following:  

  • Packet: This term is considered by many to most correctly refer to a message sent by protocols operating at the network layer of the OSI Reference Model. So, you will commonly see people refer to “IP packets”. 
  • Datagram: This term is basically synonymous with “packet” and is also used to refer to network layer technologies. It is also often used to refer to a message that is sent at a higher level of the OSI Reference Model (more often than “packet” is). IP was designed for use in interconnected systems of packet-switched computer communication networks. IP operates on the OSI Network Layer and routes packets. The Internet protocol (IP) provides for transmitting blocks of data called datagrams (network-layer packets) from sources to destinations, where sources and destinations are hosts identified by fixed-length addresses. The Internet protocol also provides for fragmentation and reassembly of long datagrams, if necessary, for transmission through small-packet networks. The datagram plays a central role in the Internet.
  • Frame: This term is most commonly associated with messages that travel at low levels of the OSI Reference Model. In particular, it is most commonly seen used in reference to data link layer messages. It is occasionally also used to refer to physical layer messages, when message formatting is performed by a layer one technology. A frame gets its name from the fact that it is created by taking higher-level packets or datagrams and “framing” them with additional header information needed at the lower level. 

 

NOTE: Even though most people use the term packet as the Layer 3 protocol data unit (PDU), the true Layer 3 PDU is a datagram. A packet is a fragment of a datagram that was fragmented due to insufficient MTU at a particular network segment. However, unless a datagram is segmented, a packet and a datagram are identical. 

In computer networking, the maximum transmission unit (MTU) is the size of the largest protocol data unit (PDU) that can be communicated in a single network layer transaction.[1] The MTU relates to, but is not identical to the maximum frame size that can be transported on the data link layer, e.g. Ethernet frame.

 

Salem_MA_1942_n
(Salem, Massachusetts - Harvard Taiwan Student Association)

- IP Addressing

TCP/IP uses IP addresses to send messages to their proper destinations. Every TCP/IP host in the network requires a unique IP address on each of its NICs. IP addresses are assigned by the network administrator, either manually or through a dynamic addressing protocol such as Reverse Address Resolution Protocol (RARP), BOOTP, or DHCP. The current IP addressing scheme (IPv4) defines an IP address as a 32-bit binary number - for example: 

 

11000111 00011010 10101100 01010011

 

To make it more convenient for us, the IP address is divided into four 8-bit octets (bytes):

 

11000111.00011010.10101100.01010011

 

These octets are then converted from binary to decimal numbers and written as follows (four decimal digits separated by periods):

199.26.172.83

When this number is entered into a computer, the machine automatically converts it to a 32-bit binary number, with no regard for the individual octets or the decimals. 

An IP address has two portions, a network ID and a host ID. The network ID is shared amongst all the stations on a segment and must be unique across the entire network. The host ID identifies a specific device (host) within a segment and must be unique on a particular segment.

 

- IPv4 vs. IPv6

The fourth version of IP (IPv4) was introduced in 1983. However, just as there are only so many possible permutations for automobile license plate numbers and they have to be reformatted periodically, the supply of available IPv4 addresses has become depleted. IPv6 addresses have many more characters and thus more permutations; however, IPv6 is not yet completely adopted, and most domains and devices still have IPv4 addresses.  

IPv4 was the first version of IP. It was deployed for production in the ARPANET in 1983. Today it is most widely used IP version. It is used to identify devices on a network using an addressing system. The IPv4 uses a 32-bit address scheme allowing to store 2^32 addresses which is more than 4 billion addresses. Till date, it is considered the primary Internet Protocol and carries 94% of Internet traffic. 

IPv6 is the most recent version of the Internet Protocol. Internet Engineer Taskforce initiated it in early 1994. The design and development of that suite is now called IPv6. This new IP address version is being deployed to fulfill the need for more Internet addresses. It was aimed to resolve issues which are associated with IPv4. With 128-bit address space, it allows 340 undecillion unique address space. IPv6 also called IPng (Internet Protocol next generation).

IPv4 and IPv6 are both IP addresses that are binary numbers. IPv4 is 32 bit binary number while IPv6 is 128 bit binary number address. IPv4 address are separated by periods while IPv6 address are separated by colons.

 

- TCP/IP

The Transmission Control Protocol (TCP) is a transport protocol, meaning it dictates the way data is sent and received. A TCP header is included in the data portion of each packet that uses TCP/IP. Before transmitting data, TCP opens a connection with the recipient. TCP ensures that all packets arrive in order once transmission begins. Via TCP, the recipient will acknowledge receiving each packet that arrives. Missing packets will be sent again if receipt is not acknowledged. 

TCP is designed for reliability, not speed. Because TCP has to make sure all packets arrive in order, loading data via TCP/IP can take longer if some packets are missing. 

TCP and IP were originally designed to be used together, and these are often referred to as the TCP/IP suite. However, other transport protocols can be used with IP.

 

- UDP/IP

The User Datagram Protocol, or UDP, is another widely used transport protocol. It's faster than TCP, but it is also less reliable. UDP does not make sure all packets are delivered and in order, and it doesn't establish a connection before beginning or receiving transmissions. 

UDP/IP is usually utilized for streaming audio or video, as these are use cases where the risk of dropped packets (meaning, missing data) is outweighed by the need to keep the transmission real-time. For instance, when users are watching a video online, not every pixel has to be present for every frame of the video. Users would rather have the video play at normal speed than sit and wait for every bit of data to be delivered.

 

 - IP Routing

The Internet is made up of interconnected large networks that are each responsible for certain blocks of IP addresses; these large networks are known as autonomous systems (AS). A variety of routing protocols, including BGP, help route packets across ASes based on their destination IP addresses. 

Routers have routing tables that indicate which ASes the packets should travel through in order to reach the desired destination as quickly as possible. Packets travel from AS to AS until they reach one that claims responsibility for the targeted IP address. That AS then internally routes the packets to the destination. 

Packets can take different routes to the same place if necessary, just as a group of people driving to an agreed-upon destination can take different roads to get there.
 

 

[More to come ...]

 

Document Actions