First of all I dont have VLAN setup. I however have two local subnets.
The main subnet is 192.168.1.0 (gateway 192.168.1.1 --> T1 line) where all the servers and desktops are connected through the main switch.
Then I have another subnet 192.168.45.0 (Gateway 192.168.45.1 -->DSL line) for testing etc, which is connected to the same main switch so that the subnet 192.168.45.0 can be accessed from any where in the building. As they are both different subnets, they cannot ping one another. However, If you have both IP addresses added in your network configuration on your windows desktop, (192.168.1.x and 192.168.45.x) you can access both the networks internally. Ofcourse, to go out on the internet, once has to choose the gateway, 192.168.1.1 (for T1) or 192.168.45.1 (For DSL)
I have setup proxmox (only one physical NIC) on the 192.168.45.0 subnet. I have all my test VMs running on the 192.168.45.0 subnet. Everything is working fine.
Now, I want to use the proxmox server and create VM on it with 192.168.1.0 subnet, so that it can be used in the production environment.
The problem is when I use
route add -net 192.168.1.0 netmask 255.255.255.0 dev vmbr0
The VM crated with 192.168.1.x IP works great on the internal network (192.168.1.0). But since in the "route add" command, there is no gateway defined (192.168.1.1) it can not go out on the internet. So I can not do anything from the web, like yum, apt-get, wget etc from inside the VM.
so in the command:
How do I add gateway 192.168.1.1 ?
How to solve this problem?
Many thanks in advance.
The main subnet is 192.168.1.0 (gateway 192.168.1.1 --> T1 line) where all the servers and desktops are connected through the main switch.
Then I have another subnet 192.168.45.0 (Gateway 192.168.45.1 -->DSL line) for testing etc, which is connected to the same main switch so that the subnet 192.168.45.0 can be accessed from any where in the building. As they are both different subnets, they cannot ping one another. However, If you have both IP addresses added in your network configuration on your windows desktop, (192.168.1.x and 192.168.45.x) you can access both the networks internally. Ofcourse, to go out on the internet, once has to choose the gateway, 192.168.1.1 (for T1) or 192.168.45.1 (For DSL)
I have setup proxmox (only one physical NIC) on the 192.168.45.0 subnet. I have all my test VMs running on the 192.168.45.0 subnet. Everything is working fine.
Now, I want to use the proxmox server and create VM on it with 192.168.1.0 subnet, so that it can be used in the production environment.
The problem is when I use
route add -net 192.168.1.0 netmask 255.255.255.0 dev vmbr0
The VM crated with 192.168.1.x IP works great on the internal network (192.168.1.0). But since in the "route add" command, there is no gateway defined (192.168.1.1) it can not go out on the internet. So I can not do anything from the web, like yum, apt-get, wget etc from inside the VM.
so in the command:
Code:
route add -net 192.168.1.0 netmask 255.255.255.0 dev vmbr0
How to solve this problem?
Many thanks in advance.
Last edited: