What Are The Functions of Internet Protocol - Techwalla
What Are The Functions of Internet Protocol - Techwalla
Internet Protocol, or IP, is the method that governs how computers share data
across the Internet. When one computer sends data, such as an email or a
web form, its message gets parsed into small packets that contain the sending
computer's Internet address, the receiving computer's address, and part of the
message. Internet Protocol serves several basic functions.
Addressing
IP packet headers contain addresses that identify the sending computer and
the receiving computer. Routers use this information to guide each packet
across communication networks and connect the sending and receiving
computers.
Reassembly
Internet Protocol keeps track of the way messages between computers are
broken into packets. Since most messages are too big to fit in one packet, and
since packets aren't sent in any organized order, they must be reassembled as
they arrive at the recipient. IP dictates how packets are reassembled into
usable messages.
Timeouts
Each IP packet contains a self-destructive counter that limits its lifetime. If a
packet's defined lifetime expires, the packet is destroyed so that the Internet
doesn't get overloaded with broken packets wandering aimlessly.
Options
IP includes optional features such as allowing the sending computer to decide
the path its packets take to get to the receiving computer, to trace the path
they take or to include added security in the packets.
Class A addresses begin with a "0" bit. The next seven bits identify the
individual network block, and the subsequent 24 bits identify individual
computers within that network. Class B addresses began with a "1" bit
followed by a "0" bit, where the next 14 bits identify the network block and the
subsequent 16 bits identify individual computers. Class C addresses began
with two "1" bits followed by a "0" bit, with the next 21 bits identifying the
network block and the last 8 bits identifying specific devices within the
network.
IP address classes made it easy for routers to build tables specifying where
packets destined for particular IP addresses should be sent, since they could
store information for each network identified by the prefix of a particular IP
address.
To make things more efficient, many routers and organizations have adopted
what is called classless interdomain routing, or CIDR (often pronounced like
the word "cider.") This allows IP addresses to be divided into more flexibly-
sized IP address blocks, where a prefix of any length identifying the network
can be followed by the remainder of an IP address identifying individual
devices.
If you want to calculate the number of subnets and hosts (or devices) that
match a given subnet mask, it is relatively easy. The total number of subnets is
the possible number of variations in an IP address for the portion of the mask
that is all ones, which is two raised to the power of the number of ones in the
mask. For example, 255.255.254.0 written in binary begins with 23 ones, so
there are 2^(23) or 8,388,608 possible subnets. Each subnet contains all IP
addresses with its valid prefix, but can vary in the remaining 9 binary digits,
so there are 2^9 = 512 IP addresses available to hosts in each subnet.
Loopback IP Addresses
Another special type of IP address is the loopback address. This is an IP
address in the range 127.0.0.1-127.255.255.255. In CIDR terms, that's the
range 127.0.0.0/8, which is also a class A IP address block.
The address "127.0.0.1" is by far the most commonly used IP address for
loopback and should generally be used unless there's an important reason to
use another, since users and software alike are more likely to understand it.
The special purpose domain name "localhost" is also used to refer to the
current computer.