Após conectar wlan0 à interface bridge (e depois removê-lo), não é possível conectar-se ao AP

0

Eu estou em um laptop rodando o Debian Jessie com o kernel 3.13-1-amd64; lspci mostra que meu driver NIC + sem fio é

04:00.0 Network controller: Intel Corporation Wireless 3160 (rev 83)
    Subsystem: Intel Corporation Dual Band Wireless-AC 3160
    Kernel driver in use: iwlwifi

Isso tem funcionado sem problemas, até que tentei criar uma ponte para os containers lxc usarem. Eu fiz a mesma coisa que essa pessoa aqui: Como configurar uma bridge de rede em um laptop para o uso do LXC? - e acabou tendo o mesmo problema que este pôster, então decidi" desfazer "minhas ações.

Isso não foi bem sucedido.

Ações tomadas até agora:

Para configurar a ponte:

#> ip link add type veth
#> iw dev wlan0 set 4addr on
#> ifconfig veth0 up
#> brctl addbr br0
#> brctl addif br0 wlan0
#> brctl addif br0 veth0
#> ifconfig br0 192.168.0.4/24  
#> ifconfig wlan0 0.0.0.0

Para "desconfigurar":

#> brctl delif br0 wlan0
#> brctl delif br0 veth0
#> iw dev wlan0 set 4addr off
#> ifconfig veth0 down
#> ifconfig wlan0 down
#> ifconfig br0 down
#> brctl delbr br0

Agora, o dmesg e o / var / log / syslog mostram repetidas tentativas de se conectar ao AP que estava funcionando antes, o que falha após a autenticação:

