EDIT: After typing this entire post, and reading many more similar posts, something stood out. The fact that one can't have two default gateways on a server stood out. So what I did was assign the new IP address, including the default gateway, to the
guest VM. I did
nothing on the host. And it just worked! So I am guessing my second range of IP addresses, especially the router, is aliased by the ISP to the primary router.
ORIGINAL POST:
@
Nader Jafari how did you get this going?
I have a similar setup. The proxmox server has two physical interfaces in the DC, eno1 and eno2
I received on /29 when I signed up for the physical host, and now I need to add a new /29. The new /29 has a
new gateway.
From what I can see under the "Active" column
only eno1 is online.
So from reading a few posts like:
https://forum.proxmox.com/threads/how-to-add-additional-ip-to-proxmox-itself.69390/
https://forum.proxmox.com/threads/how-can-i-add-additional-ips-to-proxmox-network-interface.51631/
I thought let's add a Bridge interface. But trying to do this via the GUI is problematic. Here are some errors:
Action: Create new Linux Bridge / vmbr0
Result: "iface: interface already exists"
Action I try to create vmbr1 and use new gateway:
Resuit: Default gateway already exists on interface 'vmbr0'
Action: I create vmbr1 and leave out gateway. This feels all wrong but hec I'm trying stuff, right?
Result (after pressing Apply):
you need ifupdown2 to reload network configuration (500)
Action: From terminal I try ifupdown2
Result: -bash: ifupdown2:
command not found
I give up on GUI and move to terminal.
From the terminal I try:
Action: add new section to /etc/network/interfaces
iface vmbr0 inet static
address x.x.x.x/29
gateway y.y.y.y
I reboot. New section is gone, and new IP address is not listening. Thankfully old IP address still works.
Now I'm stuck. What I have learnt from the other posts:
1. Apparently no need to use :1 syntax, just duplicate bridge. But does a bridge work on different subnet with different gateway?
2. You can't do ifconfig down vmbr0:1 (if you ignored using that syntax) and have to do `ip a del`
Seems like many people are asking the same question and referral to Unix networking guides are given, but none seems Proxmox specific to me, and also I am not really a network specialist at this level. The guides that didn't help me, all in the other posts:
https://wiki.debian.org/NetworkConfiguration
https://wiki.debian.org/NetworkConfiguration#Multiple_IP_addresses_on_one_Interface
The title multiple IP addresses on one interface seems perfect except I have a different gateway?
The member
@oguz mentions "you can utilize the 'interfaces.d' directory and source the contents in 'interfaces'"
What does it mean, "source the contents of interfaces"?
Please assist. I would have though adding a new subnet with a new gateway is fairly common networking but I can't figure it out.