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
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
188.8.131.52/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="184.108.40.206" DNS1="220.127.116.11" DNS2="18.104.22.168"
Then I have setup basic routing with
route-ens192 file -
default via 22.214.171.124 dev ens192 126.96.36.199/27 via 188.8.131.52 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!