Score:0

Networking.service failed to start - RTNETLINK answers: file exists

pk flag

I've been having an issue with a server after rebooting it. Previously the networking was fine, and I rarely touched it as it's a back up server. Since rebooting it, it's been having issues. The server is running ubuntu 18.04

systemctl status networking.service

Shows the status as failed:

RTNETLINK answers: File exists
Failed to bring up enp5s0f1
Failed to start Raise network interfaces

Restarting the server, further reboots haven't changed this. When running ifdown enp5s0f1 it shows as device not being configured.

Whilst ifup en5s0f1 shows again:

RTNETLINK answers: File exists
Failed to bring up enp5s0f1

There are a few solutions that I've tried from this thread: https://raspberrypi.stackexchange.com/questions/13895/solving-rtnetlink-answers-file-exists-when-running-ifup

I don't want to add the ignore errors option, incase of issues later.

Here is the interfaces file:

# ifupdown has been replaced by netplan(5) on this system.  See
# /etc/netplan for current configuration.
# To re-enable ifupdown on this system, you can run:
#    sudo apt install ifupdown
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#auto bond0
#iface bond0 inet static
#        pre-up modprobe bonding miimon=100 mode=4 lacp_rate=1
#        pre-up ip link set bond0 up
#        pre-up ifenslave bond0 eno1
#        pre-up ifenslave bond0 eno2
#        pre-up ifenslave bond0 eno3
#        pre-up ifenslave bond0 eno4
#        post-down ip link set bond0 up
#        post-down ifenslave -d bond0 eno1
#        post-down ifenslave -d bond0 eno2
#        post-down ifenslave -d bond0 eno3
#        post-down ifenslave -d bond0 eno4
#        post-down rmmod bonding
#        address 192.168.128.23
#        netmask 255.255.240.0
#    gateway 192.168.128.1
#    mtu 9000
#       slaves      eno1 eno2 eno3 eno4
#       bond_mode   4
#       bond-miimon 100
#       bond_downdelay  200
#       bond_updelay    200

auto enp5s0f1
iface enp5s0f1 inet static
        address 192.168.128.23
        netmask 255.255.240.0
    gateway 192.168.128.1
    mtu 9000

auto enp5s0f1.0100
iface enp5s0f1.0100 inet static
    address 192.168.100.23
    netmask 255.255.255.0
    vlan-raw-device enp5s0f1

auto enp5s0f1.0201
iface enp5s0f1.0201 inet static
    address 192.168.201.23
    netmask 255.255.255.0
    vlan-raw-device enp5s0f1

#auto bond0.0100
#iface bond0.0100 inet static
#   address 192.168.100.23
#   netmask 255.255.255.0

#auto bond0.0201
#iface bond0.0201 inet static
#       address 192.168.201.23
#       netmask 255.255.255.0

Looking at ifstate, I added the first line but it didn't help:

lo=lo
enp5s0f1=enp5s0f1
enp5s0f1.0100=enp5s0f1.0100
enp5s0f1.0201=enp5s0f1.0201

ifconfig -a outputs this

bond0: flags=5123<UP,BROADCAST,MASTER,MULTICAST>  mtu 1500
        inet 192.168.128.23  netmask 255.255.240.0  broadcast 192.168.143.255
        ether 1a:e3:d6:8c:b5:ff  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

bond0.0100: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.100.23  netmask 255.255.255.0  broadcast 192.168.100.255
        ether 1a:e3:d6:8c:b5:ff  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

