VMs configuration

bounguine

New Member
Jan 28, 2018
3
0
1
51
1. Threr's a DHCP server:

192.168.1.2
255.255.255.0


2. There's a Proxmox host:
auto lo
iface lo inet loopback

auto enp3s0
iface enp3s0 inet dhcp

auto enp4s0f1
iface enp4s0f1 inet dhcp

iface enp2s0 inet manual

iface enp4s0f0 inet manual

auto vmbr0
iface vmbr0 inet static
address 192.168.1.95
netmask 255.255.255.0
gateway 192.168.1.2
bridge_ports none
bridge_stp off
bridge_fd 0

auto vmbr1
iface vmbr1 inet static
address 192.168.1.96
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0

auto vmbr100
iface vmbr100 inet static
address 192.168.1.160
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '192.168.1.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.1.0/24' -o vmbr0 -j MASQUERADE


And there'are several VMs with CentOS 7.

Which is the right way to configure VMs to get static or dynamic IPs 192.168.1.* in 255.255.255.0 subnet?
Tried many ways, but without any luck
 

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!