IP addressing

Q. What do you understand by IP addressing? How can you classify IP addressing? How is subnet addressing is done?

Answer: -

Each and every host and router on the Internet has an IP address, which encodes its network number and the host number. The grouping is single: in principle, no two machines on the Internet have same IP address. All IP addresses are of 32 bits long and are made in use in the Source address and Destination address fields of the IP packets. It is essential to note that an IP address does not in reality refer to a host. It really refers to the network interface, so if a host is on two networks, it should have two IP addresses of it. Though, in practice, mainly the hosts are on the one network and thus have only one IP address.

2260_IP addressing.png


F
or several decades, IP addresses were divided into the five categories

The class A, B, C, and D formats permits for up to 128 networks with 16 million hosts of each, 16,384 networks with up to 64K hosts, and the2 million networks (e.g., LANs) with up to the 256 hosts of each (although a few of these are unique). Also supported is multicast, in which a datagram is focussed to multiple hosts. Addresses beginning with 1111 are reserved for the future use. Over the 500,000 networks are now linked to the Internet, and the number grows every year wildly. Network numbers  are  arranged  by  a  nonprofit  corporation  known as  ICANN  (Internet  Corporation for Assigned Names and Numbers) to avoid the conflicts. In turn, ICANN has delegated parts of the address space to the various regional authorities, which then dole out IP addresses to ISPs and the other companies.

Network addresses, that are 32-bit numbers, are generally written in dotted decimal notation. In this format, each of 4 bytes is written in the decimal, from 0 to 255. For instance, the 32-bit hexadecimal address C0290614 is written as 192.41.6.20. The smallest IP address is 0.0.0.0 and highest is 255.255.255.255. The values of 0 and -1 (all 1s) have specific meanings, as shown in the Fig. 5-56. The value 0 means this network. The value of -1 is used as a broadcast address to mean all the hosts on an indicated network.

IP address 0.0.0.0 is used by the hosts when they are being booted up. IP addresses with 0 as network number refers to the current network or host. These addresses permits machines to refer to their own network with not knowing its number (but they have to know its class to know how many 0s should be included). The address comprising of all 1s allows the broadcasting on the local network, naturally a LAN. The addresses with the proper network number and all the 1s in the host field or network allow the machines to send broadcast packets to distant LANs anywhere in  the  Internet (although many network administrators disable this feature). In the end, all addresses of the form 127.xx.yy.zz are reserved for the loopback testing. Packets sent to that particular address are not put out onto wire; they are processed locally and treated as the incoming packets. This permits packets to be sent to local network without the sender knowing its number.

1920_IP addressing1.png

SOME SPECIAL IP ADDRESS

As we have now known that all the hosts in a network should have the same network number. This property of IP addressing can create problems as networks grow. For instance, consider a university that begins out with one class B network used by the Computer Science Dept. for computers on its Ethernet. A year later, Electrical Engineering Dept. required obtaining on the Internet, so they bought a repeater to expand the CS Ethernet to their building. As the time went on, number of other departments acquired computers and the limit of four repeaters per Ethernet was rapidly reached. A different organization was needed. Getting a second network address would be difficult to do since network addresses are scarce and university already had sufficient addresses for over 60,000 hosts. The difficulty is the rule that a single class A, B, or C address refers to one the network, not to the collection of LANs. As more and more the organizations ran into this situation, a little change was made to the addressing system to deal with it. The solution is to permit a network to be dividing into several parts for internal use but still act like the single network to the outside world. A particular campus network nowadays might look like that of the Fig. 5-57, with the main router linked to an ISP or the regional network and numerous Ethernets spread around campus in different departments. Each of the Ethernets has its router connected to the main router (possibly via the backbone LAN, but the nature of inter router connection is not relevant here).

1817_IP addressing2.png

When the packet comes into the major router, how does it comes to know that which subnet (Ethernet) to give it to? The one way would be to have a table with the 65,536 entries in the main router telling that which router to use for each host on campus. This logic would work, but it would need a very large table in the chief router and a lot of manual maintenance as the hosts were added, moved and taken out of service.

In its place, a different scheme was created. Generally, instead of having a single class B address with 14 bits for the network number and the 16 bits for the host number, some of the bits are taken away from the host number to create the subnet number. For instance, if the university has 35 departments, it would use a 6-bit subnet number and a 10-bit host number, permitting for up to 64

Ethernets, each with the maximum of 1022 hosts (0 and -1 are not accessible, as mentioned earlier). This divide could be changed later if it turns out to be wrong one.

To implement the subnetting, the main router requires a subnet mask that signifies the split between network + subnet number and the host or network, as shown in Fig. Subnet masks are also written in dotted decimal notation, with addition of a slash followed by the number of the bits in the network + subnet part.  For the example of Fig. the subnet  mask can  be  written  as follows 255.255.252.0. An option notation is /22 to indicate that the subnet mask is 22 bits long.

261_IP addressing3.png

A class B network subnetted into 64 subnets.

   Related Questions in Computer Networking

©TutorsGlobe All rights reserved 2022-2023.