May 27 09:16:01 myhostname kernel: [11350.757172] wlan0: authenticate with 00:18:f8:54:a3:d6
May 27 09:16:01 myhostname kernel: [11350.759036] wlan0: send auth to 00:18:f8:54:a3:d6 (try 1/3)
May 27 09:16:01 myhostname NetworkManager[13992]: <info> (wlan0): supplicant interface state: scanning -> authenticating
May 27 09:16:01 myhostname wpa_supplicant[8946]: wlan0: Trying to associate with 00:18:f8:54:a3:d6 (SSID='myaccesspoint' freq=2437 MHz)
May 27 09:16:01 myhostname kernel: [11350.762615] wlan0: authenticated
May 27 09:16:01 myhostname kernel: [11350.762753] iwlwifi 0000:04:00.0 wlan0: disabling HT as WMM/QoS is not supported by the AP
May 27 09:16:01 myhostname kernel: [11350.762755] iwlwifi 0000:04:00.0 wlan0: disabling VHT as WMM/QoS is not supported by the AP
May 27 09:16:01 myhostname kernel: [11350.765080] wlan0: associate with 00:18:f8:54:a3:d6 (try 1/3)
May 27 09:16:01 myhostname NetworkManager[13992]: <info> (wlan0): supplicant interface state: authenticating -> associating
May 27 09:16:01 myhostname kernel: [11350.767474] wlan0: RX AssocResp from 00:18:f8:54:a3:d6 (capab=0x411 status=12 aid=0)
May 27 09:16:01 myhostname kernel: [11350.767476] wlan0: 00:18:f8:54:a3:d6 denied association (code=12)
May 27 09:16:01 myhostname wpa_supplicant[8946]: wlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:18:f8:54:a3:d6 status_code=12
May 27 09:16:01 myhostname kernel: [11350.788475] wlan0: deauthenticating from 00:18:f8:54:a3:d6 by local choice (reason=3)
May 27 09:16:01 myhostname NetworkManager[13992]: <info> (wlan0): supplicant interface state: associating -> disconnected
May 27 09:16:01 myhostname NetworkManager[13992]: <info> (wlan0): supplicant interface state: disconnected -> scanning
May 27 09:16:02 myhostname dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 14
May 27 09:16:04 myhostname wpa_supplicant[8946]: wlan0: SME: Trying to authenticate with 00:18:f8:54:a3:d6 (SSID='myaccesspoint' freq=2437 MHz)
May 27 09:16:04 myhostname kernel: [11354.559579] wlan0: authenticate with 00:18:f8:54:a3:d6
May 27 09:16:04 myhostname kernel: [11354.561458] wlan0: send auth to 00:18:f8:54:a3:d6 (try 1/3)
May 27 09:16:04 myhostname wpa_supplicant[8946]: wlan0: Trying to associate with 00:18:f8:54:a3:d6 (SSID='myaccesspoint' freq=2437 MHz)
May 27 09:16:04 myhostname NetworkManager[13992]: <info> (wlan0): supplicant interface state: scanning -> associating
May 27 09:16:04 myhostname kernel: [11354.563445] wlan0: authenticated
May 27 09:16:04 myhostname kernel: [11354.563631] iwlwifi 0000:04:00.0 wlan0: disabling HT as WMM/QoS is not supported by the AP
May 27 09:16:04 myhostname kernel: [11354.563633] iwlwifi 0000:04:00.0 wlan0: disabling VHT as WMM/QoS is not supported by the AP
May 27 09:16:04 myhostname kernel: [11354.565727] wlan0: associate with 00:18:f8:54:a3:d6 (try 1/3)
May 27 09:16:04 myhostname wpa_supplicant[8946]: wlan0: Associated with 00:18:f8:54:a3:d6
May 27 09:16:04 myhostname kernel: [11354.568091] wlan0: RX AssocResp from 00:18:f8:54:a3:d6 (capab=0x411 status=0 aid=9)
May 27 09:16:04 myhostname kernel: [11354.569030] wlan0: associated
May 27 09:16:04 myhostname NetworkManager[13992]: <info> (wlan0): supplicant interface state: associating -> associated
May 27 09:16:05 myhostname kernel: [11354.978204] wlan0: deauthenticated from 00:18:f8:54:a3:d6 (Reason: 15)
May 27 09:16:05 myhostname wpa_supplicant[8946]: wlan0: CTRL-EVENT-DISCONNECTED bssid=00:18:f8:54:a3:d6 reason=15
May 27 09:16:05 myhostname kernel: [11354.992729] cfg80211: Calling CRDA to update world regulatory domain
May 27 09:16:05 myhostname kernel: [11354.995004] cfg80211: World regulatory domain updated:
May 27 09:16:05 myhostname kernel: [11354.995005] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
May 27 09:16:05 myhostname kernel: [11354.995006] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm)
May 27 09:16:05 myhostname kernel: [11354.995007] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)
May 27 09:16:05 myhostname kernel: [11354.995007] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm)
May 27 09:16:05 myhostname kernel: [11354.995008] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 mBm)
May 27 09:16:05 myhostname kernel: [11354.995009] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm)
May 27 09:16:05 myhostname kernel: [11354.995010] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm)
May 27 09:16:05 myhostname NetworkManager[13992]: <info> (wlan0): supplicant interface state: associated -> disconnected
May 27 09:16:05 myhostname NetworkManager[13992]: <info> (wlan0): supplicant interface state: disconnected -> scanning
May 27 09:16:09 myhostname wpa_supplicant[8946]: wlan0: SME: Trying to authenticate with 00:18:f8:54:a3:d6 (SSID='myaccesspoint' freq=2437 MHz)
May 27 09:16:09 myhostname kernel: [11358.763968] wlan0: authenticate with 00:18:f8:54:a3:d6
May 27 09:16:09 myhostname kernel: [11358.765796] wlan0: send auth to 00:18:f8:54:a3:d6 (try 1/3)
May 27 09:16:09 myhostname NetworkManager[13992]: <info> (wlan0): supplicant interface state: scanning -> authenticating
May 27 09:16:09 myhostname wpa_supplicant[8946]: wlan0: Trying to associate with 00:18:f8:54:a3:d6 (SSID='myaccesspoint' freq=2437 MHz)
May 27 09:16:09 myhostname kernel: [11358.769957] wlan0: authenticated
May 27 09:16:09 myhostname kernel: [11358.770102] iwlwifi 0000:04:00.0 wlan0: disabling HT as WMM/QoS is not supported by the AP
May 27 09:16:09 myhostname kernel: [11358.770104] iwlwifi 0000:04:00.0 wlan0: disabling VHT as WMM/QoS is not supported by the AP
May 27 09:16:09 myhostname kernel: [11358.770846] wlan0: associate with 00:18:f8:54:a3:d6 (try 1/3)
May 27 09:16:09 myhostname kernel: [11358.773358] wlan0: RX AssocResp from 00:18:f8:54:a3:d6 (capab=0x411 status=12 aid=0)
May 27 09:16:09 myhostname kernel: [11358.773361] wlan0: 00:18:f8:54:a3:d6 denied association (code=12)
May 27 09:16:09 myhostname NetworkManager[13992]: <info> (wlan0): supplicant interface state: authenticating -> associating
May 27 09:16:09 myhostname wpa_supplicant[8946]: wlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:18:f8:54:a3:d6 status_code=12
May 27 09:16:09 myhostname kernel: [11358.802187] wlan0: deauthenticating from 00:18:f8:54:a3:d6 by local choice (reason=3)
May 27 09:16:09 myhostname NetworkManager[13992]: <info> (wlan0): supplicant interface state: associating -> disconnected
May 27 09:16:09 myhostname NetworkManager[13992]: <info> (wlan0): supplicant interface state: disconnected -> scanning
May 27 09:16:12 myhostname wpa_supplicant[8946]: wlan0: SME: Trying to authenticate with 00:18:f8:54:a3:d6 (SSID='myaccesspoint' freq=2437 MHz)
May 27 09:16:12 myhostname kernel: [11362.573442] wlan0: authenticate with 00:18:f8:54:a3:d6
May 27 09:16:12 myhostname kernel: [11362.575270] wlan0: send auth to 00:18:f8:54:a3:d6 (try 1/3)
May 27 09:16:12 myhostname NetworkManager[13992]: <info> (wlan0): supplicant interface state: scanning -> authenticating
May 27 09:16:12 myhostname wpa_supplicant[8946]: wlan0: Trying to associate with 00:18:f8:54:a3:d6 (SSID='myaccesspoint' freq=2437 MHz)
May 27 09:16:12 myhostname kernel: [11362.580334] wlan0: authenticated
May 27 09:16:12 myhostname kernel: [11362.580503] iwlwifi 0000:04:00.0 wlan0: disabling HT as WMM/QoS is not supported by the AP
May 27 09:16:12 myhostname kernel: [11362.580516] iwlwifi 0000:04:00.0 wlan0: disabling VHT as WMM/QoS is not supported by the AP
May 27 09:16:12 myhostname kernel: [11362.583508] wlan0: associate with 00:18:f8:54:a3:d6 (try 1/3)
May 27 09:16:12 myhostname NetworkManager[13992]: <info> (wlan0): supplicant interface state: authenticating -> associating
May 27 09:16:12 myhostname wpa_supplicant[8946]: wlan0: Associated with 00:18:f8:54:a3:d6
May 27 09:16:12 myhostname kernel: [11362.585908] wlan0: RX AssocResp from 00:18:f8:54:a3:d6 (capab=0x411 status=0 aid=9)
May 27 09:16:12 myhostname kernel: [11362.586781] wlan0: associated
May 27 09:16:12 myhostname NetworkManager[13992]: <info> (wlan0): supplicant interface state: associating -> associated
May 27 09:16:13 myhostname kernel: [11362.947693] wlan0: deauthenticated from 00:18:f8:54:a3:d6 (Reason: 15)
May 27 09:16:13 myhostname wpa_supplicant[8946]: wlan0: CTRL-EVENT-DISCONNECTED bssid=00:18:f8:54:a3:d6 reason=15
May 27 09:16:13 myhostname kernel: [11362.973461] cfg80211: Calling CRDA to update world regulatory domain
May 27 09:16:13 myhostname kernel: [11362.975673] cfg80211: World regulatory domain updated:
May 27 09:16:13 myhostname kernel: [11362.975675] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
May 27 09:16:13 myhostname kernel: [11362.975676] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm)
May 27 09:16:13 myhostname kernel: [11362.975677] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)
May 27 09:16:13 myhostname kernel: [11362.975678] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm)
May 27 09:16:13 myhostname kernel: [11362.975678] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 mBm)
May 27 09:16:13 myhostname kernel: [11362.975679] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm)
May 27 09:16:13 myhostname kernel: [11362.975679] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm)
May 27 09:16:13 myhostname NetworkManager[13992]: <info> (wlan0): supplicant interface state: associated -> disconnected
May 27 09:16:13 myhostname NetworkManager[13992]: <info> (wlan0): supplicant interface state: disconnected -> scanning
May 27 09:16:14 myhostname NetworkManager[13992]: <warn> Activation (wlan0/wireless): association took too long.
May 27 09:16:14 myhostname NetworkManager[13992]: <info> (wlan0): device state change: config -> failed (reason 'no-secrets') [50 120 7]
May 27 09:16:14 myhostname NetworkManager[13992]: <info> Marking connection 'Auto myaccesspoint' invalid.
May 27 09:16:14 myhostname NetworkManager[13992]: <warn> Activation (wlan0) failed for connection 'Auto myaccesspoint'
May 27 09:16:14 myhostname NetworkManager[13992]: <info> (wlan0): device state change: failed -> disconnected (reason 'none') [120 30 0]
May 27 09:16:14 myhostname NetworkManager[13992]: <info> (wlan0): deactivating device (reason 'none') [0]
May 27 09:16:14 myhostname NetworkManager[13992]: <info> (wlan0): supplicant interface state: scanning -> disconnected

