O gateway padrão “desaparece” da tabela de roteamento

5

Eu uso o NetworkManager (Arch Linux) no meu laptop para me conectar a redes sem fio. Eu uso a GUI oficial do GNOME. Tudo funciona bem, mas após cerca de meia hora a rede ainda está conectada, mas o gateway padrão simplesmente "desaparece" da tabela de roteamento.

➜  log  ip r                                 
10.135.1.0/24 dev wlan0  proto kernel  scope link  src 10.135.1.3  metric 303 
10.135.1.3 via 127.0.0.1 dev lo  metric 303

O gateway padrão deve ser 10.135.1.138 e eu posso pingar. Posso restaurá-lo se eu me reconectar, reiniciar o NetworkManager ou usar "ip r" para adicioná-lo manualmente, mas ele será removido novamente após meia hora. Eu tentei dois drivers Wifi diferentes e isso acontece com ambos. Eu tentei usar o wicd em vez do NetworkManager e ele pareceu resolver o problema. No entanto, não estou satisfeito com o wicd por várias outras razões e estou curioso para saber o que há de errado com o NetworkManager. Verifiquei se netctl e wicd estão desativados enquanto o NetworkManager está em execução (há outros serviços que possam interferir?). Este é o log da última hora. Eu não consegui encontrar nada de suspeito, no entanto:

Jan 18 17:36:39 tarsonis NetworkManager[2382]: <info> (wlan0): device state change: prepare -> config (reason 'none') [40 50 0]
Jan 18 17:36:39 tarsonis NetworkManager[2382]: <info> Activation (wlan0/wireless): connection 'KrustyKrab' has security, and secrets exist.  No new secrets needed.
Jan 18 17:36:39 tarsonis NetworkManager[2382]: <info> Config: added 'ssid' value 'KrustyKrab'
Jan 18 17:36:39 tarsonis NetworkManager[2382]: <info> Config: added 'scan_ssid' value '1'
Jan 18 17:36:39 tarsonis NetworkManager[2382]: <info> Config: added 'key_mgmt' value 'WPA-PSK'
Jan 18 17:36:39 tarsonis NetworkManager[2382]: <info> Config: added 'auth_alg' value 'OPEN'
Jan 18 17:36:39 tarsonis NetworkManager[2382]: <info> Config: added 'psk' value '<omitted>'
Jan 18 17:36:39 tarsonis NetworkManager[2382]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) complete.
Jan 18 17:36:39 tarsonis NetworkManager[2382]: <info> Config: set interface ap_scan to 1
Jan 18 17:36:39 tarsonis NetworkManager[2382]: <info> (wlan0): supplicant interface state: inactive -> scanning
Jan 18 17:36:40 tarsonis NetworkManager[2382]: <info> (wlan0): supplicant interface state: scanning -> authenticating
Jan 18 17:36:40 tarsonis NetworkManager[2382]: <info> (wlan0): supplicant interface state: authenticating -> associating
Jan 18 17:36:40 tarsonis NetworkManager[2382]: <info> (wlan0): supplicant interface state: associating -> 4-way handshake
Jan 18 17:36:40 tarsonis NetworkManager[2382]: <info> (wlan0): supplicant interface state: 4-way handshake -> completed
Jan 18 17:36:40 tarsonis NetworkManager[2382]: <info> Activation (wlan0/wireless) Stage 2 of 5 (Device Configure) successful.  Connected to wireless network 'KrustyKrab'.
Jan 18 17:36:40 tarsonis NetworkManager[2382]: <info> Activation (wlan0) Stage 3 of 5 (IP Configure Start) scheduled.
Jan 18 17:36:40 tarsonis NetworkManager[2382]: <info> Activation (wlan0) Stage 3 of 5 (IP Configure Start) started...
Jan 18 17:36:40 tarsonis NetworkManager[2382]: <info> (wlan0): device state change: config -> ip-config (reason 'none') [50 70 0]
Jan 18 17:36:40 tarsonis NetworkManager[2382]: <info> Activation (wlan0) Beginning DHCPv4 transaction (timeout in 45 seconds)
Jan 18 17:36:40 tarsonis NetworkManager[2382]: <info> dhcpcd started with pid 2403
Jan 18 17:36:40 tarsonis NetworkManager[2382]: <info> Activation (wlan0) Beginning IP6 addrconf.
Jan 18 17:36:40 tarsonis NetworkManager[2382]: <info> Activation (wlan0) Stage 3 of 5 (IP Configure Start) complete.
Jan 18 17:36:40 tarsonis NetworkManager[2382]: <info> (wlan0): DHCPv4 state changed nbi -> preinit
Jan 18 17:36:50 tarsonis NetworkManager[2382]: <info> (wlan0): DHCPv4 state changed preinit -> bound
Jan 18 17:36:50 tarsonis NetworkManager[2382]: <info>   address 10.135.1.3
Jan 18 17:36:50 tarsonis NetworkManager[2382]: <info>   prefix 24 (255.255.255.0)
Jan 18 17:36:50 tarsonis NetworkManager[2382]: <info>   gateway 10.135.1.138
Jan 18 17:36:50 tarsonis NetworkManager[2382]: <info>   nameserver '10.135.1.138'
Jan 18 17:36:50 tarsonis NetworkManager[2382]: <info> Activation (wlan0) Stage 5 of 5 (IPv4 Configure Commit) scheduled...
Jan 18 17:36:50 tarsonis NetworkManager[2382]: <info> Activation (wlan0) Stage 5 of 5 (IPv4 Commit) started...
Jan 18 17:36:51 tarsonis NetworkManager[2382]: <info> (wlan0): device state change: ip-config -> secondaries (reason 'none') [70 90 0]
Jan 18 17:36:51 tarsonis NetworkManager[2382]: <info> Activation (wlan0) Stage 5 of 5 (IPv4 Commit) complete.
Jan 18 17:36:51 tarsonis NetworkManager[2382]: <info> (wlan0): device state change: secondaries -> activated (reason 'none') [90 100 0]
Jan 18 17:36:51 tarsonis NetworkManager[2382]: <info> NetworkManager state is now CONNECTED_GLOBAL
Jan 18 17:36:51 tarsonis NetworkManager[2382]: <info> Policy set 'KrustyKrab' (wlan0) as default for IPv4 routing and DNS.
Jan 18 17:36:51 tarsonis NetworkManager[2382]: <info> Writing DNS information to /usr/bin/resolvconf
Jan 18 17:36:51 tarsonis NetworkManager[2382]: <info> Activation (wlan0) successful, device activated.
Jan 18 17:36:51 tarsonis NetworkManager[2382]: <warn> Dispatcher failed: (32) Unit dbus-org.freedesktop.nm-dispatcher.service failed to load: No such file or directory.
Jan 18 17:37:01 tarsonis NetworkManager[2382]: <info> (wlan0): IP6 addrconf timed out or failed.
Jan 18 17:37:01 tarsonis NetworkManager[2382]: <info> Activation (wlan0) Stage 4 of 5 (IPv6 Configure Timeout) scheduled...
Jan 18 17:37:01 tarsonis NetworkManager[2382]: <info> Activation (wlan0) Stage 4 of 5 (IPv6 Configure Timeout) started...
Jan 18 17:37:01 tarsonis NetworkManager[2382]: <info> Activation (wlan0) Stage 4 of 5 (IPv6 Configure Timeout) complete.
Jan 18 18:06:50 tarsonis NetworkManager[2382]: <info> (wlan0): DHCPv4 state changed bound -> (null)
Jan 18 18:06:55 tarsonis NetworkManager[2382]: <info> (wlan0): DHCPv4 state changed (null) -> bound
Jan 18 18:06:55 tarsonis NetworkManager[2382]: <info>   address 10.135.1.3
Jan 18 18:06:55 tarsonis NetworkManager[2382]: <info>   prefix 24 (255.255.255.0)
Jan 18 18:06:55 tarsonis NetworkManager[2382]: <info>   gateway 10.135.1.138
Jan 18 18:06:55 tarsonis NetworkManager[2382]: <info>   nameserver '10.135.1.138'
Jan 18 18:36:56 tarsonis NetworkManager[2382]: <info> (wlan0): DHCPv4 state changed bound -> (null)
Jan 18 18:37:01 tarsonis NetworkManager[2382]: <info> (wlan0): DHCPv4 state changed (null) -> bound
Jan 18 18:37:01 tarsonis NetworkManager[2382]: <info>   address 10.135.1.3
Jan 18 18:37:01 tarsonis NetworkManager[2382]: <info>   prefix 24 (255.255.255.0)
Jan 18 18:37:01 tarsonis NetworkManager[2382]: <info>   gateway 10.135.1.138
Jan 18 18:37:01 tarsonis NetworkManager[2382]: <info>   nameserver '10.135.1.138'
Jan 18 18:48:23 tarsonis NetworkManager[2382]: <warn> Connection disconnected (reason -4)
Jan 18 18:48:23 tarsonis NetworkManager[2382]: <info> (wlan0): supplicant interface state: completed -> disconnected
Jan 18 18:48:23 tarsonis NetworkManager[2382]: <info> (wlan0): supplicant interface state: disconnected -> scanning
Jan 18 18:48:24 tarsonis NetworkManager[2382]: <info> (wlan0): supplicant interface state: scanning -> authenticating
Jan 18 18:48:24 tarsonis NetworkManager[2382]: <info> (wlan0): supplicant interface state: authenticating -> associating
Jan 18 18:48:24 tarsonis NetworkManager[2382]: <info> (wlan0): supplicant interface state: associating -> 4-way handshake
Jan 18 18:48:24 tarsonis NetworkManager[2382]: <info> (wlan0): supplicant interface state: 4-way handshake -> completed
Jan 18 19:07:01 tarsonis NetworkManager[2382]: <info> (wlan0): DHCPv4 state changed bound -> (null)
Jan 18 19:07:07 tarsonis NetworkManager[2382]: <info> (wlan0): DHCPv4 state changed (null) -> bound
Jan 18 19:07:07 tarsonis NetworkManager[2382]: <info>   address 10.135.1.3
Jan 18 19:07:07 tarsonis NetworkManager[2382]: <info>   prefix 24 (255.255.255.0)
Jan 18 19:07:07 tarsonis NetworkManager[2382]: <info>   gateway 10.135.1.138
Jan 18 19:07:07 tarsonis NetworkManager[2382]: <info>   nameserver '10.135.1.138'
Jan 18 19:13:27 tarsonis NetworkManager[2382]: <warn> Connection disconnected (reason -4)
Jan 18 19:13:27 tarsonis NetworkManager[2382]: <info> (wlan0): supplicant interface state: completed -> disconnected
Jan 18 19:13:27 tarsonis NetworkManager[2382]: <info> (wlan0): supplicant interface state: disconnected -> scanning
Jan 18 19:13:28 tarsonis NetworkManager[2382]: <info> (wlan0): supplicant interface state: scanning -> authenticating
Jan 18 19:13:28 tarsonis NetworkManager[2382]: <info> (wlan0): supplicant interface state: authenticating -> associating
Jan 18 19:13:28 tarsonis NetworkManager[2382]: <info> (wlan0): supplicant interface state: associating -> 4-way handshake
Jan 18 19:13:28 tarsonis NetworkManager[2382]: <info> (wlan0): supplicant interface state: 4-way handshake -> completed
Jan 18 19:37:07 tarsonis NetworkManager[2382]: <info> (wlan0): DHCPv4 state changed bound -> (null)
Jan 18 19:37:13 tarsonis NetworkManager[2382]: <info> (wlan0): DHCPv4 state changed (null) -> bound
Jan 18 19:37:13 tarsonis NetworkManager[2382]: <info>   address 10.135.1.3
Jan 18 19:37:13 tarsonis NetworkManager[2382]: <info>   prefix 24 (255.255.255.0)
Jan 18 19:37:13 tarsonis NetworkManager[2382]: <info>   gateway 10.135.1.138
Jan 18 19:37:13 tarsonis NetworkManager[2382]: <info>   nameserver '10.135.1.138'

