In this post,
we can see how to create a virtual IP address, based on an existing network
interface (permanently).
In Linux you simply create a new, virtual interface in the
interfaces file.
|
vi /etc/network/interfaces
|
And add a network interface, based on an existing interface.
The below example is a virtual IP based on eth0 – note if this is your
second virtual IP you would use eth0:2, and so on.
|
auto eth0
iface eth0 inet static
address 192.168.0.211
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
|
You will need to change the IP addresses to match your
network. Notice there is no gateway – usually you can only have one
gateway per machine.
Restart networking for the changes to take effect.
No comments:
Post a Comment