[SOLVED] Unable to Add IP to VM

d1ch0t

Active Member
Jan 29, 2016
10
1
43
53
I am having problems configuring the first VM's networking after a fresh bare metal install of Proxmox. I have tested the IP I'm trying to add by adding it as an alias to the HN's interface and it works fine. I then remove it. Then I try to add it to a Centos7 VM using ifcfg-ens18 and route-ens18 and I get Network Unreachable.

Hardware node is set up as follows in /etc/network/interfaces:

Code:
auto lo
iface lo inet loopback

auto vmbr0
iface vmbr0 inet static
    address 1.1.1.3
    netmask 255.255.255.224
    gateway 1.1.1.1
    bridge_ports eth0
    bridge_stp off
    bridge_fd 0

ifcfg-ens18:

Code:
TYPE=Ethernet
BOOTPROTO=none
IPV4_FAILURE_FATAL=no
IPV6INIT=no
NAME=ens18
DEVICE=ens18
ONBOOT=yes
IPADDR=1.1.1.10
GATEWAY=1.1.1.3
NETMASK=255.255.255.224
NM_CONTROLLED=no

route-ens18:

Code:
1.1.1.3 dev ens18
default via 1.1.1.3 dev ens18

..which on restarting network gives me one line:

ip route show:

Code:
1.1.1.3 dev ens18 scope link

...with Network is unreachable for any attempts to ping out etc. I can't ping the gateway.

I've been bashing my head on this for a few hours now and can't understand where I'm going wrong. If anyone has any ideas please let me know. Thanks for your help!
 
Ignore me I fixed it. Was using the HW IP as the gateway instead of the actual gateway IP used by my HN. Idiot :I