As coisas que surgem em mim são "autenticar ... por escolha local (razão = 3)" e as linhas que contêm "(razão = 15)".

Eu tentei várias correções:

  • desligar o wlan0 do iwconfig
  • matando o wpa_supplicant
  • conectando-se ao iwconfig + dhclient em vez do gerenciador de rede do gnome
  • configurando explicitamente o wlan0 em / etc / network / interfaces
  • criando um arquivo /etc/wpa_supplicant.conf

... mas nada parece funcionar.

Não sei ao certo o que fiz de errado ou que etapa pulei ao tentar recuperar o wlan0 como um dispositivo sem ponte - removi-o da ponte e excluí a própria ponte.

Alguma idéia?

    
por gmonk 27.05.2014 / 15:45

1 resposta

0

Isso não funcionará, porque você não pode interligar uma interface sem fio com uma virtual. Há uma maneira de contornar isso, eu vou te dizer como fazer isso em um segundo.

Primeiro, sobre o seu problema atual: você já tentou desligar e ligar novamente sua máquina? Nada do que você fez é permanente, de modo que, se você realmente se sentir desesperado, a reinicialização certamente funcionará.

Não sei qual é exatamente o seu problema. Depois de apagar a ponte, você deve apagar as interfaces veth,

  ip link del dev veth0 type veth

