Pagina 1 di 2

[RISOLTO] problema rc.inet1.conf e wireless

Inviato: dom 31 gen 2010, 22:39
da freax
edit : quasi dimenticavo , il sistema è una slackware 13.0 32 bit , praticamente vergine appena installata con tutti i pacchetti del dvd .

salve gente , tanto per cambiare mi addentro a fare esperimentucoli ogni tanto , l'ultima idea , per adesso malsana , consiste nel tentare di fare a meno di un network manager e gestire la connessione il più semplicemente possibile , ho così editato i file /etc/rc.d/rc.inet1.conf e /etc/wpa_supplicant.conf come segue :

/etc/rc.d/rc.inet1.conf

Codice: Seleziona tutto

# /etc/rc.d/rc.inet1.conf
#
# This file contains the configuration settings for network interfaces.
# If USE_DHCP[interface] is set to "yes", this overrides any other settings.
# If you don't have an interface, leave the settings null ("").

# You can configure network interfaces other than eth0,eth1... by setting
# IFNAME[interface] to the interface's name. If IFNAME[interface] is unset
# or empty, it is assumed you're configuring eth<interface>.

# Several other parameters are available, the end of this file contains a
# comprehensive set of examples.

# =============================================================================

# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""

# Config information for eth1:
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""

# Config information for eth2:
IPADDR[2]=""
NETMASK[2]=""
USE_DHCP[2]=""
DHCP_HOSTNAME[2]=""

# Config information for eth3:
IPADDR[3]=""
NETMASK[3]=""
USE_DHCP[3]=""
DHCP_HOSTNAME[3]=""

# Default gateway IP address:
GATEWAY="192.168.1.1"

# Change this to "yes" for debugging output to stdout.  Unfortunately,
# /sbin/hotplug seems to disable stdout so you'll only see debugging output
# when rc.inet1 is called directly.
DEBUG_ETH_UP="no"

## Example config information for wlan0.  Uncomment the lines you need and fill
## in your data.  (You may not need all of these for your wireless network)
IFNAME[4]="wlan0"
IPADDR[4]="192.168.1.3"
NETMASK[4]="255.255.255.0"
USE_DHCP[4]="no"
#DHCP_HOSTNAME[4]="icculus-wireless"
#DHCP_KEEPRESOLV[4]="yes"
#DHCP_KEEPNTP[4]="yes"
#DHCP_KEEPGW[4]="yes"
#DHCP_IPADDR[4]=""
#WLAN_ESSID[4]=DARKSTAR
#WLAN_MODE[4]=Managed
WLAN_RATE[4]="54M auto"
#WLAN_CHANNEL[4]="auto"
#WLAN_KEY[4]="D5A31F54ACF0487C2D0B1C10D2"
#WLAN_IWPRIV[4]="set AuthMode=WPAPSK | set EncrypType=TKIP | set WPAPSK=96389dc66eaf7e6efd5b5523ae43c7925ff4df2f8b7099495192d44a774fda16"
WLAN_WPA[4]="wpa_supplicant"
WLAN_WPADRIVER[4]="wext"
#WLAN_WPAWAIT[4]=30

## Some examples of additional network parameters that you can use.
## Config information for wlan0:
#IFNAME[4]="wlan0"              # Use a different interface name instead of
                                # the default 'eth4'
#IFNAME[4]="eth0:1"             # Set up an IP alias.
#HWADDR[4]="00:01:23:45:67:89"  # Overrule the card's hardware MAC address
#MTU[4]=""                      # The default MTU is 1500, but you might need
                                # 1360 when you use NAT'ed IPSec traffic.
#DHCP_TIMEOUT[4]=15             # The default timeout for the DHCP client to
                                # wait for server resonse is 10 seconds, but
                                # you might want a shorter or longer wait.
#DHCP_KEEPRESOLV[4]="yes"       # If you dont want /etc/resolv.conf overwritten
#DHCP_KEEPNTP[4]="yes"          # If you don't want ntp.conf overwritten
#DHCP_KEEPGW[4]="yes"           # If you don't want the DHCP server to change
                                # your default gateway
#DHCP_IPADDR[4]=""              # Request a specific IP address from the DHCP
                                # server
