Interface not coming up or continuously flapping

Hi All,

SIM interfaces are connected to a device using Quectel modules and these interfaces keeps on flapping and some times if goes down, wont come up until the device is rebooted.

The below are the messages I get when I try to ping

  1. ping: sendto: Network unreachable
  2. ping: bad address '3g-wanSIM0'

Can I get any pointers on how to proceed especially when the interface goes down and wont come up.

Thanks

Please post here the output of the following command, copy and paste the whole block:

uci show network

If you have configured anything else, also add it here.

Please use "Preformatted text </>" for logs, scripts, configs and general console output.
grafik

No special configuration has been done and below is the output of "uci show network"

network.loopback=interface
network.loopback.ifname='lo'
network.loopback.proto='static'
network.loopback.ipaddr='127.0.0.1'
network.loopback.netmask='255.0.0.0'
network.lan=interface
network.lan.type='bridge'
network.lan.ifname='lan0 lan1 lan2 lan3'
network.lan.proto='static'
network.lan.netmask='255.255.255.248'
network.lan.ip6assign='60'
network.lan.ipaddr='192.168.1.1'
network.wifi=interface
network.wifi.proto='dhcp'
network.wifi.disabled='0'
network.wanEth0=interface
network.wanEth0.ifname='wan'
network.wanEth0.proto='dhcp'
network.wanEth0.defaultroute='1'
network.wanEth0.metric='0'
network.wanEth0.disabled='0'
network.wanEth0.hostname='iotgateway'
network.wanUSB0=interface
network.wanUSB0.ifname='usb0'
network.wanUSB0.proto='dhcp'
network.wanUSB0.defaultroute='1'
network.wanUSB0.metric='0'
network.wanUSB0.disabled='0'
network.wanSIM0=interface
network.wanSIM0.proto='3g'
network.wanSIM0.metric='10'
network.wanSIM0.disabled='0'
network.wanSIM0.apn='internet'
network.wanSIM0.modes='all'
network.wanSIM0.device='/dev/ttyUSB6'
network.wanSIM0.ifname='3g-wanSIM0'
network.wanSIM1=interface
network.wanSIM1.proto='3g'
network.wanSIM1.metric='20'
network.wanSIM1.disabled='0'
network.wanSIM1.apn='internet'
network.wanSIM1.modes='all'
network.wanSIM1.device='/dev/ttyUSB10'
network.wanSIM1.ifname='3g-wanSIM1'
network.wanSIM2=interface
network.wanSIM2.proto='3g'
network.wanSIM2.metric='30'
network.wanSIM2.disabled='0'
network.wanSIM2.apn='internet'
network.wanSIM2.modes='all'
network.wanSIM2.device='/dev/ttyUSB14'
network.wanSIM2.ifname='3g-wanSIM2'
network.wanSIM3=interface
network.wanSIM3.proto='3g'
network.wanSIM3.metric='40'
network.wanSIM3.disabled='0'
network.wanSIM3.apn='internet'
network.wanSIM3.modes='all'
network.wanSIM3.device='/dev/ttyUSB2'
network.wanSIM3.ifname='3g-wanSIM3'
network.wanSIM4=interface
network.wanSIM4.proto='3g'
network.wanSIM4.metric='50'
network.wanSIM4.disabled='0'
network.eth0=device
network.eth0.name='eth0'
network.lan0=device
network.lan0.name='lan0'
network.lan1=device
network.lan1.name='lan1'
network.lan2=device
network.lan2.name='lan2'
network.lan3=device
network.lan3.name='lan3'

Anything related in the logs?

logread
dmesg

Do they work or they immediately start flapping as soon as the device boots?
Have you tried to connect only one of them at a time?

Not immediately. But after some time it flaps and as mentioned most importantly sometimes it doesn't come up at all.

Wed Sep 11 13:33:01 2019 daemon.notice netifd: Network device '3g-wanSIM0' link is down
Wed Sep 11 13:33:01 2019 daemon.notice netifd: Interface 'wanSIM0' has lost the connection
Wed Sep 11 13:33:01 2019 daemon.notice pppd[17437]: Modem hangup
Wed Sep 11 13:33:01 2019 daemon.notice pppd[17437]: Connection terminated.
Wed Sep 11 13:33:01 2019 daemon.warn dnsmasq[2348]: no servers found in /tmp/resolv.conf.auto, will retry
Wed Sep 11 13:33:02 2019 daemon.info pppd[17437]: Exit.
Wed Sep 11 13:33:02 2019 daemon.notice netifd: Interface 'wanSIM0' is now down
Wed Sep 11 13:33:02 2019 daemon.notice netifd: Interface 'wanSIM0' is setting up now

I have observed these kind of messages and most probably this is the time when the interfaces goes down and comes up. But sometimes, it wont come up.

Check if there are signal strength issues.

There seems to be a workaround for the lost connection. Check at the bottom of this section.