0

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!

1 Answer 1

0

The error message is related to the link status of the interface, not to the IPv4 configuration.

The link status on hardware devices is typically related to the cable connection at both ends although this can also be controlled through software.

See the man ip for more details:

https://linux.die.net/man/8/ip

ip link set - change device attributes

dev NAME (default)
    NAME specifies network device to operate on. When configuring SR-IOV Virtual Fuction (VF) devices, this keyword should specify the associated Physical Function (PF) device. 
up and down
    change the state of the device to UP or DOWN. ```

In case wires are connected properly, try a command such as `ip link set dev ens192 up`.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .