Ajouter pont Jeedom impossible: 2 interfaces dans HomeBridge eth0 et wlan0

en ligne de commande tape :

sudo route
1 « J'aime »
pi@raspberrypi:~ $ sudo route
Table de routage IP du noyau
Destination     Passerelle      Genmask         Indic Metric Ref    Use Iface
default         www.huaweimobil 0.0.0.0         UG    0      0        0 wlan0
default         192.168.1.1     0.0.0.0         UG    100    0        0 eth0
10.14.0.1       10.14.7.225     255.255.255.255 UGH   0      0        0 tun0
10.14.7.225     0.0.0.0         255.255.255.255 UH    0      0        0 tun0
192.168.1.0     0.0.0.0         255.255.255.0   U     100    0        0 eth0
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0

default Huwai … bon, comme vous l’imaginiez, c’est mon principal problème donc

sudo cat /etc/network/interfaces

Yep il faut changer la metric pour mettre en prio eth :slight_smile:

et sudo cat /etc/dhcpcd.conf

(héhé doucement ! je sais même pas ce que veux dire > changer la métric. Je suis à fond sur Google là :stuck_out_tongue:

je vais vous l’expliquer, mais donnez le contenu des deux fichiers, afin qu’on soit certain

1 « J'aime »

Nebz vous passe toutes les commandes :slight_smile:

1 « J'aime »

sudo cat /etc/network/interfaces:

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
# iface wlan0 inet static
source-directory /etc/network/interfaces.d
allow-hotplug wlan0
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Puis sudo cat /etc/dhcpcd.conf:

# 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.
# Some non-RFC compliant DHCP servers do not reply with this set.
# In this case, comment out duid and enable clientid above.
#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
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu

# Most distributions have NTP support.
#option ntp_servers

# A ServerID is required by RFC2131.
#require dhcp_server_identifier

# Generate SLAAC address using the Hardware Address of the interface
#slaac hwaddr
# OR generate Stable Private IPv6 Addresses based from the DUID
slaac private

# Example static IP configuration:
#interface eth0
#static ip_address=192.168.1.95/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
#static routers=192.168.1.1
#static domain_name_servers=192.168.0.1 8.8.8.8 fd51:42f8:caae:d92e::1
 #interface wlan0
 #static ip_address=192.168.1.95/24
 #static routers=192.168.1.1
 #static domain_name_servers=192.168.1.1

# It is possible to fall back to a static IP if DHCP fails:
# define static profile
#profile static_eth0
#static ip_address=192.168.1.23/24
#static routers=192.168.1.1
#static domain_name_servers=192.168.1.1
interface eth0
static ip_address=192.168.1.95/24

interface wlan0
static ip_adress=192.168.2.1/24

static routers=192.168.1.1
static domain_name_servers=192.168.1.1

# fallback to static profile on eth0
interface eth0
fallback static_eth0

Rien qu’à relire, je vois que j’ai fait pas mal de test à une époque :stuck_out_tongue: j’ai du embrouiller tout le Réseau.

interface eth0
static ip_address=192.168.1.95/24
metric 0

interface wlan0
static ip_adress=192.168.2.1/24
metric 100

dans la dernière partie du fichier dhcpcd.conf, ajoutez la ligne metric pour chaque interface et reboot

D’acc.
Plus la metric est basse plus elle est « prioritaire » c’est bien ca ?

exactement

J’en arrive au même résultat => Accessoire Introuvable.
Je me disais: vu que c’est le plugin Huawei qui se connecte au routeur 4G via son adresse ip 192.18.2.1 avec Login et MDP, autant que j’enlève en commentant cette partie :

#interface wlan0
#static ip_adress=192.168.2.1/24
#metric 100

Pareil ici, non ?

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
# iface wlan0 inet static


#source-directory /etc/network/interfaces.d
#allow-hotplug wlan0
#auto wlan0
#iface wlan0 inet dhcp
#source-directory /etc/network/interfaces.d
#allow-hotplug wlan0
#auto wlan0
#iface wlan0 inet dhcp
#wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

je connais pas le mode de fonctionnement de ce plugin, en fait vous devriez peut-etre contacter son developpeur, si ca tombe c’est lui qui modifie la metric !!

1 « J'aime »

C’est une carte à jouer je vous l’accorde :slight_smile:

On arrive à ma solution de début à virer le wlan

1 « J'aime »

Bon, ca fonctionne !! Sur le principe, Homebridge refonctionne parfaitement depuis que j’ai viré wlan0 oui :slight_smile: et reste sur 192.168.1.95.
Par contre, mon réseau 4G qui faisait office de réseau internet de secours si ma box se coupe, ne fonctionne plus.
Il y a du bon, et du moins bon

oui mais ca on le savait depuis le début que virer le wlan0 résolvait le problème, le tout est de les faire cohabiter

C’est bizarre quand même que ca ne fonctionne pas avec la metric