#DHCP_DEBUG[4]="yes"            # Make dhcpcd show verbose diagnostics
#DHCP_NOIPV4LL[4]="yes"         # Do not assign an ipv4ll address when a DHCP
                                # server is not found (ipv4ll link-local
                                # adresses in the IP range 169.254.0.0/16 are
                                # also known as "zeroconf" addresses)
#WLAN_ESSID[4]=DARKSTAR         # An example of how you can override _any_
                                # parameter defined in rc.wireless.conf, by
                                # prepending 'WLAN_' to the parameter's name.
                                # Useful with multiple wireless interfaces.
#WLAN_IWPRIV[4]="set AuthMode=WPAPSK | set EncrypType=TKIP | set WPAPSK=thekey"
                                # Some drivers require a private ioctl to be
                                # set through the iwpriv command. If more than
                                # one is required, you can place them in the
                                # IWPRIV parameter (separated with the pipe (|)
                                # character, see the example).
#WLAN_WPA[4]="wpa_supplicant"   # Run wpa_supplicant for WPA support
#WLAN_WPADRIVER[4]="ndiswrapper"# Tell wpa_supplicant to specifically use the
                                # ndiswrapper driver (if you leave this empty
                                # the 'wext' driver is used by default)
#WLAN_WPAWAIT[4]=30             # In case it takes long for the WPA association
                                # to finish, you can increase the wait time
                                # (defaults to 10 seconds)
/etc/wpa_supplicant.conf

Codice: Seleziona tutto

# See /usr/doc/wpa_supplicant-0.6.9/wpa_supplicant.conf.sample
# for many more options that you can use in this file.

# This line enables the use of wpa_cli which is used by rc.wireless
# if possible (to check for successful association)
ctrl_interface=/var/run/wpa_supplicant
# By default, only root (group 0) may use wpa_cli
ctrl_interface_group=wheel
eapol_version=1
ap_scan=1
fast_reauth=1
#country=US

# WPA protected network, supply your own ESSID and WPAPSK here:
network={
  scan_ssid=1
  ssid="aliceadsl"
  proto=WPA
  key_mgmt=WPA-PSK
  pairwise=CCMP TKIP
  #group=CCMP TKIP WEP104 WEP40
  psk=wjcgqt88g2k8cj0036fnywa0
  #priority=10
}

# Plaintext connection (no WPA, no IEEE 802.1X),
# nice for hotel/airport types of WiFi network.
#network={
#  key_mgmt=NONE
#  priority=0
#}
tento di testare la configurazione avviando il demone rc solo per la wlan0 e ottengo :

Codice: Seleziona tutto

/etc/rc.d/rc.inet1:  wlan0 information: 'Any ESSID'
Line 22: Invalid PSK 'wjcgqt88g2k8cj0036fnywa0'.
Line 22: failed to parse psk 'wjcgqt88g2k8cj0036fnywa0'.
Line 24: WPA-PSK accepted for key management, but no PSK configured.
Line 24: failed to parse network block.
Failed to read or parse configuration '/etc/wpa_supplicant.conf'.
ho letto in giro che potrebbe essere un problema di driver , ma non credo proprio visto che comunque a me i moduli di default sono sempre bastati , l'unica differenza è che prima mi collegavo con wicd e adesso tento la via maestra , ad ogni modo ho una Atheros AR5001 per la quale ci vogliono i driver ath5k prontamente caricati all'avvio :

Codice: Seleziona tutto

ath5k                 109216  0 
mac80211              155588  1 ath5k
cfg80211               36468  2 ath5k,mac80211
led_class               3392  2 ath5k,asus_laptop
un ifconfig del mio portatile è :

Codice: Seleziona tutto

eth0      Link encap:Ethernet  HWaddr 00:1d:60:bb:39:04  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:22 Base address:0xa000 

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:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 00:15:af:48:e6:32  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wmaster0  Link encap:UNSPEC  HWaddr 00-15-AF-48-E6-32-6C-6F-00-00-00-00-00-00-00-00  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
specifico una cosa alquanto strana , almeno per me che non sono abituato a fare debug su queste robe , di default wlan0 è apparentemente down , con un ifconfing wlan0 up la riporto in attività ma dopo aver quantomeno tentato di avviare il demone rc.inet1 per la wlan0 appunto la stessa wlan0 si disabilita nuovamente .

