# Networking stopped working

## rudregues

I don't know what happened, but I updated my system with 

```
emerge -uDN --with-bdeps=y @world
```

and the merged packages were:

```
 # qlop -l | tail -n 135

Thu Mar 12 10:35:02 2015 >>> virtual/perl-ExtUtils-Manifest-1.630.0-r1

Thu Mar 12 10:35:06 2015 >>> virtual/perl-ExtUtils-Install-1.670.0

Thu Mar 12 10:35:10 2015 >>> virtual/perl-ExtUtils-CBuilder-0.280.217-r1

Thu Mar 12 10:35:14 2015 >>> virtual/perl-JSON-PP-2.272.30

Thu Mar 12 10:35:17 2015 >>> virtual/perl-Archive-Tar-1.960.0

Thu Mar 12 10:35:22 2015 >>> virtual/perl-Storable-2.490.0

Thu Mar 12 10:35:27 2015 >>> virtual/perl-ExtUtils-MakeMaker-6.980.0

Thu Mar 12 10:35:32 2015 >>> virtual/perl-Encode-2.600.0

Thu Mar 12 10:35:37 2015 >>> virtual/perl-Scalar-List-Utils-1.380.0

Thu Mar 12 10:36:49 2015 >>> sys-apps/busybox-1.23.1-r1

Thu Mar 12 10:36:55 2015 >>> dev-perl/HTTP-Date-6.20.0-r1

Thu Mar 12 10:37:02 2015 >>> dev-perl/URI-1.600.0-r1

Thu Mar 12 10:37:11 2015 >>> dev-perl/HTML-Parser-3.710.0-r1

Thu Mar 12 10:37:18 2015 >>> dev-perl/Net-HTTP-6.60.0

Thu Mar 12 10:37:24 2015 >>> dev-perl/Text-WrapI18N-0.60.0-r1

Thu Mar 12 10:37:30 2015 >>> dev-perl/IO-Socket-SSL-1.967.0

Thu Mar 12 10:37:40 2015 >>> sys-libs/mtdev-1.1.5

Thu Mar 12 10:37:44 2015 >>> virtual/perl-CPAN-Meta-2.140.640

Thu Mar 12 10:37:51 2015 >>> dev-perl/HTTP-Message-6.30.0-r1

Thu Mar 12 10:37:57 2015 >>> dev-perl/File-Listing-6.40.0-r1

Thu Mar 12 10:38:04 2015 >>> dev-perl/WWW-RobotRules-6.20.0

Thu Mar 12 10:38:11 2015 >>> dev-perl/HTTP-Daemon-6.10.0-r1

Thu Mar 12 10:38:18 2015 >>> dev-perl/HTTP-Cookies-6.0.1-r1

Thu Mar 12 10:38:25 2015 >>> dev-perl/HTTP-Negotiate-6.0.1-r1

Thu Mar 12 10:38:36 2015 >>> x11-proto/xproto-7.0.27

Thu Mar 12 10:38:46 2015 >>> x11-proto/inputproto-2.3.1

Thu Mar 12 10:38:56 2015 >>> x11-libs/xtrans-1.3.5

Thu Mar 12 10:39:31 2015 >>> x11-libs/pixman-0.32.6

Thu Mar 12 10:39:45 2015 >>> x11-libs/libpciaccess-0.13.3

Thu Mar 12 10:39:53 2015 >>> x11-misc/util-macros-1.19.0

Thu Mar 12 10:40:03 2015 >>> x11-proto/fontsproto-2.1.3

Thu Mar 12 10:40:18 2015 >>> x11-libs/libICE-1.0.9

Thu Mar 12 10:40:38 2015 >>> x11-libs/libdrm-2.4.59

Thu Mar 12 10:40:51 2015 >>> x11-libs/libxshmfence-1.2

Thu Mar 12 10:41:01 2015 >>> x11-apps/rgb-1.0.6

Thu Mar 12 10:41:12 2015 >>> x11-apps/mkfontscale-1.1.2

Thu Mar 12 10:41:23 2015 >>> x11-apps/iceauth-1.0.7

Thu Mar 12 10:41:45 2015 >>> x11-libs/libXfont-1.5.0

Thu Mar 12 10:41:50 2015 >>> x11-base/xorg-drivers-1.16

Thu Mar 12 10:41:58 2015 >>> app-admin/eselect-1.4.4

Thu Mar 12 10:42:10 2015 >>> dev-libs/libevdev-1.3

Thu Mar 12 10:42:24 2015 >>> dev-python/setuptools-12.0.1

Thu Mar 12 10:43:01 2015 >>> dev-libs/libxslt-1.1.28-r4

Thu Mar 12 10:43:14 2015 >>> x11-proto/xcb-proto-1.11

Thu Mar 12 10:43:32 2015 >>> sys-devel/make-4.1-r1

Thu Mar 12 10:44:01 2015 >>> sys-libs/e2fsprogs-libs-1.42.12

Thu Mar 12 10:44:08 2015 >>> dev-perl/Locale-gettext-1.50.0-r1

Thu Mar 12 10:46:43 2015 >>> dev-lang/python-3.4.1

Thu Mar 12 10:47:15 2015 >>> net-dns/libidn-1.29

Thu Mar 12 10:48:48 2015 >>> dev-scheme/guile-1.8.8-r1

Thu Mar 12 10:49:04 2015 >>> app-editors/nano-2.3.6

Thu Mar 12 10:50:04 2015 >>> x11-libs/libxcb-1.11-r1

Thu Mar 12 10:51:26 2015 >>> sys-devel/autogen-5.18.1

Thu Mar 12 10:51:39 2015 >>> x11-libs/xcb-util-renderutil-0.3.9-r1

Thu Mar 12 10:54:27 2015 >>> net-libs/gnutls-3.3.10-r2

Thu Mar 12 10:54:40 2015 >>> x11-libs/xcb-util-keysyms-0.4.0

Thu Mar 12 10:54:54 2015 >>> x11-libs/xcb-util-wm-0.4.1-r1

Thu Mar 12 10:55:08 2015 >>> x11-libs/libXext-1.3.3

Thu Mar 12 10:55:22 2015 >>> x11-libs/libXxf86vm-1.1.4

Thu Mar 12 10:55:38 2015 >>> x11-libs/libXi-1.7.4

Thu Mar 12 10:55:51 2015 >>> x11-apps/xkbcomp-1.3.0

Thu Mar 12 10:56:06 2015 >>> x11-libs/libXft-2.3.2

Thu Mar 12 10:56:19 2015 >>> x11-misc/xkeyboard-config-2.14

Thu Mar 12 10:56:32 2015 >>> x11-libs/xcb-util-0.4.0

Thu Mar 12 10:56:45 2015 >>> x11-libs/xcb-util-image-0.4.0

Thu Mar 12 10:56:58 2015 >>> x11-libs/xcb-util-cursor-0.1.1-r1

Thu Mar 12 10:58:13 2015 >>> sys-kernel/gentoo-sources-3.18.7

Thu Mar 12 10:58:24 2015 >>> perl-core/Module-Build-0.420.500

Thu Mar 12 10:58:29 2015 >>> virtual/perl-Module-Build-0.420.500-r1

Thu Mar 12 10:58:36 2015 >>> dev-perl/File-BaseDir-0.30.0-r1

Thu Mar 12 10:59:04 2015 >>> dev-perl/DateManip-6.410.0

Thu Mar 12 10:59:10 2015 >>> dev-perl/File-DesktopEntry-0.40.0-r1

Thu Mar 12 10:59:18 2015 >>> dev-perl/File-MimeInfo-0.210.0

Thu Mar 12 10:59:24 2015 >>> perl-core/libnet-1.270.0

Thu Mar 12 10:59:29 2015 >>> virtual/perl-libnet-1.270.0

Thu Mar 12 10:59:36 2015 >>> dev-perl/libwww-perl-6.50.0

Thu Mar 12 10:59:43 2015 >>> dev-perl/LWP-Protocol-https-6.30.0-r1

Thu Mar 12 10:59:55 2015 >>> x11-apps/xauth-1.0.9-r1

Thu Mar 12 11:00:06 2015 >>> x11-apps/xinit-1.3.3-r1

Thu Mar 12 11:01:05 2015 >>> sys-apps/util-linux-2.25.2-r2

Thu Mar 12 11:01:58 2015 >>> sys-fs/e2fsprogs-1.42.12

Thu Mar 12 11:02:14 2015 >>> app-text/docbook-xsl-stylesheets-1.78.0-r1

Thu Mar 12 11:12:44 2015 >>> media-libs/mesa-10.3.7-r1

Thu Mar 12 11:14:51 2015 >>> x11-libs/cairo-1.12.18-r1

Thu Mar 12 11:16:02 2015 >>> app-text/po4a-0.45-r1

Thu Mar 12 11:16:34 2015 >>> media-libs/libepoxy-1.2

Thu Mar 12 11:17:55 2015 >>> sys-apps/dbus-1.8.16

Thu Mar 12 11:20:39 2015 >>> x11-base/xorg-server-1.16.4

Thu Mar 12 11:20:57 2015 >>> x11-drivers/xf86-input-synaptics-1.8.1

Thu Mar 12 11:21:54 2015 >>> x11-drivers/xf86-video-intel-2.99.917

Thu Mar 12 11:22:11 2015 >>> x11-drivers/xf86-input-evdev-2.9.1

Thu Mar 12 11:22:24 2015 >>> sys-apps/man-pages-3.79

Thu Mar 12 11:22:42 2015 >>> www-client/firefox-bin-31.5.0

Thu Mar 12 11:27:35 2015 >>> www-client/qupzilla-1.8.6

Thu Mar 12 11:27:51 2015 >>> sys-apps/openrc-0.13.11

Thu Mar 12 14:07:56 2015 >>> media-libs/libogg-1.3.1

Thu Mar 12 14:08:08 2015 >>> media-libs/libdvdcss-1.2.13-r1

Thu Mar 12 14:08:22 2015 >>> media-libs/vo-aacenc-0.1.3

Thu Mar 12 14:08:35 2015 >>> dev-libs/wayland-1.6.1

Thu Mar 12 14:08:49 2015 >>> x11-libs/libXScrnSaver-1.2.2-r1

Thu Mar 12 14:09:09 2015 >>> media-libs/libdvdread-4.2.1

Thu Mar 12 14:09:42 2015 >>> x11-libs/libxkbcommon-0.5.0

Thu Mar 12 14:10:04 2015 >>> dev-libs/fribidi-0.19.6

Thu Mar 12 14:10:29 2015 >>> media-libs/libvorbis-1.3.4

Thu Mar 12 14:11:03 2015 >>> media-sound/lame-3.99.5-r1

Thu Mar 12 14:11:19 2015 >>> dev-lang/lua-5.1.5-r3

Thu Mar 12 14:11:26 2015 >>> dev-lua/luasocket-3.0_rc1-r3

Thu Mar 12 14:11:31 2015 >>> dev-lua/luaexpat-1.3.0-r1

Thu Mar 12 14:11:36 2015 >>> dev-lua/LuaBitOp-1.0.2-r1

Thu Mar 12 14:11:41 2015 >>> dev-lua/lpeg-0.12

Thu Mar 12 14:11:45 2015 >>> app-admin/eselect-mpg123-0.1

Thu Mar 12 14:11:49 2015 >>> dev-lua/luajson-1.3.2

Thu Mar 12 14:11:59 2015 >>> media-libs/libquvi-scripts-0.9.20131130-r1

Thu Mar 12 14:12:12 2015 >>> dev-python/pygments-2.0.1

Thu Mar 12 14:12:37 2015 >>> dev-lang/yasm-1.2.0-r1

Thu Mar 12 14:13:30 2015 >>> media-libs/libquvi-0.9.4-r1

Thu Mar 12 14:15:23 2015 >>> dev-python/docutils-0.12

Thu Mar 12 14:16:12 2015 >>> media-libs/flac-1.3.1-r1

Thu Mar 12 14:16:49 2015 >>> media-libs/audiofile-0.3.6-r1

Thu Mar 12 14:17:08 2015 >>> media-libs/xvid-1.3.3

Thu Mar 12 14:17:34 2015 >>> media-libs/x264-0.0.20140308

Thu Mar 12 14:17:42 2015 >>> sys-devel/automake-1.11.6-r1

Thu Mar 12 14:18:18 2015 >>> app-text/recode-3.6_p20-r1

Thu Mar 12 14:18:46 2015 >>> app-i18n/enca-1.14-r2

Thu Mar 12 14:29:04 2015 >>> media-libs/mesa-10.3.7-r1

Thu Mar 12 14:29:16 2015 >>> media-libs/libass-0.11.2

Thu Mar 12 14:30:01 2015 >>> media-libs/libsdl-1.2.15-r8

Thu Mar 12 14:32:54 2015 >>> media-video/libav-9.17

Thu Mar 12 14:33:15 2015 >>> media-sound/mpg123-1.18.1

Thu Mar 12 14:33:28 2015 >>> media-libs/libpostproc-10.20140517-r1

Thu Mar 12 14:34:05 2015 >>> media-video/mpv-0.3.10

Thu Mar 12 14:36:20 2015 >>> net-print/cups-2.0.1-r1

Thu Mar 12 14:36:49 2015 >>> net-libs/glib-networking-2.40.1-r1

Thu Mar 12 14:41:34 2015 >>> net-print/cups-2.0.1-r1

Fri Mar 13 13:28:07 2015 >>> net-print/cups-filters-1.0.66

```

