Wednesday, April 14, 2010

15.IP Addressing

An IP address is a unique address used to identify a computer or a host on the network. This address is made up of 32-bit numbers written in dotted decimal notation in the w.x.y.z format. Each eight bits are known as an octet or a byte. A part of the IP address is known as the network address, or network ID, and the rest of it is known as the host address, or host ID. These parts are based on the class of IP addresses used on the network. All computers on a particular network must have the same number as the network address, while the host address must be unique on the entire network. A second address, the subnet mask, is used to help identify the part of the network where the host is located.

IP addresses are assigned and controlled by an organization called Internet Assigned Numbers Authority (IANA). There are two current versions of IP addressing: IPv4 and IPv6.
IPv4 addresses
IPv4 addresses are classified into classes A, B, C, D, and E. Only addresses from the classes A, B, and C are assigned to organizations and are known as class-ful IP addresses. The first byte of an IP address identifies the class of IP addresses used in the network. For example, a host with an IP address of 92.137.0.10 is using a class A IP address. A host with an IP address of 192.170.200.10 is using a class C IP address. The IP addresses in the A, B, and C classes are available for public companies and can be assigned by an ISP. The class D and E addresses are reserved for special usage.

Subnet mask. Every IP address is accompanied by a subnet mask, which is used to help identify the part of the network where the host is located. Like the IP address, the subnet mask is a 32-bit binary number that distinguishes the network ID from the host ID. Its digits are set to 1 and 0, where 1 represents the network portion of the address and 0 represents the host portion. Table summarizes the main classes of IP addresses, the number of networks and hosts in each class and the default subnet masks.
Note: The IP address 127.0.0.1 is reserved as a loop back address for troubleshooting TCP/IP configuration of the computer.

Apart from the IP addresses, the hosts on a network also have a general alphanumeric hostname or a Fully Qualified Domain Name (FQDN) in the format server1.mycompany.com. Each hostname corresponds to an IP address, and the DNS is used to translate the IP address of a host to its domain name.

When configuring the IP address of a computer or some other network device, you will need to specify the IP address, the subnet mask, and the default gateway address. The IP address must be unique in the network, while the subnet mask must be same on all computers in a particular network segment.

Default gateway. A default gateway allows computers on a network segment to communicate with computers on another segment. The default gateway for all computers on a particular segment is the IP address of the router interface that is connected to the local segment. If a computer is not configured with the IP address of a default gateway, it cannot communicate with computers on a different network segment.
Public and private IP addresses
Public IP addresses (or registered IP addresses) are those addresses of those networks that are accessible from outside the organization. For example, if any host is connected to a network, it is using a public IP address. If an organization needs to connect its network to the Internet, it will need to obtain a public IP address from its Internet Service Provider. Typically, web servers, email servers, DNS servers, FTP servers, and VPN servers are connected directly to the Internet and use public IP addresses.

Private IP addresses (or unregistered IP addresses), on the other hand, are used when an organization’s computer network is private. In other words, it is not connected to the Internet or if it is, it is located behind a proxy server or a firewall. Access to private networks is usually restricted to users inside the organization. The Internet Assigned Numbers Authority (IANA) has set aside a range of IP addresses in each of A, B, and C address classes that can be used by private organizations for their internal IP addressing.
Subnetting
Subnetting is the process of creating two or more network segments by using the host portion of the IP address. Subnetting creates multiple broadcast domains that help reduce undesired broadcast traffic. Subnetting allows administrators to more effectively manage the IP address range. It also increases security of the network and helps contain network traffic to local network segments.

With a default subnet mask, you can have only one network segment. With subnetting, the number of segments increases, while the number of hosts in each segment reduces. For example, consider a network with an IP address of 192.168. 2.0. With the default subnet mask of 255.255.255.0, you can have only one large network segment with 254 hosts. If you use some bits from the host portion, you can create two, three, or four segments. But as the number of segments increases, the number of hosts in each segment reduces.
IPv6 addresses
The most significant advantage of IPv6 over IPv4 is the increase in the number of network addresses available for network devices. This is an important consideration because most of the IPv4 addresses have already been allocated, and the availability is continuously decreasing. IPv6 uses a 128-bit address as opposed to the 32-bit address used in IPv4.

An IPv6 address is composed of two logical parts: a 64-bit network prefix and a 64-bit host address. The host address can either be dynamically generated from the MAC address of the host interface or can be sequentially assigned.

The IPv6 address is written as eight groups of four hexadecimal digits separated by colons. The following is an example of an IPv6 address:

2001:0db8:85a3:08d3:1319:8a2e:0370:7334

If any of the four-digit group is composed of all zeros, it can be omitted. Consider another example:
2001:0db8:0000:08d3:1319:8a2e:0000:7334

This address can be written as follows:
2001:0db8::08d3:1319:8a2e::7334
Address assignment
In every network based on the TCP/IP protocol, whether it is small or large, there has to be some means of assigning IP addresses to the computers. At the minimum, the TCP/IP address configuration requires assignment of an IP address and a subnet mask. If it is a routed network(a network with multiple segments), the address of the default gateway must also be configured. IP address assignment can be done manually (static addressing) or automatically (dynamic addressing), as discussed in the following paragraphs:
Static
In the static IP address assignment method, an administrator manually configures the IP addresses on every computer. This method is prone to typing errors and cannot be used in large networks. In case the organization changes the IP addressing scheme, each computer must again be manually configured, which makes it a tedious task for the administrator. Moreover, an administrator may assign duplicate addresses, leaving a system unable to communicate on the network.
Dynamic
Dynamic IP addressing refers to automatic assignment of TCP/IP configuration by using a centralized server known as a Dynamic Host Configuration Protocol (DHCP) server. The DHCP server is configured with IP address scopes for each network segment. This not only saves the administrator from manually entering IP addresses, but it also prevents typing errors and duplicate addresses. If there is a change in the IP addressing scheme, the administrator has only to make changes on the DHCP server.

The DHCP server maintains a list of available IP addresses in a scope. When a client is assigned an IP address from a scope, the DHCP server can also provide the subnet mask and default gateway address. Optionally, the addresses of DNS and WINS servers can also be assigned to the client (WINS is discussed later in this section). IP addresses are assigned for a specific period of time known as a lease. Clients must renew their IP addresses with the DHCP server when 50 percent of the lease period expires.
Automatic Private IP Addressing (APIPA)
The default configuration on most operating systems is to dynamically obtain an IP address configuration from a DHCP server. When the DHCP server is not available for some reason, the computer can assign itself an IP address automatically. This feature is enabled by default on all Windows XP computers. The automatically assigned address is from the range 169.254.0.1 to 169.254.255.254 with a subnet mask of 255.255.0.0.

With an APIPA address, the computer can connect only to the other computers with APIPA addresses on the local network segment, but cannot access any other computers or a remote network. A computer assigned with APIPA keeps on trying to locate a DHCP server every five minutes in order to obtain a genuine IP address. If a computer is configured to obtain an IP address from a DHCP server but does not support APIPA, its IP address defaults to 0.0.0.0.

No comments:

Post a Comment