IP Address | Network Part of IP Address

An IP address is an identifier for a computer or device on a TCP/IP network. Networks using the TCP/IP protocol route messages based on the IP address of the destination.

An Internet Protocol address (IP address) is a numerical label assigned to each device (e.g., computer, printer) participating in a computer network that uses the Internet Protocol for communication. An IP address serves two principal functions: host or network interface identification and location addressing. Its role has been characterized as follows: “A name indicates what we seek. An address indicates where it is. A route indicates how to get there.”

Client IP Address

It's pretty common the need for a web application to be able to detect the IP address of a client. The IP address could be used either for statistic or authentication purposes.

You can also use the IP address to block multiple logins with the same credentials. This could be useful for sites that offer content to users that have paid a subscription.

Network Part of IP Address

The format of an IP address is a 32-bit numeric address written as four numbers separated by periods. Each number can be zero to 255.

Within an isolated network, you can assign IP addresses at random as long as each one is unique. However, connecting a private network to the Internet requires using registered IP addresses (called Internet addresses) to avoid duplicates.

A localhost is, put plainly, the standard hostname given to the address assigned to the loopback network interface. Translated into an IP address, a localhost is always designated as This may be overwhelming, so let’s look at what these things mean.

Hostname is the term for the label that is assigned to any device connected to a computer network and is used to identify the device across the web. A hostname usually consists of a single word or phrase and can be followed by a Domain Name System domain at the end. That is, a website. Used this way, the hostname is called a domain name.

IP Address Classes and their Formats

IP addresses are 32 bit integers which are represented in the familiar dot based notation. The dot based notation is nothing but a decimal representation for each byte of the IP address.

The internet, as the name suggests, is a network of networks. Thus to uniquely identify a host on the internet, one needs to know the network’s id and the host’s id in the network. Thus IP address consist of two components, the network id and the host id.

Relation of IP Address to Physical Address

Network device has two types of addresses, one called the logical address — in most cases this is the IP address — and the other one being the physical address — also known as the MAC address.

The MAC address is a hardware address, which means it is unique to the network card installed on your PC. No two devices on a local network should ever have the same MAC address. In the unlikely event this occurs, the two devices will have major communication problems. During the manufacturing process, the vendor “burns” a specific MAC address into each network card’s ROM. When the serial numbers have all been used, they start from the beginning, as it’s very unlikely anyone would buy two network cards from the same vendor, and they will contain the same MAC address.

Static Vs Dynamic IP Address

An IP address can be static or dynamic.

A static IP address will never change and it is a permanent Internet address.

A dynamic IP address is a temporary address that is assigned each time a computer or device accesses the Internet.