Default route is vanishing

As it can be observed in the above picture, the default route is vanishing but the interface is present in ifconfig as a result I am not able to ping from that particular interface.

Any suggestions.

Thanks

uci show network
1 Like

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.ipaddr='192.168.1.1'
network.lan.netmask='255.255.255.0'
network.lan.ip6assign='60'
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/ttyUSB2'
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/ttyUSB6'
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'

I have observed one more thing. When I type ifconfig, 3g-wanSIM0 is not showing up but if I give ifconfig 3g-wanSIM0, then its showing up with IP address

My impression was, if interface doesn't show up in ifconfig, then it shouldn't also show up in ifconfig <interface_name>. It might show up in ifconfig -a

ifstatus wanSIM0

Interface 3g-wanSIM0 not found

ubus call system board
1 Like
{
	"kernel": "4.9.44",
	"hostname": "iotgateway",
	"system": "ARMv7 Processor rev 3 (v7l)",
	"model": "Bananapi BPI-R2",
	"board_name": "bananapi,bpi-r2",
	"release": {
		"distribution": "XXXXXX",
		"version": "1.0.0.0",
		"revision": "r5139-9ce668e",
		"codename": "reboot",
		"target": "mediatek\/32",
		"description": "XXXXXXXXXX"
	}
}

It looks quite old.
You should consider firmware upgrade.
The issue might be already fixed in the later releases.

ok. Thanks for suggestion.

Any pointers for this default route problem ?

Just to clarify:
Can you ping your P-t-P partner 10.64.64.65?
Can you reach the internet, if you manually set a default route?

1 Like
ip route show table all; ip rule show

When I am trying to set default route it says Network Unreachable.

SIM1 is working fine now. But issue is present with SIM0

default via 10.64.64.65 dev 3g-wanSIM1 proto static metric 20 
10.64.64.65 dev 3g-wanSIM1 proto kernel scope link src 10.3.150.81 
192.168.1.0/24 dev br-lan proto kernel scope link src 192.168.1.1 
239.255.255.250 dev br-lan scope link 
local 10.3.150.81 dev 3g-wanSIM1 table local proto kernel scope host src 10.3.150.81 
broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1 
local 127.0.0.0/8 dev lo table local proto kernel scope host src 127.0.0.1 
local 127.0.0.1 dev lo table local proto kernel scope host src 127.0.0.1 
local 127.0.0.2 dev lo table local proto kernel scope host src 127.0.0.1 
broadcast 127.255.255.255 dev lo table local proto kernel scope link src 127.0.0.1 
broadcast 192.168.1.0 dev br-lan table local proto kernel scope link src 192.168.1.1 
local 192.168.1.1 dev br-lan table local proto kernel scope host src 192.168.1.1 
broadcast 192.168.1.255 dev br-lan table local proto kernel scope link src 192.168.1.1 
unreachable default dev lo proto kernel metric 4294967295 error -101 pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
fe80::/64 dev eth1 proto kernel metric 256 pref medium
fe80::/64 dev br-lan proto kernel metric 256 pref medium
unreachable default dev lo proto kernel metric 4294967295 error -101 pref medium
local ::1 dev lo table local proto unspec metric 0 pref medium
local fe80:: dev lo table local proto unspec metric 0 pref medium
local fe80:: dev lo table local proto unspec metric 0 pref medium
local fe80:: dev lo table local proto unspec metric 0 pref medium
local fe80::7c5e:c7ff:fe9a:3d20 dev lo table local proto unspec metric 0 pref medium
local fe80::d099:e7ff:fe92:31f0 dev lo table local proto unspec metric 0 pref medium
local fe80::d099:e7ff:fe92:31f0 dev lo table local proto unspec metric 0 pref medium
ff00::/8 dev eth0 table local metric 256 pref medium
ff00::/8 dev eth1 table local metric 256 pref medium
ff00::/8 dev br-lan table local metric 256 pref medium
unreachable default dev lo proto kernel metric 4294967295 error -101 pref medium

0:	from all lookup local 
220:	from all lookup 220 
32766:	from all lookup main 
32767:	from all lookup default 

They might conflict with each other.
Try to explicitly specify another routing table:

@vgaetera, what's this?

(I'm used to reading /etc/config/network)

Why are you changing your default route for two devices - upon their connection?

1 Like