desconfigure sua interface wlan0,

  ip link set wlan0 down
  ip addr flush dev wlan0 

volte a apresentá-lo,

  ip link set dev wlan0 up

e então deixe o gerenciador de rede trabalhar sua mágica

  service network-manager start. 

Como eu disse antes, reiniciar o computador certamente funcionará. Além disso, e muito importante, você não deve usar comandos obsoletos , reprovados como * ifconfig, brctl ** e assim por diante. O pacote iproute2 contém comandos para tudo isso, incluindo a configuração de interfaces virtuais (algo para o qual uma vez tivemos que usar o openvpn) e a criação de pontes. Se você não sabe como configurar uma ponte com ip , aqui vamos nós:

  ip tuntap add tap0 mode tap user root 

  ip link set tap0 up

  ip link add br0 type bridge

  ip link set tap0 master br0

  ip link set eth0 master br0

  ip addr add 10.173.10.1/24  dev br0

  ip link set br0 up

Com este conjunto de comandos, criamos uma interface virtual chamada tap0 , em seguida, uma ponte chamada br0 e, em seguida, escravizamos eth0 e tap0 para a bridge, para a qual nós atribuímos um endereço IP de 10.173.10.1, e depois trazemos tudo para cima. As três instâncias separadas de trazer as interfaces para cima (para tap0, eth0 e br0) são necessárias.

Quanto ao seu problema. O truque para fazer isso funcionar é usar proxy.arp, que permite que seu pc ( não seu namespace de rede / contêiner VM / Linux) responda a consultas ARP no seu lugar.

Em outras palavras, usando o encaminhamento IPv4 entre sua interface de hardware e sua interface virtual, você acha que pode conectar seu VM / LXC / NNS à sua LAN como se fosse uma interface física, mas isso não é verdade: você está esquecendo o tráfego ARP absolutamente fundamental, que é o que realmente permite que a LAN opere. Portanto, o problema é: se eu encaminhar corretamente o tráfego IPv4, como também posso encaminhar o tráfego ARP para que meu VM / LXC / NNS funcione? O truque é usar proxy-arp.

A resposta completa para isso está no blog de Bohdi Zazen , com o título revelador: Bridge wireless cards . Ele usa um pacote obsoleto, uml-utilities , para criar uma interface virtual por meio do comando tunctl : este é o único comando para o qual ele usa uml- utilitários , para que você possa negligenciar com segurança o download do pacote e usar o comando que escrevi acima para criar uma interface tap ou tun , o que você quiser, modifique o comando de acordo. então crie um par de veth para o seu LXC, e agora crie uma ponte entre tap0 e veth0. Essa ponte, chamada br0, é o que você deve proxy-arp , em vez da simples interface tap0 descrita por Bohdi Zazen.

    
por 27.05.2014 / 17:19