bond0.0201: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.201.23  netmask 255.255.255.0  broadcast 192.168.201.255
        ether 1a:e3:d6:8c:b5:ff  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eno1: flags=6147<UP,BROADCAST,SLAVE,MULTICAST>  mtu 1500
        ether 1a:e3:d6:8c:b5:ff  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eno2: flags=6147<UP,BROADCAST,SLAVE,MULTICAST>  mtu 1500
        ether 1a:e3:d6:8c:b5:ff  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eno3: flags=6147<UP,BROADCAST,SLAVE,MULTICAST>  mtu 1500
        ether 1a:e3:d6:8c:b5:ff  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eno4: flags=6147<UP,BROADCAST,SLAVE,MULTICAST>  mtu 1500
        ether 1a:e3:d6:8c:b5:ff  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp5s0f0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether a0:36:9f:5f:6a:78  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp5s0f1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9000
        inet 192.168.128.23  netmask 255.255.240.0  broadcast 192.168.143.255
        inet6 fe80::a236:9fff:fe5f:6a7a  prefixlen 64  scopeid 0x20<link>
        ether a0:36:9f:5f:6a:7a  txqueuelen 1000  (Ethernet)
        RX packets 1816  bytes 182426 (182.4 KB)
        RX errors 0  dropped 211  overruns 0  frame 0
        TX packets 33  bytes 2598 (2.5 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp5s0f1.0100: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9000
        inet 192.168.100.23  netmask 255.255.255.0  broadcast 192.168.100.255
        inet6 fe80::a236:9fff:fe5f:6a7a  prefixlen 64  scopeid 0x20<link>
        ether a0:36:9f:5f:6a:7a  txqueuelen 1000  (Ethernet)
        RX packets 433  bytes 22045 (22.0 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 11  bytes 866 (866.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp5s0f1.0201: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9000
        inet 192.168.201.23  netmask 255.255.255.0  broadcast 192.168.201.255
        inet6 fe80::a236:9fff:fe5f:6a7a  prefixlen 64  scopeid 0x20<link>
        ether a0:36:9f:5f:6a:7a  txqueuelen 1000  (Ethernet)
        RX packets 106  bytes 7861 (7.8 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 11  bytes 866 (866.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 134  bytes 13007 (13.0 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 134  bytes 13007 (13.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

I'm not sure about the bond options. The networking was setup a while ago by my colleague who's not with us anymore.

Edit: Found a netplan config! I'd like to just use netplan, as long as it works. I removed ifupdown, and tried the netplan config but still no network. I confirmed networking.service is removed and systemd-networkd is up - still broken!

Any advice on this netplan config?

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
#network:
#  version: 2
#  renderer: networkd
#  ethernets:
#    eno1:
#      addresses: [ 192.168.128.23/20 ]
#      gateway4: 192.168.128.1
#      nameservers:
#          addresses:
#              - "192.168.128.240"

network:
    version: 2
    renderer: networkd
    ethernets:
        switchports: #the physical interfaces
            match: {name: "eno[1-4]"}
            dhcp4: no
            optional: true           
    bonds:     
        bond0: #the bonded interface
            interfaces: [switchports]
            parameters:
                mode: 802.3ad
                lacp-rate: fast
                mii-monitor-interval: 100
            dhcp4: no
            addresses: [ "192.168.128.23/20" ]
            gateway4: 192.168.128.1
            nameservers:
                addresses:
                    - "192.168.128.240"
    vlans:
        bond0.0100:
            id: 100
            link: bond0
            dhcp4: no
            addresses: [ "192.168.100.23/24" ]
        bond0.0201:
            id: 201
            link: bond0
            dhcp4: no
            addresses: [ "192.168.201.23/24" ]

Edit2: Added some more outputs that I found.

ipaddr output

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eno1: <NO-CARRIER,BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc mq master bond0 state DOWN group default qlen 1000
    link/ether 1a:e3:d6:8c:b5:ff brd ff:ff:ff:ff:ff:ff
3: eno2: <NO-CARRIER,BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc mq master bond0 state DOWN group default qlen 1000
    link/ether 1a:e3:d6:8c:b5:ff brd ff:ff:ff:ff:ff:ff
4: eno3: <NO-CARRIER,BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc mq master bond0 state DOWN group default qlen 1000
    link/ether 1a:e3:d6:8c:b5:ff brd ff:ff:ff:ff:ff:ff
5: eno4: <NO-CARRIER,BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc mq master bond0 state DOWN group default qlen 1000
    link/ether 1a:e3:d6:8c:b5:ff brd ff:ff:ff:ff:ff:ff
6: enp5s0f0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether a0:36:9f:5f:6a:78 brd ff:ff:ff:ff:ff:ff
7: enp5s0f1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether a0:36:9f:5f:6a:7a brd ff:ff:ff:ff:ff:ff
8: bond0: <NO-CARRIER,BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 1a:e3:d6:8c:b5:ff brd ff:ff:ff:ff:ff:ff
    inet 192.168.128.23/20 brd 192.168.143.255 scope global bond0
       valid_lft forever preferred_lft forever
9: bond0.0201@bond0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN group default qlen 1000
    link/ether 1a:e3:d6:8c:b5:ff brd ff:ff:ff:ff:ff:ff
    inet 192.168.201.23/24 brd 192.168.201.255 scope global bond0.0201
       valid_lft forever preferred_lft forever
10: bond0.0100@bond0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN group default qlen 1000
    link/ether 1a:e3:d6:8c:b5:ff brd ff:ff:ff:ff:ff:ff
    inet 192.168.100.23/24 brd 192.168.100.255 scope global bond0.0100
       valid_lft forever preferred_lft forever

The networkd.service status. It's showing as link is up, but I still cannot ping anything internal or external.

systemd-networkd.service - Network Service
   Loaded: loaded (/lib/systemd/system/systemd-networkd.service; enabled-runtime; vendor preset: enabled)
   Active: active (running) since Tue 2021-12-21 12:14:54 GMT; 17s ago
     Docs: man:systemd-networkd.service(8)
 Main PID: 11381 (systemd-network)
   Status: "Processing requests..."
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/systemd-networkd.service
           └─11381 /lib/systemd/systemd-networkd

Dec 21 12:14:54 dougal systemd-networkd[11381]: bond0: Link is not managed by us
Dec 21 12:14:54 dougal systemd-networkd[11381]: enp5s0f1: Link is not managed by us
Dec 21 12:14:54 dougal systemd-networkd[11381]: bond0: IPv6 successfully enabled
Dec 21 12:14:54 dougal systemd-networkd[11381]: eno2: Link is not managed by us
Dec 21 12:14:54 dougal systemd-networkd[11381]: eno1: Link is not managed by us
Dec 21 12:14:54 dougal systemd-networkd[11381]: lo: Link is not managed by us
Dec 21 12:14:54 dougal systemd-networkd[11381]: eno4: Link is not managed by us
Dec 21 12:14:54 dougal systemd-networkd[11381]: enp5s0f0: Link is not managed by us
Dec 21 12:14:54 dougal systemd-networkd[11381]: eno3: Link is not managed by us
Dec 21 12:14:54 dougal systemd-networkd[11381]: enp5s0f1: Link is not managed by us

Output of networkctl ports seem to be stuck configuring.

1: lo
       Link File: /lib/systemd/network/99-default.link
    Network File: n/a
            Type: loopback
           State: carrier (unmanaged)
         Address: 127.0.0.1
                  ::1

● 2: eno1
       Link File: /lib/systemd/network/99-default.link
    Network File: /run/systemd/network/10-netplan-switchports.network
            Type: ether
           State: no-carrier (configuring)
            Path: pci-0000:01:00.0
          Driver: bnx2
          Vendor: Broadcom Limited
           Model: NetXtreme II BCM5709 Gigabit Ethernet (PowerEdge R610 BCM5709 Gigabit Ethernet)
      HW Address: 1a:e3:d6:8c:b5:ff

● 3: eno2
       Link File: /lib/systemd/network/99-default.link
    Network File: /run/systemd/network/10-netplan-switchports.network
            Type: ether
           State: no-carrier (configuring)
            Path: pci-0000:01:00.1
          Driver: bnx2
          Vendor: Broadcom Limited
           Model: NetXtreme II BCM5709 Gigabit Ethernet (PowerEdge R610 BCM5709 Gigabit Ethernet)
      HW Address: 1a:e3:d6:8c:b5:ff

● 4: eno3
       Link File: /lib/systemd/network/99-default.link
    Network File: /run/systemd/network/10-netplan-switchports.network
            Type: ether
           State: no-carrier (configuring)
            Path: pci-0000:02:00.0
          Driver: bnx2
          Vendor: Broadcom Limited
           Model: NetXtreme II BCM5709 Gigabit Ethernet (PowerEdge R610 BCM5709 Gigabit Ethernet)
      HW Address: 1a:e3:d6:8c:b5:ff

● 5: eno4
       Link File: /lib/systemd/network/99-default.link
    Network File: /run/systemd/network/10-netplan-switchports.network
            Type: ether
           State: no-carrier (configuring)
            Path: pci-0000:02:00.1
          Driver: bnx2
          Vendor: Broadcom Limited
           Model: NetXtreme II BCM5709 Gigabit Ethernet (PowerEdge R610 BCM5709 Gigabit Ethernet)
      HW Address: 1a:e3:d6:8c:b5:ff

● 6: enp5s0f0
       Link File: /lib/systemd/network/99-default.link
    Network File: n/a
            Type: ether
           State: off (unmanaged)
            Path: pci-0000:05:00.0
          Driver: ixgbe
          Vendor: Intel Corporation
           Model: Ethernet 10G 2P X520 Adapter (10GbE 2P X520 Adapter)
      HW Address: a0:36:9f:5f:6a:78 (Intel Corporate)

● 7: enp5s0f1
       Link File: /lib/systemd/network/99-default.link
    Network File: n/a
            Type: ether
           State: off (unmanaged)
            Path: pci-0000:05:00.1
          Driver: ixgbe
          Vendor: Intel Corporation
           Model: Ethernet 10G 2P X520 Adapter (10GbE 2P X520 Adapter)
      HW Address: a0:36:9f:5f:6a:7a (Intel Corporate)

● 8: bond0
       Link File: /lib/systemd/network/99-default.link
    Network File: /run/systemd/network/10-netplan-bond0.network
            Type: ether
           State: no-carrier (configuring)
          Driver: bonding
      HW Address: 1a:e3:d6:8c:b5:ff
         Address: 192.168.128.23
         Gateway: 192.168.128.1
             DNS: 192.168.128.240
  Search Domains: imaginariumuk.local

● 9: bond0.0201
       Link File: /lib/systemd/network/99-default.link
    Network File: /run/systemd/network/10-netplan-bond0.0201.network
            Type: ether
           State: no-carrier (configuring)
          Driver: 802.1Q VLAN Support
      HW Address: 1a:e3:d6:8c:b5:ff
         Address: 192.168.201.23

● 10: bond0.0100
       Link File: /lib/systemd/network/99-default.link
    Network File: /run/systemd/network/10-netplan-bond0.0100.network
            Type: ether
           State: no-carrier (configuring)
          Driver: 802.1Q VLAN Support
      HW Address: 1a:e3:d6:8c:b5:ff
         Address: 192.168.100.23
dominix avatar
gf flag
hi alex, the display of the ```/etc/network/interfaces``` is not coherent with the display of ```ifconfig -a``` . whether you're missing a reboot, or you are using another manager for your Network, like netplan, NetworkManager or whatever. your bond0 has the same address as enp5s0f1 which produce an error.
pk flag
Hi - just adding an edit to show the netplan config. It looks like netplan and ifupdown and being used. Ideally I'd like to use just netplan
dominix avatar
gf flag
hi alex. you can not give twice the same IP address to your interfaces. just choose wether it is your bond0 or your enp5s0f1 that has it.
pk flag
hi thanks that makes sense. Where can i change that in the netplan config? i commented it out of the interfaces file, trying to use netplan only
dominix avatar
gf flag
if you have commented it out you may not have the same error ... try to update the error you are seeing. Or reflect the comments you've made in the post, because at this time I still see twice 192.168.128.23 where there should be only one.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.