After that, since perl and python were upgraded, I ran perl-cleaner and python-upddater, also ran revdep-rebuild, etc-update and dispatch-conf 

The system connects and I even get an IP adress, but my internet doesn't work.

My ifconfig:

```
enp9s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500

        inet6 fe80::506c:fdb7:b597:b66c  prefixlen 64  scopeid 0x20<link>

        ether 78:2b:cb:ec:a8:01  txqueuelen 1000  (Ethernet)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.1  netmask 255.0.0.0

        inet6 ::1  prefixlen 128  scopeid 0x10<host>

        loop  txqueuelen 0  (Local Loopback)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp6s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.0.10  netmask 255.255.255.0  broadcast 192.168.0.255

        inet6 fe80::162d:27ff:fee2:509b  prefixlen 64  scopeid 0x20<link>

        ether 14:2d:27:e2:50:9b  txqueuelen 1000  (Ethernet)

        RX packets 93  bytes 16907 (16.5 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 16  bytes 1608 (1.5 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
```

----------

## NeddySeagoon

rudregues,

Please post the output of route and the content of /etc/resolv.conf.

Does ping 216.58.210.78 work for you?

----------

## rudregues

ping 216.58.210.78 worked

my resolv.conf:

```
# Generated by dhcpcd from wlp6s0

# /etc/resolv.conf.head can replace this line

nameserver 192.168.0.1

# /etc/resolv.conf.tail can replace this line

```

