casse tête réseau, Acces point et raspberry....

auto lo
iface lo inet loopback

iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet static
 address 192.168.1.74/24
 network 192.168.1.0
 gateway 192.168.1.1
wpa_ssid "Omer"
wpa_psk "********"
#   wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

et l'iwconfig

# iwconfig
wlan0     IEEE 802.11bgn  ESSID:"Omer"  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency:2.437 GHz  Access Point: 60:E3:27:0C:87:B1   
          Bit Rate:130 Mb/s   Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:****-****-****-****-****-****-****-****   Security mode:open
          Power Management:off
          Link Quality=99/100  Signal level=97/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

lo        no wireless extensions.

eth0      no wireless extensions.

ton rpas avec les deux ip 10.0.0.1 et 192.168.1.80 est en bridge ou un repeater?
si repeater, change le gateway 192.168.1.1 par 192.168.1.74

j'ai des routers wifi un peu partout chez moi pour mes cam ip et ils sont tous en repeater.
sur un server j'ai aussi motion lorsque je pars afin de détecter toute intrusion par secteur.

je vais jeter un oeil sur motioneye, que je ne connais pas.

Pour Meye je pourrais te donner quelques pistes... j'ai galéré sur certains "trucs".

Je regarde pour changer la gateway.

J'aimerais que le raspi avec les deux wifi soit un répéteur pour augmenter la portée du routeur.

Bon.... ça marche pas en changeant la gateway

même canal, même ssid?

mon réseau
ip cam 192.168.2.200 ==>router repeater (192.168.2.254 gateway 192.168.2.2) ====> router principal (192.168.2.2 gateway 192.168.1.1)==>LB 192.168.1.1

juste pour un essai, vire la clef sécu wifi et mets en open le tout.
après je ne vois qu'un routage de port

J'ai tenté de changer tout ça au moins deux à trois fois dans la semaine.... j'ai même mis des ip qui se suivent sur tout les appareils..... Sans succés.

Depuis raspicam

root@raspicam:/home/pi# traceroute 192.168.1.80
traceroute to 192.168.1.80 (192.168.1.80), 30 hops max, 60 byte packets
 1  * * *
 2  * * *
 3  * * *
 4  * * *
 5  * * *
 6  * * *
 7  * * *
 8  * * *
 9  * * *
10  * * *
11  * * *
12  * * *
13  * * *
14  * * *
15  * * *
16  * * *
17  * * *
18  * * *
19  * * *
20  * * *
21  * * *
22  * * *
23  * * *
24  * * *
25  * * *
26  * * *
27  * * *
28  * * *
29  * * *
30  * * *
root@raspicam:/home/pi# traceroute 10.0.0.1
traceroute to 10.0.0.1 (10.0.0.1), 30 hops max, 60 byte packets
 1  10.0.0.1 (10.0.0.1)  5.428 ms  9.523 ms  9.409 ms

Et depuis raspiwifi

root@raspiwifi:/home/pi# traceroute 192.168.1.74
traceroute to 192.168.1.74 (192.168.1.74), 30 hops max, 60 byte packets
 1  192.168.1.80 (192.168.1.80)  2993.465 ms !H  2993.131 ms !H  2993.036 ms !H

ça COINCe que dans un sens.... j'arrive pas à saisir pourquoi. :grin:

j'ai bien plusieurs raps, mais une seule clef wifi, sinon j'aurais testé la chose.

donne le résulta de netstat -r

testes ca
route add -net 10.0.0.0/24 192.168.1.1
route add -host 10.0.0.1 netmask 255.255.255.0 gw 192.168.1.1

raspiwifi

root@raspiwifi:/home/pi# netstat -r
Table de routage IP du noyau
Destination     Passerelle      Genmask         Indic   MSS Fenêtre irtt Iface
default         192.168.1.1     0.0.0.0         UG        0 0          0 wlan0
default         192.168.1.1     0.0.0.0         UG        0 0          0 wlan0
10.0.0.0        *               255.255.255.0   U         0 0          0 wlan1
link-local      *               255.255.0.0     U         0 0          0 wlan1
192.168.1.0     *               255.255.255.0   U         0 0          0 wlan0

raspicam

