Monday, August 9, 2010

IP Addressing



Correct IP Addresses are Critical

On a TCP/IP based internetwork, the IP address is used to uniquely identify each device operating the TCP/IP protocols.
If the IP address is not correct, or you use an IP address already used somewhere else on the internetwork, your node will not work. It is critical to get the IP address settings correct to ensure you can communicate.

 
IP Address Size and Format

The IP Address Size and Format is as follows:

• 32 bits in size.

• Grouped into 8-bit bytes or octets.

• Decimal digits separated by dots, occurring at the octet boundaries eg. X.X.X.X.

• Divided into two portions - a network portion and a host portion.

 
Network Portion

The network portion of the IP address is used to identify the network segment that the Linux box is connected to. In an Ethernet network, this segment is the complete 10Base2 network, or the group of 10BaseT nodes connected to the same hub(s).

If you have a permanent connection to the Internet, the network portion of the IP address is indirectly allocated to you by the Internet Network Information Center (InterNIC). It is indirectly allocated because your ISP (Internet Service Provider) was given the network number by InterNIC, and your ISP allocated it to you.

Network Classes
The network portion of the IP address is divided up into 5 different classes or catagories.

This network class specifies how many bytes or octets of the IP address is used for the network portion, and how many octets are left for the host portion.
Class Definitions

 
The classes are as follows:

• Class A - The first octet of the IP address is used for the network portion, and the last three octets are used for the host portion.

• Class B - The first two octets of the IP address are used for the network portion, and the last two octets are used for the host portion.

• Class C - The first three octets of the IP address are used for the network portion, and the last octet is used for the host portion.

• Class D - Class D addresses are special addresses used for a special type of IP packet transmitting called Multicasting. You should not use a Class D network number when setting up your network.

• Class E - This class of network address is reserved for experimental purposes by the Internet Engineering Task Force. You should not use a Class E network address - you could be kicked off the Internet.

 
There are two things to notice about the above class definitions:
• Only Classes A, B, and C are valid for use when giving a host an IP address.

• The more octets available for the network portion of the IP address, the more networks exist, and the more octets available for the host portion of the IP address, the more hosts per network exist.

 
Within the total IP address space,

o there are only a small number of Class A networks (1 octet), but each class A network can have a huge number of hosts (3 octets),

o there are more Class B networks (2 octets), but each Class B network has less hosts (2 octets) than a Class A,

o And there are a huge number of Class C networks (3 octets), but each Class C network can only have a small number of hosts (1 octet).
Class Ranges

 
You can tell the Class of network address by looking at the first octet of the IP address.

• Class A - ranges from 1 to 127

• Class B - ranges from 128 to 191

• Class C - ranges from 192 to 223



Host Portion

Once you have your network number specified, you can now allocate the host portion of the IP address.
The host portion of the IP address must be uniquely assigned to each host within the network segment you are configuring. If you allocate the same IP address to two hosts connected to the same network segment, you will suffer from the "Duplicate IP Address" problem, which will cause intermittent communication between the involved hosts.

Under normal circumstances, octets in the host portion of the IP address can range from 0 through to 255, with some exceptions. These special exceptions will be discussed later.

 
IP Address Ranges

Based on the above discussion of the network and host portions of the IP address, the following ranges of IP address are available for Class A, B and C networks:

• Class A - 1.0.0.1 to 127.255.255.254

• Class B - 128.0.0.1 to 191.255.255.254

• Class C - 192.0.0.1 to 223.255.255.254

No comments:

Post a Comment