ci capisco sempre meno ...

Re: problema rc.inet1.conf e wireless

Inviato: dom 31 gen 2010, 23:19
da sya54M
di specifico il problema che si legge nel tuo output è che la chiave deve essere racchiusa dalle virgolette, poi come tipo di crittografia è meglio se specifichi solo quella giusta (nel caso di alice è TKIP) invece che entrambe. quindi fai così:

Codice: Seleziona tutto

network={
  scan_ssid=1
  ssid="aliceadsl"
  proto=WPA
  key_mgmt=WPA-PSK
  pairwise=TKIP
  group=TKIP
  psk="wjcgqt88g2k8cj0036fnywa0"
}

Re: problema rc.inet1.conf e wireless

Inviato: dom 31 gen 2010, 23:39
da freax
ti ringrazio adesso il problema è leggermente diverso , le righe si sono ridotte , l'output dell'errore è questo :

Codice: Seleziona tutto

Error for wireless request "Set Nickname" (8B1C) :
    SET failed on device wlan0 ; Operation not supported.
e sotto

Codice: Seleziona tutto

Failed to connect to wpa_supplicant - wpa_ctrl_open: Operation not permitted
ripetuto all'infinito fin quando non stoppo il processo .

Re: problema rc.inet1.conf e wireless

Inviato: dom 31 gen 2010, 23:57
da sya54M
il primo errore è normale, è dovuto allo script rc.wireless che cerca di settare un inutile nickname alla scheda wifi che però è supportato solo da pochi driver e quindi non ci riesce. non ti preoccupare che non causa nessun problema.
il secondo errore è perchè hai scritto

Codice: Seleziona tutto

ctrl_interface_group=wheel
e probabilmente root non fa parte del gruppo wheel, quindi riporta questo valore a quello predefinito:

Codice: Seleziona tutto

ctrl_interface_group=0

Re: problema rc.inet1.conf e wireless

Inviato: lun 1 feb 2010, 0:00
da freax
niente , ho riavviato e sembra essere connesso , mi da ancora l'errore nel dmesg sul settaggio del nickname per la scheda , credo sia una questione di driver a questo punto , se qualcuno ha idee su come migliorare la situazione si faccia avanti , per adesso riesco ad andare su internet con il portatile .

per la questione del gruppo root fa parte già di wheel , avevo anche provato a cambiare in 0 quel valore ma non ha portato a niente , comunque adesso va , con quell'errore sul nickname ma va .

rc.wireless non era deprecato ? non è tempo sprecato all'avvio ? come posso disabilitarlo ?

Re: problema rc.inet1.conf e wireless

Inviato: lun 1 feb 2010, 0:13
da sya54M
ma se funziona qual'è il problema? te l'ho detto che quell'errore sul nickname è normale... lo da a tutti, se non vuoi che venga, modifica rc.wireless cancellando

Codice: Seleziona tutto

if [ -n "$ESSID" -o -n "$MODE" ] ; then
	echo "$0:  $IWCOMMAND nick $NICKNAME" | $LOGGER
	$IWCOMMAND nick $NICKNAME
fi
e che io sappia non è deprecato visto che viene ancora aggiornato, anzi, se non è eseguibile ai problemi con la configurazione del wifi all'avvio

e se con wheel non andava e adesso va perchè dici che non cambia nulla? mi sembri contradittorio

Re: problema rc.inet1.conf e wireless

Inviato: lun 1 feb 2010, 0:34
da freax
sya54M ha scritto:ma se funziona qual'è il problema? te l'ho detto che quell'errore sul nickname è normale... lo da a tutti, se non vuoi che venga, modifica rc.wireless cancellando

Codice: Seleziona tutto

if [ -n "$ESSID" -o -n "$MODE" ] ; then
	echo "$0:  $IWCOMMAND nick $NICKNAME" | $LOGGER
	$IWCOMMAND nick $NICKNAME
fi
e che io sappia non è deprecato visto che viene ancora aggiornato, anzi, se non è eseguibile ai problemi con la configurazione del wifi all'avvio

