Problem with additional IPs

chrunchips123

New Member
Aug 15, 2019
4
0
1
26
I need some help with setting up additional ip for my vps in proxmox. I was always using proxmox to make 1/2 virtuals to run some software. That's why I never need additional IPs and I was always using default proxmox configuration (vmbr0) so I had same IP as dedicated server on vps, but I was using port forwarding to access 2 different website with only 1 IP for example.

Now I need one of me virtual's to have different IP. That's why i bought 1 additional ip and there my struggle started. I can't manage to set this up correctly because documentation at the internet looks like old and nothing really works with my setup.

I know I have to setup virtual mac for ip and put it in "Edit: Network Device" of a vps.
First thing I have problem with is creating new network device. Because as I sad I am using default bridge configuration in my host which looks like this:
Code:
auto lo
iface lo inet loopback

iface enp3s0 inet manual

auto vmbr0
iface vmbr0 inet static
        address  12.23.34.45/24
        gateway  12.23.34.254
        netmask 255.255.255.255
        bridge-ports enp3s0
        bridge-stp off
        bridge-fd 0

There I came up at first problem because I don't even have to add anything here to simply get errors. When i try to restart "/etc/init.d/networking restart". I got this error:
Code:
Restarting networking (via systemctl): networking.serviceJob for networking.service failed because the control process exited with error code.
See "systemctl status networking.service" and "journalctl -xe" for details.
 failed!

Output of a "systemctl status networking.service" is:
Code:
● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2019-08-15 11:33:53 UTC; 1s ago
     Docs: man:interfaces(5)
  Process: 7843 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
  Process: 7827 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm settle (code=exited,
 Main PID: 7843 (code=exited, status=1/FAILURE)
      CPU: 78ms

Aug 15 11:33:53 ns3343533 systemd[1]: Starting Raise network interfaces...
Aug 15 11:33:53 ns3343533 ifup[7843]: Waiting for vmbr0 to get ready (MAXWAIT is 2 seconds).
Aug 15 11:33:53 ns3343533 ifup[7843]: RTNETLINK answers: File exists
Aug 15 11:33:53 ns3343533 ifup[7843]: ifup: failed to bring up vmbr0
Aug 15 11:33:53 ns3343533 systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Aug 15 11:33:53 ns3343533 systemd[1]: Failed to start Raise network interfaces.
Aug 15 11:33:53 ns3343533 systemd[1]: networking.service: Unit entered failed state.
Aug 15 11:33:53 ns3343533 systemd[1]: networking.service: Failed with result 'exit-code'.


Its default and I didn't change anything here. That's my first problem. Also everything is working just fine, I just cant restart networking.

So as i processed and tried to create new network-device with my new IP for vps I added these lines:
56.67.78.89 - Is my new additional IP
Code:
auto vmbr1
iface vmbr1 inet static
        address  56.67.78.89
        gateway  12.23.34.254
        netmask 255.255.255.255

But as I said i can't even restart networking because I get this error. In the Network Tab of a dedicated server it says that vmbr1 "Active:No" and I can't turn on my vps.
 
address 12.23.34.45/24
gateway 12.23.34.254
netmask 255.255.255.255
This probably won't work - a netmask of 255.255.255.255 would be written down as /32 - you've defined a /24 above?! - Maybe try removing the netmask line...

auto vmbr1
iface vmbr1
inet static address 56.67.78.89
gateway 12.23.34.254
netmask 255.255.255.255
again the netmask (unless you want to configure an alias) and you cannot easily have 2 gateways on one host (or specify one twice)

The concrete network config is quite dependent on where you have your host - please contact your ISP for a recommendation of how to configure 2 IPs in their network (if the above suggestions do not help)

Else please checkout the reference documentation on networking: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#sysadmin_network_configuration

I hope this helps!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!