Additional ip on vps

joabe

Member
Dec 8, 2020
20
0
6
23
Hi, I have a problem. I want to add another IP to the vps. I added a new network card with the virtual mac address of the new ip, I tried several ways, with cloud-init, without cloud-init, anyway.

The ips never work together, however if I deactivate eth0 for example, eth1 starts pinging, if I activate eth0 again, it doesn't work yet, for it to come back, I need to deactivate eth1.

How can I solve this? What would be the correct way to add one more IP in a virtual machine?
 
Hi, I have a problem. I want to add another IP to the vps. I added a new network card with the virtual mac address of the new ip, I tried several ways, with cloud-init, without cloud-init, anyway.

The ips never work together, however if I deactivate eth0 for example, eth1 starts pinging, if I activate eth0 again, it doesn't work yet, for it to come back, I need to deactivate eth1.

How can I solve this? What would be the correct way to add one more IP in a virtual machine?
Probably you have "problem" with default gateway.
Any network host can have only one default gateway at a moment.
You can add a static route if you wish to use one card for specific network access.
If you wish to use two network card as one interface you must create bond interface.
For this setup you also need to setup your switch properly.

You can check you route with command

on linux
Code:
ip route
on windows
Code:
route print

What you wish to achieve?