Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#2141 - On router Linksys EA6350v3, Luci shows missing port on switch0 #6992

Open
openwrt-bot opened this issue Feb 23, 2019 · 1 comment
Labels

Comments

@openwrt-bot
Copy link

gapf2010:

Hi!

I am using OpenWRT development from Feb21 on my Linksys EA6350v3 router. So far, everything works fine, however I am trying to setup the WAN port with a VLAN, but if I access: Luci -> Network -> Switch it only displays the CPU port and the 4 LAN ports, the WAN port is not displayed, but if I access the router via SSH, then the port is there on swconfig:

root@wl:~# swconfig dev switch0 show
Global attributes:
enable_vlan: 1
enable_mirror_rx: 0
enable_mirror_tx: 0
mirror_monitor_port: 0
mirror_source_port: 0
linkdown: ???
Port 0:
mib: Port 0 MIB counters
RxBroad : 722
RxPause : 0
RxMulti : 2898
RxFcsErr : 0
RxAlignErr : 0
RxRunt : 0
RxFragment : 0
Rx64Byte : 34565
Rx128Byte : 717134
Rx256Byte : 12692
Rx512Byte : 7510
Rx1024Byte : 7809
Rx1518Byte : 141976
RxMaxByte : 193165
RxTooLong : 0
RxGoodByte : 573563874
RxBadByte : 0
RxOverFlow : 0
Filtered : 4
TxBroad : 3813
TxPause : 0
TxMulti : 73600
TxUnderRun : 0
Tx64Byte : 62619
Tx128Byte : 115302
Tx256Byte : 15655
Tx512Byte : 41091
Tx1024Byte : 34454
Tx1518Byte : 2869708
TxMaxByte : 0
TxOverSize : 0
TxByte : 4378564661
TxCollision : 0
TxAbortCol : 0
TxMultiCol : 0
TxSingleCol : 0
TxExcDefer : 0
TxDefer : 0
TxLateCol : 0

pvid: 1
link: port:0 link:up speed:1000baseT full-duplex txflow rxflow 

Port 1:
mib: Port 1 MIB counters
RxBroad : 10
RxPause : 0
RxMulti : 126
RxFcsErr : 0
RxAlignErr : 0
RxRunt : 0
RxFragment : 0
Rx64Byte : 40
Rx128Byte : 534
Rx256Byte : 313
Rx512Byte : 38
Rx1024Byte : 18
Rx1518Byte : 15
RxMaxByte : 0
RxTooLong : 0
RxGoodByte : 141761
RxBadByte : 0
RxOverFlow : 0
Filtered : 13
TxBroad : 180
TxPause : 0
TxMulti : 367
TxUnderRun : 0
Tx64Byte : 335
Tx128Byte : 362
Tx256Byte : 279
Tx512Byte : 216
Tx1024Byte : 29
Tx1518Byte : 52
TxMaxByte : 0
TxOverSize : 0
TxByte : 274900
TxCollision : 0
TxAbortCol : 0
TxMultiCol : 0
TxSingleCol : 0
TxExcDefer : 0
TxDefer : 0
TxLateCol : 0

pvid: 1
link: port:1 link:down

Port 2:
mib: Port 2 MIB counters
RxBroad : 0
RxPause : 0
RxMulti : 0
RxFcsErr : 0
RxAlignErr : 0
RxRunt : 0
RxFragment : 0
Rx64Byte : 0
Rx128Byte : 0
Rx256Byte : 0
Rx512Byte : 0
Rx1024Byte : 0
Rx1518Byte : 0
RxMaxByte : 0
RxTooLong : 0
RxGoodByte : 0
RxBadByte : 0
RxOverFlow : 0
Filtered : 0
TxBroad : 4419
TxPause : 0
TxMulti : 76469
TxUnderRun : 0
Tx64Byte : 46240
Tx128Byte : 1084
Tx256Byte : 2641
Tx512Byte : 28047
Tx1024Byte : 2915
Tx1518Byte : 1
TxMaxByte : 0
TxOverSize : 0
TxByte : 18438433
TxCollision : 0
TxAbortCol : 0
TxMultiCol : 0
TxSingleCol : 0
TxExcDefer : 0
TxDefer : 0
TxLateCol : 0

