default gateway bug?

mir

Famous Member
Apr 14, 2012
3,568
127
133
Copenhagen, Denmark
Hi team,

I think I have discovered a bug in pvemanager.

The situation:
My machine has two nics installed and I want to create a bridge on the second nic as well.
The bridge on the second nic obviously is on another network than the first bridge which means I would like to assign a different default gateway for this nic. The problem is that pvemanager will not allow me to have a different default gateway assigned to this nic. The error message is:
"Parameter verification failed. (400)

gateway: Default gateway already exists on interface 'vmbr0'."

As a side note. Trying to use this netmask '255.0.0.0' gives this error message:

"Parameter verification failed. (400)

netmask: invalid format - value does not look like a valid IP netmask"

255.0.0.0 as netmask is perfectly valid in my book!

Should I create new bugs for the above in bugzilla?

Michael.
 
This is how linux networking works - there is only one 'default' gateway.
I think you misunderstand me cause this is not how linux networking, or any networking for that matter, works. Each network has its own default gateway so if the two bridges are connected to different networks they will obviously have their own individual default gateway - if this was not the case there would be no routing.

eg:
vmbr0: 1.2.3.0/24 -> gw 1.2.3.1
vmbr1: 172.16.1.0/24 -> a default gateway on this network must be present to handle routing to other networks it cannot use 1.2.3.1 as default gateway.
 
Again, there is only one default gateway per host. But you can add additional entries to the routing table.

But why do you add that on the host? Usually you do not configure an IP on the host (for vmbr1) - It is enough if your VM knows the IP/gateway.
 
Again, there is only one default gateway per host. But you can add additional entries to the routing table.

But why do you add that on the host? Usually you do not configure an IP on the host (for vmbr1) - It is enough if your VM knows the IP/gateway.
The reason for this is that I will be able to assign different networks to different hosts. For me the situation is that some of the VM's are supposed to be sitting in DMZ while others are supposed to be sitting on the internal network. My PVE host therefore is equip with two nics sitting one sitting on the internal network and the other sitting in DMZ.

|----- GREN (Internal Net) -----------| | ----- Blue (WIFI)
| 192.168.0.0/16 | --------- |
PVE ---| FW -- Black (external)
| | --------- |
|----- Orange (DMZ) ------------------| | ----- Gray (VPN)
172.16.0.0/16
 
Hi mir,

'Gateway' is needed only for access network outside your local area. You can reach your local network without gateway.
 

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!