Вылезла проблема: возникла необходимость зарезервировать провод eth через gprs, сделал по документации - переключение работает. Настроен bridge - на основном eth1 всё работает, но при переходе на ppp0 не происходит пересоединения с брокером. При переключении обратно на eth1 bridge восстанавливается. Можно конечно костыль приставить, но может проблема в настройках?
Базовые сведения прикладываю…
Имя Версия Архитектура Описание
iproute 1:4.9.0-1+deb9u1
iproute2 4.9.0-1+deb9u1
iputils-ping 3:20161105-1
libmosquitto1:armhf 1.4.15-1+wb7-3
libmosquittopp1:armhf 1.4.15-1+wb7-3
mosquitto 1.4.15-1+wb7-3
mosquitto-clients 1.4.15-1+wb7-3
mqtt-tools 1.2
net-tools 1.60+git20161116.90da8a0-1
netbase 5.4
netplug 1.2.9.2-3
wpasupplicant 2.3-1+deb8u4
wb-hw-version
202109070930
os-release
PRETTY_NAME=“Debian GNU/Linux 9 (stretch)”
NAME=“Debian GNU/Linux”
VERSION_ID=“9”
VERSION=“9 (stretch)”
VERSION_CODENAME=stretch
ID=debian
HOME_URL=“https://www.debian.org/”
SUPPORT_URL=“Debian -- User Support”
BUG_REPORT_URL=“https://bugs.debian.org/”
wb-release
RELEASE_NAME=wb-2110
SUITE=stable
TARGET=wb6/stretch
REPO_PREFIX=
/etc/network/interfaces – configuration file for ifup(8), ifdown(8)
The loopback interface
auto lo
iface lo inet loopback
Wireless interfaces
allow-hotplug wlan0
##iface wlan0 inet dhcp
wpa-ssid wifiessid
wpa-psk wifipassword
iface wlan0 inet static
address 192.168.42.1
netmask 255.255.255.0
auto eth0
iface eth0 inet dhcp
pre-up wb-set-mac
hostname WirenBoard
allow-hotplug eth1
iface eth1 inet dhcp
pre-up wb-set-mac
hostname WirenBoard
wpa-driver wired
wpa_conf /etc/wpa_supplicant.conf
The gsm pptp interface
vvv uncomment block to enable
auto ppp0
iface ppp0 inet ppp
select provider: megafon, mts or beeline below
provider megafon
provider mts
pre-up wb-gsm restart_if_broken
pre-up sleep 10
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.104.101.254 0.0.0.0 UG 0 0 0 eth1
0.0.0.0 0.0.0.0 0.0.0.0 U 100 0 0 ppp0
10.64.64.64 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
10.104.101.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.42.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
mosquitto.conf
Place your local configuration in /etc/mosquitto/conf.d/
A full description of the configuration file is at
/usr/share/doc/mosquitto/examples/mosquitto.conf.example
pid_file /var/run/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
log_dest file /var/log/mosquitto/mosquitto.log
include_dir /etc/mosquitto/conf.d
bridge.conf
#see bridge.conf.example for the example
connection xxxxxxx
address xxxxxxx.ru:1883 xx.xxx.xxx.xxx:1883
notifications true
notification_topic /xx/xxxxxx/log
cleansession true
round_robin true
start_type automatic
remote_clientid WB_xxxxxx
remote_username xxxxxxxxx
remote_password xxxxxxxxx
…
ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether e8:eb:1b:34:93:c5 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.104.101.108 netmask 255.255.255.0 broadcast 10.104.101.255
inet6 fe80::eaeb:1bff:fe33:ff72 prefixlen 64 scopeid 0x20
ether e8:eb:1b:33:ff:72 txqueuelen 1000 (Ethernet)
RX packets 45788855 bytes 3451228726 (3.2 GiB)
RX errors 9000 dropped 0 overruns 0 frame 9000
TX packets 52121190 bytes 449201275 (428.3 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 454764008 bytes 33635549064 (31.3 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 454764008 bytes 33635549064 (31.3 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ppp0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet 10.149.20.65 netmask 255.255.255.255 destination 10.64.64.64
ppp txqueuelen 3 (Point-to-Point Protocol)
RX packets 1363 bytes 110226 (107.6 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1461 bytes 118859 (116.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.42.1 netmask 255.255.255.0 broadcast 192.168.42.255
inet6 fe80::2618:c6ff:fe77:cc7f prefixlen 64 scopeid 0x20
ether 24:18:c6:77:cc:7f txqueuelen 1000 (Ethernet)
RX packets 47490 bytes 5419606 (5.1 MiB)
RX errors 0 dropped 100 overruns 0 frame 0
TX packets 60871 bytes 14928973 (14.2 MiB)
TX errors 0 dropped 3 overruns 0 carrier 0 collisions 0