How do I troubleshoot a non-working docker network bridge (docker0)?

2

2

For me,

docker run -it --rm --net=host debian ping -c3 heise.de

results in successful ping output, while

docker run -it --rm debian ping -c3 heise.de

simply hangs (no network). I use Docker 1.11 on Lubuntu 16.04 desktop. The computer was connected via USB/Wifi to the internet but now is connected via Ethernet. I tested the Docker from the official Ubuntu repository, and now use the latest release.

In both cases, docker0 does not seem to work. Inside the container, there is no working network. ifconfig says

docker0   Link encap:Ethernet  HWaddr ***  
          inet addr:172.17.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
          inet6 addr: fe80::***/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:509 errors:0 dropped:0 overruns:0 frame:0
          TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:35000 (35.0 KB)  TX bytes:4358 (4.3 KB)

enp0s18   Link encap:Ethernet  HWaddr ***  
          inet addr:***.122.165  Bcast:***.122.255  Mask:255.255.255.0
          inet6 addr: fe80::***/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:255294810 errors:0 dropped:48 overruns:0 frame:0
          TX packets:2140765 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:31017941143 (31.0 GB)  TX bytes:378556157 (378.5 MB)

lo        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:1181928 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1181928 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:1745784400 (1.7 GB)  TX bytes:1745784400 (1.7 GB)

How can I go from here? Where can one look at next?

Torsten Bronger

Posted 2016-05-17T13:00:54.760

Reputation: 358

I don't know if we're experiencing quite the same problem, but for me it hangs on TCP but not PING (UDP). Your command works for me but this hangs: sudo docker run -it --rm busybox telnet heise.de 80 My question is essentially the same as yours; how to debug this? – David Smiley – 2016-09-17T13:35:19.447

No answers