Bonjour,
J'ai besoin de créer un point d'accès wifi pour connecter entre autres une tablette iPad à mon réseau et lui faire profiter d'internet.
J'ai donc un PC qui tourne sous Fedora 15 (à jour) connecté au réseau local via eth0 et une clé USB wifi Linksys WUSB54G.
lsusb :
Bus 002 Device 002: ID 13b1:0020 Linksys WUSB54GC v1 802.11g Adapter [Ralink RT73]
Je donne une ip à wlan0 : 10.10.0.1 et un netmask 255.255.255.0
Pour en faire un AP, j'ai installé hostapd et je lui ai mis la configuration suivante :
/etc/hostap/hostapd.conf
ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
# Most modern wireless drivers in the kernel need driver=nl80211
driver=nl80211
interface=wlan0
ssid=BORNE
hw_mode=g
channel=11
wpa=1
wpa_passphrase=motdepasse
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
wpa_ptk_rekey=600
hostapd démarre bien :
[root@Dell760-10 ~]# service hostapd start
Starting hostapd (via systemctl): [ OK ]
ifconfig -a me donne le résultat suivant :
mon.wlan0 Link encap:UNSPEC HWaddr 00-1E-E5-FF-33-6F-40-14-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:1550 (1.5 KiB) TX bytes:0 (0.0 b)
wlan0 Link encap:Ethernet HWaddr 00:1E:E5:FF:33:6F
inet adr:10.10.0.1 Bcast:10.10.0.255 Masque:255.255.255.0
adr inet6: fe80::21e:e5ff:feff:336f/64 Scope:Lien
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:46 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:0 (0.0 b) TX bytes:10228 (9.9 KiB)
iwconfig me donne le résultat suivant :
wlan0 IEEE 802.11bg Mode:Master Frequency:2.462 GHz Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:on
mon.wlan0 IEEE 802.11bg Mode:Monitor Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:on
Jusque là, mon AP est vu par les clients wifi, mais ils sont incapables de se connecter. J'ai tenté de mettre une ip fixe qui fait partie du sous-réseau à un client (10.10.0.25/24 par exemple) mais il refuse de se connecter.
J'ai poursuivi avec le configuration d'un serveur DHCP sur mon PC sous Fedora 15.
Pour limiter les ennuis, la carte eth0 a une ip fixe 192.168.1.100 (le client DHCP ne lui cherche plus d'ip sur le réseau).
Voici ma configuration de /etc/dhcp/dhcpd.conf :
DHCPDARGS=wlan0;
option domain-name-servers 8.8.4.4, 208.67.222.222;
default-lease-time 600;
max-lease-time 7200;
authoritative;
subnet 10.10.0.0 netmask 255.255.255.0 {
range dynamic-bootp 10.10.0.20 10.10.0.30;
option routers 10.10.0.1;
option broadcast-address 10.10.0.255;
}
Ca tourne :
# service dhcpd status
Redirecting to /bin/systemctl status dhcpd.service
dhcpd.service - DHCPv4 Server Daemon
Loaded: loaded (/lib/systemd/system/dhcpd.service)
Active: active (running) since Wed, 12 Oct 2011 10:59:24 +0200; 2h 22min ago
Main PID: 1903 (dhcpd)
CGroup: name=systemd:/system/dhcpd.service
└ 1903 /usr/sbin/dhcpd -d
La connexion des clients ne marche toujours pas... sur mon téléphone sous Android, je vois que la négociation a lieu, il affiche qu'il recherche une adresse IP.
Voici ce que j'ai dans les logs :
Oct 12 10:59:24 Dell760-10 dhcpd: Internet Systems Consortium DHCP Server 4.2.1-P1
Oct 12 10:59:24 Dell760-10 dhcpd: Copyright 2004-2011 Internet Systems Consortium.
Oct 12 10:59:24 Dell760-10 dhcpd: All rights reserved.
Oct 12 10:59:24 Dell760-10 dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Oct 12 10:59:24 Dell760-10 dhcpd: Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
Oct 12 10:59:24 Dell760-10 dhcpd: Wrote 0 leases to leases file.
Oct 12 10:59:24 Dell760-10 dhcpd: Listening on LPF/wlan0/00:1e:e5:ff:33:6f/10.10.0.0/24
Oct 12 10:59:24 Dell760-10 dhcpd: Sending on LPF/wlan0/00:1e:e5:ff:33:6f/10.10.0.0/24
Oct 12 10:59:24 Dell760-10 dhcpd:
Oct 12 10:59:24 Dell760-10 dhcpd: No subnet declaration for em1 (192.168.174.87).
Oct 12 10:59:24 Dell760-10 dhcpd: ** Ignoring requests on em1. If this is not what
Oct 12 10:59:24 Dell760-10 dhcpd: you want, please write a subnet declaration
Oct 12 10:59:24 Dell760-10 dhcpd: in your dhcpd.conf file for the network segment
Oct 12 10:59:24 Dell760-10 dhcpd: to which interface em1 is attached. **
Oct 12 10:59:24 Dell760-10 dhcpd:
Oct 12 10:59:24 Dell760-10 dhcpd: Sending on Socket/fallback/fallback-net
Oct 12 10:59:37 Dell760-10 avahi-daemon[724]: Interface wlan0.IPv4 no longer relevant for mDNS.
Oct 12 10:59:37 Dell760-10 avahi-daemon[724]: Leaving mDNS multicast group on interface wlan0.IPv4 with address 10.10.0.1.
Oct 12 10:59:37 Dell760-10 dhcpd: receive_packet failed on wlan0: Network is down
Oct 12 10:59:37 Dell760-10 avahi-daemon[724]: Withdrawing address record for 10.10.0.1 on wlan0.
Oct 12 10:59:37 Dell760-10 avahi-daemon[724]: Joining mDNS multicast group on interface wlan0.IPv4 with address 10.10.0.1.
Oct 12 10:59:37 Dell760-10 avahi-daemon[724]: New relevant interface wlan0.IPv4 for mDNS.
Oct 12 10:59:37 Dell760-10 avahi-daemon[724]: Registering new address record for 10.10.0.1 on wlan0.IPv4.
Oct 12 10:59:39 Dell760-10 avahi-daemon[724]: Registering new address record for fe80::21e:e5ff:feff:336f on wlan0.*.
Oct 12 10:59:40 Dell760-10 ntpd[719]: Listen normally on 7 wlan0 fe80::21e:e5ff:feff:336f UDP 123
Oct 12 10:59:40 Dell760-10 ntpd[719]: peers refreshed
Oct 12 11:49:21 Dell760-10 avahi-daemon[724]: Withdrawing workstation service for mon.wlan0.
Oct 12 11:49:21 Dell760-10 avahi-daemon[724]: Interface wlan0.IPv4 no longer relevant for mDNS.
Oct 12 11:49:21 Dell760-10 avahi-daemon[724]: Leaving mDNS multicast group on interface wlan0.IPv4 with address 10.10.0.1.
Oct 12 11:49:21 Dell760-10 dhcpd: receive_packet failed on wlan0: Network is down
Oct 12 11:49:21 Dell760-10 avahi-daemon[724]: Withdrawing address record for fe80::21e:e5ff:feff:336f on wlan0.
Oct 12 11:49:21 Dell760-10 avahi-daemon[724]: Withdrawing address record for 10.10.0.1 on wlan0.
Oct 12 11:49:22 Dell760-10 ntpd[719]: Deleting interface #7 wlan0, fe80::21e:e5ff:feff:336f#123, interface stats: received=0, sent=0, dropped=0, active_time=2982 secs
Oct 12 11:49:22 Dell760-10 ntpd[719]: Deleting interface #6 wlan0, 10.10.0.1#123, interface stats: received=0, sent=0, dropped=0, active_time=3028 secs
Oct 12 11:49:22 Dell760-10 ntpd[719]: peers refreshed
Oct 12 12:01:39 Dell760-10 avahi-daemon[724]: Joining mDNS multicast group on interface wlan0.IPv4 with address 10.10.0.1.
Oct 12 12:01:39 Dell760-10 avahi-daemon[724]: New relevant interface wlan0.IPv4 for mDNS.
Oct 12 12:01:39 Dell760-10 avahi-daemon[724]: Registering new address record for 10.10.0.1 on wlan0.IPv4.
Oct 12 12:01:40 Dell760-10 avahi-daemon[724]: Registering new address record for fe80::21e:e5ff:feff:336f on wlan0.*.
Oct 12 12:01:41 Dell760-10 ntpd[719]: Listen normally on 8 wlan0 10.10.0.1 UDP 123
Oct 12 12:01:41 Dell760-10 ntpd[719]: Listen normally on 9 wlan0 fe80::21e:e5ff:feff:336f UDP 123
A un moment j'ai eu une authentification qui semble avoir marché pour téléphone, j'ai ça dans les logs :
Oct 12 10:23:31 Dell760-10 avahi-daemon[763]: Registering new address record for 10.10.0.1 on wlan0.IPv4.
Oct 12 10:23:31 Dell760-10 hostapd: wlan0: STA 63:a7:96:ec:7b:58 IEEE 802.11: authenticated
Mais le téléphone se déclarait déconnecté malgré tout.
J'avoue que je suis un peu perdu, je ne vois pas ce qui coince, j'ai regardé divers tutos sur le net, mais sans succès jusqu'à présent. Si vous avez une idée pour m'aider à avancer