pvid: 1
link: port:2 link:up speed:100baseT full-duplex txflow rxflow auto

Port 3:
mib: Port 3 MIB counters
RxBroad : 0
RxPause : 0
RxMulti : 0
RxFcsErr : 0
RxAlignErr : 0
RxRunt : 0
RxFragment : 0
Rx64Byte : 0
Rx128Byte : 0
Rx256Byte : 0
Rx512Byte : 0
Rx1024Byte : 0
Rx1518Byte : 0
RxMaxByte : 0
RxTooLong : 0
RxGoodByte : 0
RxBadByte : 0
RxOverFlow : 0
Filtered : 0
TxBroad : 4419
TxPause : 0
TxMulti : 76469
TxUnderRun : 0
Tx64Byte : 46240
Tx128Byte : 1084
Tx256Byte : 2641
Tx512Byte : 28047
Tx1024Byte : 2915
Tx1518Byte : 1
TxMaxByte : 0
TxOverSize : 0
TxByte : 18438433
TxCollision : 0
TxAbortCol : 0
TxMultiCol : 0
TxSingleCol : 0
TxExcDefer : 0
TxDefer : 0
TxLateCol : 0

pvid: 1
link: port:3 link:up speed:1000baseT full-duplex auto

Port 4:
mib: Port 4 MIB counters
RxBroad : 3765
RxPause : 0
RxMulti : 73151
RxFcsErr : 0
RxAlignErr : 0
RxRunt : 0
RxFragment : 0
Rx64Byte : 62113
Rx128Byte : 115122
Rx256Byte : 15386
Rx512Byte : 40931
Rx1024Byte : 34440
Rx1518Byte : 2869706
RxMaxByte : 0
RxTooLong : 0
RxGoodByte : 4378395323
RxBadByte : 0
RxOverFlow : 0
Filtered : 11
TxBroad : 379
TxPause : 0
TxMulti : 2755
TxUnderRun : 0
Tx64Byte : 34306
Tx128Byte : 717333
Tx256Byte : 12274
Tx512Byte : 7258
Tx1024Byte : 7735
Tx1518Byte : 335099
TxMaxByte : 0
TxOverSize : 0
TxByte : 569081244
TxCollision : 0
TxAbortCol : 0
TxMultiCol : 0
TxSingleCol : 0
TxExcDefer : 0
TxDefer : 0
TxLateCol : 0

pvid: 1
link: port:4 link:up speed:1000baseT full-duplex txflow rxflow auto

Port 5:
mib: Port 5 MIB counters
RxBroad : 38
RxPause : 0
RxMulti : 323
RxFcsErr : 0
RxAlignErr : 0
RxRunt : 0
RxFragment : 0
Rx64Byte : 526
Rx128Byte : 312
Rx256Byte : 54
Rx512Byte : 205
Rx1024Byte : 23
Rx1518Byte : 30
RxMaxByte : 0
RxTooLong : 0
RxGoodByte : 217499
RxBadByte : 0
RxOverFlow : 0
Filtered : 9
TxBroad : 348
TxPause : 0
TxMulti : 259
TxUnderRun : 0
Tx64Byte : 344
Tx128Byte : 406
Tx256Byte : 200
Tx512Byte : 199
Tx1024Byte : 20
Tx1518Byte : 13
TxMaxByte : 0
TxOverSize : 0
TxByte : 194389
TxCollision : 0
TxAbortCol : 0
TxMultiCol : 0
TxSingleCol : 0
TxExcDefer : 0
TxDefer : 0
TxLateCol : 0

pvid: 1
link: port:5 link:down

