Additional Subnet Configuration

tachra

New Member
Jan 9, 2015
5
0
1
Hello,

I have 2 Range of IPs on my proxmox ve server and i want to use KVM based VMs.
We assume my main IP is: 192.168.51.90 with netmask 255.255.255.248 and GW 192.168.51.89
and my additional IPs are: 192.168.51.91 - 94
and another subnet is: 192.168.52.16 - 28 with subnet 255.255.255.240 and this subnet is routed through the main IP range that makes its gw same as main IP

When i create a VM with KVM/Bridged mode and i set IP from subnet, that VM is not reachable while the MAIN IP RANGE works fine

Now i have 2 questions:
1 - Should i do some routing configuration on the node?
2 - If i use a subnet with its own gateway will it work on my VMs?
3 - What if i use KVM NAT network device?
 
Hi,
You can't just setup a subnet and say its gateway is some arbitrary number (in this case, that arbitrary number being the gateway on your primary /29 subnet) - you have to setup a router (or layer 3 routing switch) and setup routes so the machines understand where to send the packets to in order to reach the appropriate machine. Right now, from what you've posted, it would appear you're thought process is that these two subnets exist on the same physical lan and you can just say in one subnet to use the other ones gateway.

One example might be:

router to which both subnets connect and connects to the internet and can route between each subnet as well as the internet

Another example might be

(assuming for the size of the network everything is manually created)
SubnetA GW Router (192.168.51.89) route any data needed for the 192.168.52.16/28 network to it's border router, located at (I just picked a number from your subnet) 192.168.51.94

Router at 192.168.51.94 would have a second ethernet connected to the other subnet at lets say IP 192.168.52.30 (192.168.52.16/28 network address is .16, broadcast is .31). Each of the machines on that subnet would have a default GW of 192.168.52.31. This router's default next hop would need to be configured as the SubnetA GW router.