Beruflich Dokumente
Kultur Dokumente
What's an IP address?
An IP address is a number that represents a device like a network card uniquely on
the Internet or on your company's intranet. This number is actually a binary one,
but for convenience it's normally written as four decimal numbers. For instance, a
typical IP address would be something like 192.168.1.1. The four constituent
numbers together represent the network that the computer is on and the computer
(interface) itself. Let us first look at the network address part.
The IP addresses for networks on the Internet are allocated by the InterNIC. If you
have an Internet connection (a registered domain and a permanent link to the
Internet, and not just a dial-up connection), then you would be allocated a network
address by the agency that registered you, like the InterNIC. Let us assume this to
be 192.6.132.0, a class C network. Then all the machines on this network would have
the same network address. And the last 0 will be replaced by a number from 1 to 254
for the node address. So, nodes will have addresses 192.6.132.1, 192.6.132.2, and
so on up to 192.6.132.254.It would be worth mentioning here that IP address
calculations and concepts make sense only when done in binary.
Depending on the size of the network, IP-based networks are divided into three
classes.
? Class A- Class A networks are mega monster networks with up to 224 nodes 16
million plus. Class A networks have their network addresses from 1.0.0.0 to
126.0.0.0, with the zero's being replaced by node addresses.
? Class B- Class B networks are smaller networks in comparison they can have only
about 65,000 nodes! Network addresses for these ranges from 128.0.0.0 to 191.0.0.0.
Here the last two zeros get replaced by the node addresses.
? Class C- These are the baby networks that can have only 254 nodes at the maximum.
The network IP addresses for these range from 192.0.0.0 to 223.0.0.0.
For a given network address, the last node address is the broadcast address. For
example, for the C class network with address 192.168.1.0, the address
192.168.1.255 is the broadcast address, used to transmit to all nodes in that
network. So, this address along with the network address itself should not be used
as node address.If you want your network to be permanently on the Internet, then
you need to be allocated a network address by the InterNIC. Most of the network
addresses now available for allocation are class C addresses.There are other
classes of networks class D and class E. These are primarily used for experimental
purposes.
Computers on networks using the above IP addresses will be treated as private ones
and they can communicate only within the company intranet. However, they can still
access the outside world using proxy servers. This adds to the security of your
intranet. So, your intranet should always use addresses from these reserved groups
only.
Now, which IP address class should you use for your intranet?The answer depends on
the number of hosts that are going to be connected to the intranet. Any machine
connected to the network, whether server or client, is called a host.
Without subneting, you can have the following configurations.
Thus, if you are having a class C network that is not permanently connected to the
Internet, your network address can be any one from 192.168.1.0 to 192.168.255.0,
and without subneting, you can have 254 hosts having addresses 192.168.1.1 to
192.168.1.254, if you have selected 192.168.1.0 as your network address;
192.168.1.255 is the broadcast address and 192.168.1.0 is the network address for
this network.
Calculation of IP addresses and subnet masks is no job for the binary challenged. A
handy tool which will do all this for you is the IP Subnet calculator, a freeware
tool from the Net3 Group. It is available on the PCQ July 97 CD-ROM.
An example in subnet design
Warning: You can safely ignore this section and use the IP subnet calculator
instead. Remember that all this is done in binary. If you are curious as to what
happens behind the scenes, here it goes.
Assume that the network address chosen for your intranet is 192.168.1.0, and that
you want seven subnets, with the largest one having 20 hosts.Since you are dealing
with binary numbers, subnets can be created only in blocks of powers of two. That
is you can have two subnets, four, eight, 16, and so on. In this case you choose
eight subnets, which will also give you one free subnet for future use. Your IP
address is a 32-bit binary number. Out of this the first 24 bits (8 x 3) have
already gone for the network address. Now you have to set aside the next three (8 =
23 ) for subneting. That leaves you with 32-24-3 = 5 bits for host addresses. With
five bits you can have 25 = 32 individual IP addresses for the hosts. Of these, two
all 1s and all 0s cannot be assigned to hosts. The all 0s host number identifies
the base network or the subnet while the all 1s host number identifies the
broadcast address of the network or subnetwork. So, you can have a maximum of 30
hosts on each subnet.
If you want more than 30 hosts on a subnet, what would you do? Reduce the number of
subnets or go for a higher class of network. Remember that the maximum number of
hosts on a class C network is 254 (after subtracting the broadcast address and the
network address), and with every subnet, you are reducing that number by two. (8 x
30) + (7x2) = 240 + 14 = 254.
A quick check on your calculations is that the fourth octet (in decimal) of all
subnets will be multiples of the fourth octet (in decimal) of subnet 1.As
originally defined, subnets with all 0s and all 1s subnets 0 and 7 in this case
were not to be used. But today's routers can overcome this limitation.
Now we come to the host address for each of the subnets. Hosts are numbered from 1
onwards as against subnets which as we saw are numbered from 0 onwards. In this
case, we have 30 hosts in each subnet, and they will be numbered from 1 to 30. To
arrive at the host IP address, replace the host portion of the relevant subnet
address (the last five digits of the fourth octet in this case) with the binary
equivalent of the host number.Thus, the IP address of host number 3 on subnet 1
will be 11000000.10101000.00000001.00000011 = 192.168.1.3 and that for host number
30 in subnet 6 will be 11000000.10101000.00000001.11011110 =192.168.1.222.The
broadcast address for subnet 4 is 11000000.10101000.00000001.10011111 =
192.168.1.159, which is one less than the subnet address of subnet 5.