Brak adresu IP przy po ponownym po

Masz problemy z siecią bądź internetem? Zapytaj tu
dulaman
Posty: 13
Rejestracja: 24 listopada 2010, 14:35
Lokalizacja: Sosnowiec

Brak adresu IP przy po ponownym połączeniu z ruterem

Post autor: dulaman »

Po rozłączeniu połączenia z ruterem mimo wielokrotnych prób, demonowi wpa_supplicant nie zostaje przyznany adres ip przez ruter (Gigaset 504AG). Do resetowania połączenia muszę używać polecenia:

Kod: Zaznacz cały

ifdown wlan0 && ifup wlan0
Nie wiem czy to wina routera czy demona, bądź karty dlatego podaje następujące informacje:

/etc/network/interfaces:

Kod: Zaznacz cały

# The loopback network interfaceauto lo
iface lo inet loopback




#Added by user
allow-hotplug wlan0
iface wlan0 inet manual
  wpa-roam /etc/wpa_supplicant/wpa-roam.conf


#this line must always be here
iface default inet dhcp


lspci:

Kod: Zaznacz cały

02:00.0 Network controller: Intel Corporation Centrino Wireless-N 1000

Kod: Zaznacz cały

sudo cat /etc/wpa_supplicant/wpa-roam.conf######################## Debian wpa-roam Template ##############################
# Template configuration for wpa-roam mode of Debian's wpasupplicant package.
# wpa-roam mode is described in detail in the wpa_action(8) manpage, and also
# at /usr/share/doc/wpasupplicant/README.modes.gz. Please read these documents
# to get an overview of how to setup this mode.
#
# For a detailed set of configuration examples for different networks, refer to
# /usr/share/doc/wpasupplicant/README.wpa_supplicant.conf.gz
#
# Also see the other files in /usr/share/doc/wpasupplicant/examples/ for
# specific network configuration examples.
#
# Empty lines and lines starting with # are ignored
#
# NOTE! This file may contain password information and should be made readable
# only by root user or netdev group on multiuser systems.
#
######################## Global Configuration Options #########################
#
# The update_config option can be used to allow wpa_supplicant to overwrite
# configuration file whenever configuration is changed (e.g., new network block
# is added with wpa_cli or wpa_gui, or a password is changed). This is required
# for wpa_cli/wpa_gui to be able to store the configuration changes
# permanently.
#
# NOTE! Any comments will be removed from the configuration file when the
# update_config option is used.
#
update_config=1


# The ctrl_interface specifies the path to a unix socket through which the
# supplicant may be controlled and interacted with.
#
# DIR=   Path to UNIX socket control interface, mandatory for wpa-roam mode
GROUP=netdev #Users in this group to control wpa_supplicant via wpa_cli/wpa_gui
#
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
#
######################## Network Block Configurations #########################
#
# Each network is configured as a separate block in this configuration file.
# The network blocks are listed in preference of order, the top most network
# to be found in scan results is used.
#
# By default, all networks will get same priority (0). If some of the networks
# are more desirable, the "priority=" network parameter can be used to change
# the order in which wpa_supplicant goes through the network blocks when
# selecting what network will be used. The priority groups will be iterated
# in decreasing priority, the network with the highest priority value will be
# considered for selection first and the network with the lowest priority value
# will be considered last.
#
# NOTE! The scan_ssid=1 and ap_scan=2 modes ignore the priority field. Instead,
# the networks will be considered in the order specified in this configuration
# file.
#
# The "id_str=" network identifier string parameter is given to wpa_action when
# a network has been selected, and contains this field in its configuration
# block. The given id_str string will be used to select a logical interfaces
# from ifupdown's /etc/network/interfaces file.
#
###############################################################################


#network={
#	ssid="Example WEP Network"
#	key_mgmt=NONE
#	wep_key0=6162636465
#	wep_tx_keyidx=0
#	id_str="johns_house"
#}
network={
	ssid="Orange_B78C"
	psk="xxxxxxxx"
}




###############################################################################
# Default behaviour is to associate with any open access point, further
# networks can be configured with wpa_cli/wpa_gui.
#
network={
	key_mgmt=NONE
}


