Assign second ipadres to network card
-
Hi,
My XO does have 2 network cards assigned, i would like to add a second ip to the second network card. An ip alias. I can’t find the way to do this. I do not want to add another network card to it. Anyone who can help me with this?
Cheers Robin
-
Hi,
Are you using XOA or XO from the sources?
-
i do use the XOA.
-
@rtjdamen Copying my reply to your official support ticket (any reason for duplicating support tickets on the forum as well?):
given XOA is built on standard debian, you can assign multiple IPs to the same interface quite easily by just duplicating another "iface eth1 inet static" line. Also keep in mind XOA does not add extra interfaces under the main /etc/network/interfaces file, but in files under the /etc/network/interfaces.d/ directory. So in your case given it was eth1 you wanted a second IP on, you can add your required second IP in this file like so:
[09:43 12] xoa:~$ cat /etc/network/interfaces.d/eth1 allow-hotplug eth1 iface eth1 inet static address 192.168.1.80 netmask 255.255.255.0 #second IP iface eth1 inet static address 172.16.100.5 netmask 255.255.255.0