e se con wheel non andava e adesso va perchè dici che non cambia nulla? mi sembri contradittorio
ho detto che ho provato con entrambi e comunque il risultato era lo stesso , difatti l'unico modo per farlo andare è stato riavviare il portatile , che è stata per lo più una prova buttata li ma che mi ha salvato tante ore perse nei meandri dei file di configurazione .

mi sa che lo lascio così allora , avevo letto del wireless.conf deprecato su una wiki inglese abbastanza affidabile , mah , a questo punto lo lascio dov'è :-k

grazie mille allora , lo segno come risolto \:D/

Re: [RISOLTO] problema rc.inet1.conf e wireless

Inviato: lun 1 feb 2010, 0:45
da sya54M
ma ad ogni modifica dei file di configurazione è ovvio che o riavvii il pc o riavvii gli script di rete...

Re: [RISOLTO] problema rc.inet1.conf e wireless

Inviato: lun 1 feb 2010, 0:56
da SIV
sya54M si è arrabbiato :o :o

Re: [RISOLTO] problema rc.inet1.conf e wireless

Inviato: lun 1 feb 2010, 1:01
da freax
sya54M ha scritto:ma ad ogni modifica dei file di configurazione è ovvio che o riavvii il pc o riavvii gli script di rete...
nella wiki che ho letto ( che alla fine risulta corretta e solo sbagliata in questo punto ) c'è scritto che per testare la config nuova basta dare

Codice: Seleziona tutto

/etc/rc.d/rc.init1 wlan0_start
, il riavvio l'ho dato proprio per quel motivo che dici te , ho ragionato un po' e comunque mi son reso conto che un riavvio male non avrebbe fatto e infatti ...

Re: [RISOLTO] problema rc.inet1.conf e wireless

Inviato: lun 1 feb 2010, 1:13
da sya54M
SIV ha scritto:sya54M si è arrabbiato :o :o
HAHAAH no no figurati è che mi è sembrato strano leggere che funzionava in un modo come se non funzionasse...

comunque si riavvia così:

Codice: Seleziona tutto

/etc/rc.d/rc.init1 restart

Re: problema rc.inet1.conf e wireless

Inviato: lun 1 feb 2010, 17:36
da NetNightmare
freax ha scritto:
mi sa che lo lascio così allora , avevo letto del wireless.conf deprecato su una wiki inglese abbastanza affidabile ,
rc.wireless.conf e' deprecato ... lo puoi tranquillamente cancellare in toto ... io l'ho cancellato con la 12.2 ... e comunque se lo dice AlienBOB http://www.linuxquestions.org/questions ... 1c-643072/ credo possiamo convenire tutti che sia vero

Re: [RISOLTO] problema rc.inet1.conf e wireless

Inviato: lun 1 feb 2010, 17:52
da sya54M
io gli tolsi l'eseguibilità e non si configurava più l'adattatore a runtime pur essendo configurato rc.inet1.conf, rendendolo di nuovo eseguibile tutto tornava a funzionare.
fu una prova fatta su una slackware 12.2 o 13, non ricordo bene ma abbastanza recente

Re: [RISOLTO] problema rc.inet1.conf e wireless

Inviato: lun 1 feb 2010, 18:16
da conraid
l'eseguibilità ad un file .conf?
o parli di rc.wireless?
nel secondo caso quello serve, è deprecato solamente rc.wireless.conf

Re: [RISOLTO] problema rc.inet1.conf e wireless

Inviato: lun 1 feb 2010, 19:49
da sya54M
conraid ha scritto:l'eseguibilità ad un file .conf?
o parli di rc.wireless?
nel secondo caso quello serve, è deprecato solamente rc.wireless.conf
parlo dell'eseguibilità di rc.wireless.
cioè dicevo che togliendo l'eseguibilità a rc.wireless, pur avendo configurato rc.inet1.conf, i dispositivi wifi non si configurano a runtime, quindi come dici anche tu, non è affatto deprecato rc.wireless.
rc.wireless.conf è un altro conto... quello si usava per configurazioni diverse a seconda del driver usato che veniva riconosciuto in base al MAC e quindi alla marca del dispositivo.