1

I have a Linux box with Ubuntu 16.04. I've noticed some odd behavior when I needed use the loopback interface.

So I checked with ifconfig first and it showed that:

rename1   Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:326 (326.0 B)  TX bytes:326 (326.0 B)

ip link shows this:

1: rename1: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

The "rename1" is not intentional and I wanted revert this to "lo".

After some search I found this command:

sudo ip link set rename1 name lo

Witch it does what I wanted, but after a restart it changes back to "rename1" and I don't know how to fix this.

northway
  • 11
  • 2

1 Answers1

0

Loopback interface is defined in /etc/network/interfaces on debian and derivated.

Replace "rename1" by "lo" as root or sudoer

sed -i s@rename1@lo@ /etc/network/interfaces
maxxvw
  • 321
  • 1
  • 7
  • Ho.. so what's the output of "rgrep rename1 /etc/" – maxxvw Jun 01 '16 at 09:22
  • This is how my interfaces file looks like: `# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback # eth0 auto eth0 iface eth0 inet static address 192.168.0.10 netmask 255.255.255.0 gateway 192.168.0.1 network 192.168.0.0 broadcast 192.168.0.255 dns-nameservers 192.168.0.9 8.8.8.8 8.8.4.4 dns-search mydomain.com ` – northway Jun 01 '16 at 09:25
  • The `rgrep rename1 /etc/` output is nothing too. – northway Jun 01 '16 at 09:26