output of route:

```
Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

default         192.168.0.1     0.0.0.0         UG    2004   0        0 wlp6s0

loopback        *               255.0.0.0       U     0      0        0 lo

192.168.0.0     *               255.255.255.0   U     2004   0        0 wlp6s0
```

----------

## rudregues

 *NeddySeagoon wrote:*   

> 
> 
> Does ping 216.58.210.78 work for you?

 

I just discovered something very strange:

When I enter 216.58.210.78 it goes to google search through http://216.58.210.78/ and I can even search and get results (but if I click some link it doesn't load). I couldn't find any other website working. Not even https://www.google.com.br/ loads up!

Maybe I'm crossing some bug?

----------

## rudregues

I just discovered more.

If I plug the net cable, the ping command that worked stops working and gives me the following error:

```
PING 216.58.210.78 (216.58.210.78) 56(84) bytes of data.

From 192.168.0.10: icmp_seq=1 Destination Host Unreachable

From 192.168.0.10: icmp_seq=2 Destination Host Unreachable

From 192.168.0.10: icmp_seq=3 Destination Host Unreachable

From 192.168.0.10: icmp_seq=4 Destination Host Unreachable

From 192.168.0.10: icmp_seq=5 Destination Host Unreachable

From 192.168.0.10: icmp_seq=6 Destination Host Unreachable

From 192.168.0.10: icmp_seq=7 Destination Host Unreachable

From 192.168.0.10: icmp_seq=8 Destination Host Unreachable

From 192.168.0.10: icmp_seq=9 Destination Host Unreachable

From 192.168.0.10: icmp_seq=10 Destination Host Unreachable

From 192.168.0.10: icmp_seq=11 Destination Host Unreachable

From 192.168.0.10: icmp_seq=12 Destination Host Unreachable

--- 216.58.210.78 ping statistics ---

12 packets transmitted, 0 received, +12 errors, 100% packet loss, time 11001ms

pipe 4
```

But if I remove the cable, this specific ping 216.58.210.78 works again.

I tried to start and stop enp9s0 but is ineffective. Here's the output of /etc/init.d/net.enp9s0 start (maybe it helps...)

```
 * Bringing up interface enp9s0

 *   dhcp ...

 *     Running dhcpcd ... [ ok ]

 *     received address 192.168.0.10/24

 [ ok ]

 *   Waiting for IPv6 addresses ... [ ok ]
```

----------

## charles17

 *rudregues wrote:*   

> When I enter 216.58.210.78 it goes to google search through http://216.58.210.78/ and I can even search and get results (but if I click some link it doesn't load). I couldn't find any other website working. Not even https://www.google.com.br/ loads up!

 Looks like a firewall problem.  Are you running iptables?

----------

## rudregues

 *charles17 wrote:*   

> Looks like a firewall problem.  Are you running iptables?

 charles17, I don't have iptables added to any run level.

I did tests with other networks and discovered this:

1) Network Frodo:

- ping 216.58.210.78 in both Wifi (WPA2) and cable network works, but any other ping gives me the unknown host error

2) Network_Tim:

- ping  216.58.210.78 in both Wifi (WPA2) and cable network gives me the unreachable error

(From 192.168.0.10: icmp_seq=1 Destination Host Unreachable)

