Configure VM network in a different Subnet under Proxmox VE

mykeebot

New Member
Oct 25, 2023
11
1
1
Dear All,

I'm writing to you because I have an unusual scenario and I could not find any exactly related information in the Network Configuration docs.

I have a HP server which has two management ports, one for iLO5 (192.168.29.67/24) and one for Proxmox VE (192.168.29.59/24).

iLO5

IP: 192.168.29.57
Netmask: 255.255.255.0
Gateway: 192.168.29.1
DNS: 10.41.131.20

Proxmox VE


IP: 192.168.29.59
Netmask: 255.255.255.0
Gateway: 192.168.29.1
DNS: 10.41.131.20

These are in the same subnet, but I need to configure the network under a different subnet on the Rocky 8 VM what I have created in Proxmox.

The network configuration of the Rocky 8 VM should look as follows...

VM

IP: 192.168.101.129
Netmask: 255.255.252.0
Gateway: 192.168.100.1
DNS: 10.41.131.20

My problem is, with this VM (Rocky 8) network configuration I don't have any network traffic and I cannot even ping or ssh to my VM.

I went through on the Proxmox Network Configuration guide and if I understand correctly I need to modify the Network Settings of my Node which looks as follows at the moment...

ScreenShot_15624.gif

...and this is what I see on my Rocky 8 VM...

ScreenShot_15625.gif

Any help would be much appreciated about the proper network configuration.

Thanks,
Mike
 
Hello,

The network of your VM cannot reach the gateway as 192.168.29.1 is not between HostMin and HostMax in:

Code:
$ ipcalc 192.168.101.129/255.255.252.0
Address:   192.168.101.129      11000000.10101000.011001 01.10000001
Netmask:   255.255.252.0 = 22   11111111.11111111.111111 00.00000000
Wildcard:  0.0.3.255            00000000.00000000.000000 11.11111111
=>
Network:   192.168.100.0/22     11000000.10101000.011001 00.00000000
HostMin:   192.168.100.1        11000000.10101000.011001 00.00000001
HostMax:   192.168.103.254      11000000.10101000.011001 11.11111110
Broadcast: 192.168.103.255      11000000.10101000.011001 11.11111111
Hosts/Net: 1022                  Class C, Private Internet

You can use Masquerading (NAT) with iptables as descibred in [1] to achieve what you want if you really want to use a separate network instead of having VMs in the 192.168.29.2 - 192.168.29.255 range.

[1] https://pve.proxmox.com/pve-docs/pve-admin-guide.html#sysadmin_network_configuration
 
I need to configure the network under a different subnet on the Rocky 8 VM what I have created in Proxmox
I'd like to chime in with Maximiliano. What is your goal with putting the VM in another subnet? The IPs in your examples seem quite random (nothing wrong with that, of course ;-) )
 
I'd like to chime in with Maximiliano. What is your goal with putting the VM in another subnet? The IPs in your examples seem quite random (nothing wrong with that, of course ;-) )
Hey there!

It's not my goal, but I simply got this IP roster from the customer, so I cannot do much other than make it work :)
 
a HP server which has two management ports
ok, so these are the management ports.

I wanted to ask about the other ports, and just noticed you (indeed) used one of the other ports for guest networking :-) Nice you got it solved!
 
  • Like
Reactions: mykeebot
Hi guys I am in similar kind of scenario , however I have just one Ethernet port connected to my proxmox server

here is my interfaces file

auto lo
iface lo inet loopback

auto eno1
iface eno1 inet static
address 192.168.0.102/24
gateway 192.168.0.1
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up echo 1 > /proc/sys/net/ipv4/conf/eno1/proxy_arp

auto vmbr0
iface vmbr0 inet static
address 192.168.7.1/24 <------ guest network
bridge-ports none
bridge-stp off
bridge-fd 0

so 192.168.7.0/24 is my guest vm network , what I want to verify is it it is possible to reach my vm from another dedicated hosts which is on same layer 2 network and have IP address assigned from the same subnet lets say 192.168.7.5 and one of my vm is 192.168.7.2 however it looks like it is not accessible without port forwarding.

here is what arp table looks like from proxmox host

Code:
? (192.168.0.1) at a4:91:b1:c8:b6:a4 [ether] on eno1
? (192.168.7.5) at b8:76:3f:d0:83:d7 [ether] on eno1
? (192.168.7.2) at bc:24:11:88:1b:3f [ether] on vmbr0
? (192.168.7.5) at <incomplete> on vmbr0
? (192.168.0.106) at 60:a5:e2:42:2b:74 [ether] on eno1