Configuring multiple networks

Apr 25, 2017
5
0
1
36
Hi All,

As an introduction I must acknowledge that I am pretty new to Linux and most particularly to the Proxmox VE.

The HOST system
Here I have an IBM server with two ethernet ports which connects to 192.168.0.* and 10.135.109.* networks respectively. While on windows platform, I used to configure both the network adapters with their respective gateways (192.168.0.2 and 10.135.109.2 respectively)

The GUEST systems
VM#1 will connect to 192.168.0.* network with 192.168.0.2 gateway
VM#2 will connect to 10.135.109.* network with 10.135.109.2 gateway
VM#3 will have 2 NICs like the host and will connect to both the networks simultaneously through their respective gateways

Gateway is very important due to inter VLAN routing and Firewall rules already in place. But I am unable to configure the second gateway on proxmox to suffice the same. Please help me out on how may I do the needful.
 
Last edited:
Can you please guide me on how may I do this.
Really sorry, but I have very limited expertise in these things.



Please find below the screenshot of existing configuration. network.JPG
 
You can only have one default gateway. But you can define routes to specific networks over an other gateway.


wrong ;) In linux (proxmox is linux), you can have multiple default gateway, but is not so simple to explain/setup for a non-expirienced user/admin. Even in others OS's is not a trivial task.
 
Last edited:
wrong ;) In linux (proxmox is linux), you can have multiple default gateway, but is not so simple to explain/setup for a non-expirienced user/admin. Even in others OS's is not a trivial task.

It would be really helpful if you or someone may share rough steps which may serve the purpose. Anyways, thanks for replying on the thread.
 
Please find the attached screenshot of sample network in the now-running windows based setup (In which VMs are running on VMWare) which i need to replicate in Proxmox VE.Windows Network.JPG
 
Even so, I think if you do not make some "magic" setup in Win Guest, you will use ONLY one default gw, despite that you have define 2 default gw. But maybe I am wrong. Anyway any OS must have "rule" that say ... hello this kind of flow(A) must go with default gw 1 but this kind of flow(B) must use default gw 2. If you do not have something like this, ANY flow will use a single default gw(and the same) from the primary NIC.
 

Thanks man, you have saved me.

I did everything just as mentioned in the article you shared and everything seems to be working as expected as of now. Though, I am facing a small issue while the server is restarted, the "cheapskate" table gets missing and we need to reconfigure the route once again. Hope this is caused because of access permission issues in the "/etc/iproute2/rt_tables" as shown in the pic below. I am using root user to configure still the issue persists. Hope there is a way out :)
inaccessable.JPG
 
You can use two default gateways but then you have round robin for the gateways if they have the same metric.

For sure you have multiple routing tables too but this will be a very complicated setup.
 
I you "run" :
/etc/iproute2/rt_tables

it is normal to get this error, because is not acommand. "/etc/iproute2/rt_tables" is only a plain file. You can see it with:

cat /etc/iproute2/rt_tables

The second problem, if you reboot your magic server, you will lose the setup. So you need to create a script with the commanda that you make at the setup. This script you need to run after the networking stack is load. This is all you need!!!

Have a nice ruting day ;)
 

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!