root@raspicam:/home/pi# netstat -r
Table de routage IP du noyau
Destination     Passerelle      Genmask         Indic   MSS Fenêtre irtt Iface
default         raspiwifi       0.0.0.0         UG        0 0          0 wlan0
default         10.0.0.1        0.0.0.0         UG        0 0          0 wlan0
10.0.0.0        *               255.255.255.0   U         0 0          0 wlan0
192.168.1.0     *               255.255.255.0   U         0 0          0 wlan0
root@raspiwifi:/home/pi# route add -net 10.0.0.0/24 192.168.1.1
SIOCADDRT: Aucun périphérique de ce type
root@raspiwifi:/home/pi# route add -host  10.0.0.1 netmask 255.255.255.0 gw  192.168.1.1
route: netmask 000000ff n'a pas de sens pour une route vers un hôte
Syntaxe: route [-nNvee] [-FC] [<AF>]           Liste les tables de routage noyau
       route [-v] [-FC] {add|del|flush} ...  Modifie la table de routage pour AF.

       route {-h|--help} [<AF>]              Utilisation détaillée pour l'AF spécifié.
       route {-V|--version}                  Affiche la version/auteur et termine.

        -v, --verbose            mode verbeux
        -n, --numeric            don't resolve names
        -e, --extend             display other/more information
        -F, --fib                display Forwarding Information Base (default)
        -C, --cache              affiche le cache de routage au lieu de FIB

  <AF>=Use '-A <af>' or '--<af>'; default: inet
  Liste les familles d'adresses possibles (supportant le routage):
    inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25) 
    netrom (AMPR NET/ROM) ipx (Novell IPX) ddp (Appletalk DDP) 
    x25 (CCITT X.25)

Je suis pas sur qu'il apprécie vraiment.... :grin:

Je sais pas si ça peut aider ...

root@raspiwifi:/home/pi# ip route
default via 192.168.1.1 dev wlan0 
default via 192.168.1.1 dev wlan0  metric 303 
10.0.0.0/24 dev wlan1  proto kernel  scope link  src 10.0.0.1 
169.254.0.0/16 dev wlan1  proto kernel  scope link  src 169.254.241.37  metric 304 
192.168.1.0/24 dev wlan0  proto kernel  scope link  src 192.168.1.68  metric 303
root@raspicam:/home/pi# ip route
default via 192.168.1.80 dev wlan0 
default via 10.0.0.1 dev wlan0  metric 303 
10.0.0.0/24 dev wlan0  proto kernel  scope link  src 10.0.0.102  metric 303 
192.168.1.0/24 dev wlan0  proto kernel  scope link  src 192.168.1.74

route add -host 10.0.0.1 netmask 255.255.255.0 gw 192.168.1.80 wlan1
route add -net 10.0.0.0/24 gw 192.168.1.80 wlan1

que vient faire 169.254.0.0/16 dev wlan1 proto kernel scope link src 169.254.241.37 metric 304
zarbi, dommage, je ne suis pas à la porte d'à coté.

root@raspiwifi:/home/pi# route add -host  10.0.0.1 netmask 255.255.255.0 gw  192.168.1.80 wlan1
route: netmask 000000ff n'a pas de sens pour une route vers un hôte
Syntaxe: route [-nNvee] [-FC] [<AF>]           Liste les tables de routage noyau
       route [-v] [-FC] {add|del|flush} ...  Modifie la table de routage pour AF.

       route {-h|--help} [<AF>]              Utilisation détaillée pour l'AF spécifié.
       route {-V|--version}                  Affiche la version/auteur et termine.

        -v, --verbose            mode verbeux
        -n, --numeric            don't resolve names
        -e, --extend             display other/more information
        -F, --fib                display Forwarding Information Base (default)
        -C, --cache              affiche le cache de routage au lieu de FIB

  <AF>=Use '-A <af>' or '--<af>'; default: inet
  Liste les familles d'adresses possibles (supportant le routage):
    inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25) 
    netrom (AMPR NET/ROM) ipx (Novell IPX) ddp (Appletalk DDP) 
    x25 (CCITT X.25)
root@raspiwifi:/home/pi# route add -net 10.0.0.0/24 gw 192.168.1.80 wlan1
SIOCADDRT: Le réseau n'est pas accessible

Je me suis fait la même réflexion en voyant ces ip sortie de nulle part... :o

Un article intéressant : IP route

root@raspiwifi:/home/pi# route -n
Table de routage IP du noyau
Destination     Passerelle      Genmask         Indic Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 wlan0
0.0.0.0         192.168.1.1     0.0.0.0         UG    303    0        0 wlan0
10.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 wlan1
169.254.0.0     0.0.0.0         255.255.0.0     U     304    0        0 wlan1
192.168.1.0     0.0.0.0         255.255.255.0   U     303    0        0 wlan0
root@raspicam:/home/pi# route -n
Table de routage IP du noyau
Destination     Passerelle      Genmask         Indic Metric Ref    Use Iface
0.0.0.0         192.168.1.80    0.0.0.0         UG    0      0        0 wlan0
0.0.0.0         10.0.0.1        0.0.0.0         UG    303    0        0 wlan0
10.0.0.0        0.0.0.0         255.255.255.0   U     303    0        0 wlan0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0

dans le syslog du raspiwifi