O que é realmente estranho é que ele realmente mostra "gateway 10.135.1.138", embora não apareça na tabela de roteamento, a menos que eu reconecte.

    
por darwish 18.01.2014 / 22:07

2 respostas

0

Você não tem o netctl ativado, não é?

   sudo systemctl status netctl

O Wiki afirma explicitamente:

There are many solutions to choose from, but remember that all of them are mutually exclusive; you should not run two daemons simultaneously.

A solução a que se refere é Connman, Netctl, NetworkManager, Wicd . Por exemplo, eu também uso apenas o NetworkManager.

    
por 19.01.2014 / 12:03
0

Estou tendo exatamente o mesmo problema e meu ambiente é muito parecido com o seu. Eu também estou no Arch Linux, usando o Network Manager com uma placa de rede sem fio.

Já tentou usar dhclient em vez de dhcpcd? link

Editar: Para ser mais explícito e incluir material vinculado no post: O problema do gateway padrão perdido pode ser causado por dhcpcd recusando concessões. Então, o que resolveu o problema para mim de acordo com o link acima é fazer com que o gerenciador de rede use o dhclient. Para fazer isso, adicione dhcp = dhclient sob a seção principal em /etc/NetworkManager/NetworkManager.conf e reinicie o serviço NetworkManager.

Verifique também se o pacote do dhclient está instalado primeiro. HTH

    
por 13.01.2015 / 08:46