We know that IP address is a 32bit field. This is the address
we use to establish various connections, such as TCP, FTP, TELNET, etc.
To communication throught TCP/IP,
each computer on the internet is assigned a unique IP address.
If you have an isolated network, you can assign any IP address to
each computer node, as long as there is no conflicts in the
assignments. But why do we really need such a large IP addresses
and still are afraid of running out of address? The problem comes
in when we want to interconnect more computers into the network.
Internet is one such network that links basically all the computers
there are in this world. Therefor all computers on the internet
have to have a unique IP address for themselves.
IP addresses of
32 bits can uniquely label billion
address, that is a lot since we have about that many people
in this world! Unfortunately, because of the need
to hierarchically assign these address, just like telephone numbers,
many of the addresses are not effectively assigned.
This is further
aggrevated by the fact that, indeed, Internet is growing at
an ever increasing pace, there is a real possibility that the available
IP addresses are running out in the next few years. There are
many current proposals to increase the address space to the existing
IP address, none is accepted, but one has to be chosen soon. Otherwise
IP addresses have to be shared.
We could imagine someone sending a steaming
love letter to Joe Lovebird but a copy of the letter will also end
up Dr. Ruth's email box. :-)
The other issue with IP address is the notation. It is quite difficult to remember the IP address by the 32 bits binary digits. Therefore, IP addresses are expressed in terms of dotted decimal notations.
For example, the IP address of ECSE main server, ecse.rpi.edu,
is given by:
1000000001110001,0010100011001000, in decimal dotted notation,
the digits are broken into 4 bytes, each byte is represented by
its decimal numbers. We have
10000000011100010010100011001000
10000000,01110001,00101000,1100,1000
128.113.40.200
Using this notation, IP addresses range from 0.0.0.0 to 255.255.255.255.
No other machine on the internet shares the above IP address with our ecse.rpi.edu. In order to make sure this is indeed the case, there has to be a centralized organization that have authority over the assignment of IP address. The organization is called Network Information Center (NIC), which controls the assignment. Of course if you are on a network by yourself, with no outside connections, you can give yourself an IP number which may be the same as another machine's IP number. But that will certainly create disaster as soon as you put your node into the internet.
How IP addresses assigned? It is based on a hierarchical scheme.
Basically, IP addresses are somewhat similar to telephone numbers.
The first few digits determine the overall scope of the
network, called subnet,
and last few digits determine the node within
the subnetwork. For example, R.P.I. is assigned IP addresses with
that start with 128.113... In other words, no other machine
in the world have their IP addresses starting with 128.113...
This scheme maintains an organizational boundary through the
assignment of IP addresses.
But R.P.I. clearly does not have
computers. This represents inefficient use of IP address
assignments, which is another cause of IP address shortages these days.
IP addresses can be partitioned into and
fields.
The
field represents the subnet the current machine
is in, and the
represents the local ID of the machine
in the subnet. In the above example, 128.113 is the
and 40.200 is the
. In fact, the
is often
further partitioned into a
and
. In the
above example, the workstation I use, beijing.ecse.rpi.edu,
is connected to ecse.rpi.edu
and has the IP address: 128.113.40.74, you can see
that the first three numbers are the same. Here 40 is the
. Sometime it is also called that the two machines
are netmasked by 255.255.255.0. Netmasking is used for
machines on the same physical network, for example, the same
Ethernet. This assignment clearly
has advantages. if I want to open an connection to ecse.rpi.edu,
by looking at the IP address, my node should know that ecse.rpi.edu
should be on the same Ethernet. If beijing.ecse.rpi.edu
couldn't reach the machine, something must be wrong,
there is no need to search for the machine through other routers.
Some machines may have multiple IP addresses. Such machine play the role of routing functions. For example, nim.rpi.edu has two IP addresses: 128.113.43.199 and 128.113.1.29 This happens when the machine sits on two subnets, for example, each subnet can be an Ethernet. Each Ethernet has a submasking.
In addition, there are other rules in IP addressing that also exclude the use of any IP addresses starting with 240...., IP addresses starting with 224... are reserved for multicasting.