Please note, I've done both the br-lan.4
and the br-lan.4@br-lan
queries. The latter is simply a named alias in linux land.
I had previously done the ubus dump but had not noticed this: the get_network_physdev
is looking for openwrt interface names, not linux interfaces (e.g. physdev). This actually explains what the problem is: this line here is retreiving an entry from the configuration set by the luci-app-rp-pppoe-server
front end. However, on that frontend, the drop down is populated with devices, not interfaces. And the configuration will put br-lan.4
which in this case should be PPPoE
. If I use interface names like so:
root@radio-backhaul-001:~# network_get_physdev my_phys "wan" ; echo $my_phys
br-lan.2
root@radio-backhaul-001:~# network_get_physdev my_phys "PPPoE" ; echo $my_phys
br-lan.4
I get the correct behaviour.
Alright, so there are now 4 issues which I can document in a issue report on openwrt project for the rp-pppoe package, and 2 of them are due to a mismatch between configuration format and the LuCI app output format.
I am not yet sure where the LuCI implementation lives, but I can definitely put the issue in for the package.
For reference to your question, dumps below:
root@radio-backhaul-001:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether 96:af:70:e1:b3:c8 brd ff:ff:ff:ff:ff:ff
inet6 fe80::94af:70ff:fee1:b3c8/64 scope link
valid_lft forever preferred_lft forever
3: lan@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
link/ether f4:1e:57:e8:51:11 brd ff:ff:ff:ff:ff:ff
4: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
link/ether f4:1e:57:e8:51:11 brd ff:ff:ff:ff:ff:ff
5: br-lan.10@br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
link/ether f4:1e:57:e8:51:11 brd ff:ff:ff:ff:ff:ff
inet 10.10.0.2/24 brd 10.10.0.255 scope global br-lan.10
valid_lft forever preferred_lft forever
inet6 fe80::f61e:57ff:fee8:5111/64 scope link
valid_lft forever preferred_lft forever
6: br-lan.2@br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
link/ether f4:1e:57:e8:51:11 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.101/24 brd 192.168.1.255 scope global br-lan.2
valid_lft forever preferred_lft forever
inet6 fe80::f61e:57ff:fee8:5111/64 scope link
valid_lft forever preferred_lft forever
8: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1520 qdisc noqueue master br-lan state UP qlen 1000
link/ether f4:1e:57:e8:51:12 brd ff:ff:ff:ff:ff:ff
70: br-lan.4@br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
link/ether f4:1e:57:e8:51:11 brd ff:ff:ff:ff:ff:ff
inet 10.4.0.1/24 brd 10.4.0.255 scope global br-lan.4
valid_lft forever preferred_lft forever
inet6 fe80::f61e:57ff:fee8:5111/64 scope link
valid_lft forever preferred_lft forever
71: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1492 qdisc fq_codel state UNKNOWN qlen 3
link/ppp
inet6 fe80::cdf1:78d4:e1e2:e732/128 scope link flags 02
valid_lft forever preferred_lft forever
81: ppp1: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1484 qdisc fq_codel state UNKNOWN qlen 3
link/ppp
inet 10.4.0.1 peer 10.4.0.10/32 scope global ppp1
valid_lft forever preferred_lft forever
inet6 fe80::f4f1:d059:88c0:1285/128 scope link flags 02
valid_lft forever preferred_lft forever
root@radio-backhaul-001:~# ubus call network.interface dump
{
"interface": [
{
"interface": "PPPoE",
"up": true,
"pending": false,
"available": true,
"autostart": true,
"dynamic": false,
"uptime": 4383,
"l3_device": "br-lan.4",
"proto": "static",
"device": "br-lan.4",
"updated": [
"addresses"
],
"metric": 0,
"dns_metric": 0,
"delegation": true,
"ipv4-address": [
{
"address": "10.4.0.1",
"mask": 24
}
],
"ipv6-address": [
],
"ipv6-prefix": [
],
"ipv6-prefix-assignment": [
],
"route": [
],
"dns-server": [
],
"dns-search": [
],
"neighbors": [
],
"inactive": {
"ipv4-address": [
],
"ipv6-address": [
],
"route": [
],
"dns-server": [
],
"dns-search": [
],
"neighbors": [
]
},
"data": {
}
},
{
"interface": "administration",
"up": true,
"pending": false,
"available": true,
"autostart": true,
"dynamic": false,
"uptime": 347392,
"l3_device": "br-lan.10",
"proto": "dhcp",
"device": "br-lan.10",
"metric": 0,
"dns_metric": 0,
"delegation": true,
"ipv4-address": [
{
"address": "10.10.0.2",
"mask": 24
}
],
"ipv6-address": [
],
"ipv6-prefix": [
],
"ipv6-prefix-assignment": [
],
"route": [
],
"dns-server": [
"10.10.0.1"
],
"dns-search": [
"lan"
],
"neighbors": [
],
"inactive": {
"ipv4-address": [
],
"ipv6-address": [
],
"route": [
{
"target": "0.0.0.0",
"mask": 0,
"nexthop": "10.10.0.1",
"source": "10.10.0.2/32"
}
],
"dns-server": [
],
"dns-search": [
],
"neighbors": [
]
},
"data": {
"dhcpserver": "10.10.0.1",
"hostname": "radio-backhaul-001",
"leasetime": 43200
}
},
{
"interface": "loopback",
"up": true,
"pending": false,
"available": true,
"autostart": true,
"dynamic": false,
"uptime": 412680,
"l3_device": "lo",
"proto": "static",
"device": "lo",
"updated": [
"addresses"
],
"metric": 0,
"dns_metric": 0,
"delegation": true,
"ipv4-address": [
{
"address": "127.0.0.1",
"mask": 8
}
],
"ipv6-address": [
],
"ipv6-prefix": [
],
"ipv6-prefix-assignment": [
],
"route": [
],
"dns-server": [
],
"dns-search": [
],
"neighbors": [
],
"inactive": {
"ipv4-address": [
],
"ipv6-address": [
],
"route": [
],
"dns-server": [
],
"dns-search": [
],
"neighbors": [
]
},
"data": {
}
},
{
"interface": "wan",
"up": true,
"pending": false,
"available": true,
"autostart": true,
"dynamic": false,
"uptime": 346827,
"l3_device": "br-lan.2",
"proto": "dhcp",
"device": "br-lan.2",
"metric": 0,
"dns_metric": 0,
"delegation": true,
"ipv4-address": [
{
"address": "192.168.1.101",
"mask": 24
}
],
"ipv6-address": [
],
"ipv6-prefix": [
],
"ipv6-prefix-assignment": [
],
"route": [
{
"target": "0.0.0.0",
"mask": 0,
"nexthop": "192.168.1.1",
"source": "192.168.1.101/32"
}
],
"dns-server": [
"192.168.1.1"
],
"dns-search": [
],
"neighbors": [
],
"inactive": {
"ipv4-address": [
],
"ipv6-address": [
],
"route": [
],
"dns-server": [
],
"dns-search": [
],
"neighbors": [
]
},
"data": {
"dhcpserver": "192.168.1.1",
"leasetime": 86400
}
}
]
}