VLAN 1:
vid: 1
ports: 0 1 2 3 4 5
VLAN 2:
vid: 2
ports: 0t 5t
root@wl:~#

So the firmware knows there is an additional port in the switch, it's just Luci that does not display it.

For extra info, here's the OpenWRT version I am running:

BusyBox v1.30.1 () built-in shell (ash)


| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -| || | | || || |
|
_____|| |
||||___||| |____|
|
| W I R E L E S S F R E E D O M

OpenWrt SNAPSHOT, r9414-2d13945

Thanks in advance for your help with this, very appreciated.

@openwrt-bot
Copy link
Author

gapf2010:

To add more information about this, Here are the /etc/board.json and /etc/board.d/02_network files:

/etc/board.json
{
"model": {
"id": "linksys,ea6350v3",
"name": "Linksys EA6350v3"
},
"network": {
"lan": {
"ifname": "eth0",
"protocol": "static",
"macaddr": "60:38:e0:70:9b:78"
},
"wan": {
"ifname": "eth1",
"protocol": "dhcp",
"macaddr": "60:38:e0:70:9b:77"
}
},
"switch": {
"switch0": {
"enable": true,
"reset": true,
"ports": [
{
"num": 0,
"device": "eth0",
"need_tag": false,
"want_untag": true
},
{
"num": 1,
"role": "lan"
},
{
"num": 2,
"role": "lan"
},
{
"num": 3,
"role": "lan"
},
{
"num": 4,
"role": "lan"
}
],
"roles": [
{
"role": "lan",
"ports": "1 2 3 4 0",
"device": "eth0"
}
]
}
}
}

/etc/board.d/02_network :
#!/bin/sh

Copyright (c) 2015 The Linux Foundation. All rights reserved.

Copyright (c) 2011-2015 OpenWrt.org

. /lib/functions/uci-defaults.sh
. /lib/functions/system.sh

ipq40xx_setup_interfaces()
{
local board="$1"

case "$board" in
8dev,jalapeno)
	ucidef_set_interfaces_lan_wan "eth0" "eth1"
	;;
asus,map-ac2200|\
openmesh,a42|\
openmesh,a62)
	ucidef_set_interfaces_lan_wan "eth1" "eth0"
	;;
asus,rt-ac58u|\
zyxel,nbg6617)
	ucidef_set_interfaces_lan_wan "eth0" "eth1"
	ucidef_add_switch "switch0" \
		"0u@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
	;;
avm,fritzbox-4040|\
linksys,ea6350v3)
	ucidef_set_interfaces_lan_wan "eth0" "eth1"
	ucidef_add_switch "switch0" \
		"0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
	;;
compex,wpj428)
	ucidef_set_interface_lan "eth0 eth1"
	;;
engenius,eap1300|\
meraki,mr33|\
netgear,ex6100v2|\
netgear,ex6150v2|\
zyxel,wre6606)
	ucidef_set_interface_lan "eth0"
	;;
glinet,gl-b1300)
	ucidef_set_interfaces_lan_wan "eth0" "eth1"
	ucidef_add_switch "switch0" \
		"0u@eth0" "3:lan" "4:lan"
	;;
*)
	echo "Unsupported hardware. Network interfaces not initialized"
	;;
esac

}

ipq40xx_setup_macs()
{
local board="$1"

case "$board" in
asus,rt-ac58u)
	CI_UBIPART=UBI_DEV
	wan_mac=$(mtd_get_mac_binary_ubi Factory 20486)
	lan_mac=$(mtd_get_mac_binary_ubi Factory 4102)
	;;
linksys,ea6350v3)
	wan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
	lan_mac=$(macaddr_add "$wan_mac" 1)
	;;
esac

    [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
    [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac

}

board_config_update
board=$(board_name)
ipq40xx_setup_interfaces $board
ipq40xx_setup_macs $board
board_config_flush

exit 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant