We are in the process of migrating this forum. A new space will be available soon. We are sorry for the inconvenience.

DHCP Proxmox vRack


raffo
01-10-2015, 21:12
Hi Everyone,

I have some problems with vRack 1.5 using DHCP to auto-assign the public IP to a Proxmox VM.

I have put the netbloc and the server inside the vRack, then i have followed the configuration of OVH guide to assign an IP address to a VM by static configuration. It work!

netbloc: 149.202.x.224/27
IP VM: 149.202.x.226

In the Proxmox panel i add a network card with the mac address "EA:CE:74:8D:92:6F" using the vmbr2

Dedicate Server "/etc/network/interfaces" (proxmox)
Code:
#bridge vrack 1.5
auto vmbr2
iface vmbr2 inet manual
        bridge_ports eth1
        bridge_stp off
        bridge_fd 0
Virtual Machine "/etc/network/interfaces"
Code:
iface eth0 inet static
        address 149.202.x.226
        netmask 255.255.255.224
        gateway 149.202.x.254
Now i'm trying to assign the IP address "149.202.x.226" by DHCP, so i add this configurations:

Dedicate Server "/etc/network/interfaces" (proxmox)
Code:
auto eth1
iface eth1 inet static
        address 149.202.x.224
        netmask  255.255.255.224
        broadcast 149.202.x.255
        post-up /sbin/ip route add default via 149.202.x.254 dev eth1 table 125
        post-up /sbin/ip rule add from 149.202.x.224/27 table 125
        pre-down /sbin/ip route del default via 149.202.x.254 dev eth1 table 125
        pre-down /sbin/ip rule del from 149.202.x.224/27 table 125

#bridge vrack 1.5
auto vmbr2
iface vmbr2 inet manual
        bridge_ports eth1
        bridge_stp off
        bridge_fd 0
Note: I configured a private network that already working (vmbr172)
Dedicate Server "/etc/default/isc-dhcp-server" (proxmox)
Code:
INTERFACES="vmbr2 vmbr172"
Dedicate Server "/etc/dhcp/dhcpd.conf" (proxmox)
Code:
ddns-update-style none;
default-lease-time         3600;
max-lease-time             7200;

subnet 149.202.x.224 netmask 255.255.255.224 {
  range 149.202.x.224 149.202.x.251;
    option subnet-mask         255.255.255.224;
    option broadcast-address   149.202.x.255;
    option routers             149.202.x.254;
    option domain-name-servers 213.186.33.99;
    option domain-name "ovh.net";
    option broadcast-address 149.202.x.255;
}

host ansible {
  hardware ethernet EA:CE:74:8D:92:6F;
  fixed-address 149.202.x.227;
  #server-name "ansible.xxx.ovh";
}
Virtual Machine "/etc/network/interfaces"
Code:
iface eth0 inet dhcp
The reboot of the VM take too much to try dhcp assign and it fail the network.
The DHCP client dosn't find the correct routing and do not assign the lease of the IP address.
the command: dhclient -v eth0:


Anyone have the same issue/situation?

How to auto-assign IP inside a vRack?
I trying only the DHCP way, there are the ARP way to try now. But just be sure if dhcp is not capable to handle that.

Thanks in advice,
RAFFAELE