I have two ubuntu 16.04 servers here that were upgraded from 10.04 and are now virtual machines but used to be running on physical hardware using two bonded ethernet ports. The bonding configuration is now obsolete due to the virtualization.

When I do an ifconfig on one of these machines, I get the following output:

rh@wstest:~> ifconfig
ens160    Link encap:Ethernet  HWaddr00:50:56:94:1b:59
          inet addr: Bcast:  Mask:
          inet6 addr:fe80::250:56ff:fe94:1b59/64 Scope:Link
          RX packets:202330 errors:0dropped:2209 overruns:0 frame:0
          TX packets:74983 errors:0dropped:0 overruns:0 carrier:0
          RX bytes:148353176 (148.3MB)  TX bytes:6457904 (6.4 MB)

lo        Link encap:Local Loopback
          inet addr: Mask:
          inet6 addr: ::1/128Scope:Host
          UP LOOPBACK RUNNING MTU:65536  Metric:1
          RX packets:605 errors:0dropped:0 overruns:0 frame:0
          TX packets:605 errors:0dropped:0 overruns:0 carrier:0
          RX bytes:149597 (149.5 KB) TX bytes:149597 (149.5 KB)

lo:0      Link encap:Local Loopback
          inet addr: Mask:
          UP LOOPBACK RUNNING MTU:65536  Metric:1

The question is where the lo:0 interface comes from and why it has the ip and how we can get rid of it. I know I can do an ifconfig down lo:0 and remove it but it will be here again after a reboot.

Our /etc/network/interfaces looks as follows with no trace of a lo:0 interface:

auto lo
    iface lo inet loopback

auto ens160
    iface ens160 inet static
    dns-search ....
  • 1
    Do you have a virtual switch like openVSwitch running? – JFL Jan 23 '18 at 12:13

After more research, it turned out that the ifconfig statement to add this lo:0 interface was put into a script called from /etc/rc.local and thus always activated on machine startup and on calls to ifup.

  • Note that lo:0 isn't a real interface, or even an alias, it's just a second IP address added to the lo interface and given the label lo:0. ifconfig has been deprecated for over a decade and does not display a lot of things properly anymore; use ip addr instead to see the reality. – Michael Hampton Sep 21 '20 at 0:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.