I'm creating a Kubernetes cluster and using MetalLB (https://metallb.universe.tf/) as my load balancer. I've managed to configure everything to work for internal IP addressing but then wanted MetalLB to be able to allocate external IP addresses.
To do this, I've added a new interface to my machines called ens192
. The interface already on the machine for internal networking is ens160
.
My plan was that I could configure the interface and routing without an IP, ready to be allocated when required. However, it doesn't seem to like this.
For arguments sake, my IP range is 233.233.233.161/27
. Here is my ifcfg-ens192
. Keeping in mind this system already has an interface ens160 I haven't configured another gateway -
TYPE="Ethernet"
BOOTPROTO="static"
DEFROUTE="no"
ONBOOT="yes"
IPV6INIT="no"
NAME="ens192"
DEVICE="ens192"
NETMASK="255.255.255.224"
BROADCAST="233.233.233.191"
DNS1="8.8.8.8"
DNS2="8.8.4.4"
Then I have setup basic routing with route-ens192
file -
default via 233.233.233.161 dev ens192
233.233.233.161/27 via 233.233.233.161 dev ens192
However, even if I assign an IP address to this interface I cannot get anything pinging and when running ifup ens192
I get -
[root@m1 network-scripts]# ifup ens192
RTNETLINK answers: Network is unreachable
RTNETLINK answers: Network is unreachable
I hope someone can help - I'm not the most proficient at routing!