Dodatkowo zainstalowałem sterowniki do karty z repozytorium.
Awatar użytkownika
markossx
Beginner
Posty: 489
Rejestracja: 26 maja 2007, 16:01
Lokalizacja: Polska

Post autor: markossx »

Może wystarczy dopisać na górze w pliku /etc/network/interfaces:

Kod: Zaznacz cały

auto wlan0
.
dulaman
Posty: 13
Rejestracja: 24 listopada 2010, 14:35
Lokalizacja: Sosnowiec

Post autor: dulaman »

Niestety nic to nie dało. Poza tym nie chodzi o tutaj o łączenie z siecią samo w sobie, tylko o przywrócenie łącza po np. nieumyślny rozłączeniu sieci.

Po rozłączeniu powinno zadziałać polecenie:

Kod: Zaznacz cały

wpa_cli select_network 0
gdzie 0 to pozycja na liście tej sieci, z którą byłem połączony.
Po użyciu tego polecenia wszystkie informacje o sieci są wyświetlane ale nie numer IP. Obecnie muszę resetować demona poleceniem

Kod: Zaznacz cały

ifdown wlan0 && ifup wlan0
larry2003
Posty: 41
Rejestracja: 02 grudnia 2009, 14:26

Post autor: larry2003 »

A, czy w /etc/network/interfaces nie powinno być:

Kod: Zaznacz cały


# The loopback network interfaceauto lo
iface lo inet loopback

#Added by user
allow-hotplug wlan0
iface wlan0 inet [B]dhcp[/B]
  wpa-roam /etc/wpa_supplicant/wpa-roam.conf

#this line must always be here
iface default inet dhcp
dulaman
Posty: 13
Rejestracja: 24 listopada 2010, 14:35
Lokalizacja: Sosnowiec

Post autor: dulaman »

Raczej nie, skoro otrzymuję taki komunikat:

Kod: Zaznacz cały

sudo ifdown wlan0 && sudo ifup wlan0

Internet Systems Consortium DHCP Client 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/


Listening on LPF/wlan0/00:26:c7:78:c3:08
Sending on   LPF/wlan0/00:26:c7:78:c3:08
Sending on   Socket/fallback
DHCPRELEASE on wlan0 to 192.168.2.1 port 67
wpa_supplicant: wpa-roam can only be used with the "manual" inet METHOD
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
Internet Systems Consortium DHCP Client 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/


Listening on LPF/wlan0/00:26:c7:78:c3:08
Sending on   LPF/wlan0/00:26:c7:78:c3:08
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 18
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 15
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
wpa_supplicant: wpa-roam can only be used with the "manual" inet METHOD
run-parts: /etc/network/if-up.d/wpasupplicant exited with return code 1
Linia:

Kod: Zaznacz cały

wpa_supplicant: wpa-roam can only be used with the "manual" inet METHOD
mówi sama za siebie.
Awatar użytkownika
Bastian
Member
Posty: 1424
Rejestracja: 30 marca 2008, 16:09
Lokalizacja: Poznañ

Post autor: Bastian »

Czy to nie oznacza zatem, że musisz ręcznie skonfigurować interfejs?
dulaman
Posty: 13
Rejestracja: 24 listopada 2010, 14:35
Lokalizacja: Sosnowiec

Post autor: dulaman »

Konfigurację sieci wprowadzam przez wpa_gui, jedyny problem polega na tym, żeby znowu podłączyć się do sieci muszę zresetować interfejs poleceniem:

Kod: Zaznacz cały

sudo ifdown wlan0 && sudo ifup wlan0
Awatar użytkownika
Bastian
Member
Posty: 1424
Rejestracja: 30 marca 2008, 16:09
Lokalizacja: Poznañ

Post autor: Bastian »

dulaman: wybacz, niedokładnie przeczytalem posta..
sethiel
Junior Member
Posty: 762
Rejestracja: 28 stycznia 2008, 11:50
Lokalizacja: Wrocław

Post autor: sethiel »

Przecież masz w konfiguracji linię:

Kod: Zaznacz cały

iface wlan0 inet manual
Nie powinno być tam raczej

Kod: Zaznacz cały

iface wlan0 inet dhcp
ODPOWIEDZ