Managing pci wifi connection with [ifupdown]

Kernels, Network, and Services configuration
Post Reply
Message
Author
pidlas
Posts: 4
Joined: 2017-05-01 14:22

Managing pci wifi connection with [ifupdown]

#1 Post by pidlas »

I am a young 59 years old system and network admin. I have been trained into IT in the early 1980's ! Yes, I know. Old times. I am self-taught and I wish to build my own network for my personal health projects. That is why I choosed Debian 8 :

Code: Select all

Linux srv-web-idlas 3.16.0-4-686-pae #1 SMP Debian 3.16.39-1+deb8u2 (2017-03-07) i686 GNU/Linux
I am facing difficulties with configuring a wifi network interface :

Code: Select all

04:00.0 Ethernet controller: Qualcomm Atheros AR2417 Wireless Network Adapter [AR5007G 802.11bg] (rev 01)
I do not want to use NetworkManager. I stopped it and deactivated it :

Code: Select all

systemctl stop NetworkManager.service
systemctl disable NetworkManager.service
Instead I wish to make use of [ifupdown]. I did configured following files /etc/hosts, /etc/resolv.conf et /etc/network/interfaces et /run/default/networking accordingly and it works fine for my cable interface :
'/etc/hosts' file

Code: Select all

127.0.0.1		localhost
192.168.0.51		srv-web-idlas.santeonaturel.edu	web
# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
'/etc/network/interfaces' file

Code: Select all

# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.51
netmask 255.255.255.0
gateway 192.168.0.254
dns-nameservers 212.27.40.240 212.27.40.241
'/etc/resolv.conf' file

Code: Select all

search santeonaturel.edu
domain santeonaturel.edu
nameserver 212.27.40.240 212.27.40.241
'/run/default/networking' file

Code: Select all

# Configuration for networking init script being run during the boot sequence
# Set to 'no' to skip interfaces configuration on boot
CONFIGURE_INTERFACES=yes
# Don't configure these interfaces. Shell wildcards supported/
#EXCLUDE_INTERFACES=
# Set to 'yes' to enable additional verbosity
VERBOSE=yes
It works fine. NetworkManager is deactivated. I can manage eth0 properly with following commands : ifconfig, ifup et ifdown.

Code: Select all

eth0      Link encap:Ethernet  HWaddr 00:0d:88:cd:41:00  
          inet adr:192.168.0.51  Bcast:192.168.0.255  Masque:255.255.255.0
          adr inet6: fe80::20d:88ff:fecd:4100/64 Scope:Lien
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1691 errors:0 dropped:3 overruns:0 frame:0
          TX packets:522 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000 
          RX bytes:317351 (309.9 KiB)  TX bytes:223123 (217.8 KiB)
It becomes trickier with configuring my pci wifi connection with wlan0 or wlan1. I am indeed running tests with two different boards. The second board is D-LINK AMD/ATI pci board.

I have already been supported by you people and others from debian-fr.org. I read documentations and examples from /usr/share/doc/wpasupplicant. Hopeless. Neither wlan0 nor wlan1 is working. Find hereafter what I have done.

I added following lines in /etc/network/interfaces :

Code: Select all

#Wifi interface
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
I created /etc/wpa_supplicant/wpa_supplicant-wlan1.conf file as below :
root@srv-web-idlas:/home/pilipe# cat /etc/wpa_supplicant/wpa_supplicant-wlan1.conf

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
	ssid="freebox_idlas"
	psk=ce5e31a930c814da382a989fb12150429fcf52b54687e5f9e518d385f7e9f4e5
	proto=WPA
	key_mgmt=WPA-PSK
	pairwise=CCMP
	group=CCMP
	auth_alg=OPEN
}
To calculate the secret psk passphrase, I used wpa_passphrase command with SSID and ASCII AP passphrase. I tried this configuration with different network values with no success until now.

I associated my pci wifi board with my access point likewise :

Code: Select all

wpa_supplicant -B -Dnl80211,wext -i wlan1 -c /etc/wpa_supplicant/wpa_supplicant-wlan1.conf
AP is part of my internet provider router (freebox V5). It's a Ralink RT2880 board. After analyzing the frequencies used in my neighbourhood I decided to change my IP channel from 11 (most used) to channel 4 (only one to use now, frequency 2462).

When booting my server, wlanx interface is not up :

Code: Select all

wlan1     Link encap:Ethernet  HWaddr 00:17:3f:f5:f6:aa  
          adr inet6: fe80::217:3fff:fef5:f6aa/64 Scope:Lien
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:786 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000 
          RX bytes:109682 (107.1 KiB)  TX bytes:3359 (3.2 KiB)
Find hereafter the list of enabled services started by systemd :
root@srv-web-idlas:/home/pilipe# systemctl list-unit-files|grep enabled

Code: Select all

