Network config problem

licsi

New Member
Dec 10, 2013
6
0
1
Hi,

My server has two network cards. I want to connect the server two diferent network.
When I create new bridge (vmbr1) and set up gateway i get error message : Parameter verification failed. (400)

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

It is possible what I want?

Thanks.
 
Hi,

My server has two network cards. I want to connect the server two diferent network.
When I create new bridge (vmbr1) and set up gateway i get error message : Parameter verification failed. (400)

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

It is possible what I want?

Thanks.
Hi,
the gateway-entry defined the default gateway - and this can only exist one times.
But you don't need an gateway entry on the second (or first?) bridge - if you need a static route, you can add them with post-up...

Udo
 
Hi,
the gateway-entry defined the default gateway - and this can only exist one times.
But you don't need an gateway entry on the second (or first?) bridge - if you need a static route, you can add them with post-up...

Udo



Thanks,
but I am a beginer. What does it mean "add them with post-up..."
I can add gw in the VM
 
Thanks,
but I am a beginer. What does it mean "add them with post-up..."
I can add gw in the VM
Hi,
an IP on vmbr1 is only nessesary if you must reach the host from the connected network. If only the VM must in this network you can use something like this
Code:
auto vmbr0
iface vmbr0 inet static
        address  x.x.y.z
        netmask  255.255.255.0
        gateway  x.x.y.254
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0
        

auto vmbr1
iface vmbr1 inet manual
        bridge_ports eth1
        bridge_stp off
        bridge_fd 0
If you use an private network on vmbr1 (like 192.168.1.0/24 and a second (192.168.2.0/24) which is routet via 192.168.1.254) and from this networks you need the access to the pve-management you can do something like this
Code:
auto vmbr0
iface vmbr0 inet static
        address  x.x.y.z
        netmask  255.255.255.0
        gateway  x.x.y.254
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0
        

auto vmbr1
iface vmbr1 inet static
        address  192.168.1.11
        netmask  255.255.255.0
        bridge_ports eth1
        bridge_stp off
        bridge_fd 0
        post-up ip route add 192.168.2.0/24 via 192.168.1.254
Udo
 
Hi,
an IP on vmbr1 is only nessesary if you must reach the host from the connected network. If only the VM must in this network you can use something like this
Code:
auto vmbr0
iface vmbr0 inet static
        address  x.x.y.z
        netmask  255.255.255.0
        gateway  x.x.y.254
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0
        
It's OK.

auto vmbr1
iface vmbr1 inet manual
        bridge_ports eth1
        bridge_stp off
        bridge_fd 0

What network will be on eth1? I plug the cable in eth1 and in an other physical network  (a.b.c.0/24) and thats all? I set up the VM's ip and gw  


If you use an private network on vmbr1 (like 192.168.1.0/24 and a second (192.168.2.0/24) which is routet via 192.168.1.254) and from this networks you need the access to the pve-management you can do something like this
[code]
auto vmbr0
iface vmbr0 inet static
        address  x.x.y.z
        netmask  255.255.255.0
        gateway  x.x.y.254
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0
        

auto vmbr1
iface vmbr1 inet static
        address  192.168.1.11
        netmask  255.255.255.0
        bridge_ports eth1
        bridge_stp off
        bridge_fd 0
        post-up ip route add 192.168.2.0/24 via 192.168.1.254
Udo



I use 192.168.1.0/24 on eth0. VMs use vmbr0 in this network. I access pve-manager from this network. OK.
I want to use eth1 to conect other physical network and use other VMs in it. 195.111.x.y/28 I needn't routeed them.
I want to use independently them.
 
I use 192.168.1.0/24 on eth0. VMs use vmbr0 in this network. I access pve-manager from this network. OK.
I want to use eth1 to conect other physical network and use other VMs in it. 195.111.x.y/28 I needn't routeed them.
I want to use independently them.
Hi,
????? what do you mean with "195.111.x.y/28 I needn't routeed them"?
195.111.x.y is an official IP-address and if you want access the internet from this network (and the internet also should access your server) you need here the defaultroute.
Mean, your gateway-entry must be in the vmbr1-section.

If 192.168.1.0/24 is the only network accessible from vmbr0 you don't need an additional route here.

Udo
 
Hi,
????? what do you mean with "195.111.x.y/28 I needn't routeed them"?


195.111.x.y is an official IP-address and if you want access the internet from this network (and the internet also should access your server) you need here the defaultroute.
Mean, your gateway-entry must be in the vmbr1-section.

If 192.168.1.0/24 is the only network accessible from vmbr0 you don't need an additional route here.

Udo

We have got official IP range = Network1

and we have got other internet connection with one ip. Behind this private network. = Network2

I have got 1 physical server with 2 nic. I want set up 2 VM servers. One in network1 and one in network2. I need access the internet from network1 and from network2 too.
 
We have got official IP range = Network1

and we have got other internet connection with one ip. Behind this private network. = Network2

I have got 1 physical server with 2 nic. I want set up 2 VM servers. One in network1 and one in network2. I need access the internet from network1 and from network2 too.

And where is the problem?

All configurations you are need are described in the postings before.

You can use Network1 without IP on vmbr1 - all VMs in bridged mode on vmbr1 can use an official IP.
With defaultgateway on your private net (the default gateway is only for host-traffic or NAT) you can use the "other internet connection with one ip" for things like "apt-get update".
In this scenario the gui from your pve-server aren't accessible from the internet, but this is often the desired solution.

Udo
 
Last edited:

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!