DistributedNetworks DistributedNetworks


TCP/IP Concepts   «Prev  Next»
Lesson 7 IP address Conventions
Objective What is the Structure of an IP Address?

Structure of an IP Address

Before discussing TCP/IP configuration in detail, we should briefly recall the fundamental notions of IP addressing and netmasks [1].
Every machine on a TCP/IP network must have a unique 32-bit identifying number called its IP, or Internet Protocol address.
IP addresses are usually written in the familiar “dotted decimal” form:
xxx.yyy.zzz.www


where xxx, yyy, zzz, and www are integers between 0 and 255, each corresponding to one byte of the 32-bit address.

Two-part address

An IP address has two parts, 1) a network address and 2) a host address. This division simplifies routing.
A routing machine can make decisions about where to send information based on the network portion of the address, without looking at the full IP address. This ability leaves fewer possibilities to consider, so the decision may be made faster.

How the address is divided

How the IP address is divided between host and network portions depends partly on local policy and partly on Internet rules.
The rule part is reflected in the classification of IP addresses into Class A, Class B, and Class C addresses based on their first byte. As the table below shows, Class A addresses use the first byte for the network address, and the remaining bytes for the host address; and Class C addresses use the first three bytes as network address, with the last byte as host address.

Type First Byte Range Number of Bytes for Network Number of Bytes for Host
Class A 0-127 1 3
Class B 128-191 2 2
Class C 192-222 3 1
Reserved 223-255 N/A N/A

Standard conventions

Several standard conventions govern the use of IP addresses:
  1. An IP address with all host bits set to zero refers to an entire network. For example, the address 192.133.17.12 is a Class C address (because the first byte is 192, which falls in the Class C range). Then the network address is 192.133.17.0, which is obtained by setting all host bits to zero.
  2. An IP address with all host bits set to one is the broadcast address for that network. The broadcast address is used to speak simultaneously to all hosts on that network. For example, the address 192.133.17.255 (which has all eight host bits set to one) is the broadcast address for the 192.133.17.0 network.
  3. The address 127.0.0.1 is reserved by TCP/IP. It is called the “loopback” address, and always refers to the local machine. Thus, any connection to 127.0.0.1 loops back to its origin.
  4. The address 0.0.0.0 refers to the first configured interface on a machine.

IP Address Quiz

Click the Quiz link below to take a short multiple-choice quiz on IP addresses.
IP Address - Quiz
[1]Netmask: A 32-bit bit mask which shows how an Internet address is to be divided into network, subnet and host parts.