An Internet Protocol (IP) Address is a term that you will hear a lot if you are into any field of Information Technology.
Especially people in TCP/IP networking have to deal with IP addresses in their every-day professional life.
Just like any house or building in the world has a unique postal mail address in order to receive packets and mail, the same applies to any host connected to a network which must have an IP address assigned to it in order to receive or send data packets.
Basically, any device that is connected to a network that uses the IP protocol for communication (e.g Internet, LAN etc) must have an IP address configured to its network interface card.
There are different types of IP addresses which we will discuss and explain in this article.
You can categorize IP address types according to their version (v4 or v6), according to how they are used in a network topology (private, public etc), how they are assigned or configured to network hosts etc.
Table of Contents
- IP Address Types According to Their Version
- 1) IPv4
- 2) IPv6
- IP Addresses According to how they are used in a Network
- 3) Public IP Address
- 4) Private IP Address
- IP Addresses According to how they are assigned to a host
- 5) Static IP
- 6) Dynamic IP
- Other Special Types of IP Addresses
- 7) Local Host IP (or Loopback IP)
- 8) Default Gateway IP
- 9) Multicast IP
- 10) Broadcast IP
IP Address Types According to Their Version
IPv4 is the original version of IP addresses which is still widely used today in all computer networks, including the Internet.
This IP type is represented in dotted-decimal notation as four decimal numbers (with range of 0 to 255) and in binary notation as 32-bits numbers.
However, the notation used everywhere is the dotted-decimal notation like for example: 192.168.1.5 or 18.104.22.168 as examples.
Since it has 32 binary bits, it can have a maximum of 232 address space. Although IPv4 addresses have been exhausted, they are still widely used since professionals invented ways to conserve these addresses by using techniques such as NAT (Network Address Translation), IP sharing, private IP space etc.
An IPv4 address can be split into a network-part and host-part. The network-part (or subnet) contains multiple host IP addresses. The two IP address parts (network and host) are separated by using a subnet mask.
For example, the IP address 192.168.1.10 with subnet mask 255.255.255.0 denotes that we have a network-part of 192.168.1 and a host part of .10
192.168.1 = Network part
.10 = Host part
In order to deal with the exhaustion of IPv4 addresses, IETF created a new version of IP scheme, the IPv6 with RFC 2460 and 8200.
Although IPv6 has been implemented many years ago to replace the older IPv4, still its adoption is around 29-30% of the total IP addresses at the time of this writing (see this IPv6 statistics chart from Google).
The address space of IPv6 is much larger, with its 128-bits address length offering 2128 combinations of unique IPs.
Most hosts nowadays (servers, computers, network infrastructure, client devices etc) support both IPv4 and IPv6 addresses.
This means that both an IPv4 and an IPv6 address can be configured on the host’s network interface.
Similarly to IPV4, an IPv6 address consists of a network part (routing prefix) and host part. However, the host can have more than one IPv6 address (i.e a host is assigned a block of addresses).
IP Addresses According to how they are used in a Network
Let’s now see two other types of IPs categorized according to how they are used in a network.
3) Public IP Address
Public IP addresses are used on hosts connected to the Internet. Each public IPv4 address is unique on the whole Internet. Only public IP addresses are routable on the Internet.
Although each public IP address is unique, we can have shared public IPs which are used by many hosts. This sharing mechanism was created to conserve IP address space and is usually implemented using NAT overload (or PAT – Port Address Translation).
For example, your home network might have several internal client hosts (laptops, smartphones etc) each having a private IP address.
All these internal hosts share a single public IP which is assigned to the WAN interface of your home router device. Therefore, these internal hosts can now access the Internet using the public IP of the router.
4) Private IP Address
One way to conserve address space, IETF (RFC 1918) created three ranges of IP addresses that can only be used in internal LAN networks. These addresses are NOT routable on the Internet.
Here are the three private IP ranges:
|CIDR Block||IP Address Range|
|10.0.0.0/8||10.0.0.0 – 10.255.255.255|
|172.16.0.0/12||172.16.0.0 – 172.31.255.255|
|192.168.0.0/16||192.168.0.0 – 192.168.255.255|
In order for a private IP address to access the Internet, the network must perform NAT (Network Address Translation) in order to translate the private IP into a routable public IP. Devices that usually perform NAT include routers, firewalls, home gateways, proxy servers etc.
Internet Service Providers (ISPs) usually assign only a single public IP address to each residential home customer to conserve the limited IPv4 address space. Then, inside the home network, devices are assigned private IP addresses.
The same scenario above is also found in many enterprise networks whereby the internal corporate hosts use private IP address space. Then, the border router or firewall performs NAT to translate outgoing traffic from internal hosts to a public IP for Internet access.
IP Addresses According to how they are assigned to a host
Let’s now see two other types of IPs according to how they are assigned to host devices.
5) Static IP
A static IP address is configured to a device by an administrator and is fixed on the device (it does not change).
Static IP addresses can be either public or private IPs. An example of a static public IP is when your ISP assigns a small public IP range to your company (let’s say 8 public IPs) and then you as an administrator configure one of these addresses to the WAN interface of your border firewall device. This configured IP address is a Static IP.
Another example can be a Static private IP address. Assume you have an internal management workstation in your LAN network which is used to manage the whole network or other IT devices.
It is a good idea to assign a Static private IP to this management workstation so that you can allow traffic from this IP for managing the network.
6) Dynamic IP
A dynamic IP is assigned dynamically to hosts by an external server in an automated way. The server that usually assigns dynamic IPs is a DHCP server (Dynamic Host Configuration Protocol server).
Also, ISPs usually assign dynamic IPs to residential demarcation devices (e.g ADSL routers, cable modems etc).
Let’s see some examples: A windows or Linux host can be configured to receive IP address dynamically. The same happens for other client devices such as smartphones, IoT devices etc.
If a host is configured to receive dynamic IP address, when it boots up it looks to find a DHCP server in order to receive an IP. The DHCP server responds to the host and assigns a dynamic IP from a pool. This dynamic IP will change after some period of time.
Another example is a home network router connected to an ISP (e.g ADSL router, cable modem/router etc). This router usually receives a dynamic IP address from the ISP.
Dynamic IPs are great from a management perspective, especially in internal LAN networks with many hosts. You don’t have to assign manually static IPs to many hosts.
Other Special Types of IP Addresses
7) Local Host IP (or Loopback IP)
All windows and Linux computers have a localhost IP which is the number 127.0.0.1
The corresponding IPv6 localhost address is ::1
A Localhost loopback address is reserved for internal host communication purposes. Traffic sent to or received by the localhost IP is confined internally and does not reach the NIC card (Network Interface Card) of the host.
A use case of localhost IP is the following: Assume you have a Linux server with MySQL database installed. The MySQL listens to port 3306.
A good security practice would be to configure the MySQL to listen only on the localhost IP (127.0.0.1) at port 3306.
This means that the MySQL database will be accessible only from processes or services within the local server and will not be accessible over the network external from the host (thus better security for the MySQL).
8) Default Gateway IP
If you want traffic to be routed from one network to another, you must have a Layer 3 gateway device to which hosts will send packets in order to route them to another network.
A simple scenario is shown above. All hosts in the LAN network are configured with the Default Gateway IP (192.168.1.254) which is the border router that will receive packets from internal hosts in order to route them outside to the Internet.
9) Multicast IP
A multicast IP is a special range of reserved IPs (from 22.214.171.124 through 126.96.36.199) which are used for one-to-many communication.
It is mainly used in multimedia communication (e.g Video over IP etc) whereby a single host (e.g a video server) sends traffic to a multicast IP group and the network switch distributes the traffic to multiple recipient devices (e.g TV set-top boxes).
10) Broadcast IP
As the name suggests, traffic sent to a broadcast IP address is received by all hosts in that specific Layer 3 segment.
The broadcast IP is derived by setting all 1 to the host portion of the address.
Let’s see a couple of examples:
For the network subnet 192.168.5.0/24, the broadcast address is 192.168.5.255
For the network subnet 10.2.5.0/16, the broadcast address is 10.2.255.255