[Solved] Duplicate Interface

I was trying to setup a relay to extend my third-party firmware router with n OpenWrt router as I mentioned here. AP+Sta on dual-band router, or Relay - from a third party router to OpenWrt.

It's not working, yet, but I also noticed that for some reason I am seeing duplicate interfaces in LuCI. It's Archer C7 with 2 radios, but I have 5 GHz band off.

I checked /etc/config/network and that's not shown there. Also in the LuCI in the interfaces pages, or using ifconfig -a, no duplicates are shown.

/etc/config/network

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fd65:9350:dea5::/48'

config interface 'lan'
	option type 'bridge'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option mtu '1420'
	option ipaddr '192.168.2.1'
	option stp '1'
	option igmp_snooping '1'
	option ifname 'eth1.1'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option vid '1'
	option ports '0t 2 3 4 5'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '1 6t'
	option vid '2'

config interface 'WAN_IP'
	option proto 'dhcp'
	option ifname 'eth0.2'
	option clientid 'root'
	option auto '0'

config interface 'WAN6_IP'
	option proto 'dhcpv6'
	option ifname 'eth0.2'
	option reqaddress 'try'
	option reqprefix 'auto'
	option clientid 'root'
	option auto '0'

config interface 'WAN_PPPoE'
	option proto 'pppoe'
	option ifname 'eth0.2'
	option username '132907@tedata.net.eg'
	option password '44846573'
	option ipv6 'auto'
	option mtu '1420'
	option auto '0'

config interface 'wwan'
	option proto 'static'
	option ipaddr '192.168.1.2'
	option netmask '255.255.255.0'
	option gateway '192.168.1.1'
	option dns '192.168.1.1 8.8.8.8'
	option delegate '0'

from SSH


root@C7:~# ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 18:ST:UV:YX:YZ:0f brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP qlen                                                   1000
    link/ether 18:ST:UV:YX:YZ:0e brd ff:ff:ff:ff:ff:ff
6: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1420 qdisc noqueue state UP qle                                                  n 1000
    link/ether 18:ST:UV:YX:YZ:0e brd ff:ff:ff:ff:ff:ff
7: eth1.1@eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master                                                   br-lan state UP qlen 1000
    link/ether 18:ST:UV:YX:YZ:0e brd ff:ff:ff:ff:ff:ff
14: wwan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen                                                   1000
    link/ether 18:ST:UV:YX:YZ:0d brd ff:ff:ff:ff:ff:ff
15: wlan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan                                                   state UP qlen 1000
    link/ether 1a:ST:UV:YX:YZ:0d brd ff:ff:ff:ff:ff:ff

For the MAC addresses in the text above, :ST:UV:YX:YZ: was similar for all listed addresses.

What does your /etc/config/wireless show?

2 Likes
config wifi-device 'radio0'
	option type 'mac80211'
	option channel '36'
	option hwmode '11a'
	option path 'pci0000:01/0000:01:00.0'
	option country 'US'
	option legacy_rates '1'
	option htmode 'HT20'
	option disabled '0'

config wifi-device 'radio1'
	option type 'mac80211'
	option hwmode '11g'
	option path 'platform/qca955x_wmac'
	option htmode 'HT20'
	option country 'US'
	option legacy_rates '1'
	option disabled '0'
	option channel '1'

config wifi-iface 'default_radio1'
	option device 'radio1'
	option network 'wwan'
	option ifname 'wwan'
	option mode 'sta'
	option ssid 'A'
	option bssid '60:ZZ:ZZ:ZZ:ZZ:1A'
	option encryption 'psk2'
	option key 'xyz'

config wifi-iface
	option device 'radio1'
	option ifname 'wlan'
	option mode 'ap'
	option ssid 'T'
	option encryption 'psk2'
	option key 'xyz'
	option network 'lan'

Are you sure your third-party router is also on channel 1?
You can scan with iwinfo radio1 scan

1 Like
opkg update
opkg list-upgradable \
| sed -n -e "/^luci/s/\s.*//p" \
| while read PKG_NAME
do
opkg upgrade "${PKG_NAME}"
done
reboot
1 Like

Yes, it's.

@vgaetera
Thanks. I don't understand how upgrading packages is going to solve the duplicate interfaces. I would have wanted to try it, but in fact before I read your message I went ahead and deleted both wwan interface and both APs. Now all looks good.

1 Like

There's no perfect code, LuCI has its own layer of bugs, upgrade helps in some cases.

2 Likes

While trying to sort out trelay I edited /etc/config/network manually, placing one interface before the other in the text file. It appears that this is what caused the issue, as the duplicate interfaces seem to follow that order (lan, wwan, waan, lan).

2 Likes

It appears that adding ifname to a wireless in /etc/config/wireless is the reason.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.