acpid.path                                   enabled 
cups.path                                    enabled 
accounts-daemon.service                      enabled 
anacron-resume.service                       enabled 
anacron.service                              enabled 
atd.service                                  enabled 
avahi-daemon.service                         enabled 
bluetooth.service                            enabled 
cron.service                                 enabled 
cups-browsed.service                         enabled 
cups.service                                 enabled 
dbus-fi.epitest.hostap.WPASupplicant.service enabled 
dbus-org.bluez.service                       enabled 
dbus-org.freedesktop.Avahi.service           enabled 
dbus-org.freedesktop.ModemManager1.service   enabled 
display-manager.service                      enabled 
gdm.service                                  enabled 
getty@.service                               enabled 
hwclock-save.service                         enabled 
lm-sensors.service                           enabled 
lvm2-activation-early.service                enabled 
lvm2-activation.service                      enabled 
lvm2-monitor.service                         enabled 
ModemManager.service                         enabled 
openvpn.service                              enabled 
pppd-dns.service                             enabled 
rsyslog.service                              enabled 
syslog.service                               enabled 
unattended-upgrades.service                  enabled 
wpa_supplicant.service                       enabled 
acpid.socket                                 enabled 
avahi-daemon.socket                          enabled 
cups.socket                                  enabled 
dm-event.socket                              enabled 
lvm2-lvmetad.socket                          enabled 
remote-fs.target                             enabled
I read that wpa_supplicant.service could be troubled by another service. Do you foresee any such conflict  ?

Running ifdown at that point would give the following result :
root@srv-web-idlas:/usr/share/doc/wpasupplicant# ifdown wlan1

Code: Select all

ifdown: interface wlan1 not configured
Process using wpa_supplicant are :

Code: Select all

root       676  0.0  0.0   7892  3192 ?        Ss   11:19   0:00 /sbin/wpa_supplicant -s -B -P /run/wpa_supplicant.wlan1.pid -i wlan1 -D nl80211,wext -c /etc/wpa_supplicant/wpa_supplicant-wlan1.conf
root       742  0.0  0.0   7656  4108 ?        Ss   11:19   0:00 /sbin/wpa_supplicant -u -s -O /run/wpa_supplicant
Running ifup wlan1 gives the following result :
root@srv-web-idlas:/var/run/wpa_supplicant# ifup wlan1

Code: Select all

Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/wlan1/00:17:3f:f5:f6:aa
Sending on   LPF/wlan1/00:17:3f:f5:f6:aa
Sending on   Socket/fallback
DHCPDISCOVER on wlan1 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on wlan1 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan1 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on wlan1 to 255.255.255.255 port 67 interval 20
DHCPDISCOVER on wlan1 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on wlan1 to 255.255.255.255 port 67 interval 1
No DHCPOFFERS received.
No working leases in persistent database – sleeping.
While running ifup wlan1, /var/log/syslog file displays :

Code: Select all

May  7 12:18:15 srv-web-idlas wpa_supplicant[2402]: Successfully initialized wpa_supplicant
May  7 12:18:15 srv-web-idlas kernel: [ 3550.910943] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
May  7 12:18:15 srv-web-idlas dhclient: Internet Systems Consortium DHCP Client 4.3.1
May  7 12:18:15 srv-web-idlas dhclient: Copyright 2004-2014 Internet Systems Consortium.
May  7 12:18:15 srv-web-idlas dhclient: All rights reserved.
May  7 12:18:15 srv-web-idlas dhclient: For info, please visit https://www.isc.org/software/dhcp/
May  7 12:18:15 srv-web-idlas dhclient: 
May  7 12:18:15 srv-web-idlas dhclient: Listening on LPF/wlan1/00:17:3f:f5:f6:aa
May  7 12:18:15 srv-web-idlas dhclient: Sending on   LPF/wlan1/00:17:3f:f5:f6:aa
May  7 12:18:15 srv-web-idlas dhclient: Sending on   Socket/fallback
May  7 12:18:15 srv-web-idlas dhclient: DHCPDISCOVER on wlan1 to 255.255.255.255 port 67 interval 5
May  7 12:18:20 srv-web-idlas dhclient: DHCPDISCOVER on wlan1 to 255.255.255.255 port 67 interval 7
May  7 12:18:27 srv-web-idlas dhclient: DHCPDISCOVER on wlan1 to 255.255.255.255 port 67 interval 14
May  7 12:18:41 srv-web-idlas dhclient: DHCPDISCOVER on wlan1 to 255.255.255.255 port 67 interval 20
May  7 12:19:01 srv-web-idlas dhclient: DHCPDISCOVER on wlan1 to 255.255.255.255 port 67 interval 14
May  7 12:19:15 srv-web-idlas dhclient: DHCPDISCOVER on wlan1 to 255.255.255.255 port 67 interval 1
May  7 12:19:16 srv-web-idlas dhclient: No DHCPOFFERS received.
May  7 12:19:16 srv-web-idlas dhclient: No working leases in persistent database – sleeping.
How come ip link show wlan1 displays the following ?
root@srv-web-idlas:/var/run/wpa_supplicant# ip link show wlan1

Code: Select all

6: wlan1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000
    link/ether 00:17:3f:f5:f6:aa brd ff:ff:ff:ff:ff:ff
I am lost and a bit confused. Thanks for your help in that matter. I have mosly available during week-ends, days off and holidays. Take no offense if I am not answering you during mid-weeks.

Regards.

Post Reply