Jan  5 21:51:50 raspiwifi dnsmasq-dhcp[541]: DHCPACK(wlan1) 10.0.0.149 34:15:9e:8b:6a:f4 MacBook
Jan  5 21:52:09 raspiwifi dhcpcd[764]: wlan1: using IPv4LL address 169.254.241.37
Jan  5 21:52:09 raspiwifi dhcpcd[764]: wlan1: adding route to 169.254.0.0/16
Jan  5 21:52:09 raspiwifi avahi-daemon[421]: Registering new address record for 169.254.241.37 on wlan1.IPv4.
Jan  5 21:52:10 raspiwifi ntpd[783]: Listen normally on 9 wlan1 169.254.241.37 UDP 123
Jan  5 21:51:49 raspiwifi dnsmasq-dhcp[541]: DHCPREQUEST(wlan1) 10.0.0.102 c4:e9:84:1e:2e:19
Jan  5 21:51:49 raspiwifi dnsmasq-dhcp[541]: DHCPACK(wlan1) 10.0.0.102 c4:e9:84:1e:2e:19 raspicam
Jan  5 21:51:49 raspiwifi dnsmasq-dhcp[541]: L'option dhcp-option redondante 3 sera ignorée
Jan  5 21:51:49 raspiwifi dnsmasq-dhcp[541]: ne donne pas de nom raspicam au bail DHCP de 10.0.0.102 parce-que le nom existe dans /etc/hosts avec l'adresse 192.168.1.74

Je sais pas si c'est normal pour l'ipv6

Jan  5 21:51:46 raspiwifi dhcpcd[764]: wlan1: soliciting an IPv6 router
Jan  5 21:51:46 raspiwifi dhcpcd[764]: wlan1: soliciting a DHCP lease
Jan  5 21:51:45 raspiwifi dnsmasq[541]: Lecture de /var/run/dnsmasq/resolv.conf
Jan  5 21:51:45 raspiwifi dnsmasq[541]: utilise le serveur de nom 192.168.1.1#53

ça non plus je ne suis pas sur que ce soit normal vu que wlan0 a une ip fixe dans interfaces qui finit par "80"

Jan  5 21:51:37 raspiwifi dhcpcd[408]: DUID 00:01:00:01:1d:e3:a0:2f:b8:27:eb:7d:93:47
Jan  5 21:51:37 raspiwifi dhcpcd[408]: wlan0: IAID 84:18:58:94
Jan  5 21:51:37 raspiwifi dhcpcd[408]: wlan1: waiting for carrier
Jan  5 21:51:38 raspiwifi dhcpcd[408]: wlan0: soliciting an IPv6 router
Jan  5 21:51:38 raspiwifi dhcpcd[408]: wlan0: rebinding lease of 192.168.1.68
Jan  5 21:51:43 raspiwifi dhcpcd[408]: wlan0: leased 192.168.1.68 for 86400 seconds
Jan  5 21:51:43 raspiwifi dhcpcd[408]: wlan0: adding route to 192.168.1.0/24

Question bete, tu as fait un
/etc/init.d/network restart ou reboot direct?

Donnes iptables -L -n

Edit
Desactives ipv6
Donnes la conf dhcpd.conf

Un reboot mais je mets les règles iptables dans /etc/network/if-up.d/router.sh qui est appelé à chaque démarrage.

root@raspiwifi:/home/pi# iptables -L -n
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            state RELATED,ESTABLISHED
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
ACCEPT     all  --  192.168.0.0/24       0.0.0.0/0            ctstate NEW
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

J'ai pas dhcp, mais dnsmasq

Je désactive où ipv6 ?

Edit:

j'ai dhcp3 et dhcpcd.conf, ça pourrait faire un conflit avec dnsmasq ?

A sample configuration for dhcpcd.

See dhcpcd.conf(5) for details.

Allow users of this group to interact with dhcpcd via the control socket.

#controlgroup wheel

Inform the DHCP server of our hostname for DDNS.

hostname

Use the hardware address of the interface for the Client ID.

clientid

or

Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.

#duid

Persist interface configuration when dhcpcd exits.

persistent

Rapid commit support.

Safe to enable by default because it requires the equivalent option set

on the server to actually work.

option rapid_commit

A list of options to request from the DHCP server.

option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes

Most distributions have NTP support.

option ntp_servers

Respect the network MTU.

Some interface drivers reset when changing the MTU so disabled by default.

#option interface_mtu

A ServerID is required by RFC2131.

require dhcp_server_identifier

Generate Stable Private IPv6 Addresses instead of hardware based ones

slaac private

A hook script is provided to lookup the hostname if not set by the DHCP

server, but it should not be run by default.

nohook lookup-hostname

En attendant de trouver ce qui ne va pas, j'ai acheté un répéteur... ce qui sera peut-être la solution définitive.

Cet après-midi lors de mes essais avec ce nouvel appareil, j'ai eu pas mal de soucis avec mon réseau wlan, cela s'est soldé par un appel à l'assistance de mon FAI et un reset de mon routeur-wifi.

Je n'ai pas encore pu faire d'essai, mais je me demande si tout ces soucis ne venait pas de ce dernier.... :grin:

Je vais refaire une clean install de mon raspiwifi, j'ai tellement touché de trucs à droite et à gauche.... et je referai un essai.

:grin: :grin: :grin: