Second IP address on vmbr0

Jan 27, 2019
25
3
43
67
Hello,

we need to config a second IP address on a PVE server to the existing bridge vmbr0 with has already an IP address.
Have we to add it via CLI in /etc/networking/interfaces ?

How to bind the webinterface/ssh etc to this second interface? On the second IP all services of the PVE should be available

Thanks in advance

Uwe
 
As mentioned in the thread above:
"For two IPs in two subnets, you will need a second NIC."
However, if your node is standalone (not part of a cluster), you can easily add two IPs from different subnets on the same bridge using a command like this:
root@pve:~# ip a add x.x.x.x/x dev vmbr

Note that if the node is part of a cluster, using two IPs from different subnets on the same vmbr will cause issues. for example for the migration I saw error as:
Bash:
could not get migration ip: multiple, different, IP address configured for network '172.16.0.0/16'
TASK ERROR: command '/usr/bin/ssh -e none -o 'BatchMode=yes' -o 'HostKeyAlias=node2' -o 'UserKnownHostsFile=/etc/pve/nodes/node2/ssh_known_hosts' -o 'GlobalKnownHostsFile=none' root@192.168.18.78 pvecm mtunnel -migration_network 172.16.0.0/16 -get_migration_ip' failed: exit code 255
 
Both are in different subnets/networks. First, existing on 192.168. The second should be in a 10.x network
If its cluster nodes, then might be problematic as shown above. Although you can work on separate migrating network/replication then it should be fine as well I think.