Hi all,
Just like another user my internet connection comes via ethernet and I want to use the SFP port as a LAN port instead, mostly because its fun. I have a Turris Omnia 2020, and AFAIU the thread indicates that it should be possible, but I fail to figure out how to do it.
l am familiar to Linux and networking, but OpenWRT and uci is completely new to me, and I have failed to find any documentation that matches what’s configured by default in Turrisos 6.4.1 and Turris Omnia 2020.
When I plug in a SFP module, the Ethernet WAN port stops working as expected. Instead I therefore assume that I need to use one of lan0 - lan4 as WAN port for ISP traffic. The documentation indicates that eth0 and eth1 on the SOC are both connected separate ports on a “fully managed switch” together with lan0 - lan4, and that lan0 - lan3 should be connected to eth0 via port 5 while lan4 should be connected to eth1 via port 6 on the switch.
Unfortunately this does not at all reflect what the uci
configuration or the command ip link
shows. See the quoted command outputs below. Instead it appears that eth0 is DOWN by default, and lan0 - lan4 are all connected to eth1. The uci network section makes no reference to neither eth0 nor eth1, so no hint about how that is configured there. Only eth2 is explicitly referenced in the wan interface section. Hence it isn’t apparent to me how the lanX interfaces are connected to eth1, if that’s configurable, and if so how I can change that.
So, I’d be grateful if someone could help me get going here.
BTW, I have not found which tool to use to list and manage the switch or query which switch port is connected to what network interface by default. Neither uci export
nor the command swconfig
provides any hints.
Thanks in advance!
root@turris:~# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1024
link/ether d8:58:d7:01:d5:4a brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1508 qdisc mq state UP mode DEFAULT group default qlen 1024
link/ether d8:58:d7:01:d5:48 brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1024
link/ether d8:58:d7:01:d5:49 brd ff:ff:ff:ff:ff:ff
5: lan0@eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP mode DEFAULT group default qlen 1000
link/ether d8:58:d7:01:d5:48 brd ff:ff:ff:ff:ff:ff
6: lan1@eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN mode DEFAULT group default qlen 1000
link/ether d8:58:d7:01:d5:48 brd ff:ff:ff:ff:ff:ff
7: lan2@eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN mode DEFAULT group default qlen 1000
link/ether d8:58:d7:01:d5:48 brd ff:ff:ff:ff:ff:ff
8: lan3@eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN mode DEFAULT group default qlen 1000
link/ether d8:58:d7:01:d5:48 brd ff:ff:ff:ff:ff:ff
9: lan4@eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN mode DEFAULT group default qlen 1000
link/ether d8:58:d7:01:d5:48 brd ff:ff:ff:ff:ff:ff
10: ip6tnl0@NONE: <NOARP> mtu 1452 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/tunnel6 :: brd :: permaddr da49:778c:84::
11: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/sit 0.0.0.0 brd 0.0.0.0
12: gre0@NONE: <NOARP> mtu 1476 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/gre 0.0.0.0 brd 0.0.0.0
13: gretap0@NONE: <BROADCAST,MULTICAST> mtu 1462 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
14: erspan0@NONE: <BROADCAST,MULTICAST> mtu 1450 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
46: br-guest-turris: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
link/ether 8a:0e:ef:ce:64:57 brd ff:ff:ff:ff:ff:ff
47: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether 9c:b7:0d:d5:bb:bd brd ff:ff:ff:ff:ff:ff
48: wlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP mode DEFAULT group default qlen 1000
link/ether 9c:b7:0d:d5:bb:bd brd ff:ff:ff:ff:ff:ff
49: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP mode DEFAULT group default qlen 1000
link/ether c4:4b:d1:90:19:1f brd ff:ff:ff:ff:ff:ff
root@turris:~# uci export network
package network
config interface 'loopback'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
option device 'lo'
config globals 'globals'
option ula_prefix 'fd38:eb19:6663::/48'
config interface 'lan'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
option device 'br-lan'
config interface 'wan'
option proto 'dhcp'
option ipv6 '1'
option device 'eth2'
config interface 'guest_turris'
option enabled '1'
option proto 'static'
option ipaddr '10.111.222.1'
option netmask '255.255.255.0'
option device 'br-guest-turris'
config interface 'wan6'
option proto 'dhcpv6'
option device '@wan'
config device 'br_lan'
option name 'br-lan'
option bridge_empty '1'
list ports 'lan0'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
option type 'bridge'
config device 'br_guest_turris'
option bridge_empty '1'
option type 'bridge'
option name 'br-guest-turris'