In the context of IP Addressing, Aliasing refers to the process of creating and configuring multiple IP addresses on a single Network Interface. By having aliased IP addresses, you can create multiple connections to a network for an individual node on a network where each connection can serve for a different purpose.
Features of Secondary IP Address :
IP Aliasing gives way to a new concept of Secondary IP addresses, which means that you can configure multiple Secondary IP Addresses on same interface which has primary IP address. This allows you to specify an unlimited number of secondary addresses to any network interface which if required can be detached from a Virtual Machine Instance.
In GCP we can configure a primary and at the same time,a secondary CIDR Range as a part pf a subnet:
- Configure 10.1.0.0/16 as a primary CIDR Range
- Configure 10.2.0.0/20 as a secondary CIDR Range
Here, primary IP Address of Virtual Machine is allocated from primary CIDR range, whereas an alias IP range, 10.2.1.0/24, is allocated in VM from secondary CIDR range.
The addresses in alias IP range are used as IP addresses of containers hosted in VM.
Some most common applications of Secondary IP Address include:
- Secondary IP address is a good option to be used in case of hosting sites on a dedicated IP with SSL certificate because if you are using HTTPS, you need an IP per website.
- If you wish to split resources across your IP’s so that you can apply different firewalling for access control or put in some QoS rule, then various services can be assigned to different IP’s.
- Using a Secondary IP Address can be useful for controlling traffic easily depending on how you segregate DNS names/services between them.
For Instance, you can configure a secondary IP to your Device Interface or a Linux Environment if you have 2 IP subnets within same VLAN and wish to expand it when one subnet is exhausted or to migrate the default gateway of a host from one address to another.
- The use of IP Aliasing reduces need of multiple NIC’s (Network Interface Cards) to configure multiple IP’s which in turn reduces configuration time as well as cost.
- It is also very useful in setting up multiple virtual sites on Linux Web Servers such as “Apache” using one single network interface with different IP addresses on a single subnet network, what we basically call as IP based virtual hosting.
- You have freedom to consolidate applications and web pages on a single server without changing application code.
As such there are no disadvantages of IP Aliasing and it’s used completely depends upon your requirement because you can specify an unlimited number of secondary addresses. But on other hand, it is suggested to use Secondary IP only in Corner Case Scenarios as it generates more broadcast traffic if you want to increase number of hosts.
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Difference Between Network Address Translation (NAT) and Port Address Translation (PAT)
- Difference between MAC Address and IP Address
- Java program to find IP address of your computer
- How DHCP server dynamically assigns IP address to a host?
- Program to determine class, Network and Host ID of an IPv4 address
- How to validate MAC address using Regular Expression
- Types of Network Address Translation (NAT)
- C Program to find IP Address, Subnet Mask & Default Gateway
- How Address Resolution Protocol (ARP) works?
- Introduction of MAC Address in Computer Network
- C Program to display hostname and IP address
- Python | Remove leading zeros from an IP address
- Extracting MAC address using Python
- Address Resolution in DNS (Domain Name Server)
- Network Address Translation (NAT)
- Finding IP address of a URL in Java
- Port Address Translation (PAT) on Adaptive Security Appliance (ASA)
- Transition from IPv4 to IPv6 address
- Difference between Static and Dynamic IP address
- Local Broadcast and Loopback Address
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.