[SOLVED] Configure DHCP for Windows guests and static IP for my host

B

bill78

Guest
Hi,

How to configure my Proxmox Server so this one has a static IP and my guests get their IP address by DHCP.
In modifying the /etc/network/interfaces file (cf. below), I managed to have DHCP for my guests but the Proxmox server is also in DHCP.

The eth1 interface is not used, and the network device of my guests is in bridged mode.

===========================
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 170.60.4.245
netmask 255.255.255.0
gateway 170.60.4.1

iface eth1 inet manual

auto vmbr0
iface vmbr0 inet dhcp
bridge_ports eth0
bridge_stp off
===========================
 
Last edited by a moderator:
You are on the wrong path, think a vmbrx like a physical switch, does not need an IP or whatever, except vmbr0 that is used to communicate with Proxmox.
Don't know your setup, I give you mine with all private IP
You need /etc/netwok/interfaces as created standard by proxmox web inteface, like:
Code:
# network interface settings
auto lo
iface lo inet loopback

iface eth0 inet manual

iface eth1 inet manual

auto vmbr0
iface vmbr0 inet static
        address  192.168.1.5
        netmask  255.255.255.0
        gateway  192.168.1.253
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0

auto vmbr1
iface vmbr1 inet manual
        bridge_ports eth1
        bridge_stp off
        bridge_fd 0
If you assign to a VM a new network interface and bind with vmbr0, INSIDE your guest you can assign a static IP or dynamic (DHCP). Think vmbr0 like a physical switch where your proxmox eth0 is plugged on one port, and your vm network interface on another, that's all.
I use vmbr1 when I want to have a physically separated netwrok (i.e. connected to DMZ port of the firewall) where connect my VM, or in the same phisical switch if I want to distribute the VM traffic (some associated with vmbr0 and other to vmbr1, for instance).
Hope it helps
 
[SOLVED] Re: Configure DHCP for Windows guests and static IP for my host

Argh,

It was my very first config. And it did not work (regardless of the network card model).
I tried again configuring my network with the web interface, and it works fine now. Even with a new created VM.
Finally, my /etc/network/interfaces file is like below

I really don't understand what happened but thank you for your answer.


===========================
# network interface settings
auto lo
iface lo inet loopback

iface eth0 inet manual

iface eth1 inet manual

auto vmbr0
iface vmbr0 inet static
address 170.60.4.245
netmask 255.255.255.0
gateway 170.60.4.1
bridge_ports eth0
bridge_stp off
bridge_fd 0
===========================



 
It was my very first config. And it did not work (regardless of the network card model).
I tried again configuring my network with the web interface, and it works fine now. Even with a new created VM.
Finally, my /etc/network/interfaces file is like below

I really don't understand what happened but thank you for your answer.


===========================
# network interface settings
auto lo
iface lo inet loopback

iface eth0 inet manual

iface eth1 inet manual

auto vmbr0
iface vmbr0 inet static
address 170.60.4.245
netmask 255.255.255.0
gateway 170.60.4.1
bridge_ports eth0
bridge_stp off
bridge_fd 0
===========================
 

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!