1

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:172.17.1.62 Bcast:172.17.255.255  Mask:255.255.0.0
          inet6 addr:fe80::250:56ff:fe94:1b59/64 Scope:Link
          UP BROADCAST RUNNINGMULTICAST  MTU:1500  Metric:1
          RX packets:202330 errors:0dropped:2209 overruns:0 frame:0
          TX packets:74983 errors:0dropped:0 overruns:0 carrier:0
          collisions:0txqueuelen:1000
          RX bytes:148353176 (148.3MB)  TX bytes:6457904 (6.4 MB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1 Mask:255.0.0.0
          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
          collisions:0txqueuelen:1
          RX bytes:149597 (149.5 KB) TX bytes:149597 (149.5 KB)

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

The question is where the lo:0 interface comes from and why it has the ip 172.17.1.22 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
    address 172.17.1.62
    netmask 255.255.0.0
    network 172.17.0.0
    gateway 172.17.1.2
    dns-search ....
    dns-nameservers 172.17.1.6 172.17.1.7
1
  • 1
    Do you have a virtual switch like openVSwitch running? – JFL Jan 23 '18 at 12:13
1

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.

1
  • 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.