1

I am currently running Ubuntu 16.04 in Docker and need to get rid of (or adjust) /sys/class/net/ip6tnl0 and /sys/class/net/tunl0.

The reason is that I need to install software that crashes when those interfaces are present. The precise reason is that the two interfaces have weird MAC addresses of unusual length:

root@5b573f1125d0:/# cat /sys/class/net/tunl0/address

00:00:00:00

root@5b573f1125d0:/# cat /sys/class/net/ip6tnl0/address

00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00

My questions:

  • How can I remove those interfaces?
  • If I can't remove them, how can I give them mac addresses that are 6 bytes long?

Interesting follow up questions: - What would removing them imply? - Why are they there in the first place? They are not there on my AWS instances...

P.S. The only packages that I install on bare-bones Ubuntu 16.04 docker image are:

  • OpenSSH-server

  • NTP

  • gparted

  • sqlite3

  • libpython2.7

  • libfreetype6

  • libxml-security-c17v5

  • python-minimal

  • net-tools

  • vim

ps:

I tried editing the HWaddr but no success:

root@5b573f1125d0:/# ip link set dev ip6tnl0 address 00:00:00:00:00:00
RTNETLINK answers: Operation not permitted
root@5b573f1125d0:/# ip link set dev tunl0 address 00:00:00:00:00:00
RTNETLINK answers: Operation not permitted

Edit 2: I added the NET_ADMIN capability to my Docker container, and instead of 'Operation not permitted', I get now the 'Invalid parameter' error.

The interface definitions are:

root@5b573f1125d0:/# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:00:00:00:00:11
          inet addr:172.17.0.2  Bcast:172.17.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5764 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2041 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:8183379 (8.1 MB)  TX bytes:111303 (111.3 KB)

ip6tnl0   Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          NOARP  MTU:1452  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

tunl0     Link encap:IPIP Tunnel  HWaddr
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Edit 0: I figured out that the two interfaces only appear when I run the Docker container on a Windows Host. On an Ubuntu Host, I only have the lo and eth0 interfaces (as expected).

Any idea why?

0 Answers0