3) Network ALU_SE/6 

- just Wifi (WPA2): everything works! (Sad that is not my home network  :Razz: )

Well, one time I did ran # halt -p without logging out from my XFCE4 session (from bash), maybe it could generate some permission problem and messed some networks?

----------

## charles17

So on your home network, do other computers have internet connection?

And regarding your entries in /etc/wpa_supplicant/wpa_supplicant.conf, did you create them manually or by using wpa_gui?

Would you mind posting that file (with anonymized psk, of course)?

----------

## rudregues

 *charles17 wrote:*   

> So on your home network, do other computers have internet connection?

 Other pcs works flawlessly. This notebook has dual boot between Ubuntu and Gentoo, and Ubuntu connects normally to the networks.

 *charles17 wrote:*   

> And regarding your entries in /etc/wpa_supplicant/wpa_supplicant.conf, did you create them manually or by using wpa_gui?

 I've created using wpa_gui. Never edited them manually.

Here is the output of wap_supplicant.conf:

```
~ $ cat /etc/wpa_supplicant/wpa_supplicant.conf 

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel

update_config=1

network={

   ssid="Frodo"

   psk="**************"

   proto=RSN

   key_mgmt=WPA-PSK

   pairwise=CCMP

   auth_alg=OPEN

}

network={

   ssid="XT915"

   psk="************"

   proto=RSN

   key_mgmt=WPA-PSK

   pairwise=CCMP

   auth_alg=OPEN

   disabled=1

}

network={

   ssid="ALU_SE/6"

   psk="*****************"

   proto=RSN

   key_mgmt=WPA-PSK

   pairwise=CCMP

   auth_alg=OPEN

   disabled=1

}

network={

   ssid="IME-WIFI"

   psk="***************"

   proto=RSN

   key_mgmt=WPA-PSK

   pairwise=CCMP

   auth_alg=OPEN

   disabled=1

}

network={

   ssid="Frodo_TIM"

   psk="****************"

   proto=RSN

   key_mgmt=WPA-PSK

   pairwise=CCMP

   auth_alg=OPEN

}
```

----------

## krinn

 *rudregues wrote:*   

> 
> 
> ```
>  * Bringing up interface enp9s0
> 
> ...

  *Quote:*   

> 
> 
> ```
> 
> wlp6s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
> ...

 

It is obvious, but well, you know, sometimes...

But looks like they both use the same IP, so better check your config when you plug the cable... or look at your router to blacklist this one from dhcp or assign ip by interface...

Anyway, makes sure both interface use two diff ip or handle your network by turning one off if the other is witch on if you want to only use this one.

Also, it is confusing what you are doing and the state of your interfaces (like the same ip in use case):

- Allow to ping some site and not some other (or browse, download...) -> MTU problem. If you use two diff router, check the wireless MTU. Could also be because of ip collision if you use the two interface with the same ip.

- When you plug the cable, makes sure your route is update as it should too, even if you pickup the same IP as the wireless one, it doesn't mean your route is going THRU the cable as route was set thru the wireless interface, if route was set 192.168.0.10->192.168.0.1 THRU w1p6s0, even using 192.168.0.10 will not reach 192.168.0.1 thru enp9s0 if the route is kept as-is: result-> network unreachable (because you cannot reach anymore anyone as 192.168.0.10 was the bridge and the connection to it (w1p6s0) is down)

----------

## UberLord

 *krinn wrote:*   

>  *rudregues wrote:*   
> 
> ```
>  * Bringing up interface enp9s0
> 
> ...

 

When dhcpcd runs in master mode (ie not controlled by net.*) then it will allow a shared IP address and I infact run my network like this.

Take a laptop with wired and wireless - dhcpcd will automatically prefer the wired connection.

Say you start unplugged and wlan0 gets 192.168.0.10/24 - that's fine.

Then you plug in eth0 which also gets 192.168.0.10/24. dhcpcd will first remove 192.168.0.10 from wlan0 and then add it to eth0 (taking care of the routing also).

Unplug eth0 and it all moves back to wlan0.

Why would you want to do this? Well, it's so I cam remotely access the said laptop (of which I have a few) by hostname and I don't care how it's connected to my network, just as long as it is connected somehow.

----------

