8

I have one question about IP addresses. If I have address 172.18.230.127./29 how should I know what type of address is this one. It could be:

  • Network address,
  • Host address,
  • Loopback address
  • Broadcast address

What are differences between these addresses above?

Thank you!

Lolipop
  • 91
  • 1
  • 1
  • 3

1 Answers1

10

An IP address can be broken down into two parts, namely the Network Address and Host Address.

In your example, /29 refers to the Subnet Mask which means the 29 bits of the total 32 bits from MSB to LSB are all 1's, i.e., 255.255.255.248 . This will allow for 8 addresses per subnet.

The first address in the subnet, 178.18.230.120 is the Network Address in this case and - the last address, which is all 1's - i.e., 172.18.230.127 is the Broadcast Address. The host address can range anywhere between the Network and Broadcast Address, i.e., 172.18.230.121 to 172.18.230.126 .

You can arrive at these addresses by performing an logical AND on the IP address and the Subnet Mask. The first IP address is usually reserved for the Network address and the last one in that block is for the Broadcast address, while the remaining ones can be used as Host addresses.

Loopback address is a special reserved IP address, usually referred to as the localhost - 127.0.0.1 and is used to communicate with the localhost.

Edited:

You can convert IP addresses into the binary form and perform logical AND. But, it's much easier and less time consuming to have them in Decimal representation.

                       178.18.230.127

              (AND)    255.255.255.248 
                     --------------------
                       **178.18.230.120**  -----> **Network Address**
                     --------------------

                       178.18.230.127

              (AND)    255.255.255.255 
                     --------------------
                       **178.18.230.127**  -----> **Broadcast Address**
                     --------------------

Keep in mind that the first and last one in a block are always Network and Broadcast Addresses(reserved).

Host Addresses: Any other address lying between the Network and Broadcast Addresses are Host Addressable, which means they can be assigned to a Host and are NOT reserved for any specific purpose, unlike the Network and Broadcast Addresses.

  • Thank you.. I think I understood... but how do you know that Network address starts with 120 why it cannot be i.e 178.18.230.122 and then 178.18.230.127 would be host address and broadcast would be 178.18.230.129? – Lolipop Jun 23 '15 at 19:15
  • @Lolipop, you can refer to http://networkengineering.stackexchange.com/questions/7106/how-do-you-calculate-the-prefix-network-subnet-and-host-numbers/7117 which explains this in detail. – Abhishek Balaji R Jun 23 '15 at 19:33
  • @Lolipop: Edited my answer to show how the calculations can be done. Hope this helps! – Abhishek Balaji R Jun 23 '15 at 19:51