Configure LAN port as WAN

I recently received the GL.inet MT6000. The device has four 1 Gbps and two 2.5 Gbps ports. One of the 2.5 Gbps ports (eth1) is configured for wan. The other 5 ports (lan1-lan5) are used for lan.

I was wondering; Is it possible to configure one of the 1Gbps ports (like lan5) for wan so that the two 2.5 Gbps ports become available for lan?

My current ISP plan is 1000/100 Mbps, so a 1 Gbps wan port is sufficient, but I'm in need for a second 2.5 Gbps lan port

My ' network' is pretty standard.

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

config globals 'globals'
	option ula_prefix 'fd5e:48ff:xxxx::/48'
	option packet_steering '1'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'lan1'
	list ports 'lan2'
	list ports 'lan3'
	list ports 'lan4'
	list ports 'lan5'

config device
	option name 'lan1'
	option macaddr '94:83:c4:a7:xx:xx'

config device
	option name 'lan2'
	option macaddr '94:83:c4:a7:xx:xx'

config device
	option name 'lan3'
	option macaddr '94:83:c4:a7:xx:xx'

config device
	option name 'lan4'
	option macaddr '94:83:c4:a7:xx:xx'

config device
	option name 'lan5'
	option macaddr '94:83:c4:a7:xx:xx'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config device
	option name 'eth1'
	option macaddr '94:83:c4:a7:xx:xx'

config interface 'wan'
	option device 'eth1'
	option proto 'dhcp'

config interface 'wan6'
	option device 'eth1'
	option proto 'dhcpv6'

Should be possible/you can assign them how you wish by redefining br-lan

Have you installed ab official release? Or are you still using GL.inet's "based on OpenWrt" version?

(One of the) latest Openwrt snapshot
OpenWrt SNAPSHOT r24683-4cc6e7192f / LuCI Master git-23.292.78363-ee6a4da

I think you just need to add "eth0" and "eth1" to the list of ports of "br-lan", then move "lan5" to the "wan" and "wan6" interfaces.

You mean something like this?.
But where does eth0 come from?

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'lan1'
	list ports 'lan2'
	list ports 'lan3'
	list ports 'lan4'
	list ports 'eth1'

config interface 'wan'
	option device 'lan5'
	option proto 'dhcp'

config interface 'wan6'
	option device 'lan5'
	option proto 'dhcpv6'

ifconfig

1 Like

eth0 is an internal connection between the CPU and the switching logic for the lanX ports. Don't reference eth0 directly in your configuration. DSA abstracts the fact that there is a switch, and (in the ideal case) you can configure the lanX ports as if they were directly connected to the CPU.

eth1 is a direct link to the wan port. It doesn't go through the switch and is not affected by DSA.

You mentioned two 2.5Gbps ports, and I assumed they are called eth0 and eth1.

@mk24
Are you saying that it is not possible to switch the 2.5 Gbps wan port with a 1 Gbps lanx port because the eth1/wan port is fixed to the cpu?

@eduperez
Look at my original network. The second 2,5 Gbps is referenced as lan1.

@Anemona

/etc/config$ ifconfig
br-lan    Link encap:Ethernet  HWaddr 94:83:C4:xx:xx:45  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::9683:xxxx:fea7:a45/64 Scope:Link
          inet6 addr: fd5e:48ff:xxxx::1/60 Scope:Global
          inet6 addr: 2001:1c05:xxxx:f700::1/60 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1287746 errors:0 dropped:2 overruns:0 frame:0
          TX packets:1512773 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:167353858 (159.6 MiB)  TX bytes:1514664087 (1.4 GiB)

eth0      Link encap:Ethernet  HWaddr 9E:1D:FD:xx:xx:4C  
          inet6 addr: fe80::9c1d:fdff:xxxx:f4c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1504  Metric:1
          RX packets:121398398 errors:0 dropped:0 overruns:0 frame:0
          TX packets:243806175 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:63400561416 (59.0 GiB)  TX bytes:258585472886 (240.8 GiB)
          Interrupt:130 

eth1      Link encap:Ethernet  HWaddr 94:83:C4:xx:xx:43  
          inet addr:178.84.80.65  Bcast:178.84.80.255  Mask:255.255.255.0
          inet6 addr: fe80::9683:xxxx:fea7:a43/64 Scope:Link
          inet6 addr: 2001:1c05:xxxx:0:5d53:b461:d60a:6845/128 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:172180418 errors:27 dropped:0 overruns:0 frame:0
          TX packets:82219515 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:164586128766 (153.2 GiB)  TX bytes:60652899747 (56.4 GiB)
          Interrupt:130 

lan1      Link encap:Ethernet  HWaddr 94:83:C4:xx:xx:45  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1927052 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3216359 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:361878219 (345.1 MiB)  TX bytes:2399072187 (2.2 GiB)

lan2      Link encap:Ethernet  HWaddr 94:83:C4:xx:xx:45  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lan3      Link encap:Ethernet  HWaddr 94:83:C4:xx:xx:45  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:39202542 errors:0 dropped:0 overruns:0 frame:0
          TX packets:70907558 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2043569803 (1.9 GiB)  TX bytes:91705494843 (85.4 GiB)

lan4      Link encap:Ethernet  HWaddr 94:83:C4:xx:xx:45  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lan5      Link encap:Ethernet  HWaddr 94:83:C4:xx:xx:45  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:307048 errors:0 dropped:0 overruns:0 frame:0
          TX packets:374608 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:29323409 (27.9 MiB)  TX bytes:62550652 (59.6 MiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:213844 errors:0 dropped:0 overruns:0 frame:0
          TX packets:213844 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:24760028 (23.6 MiB)  TX bytes:24760028 (23.6 MiB)

phy0-ap0  Link encap:Ethernet  HWaddr 94:83:C4:xx:xx:46  
          inet6 addr: fe80::9683:xxxx:fea7:a46/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:75311670 errors:0 dropped:0 overruns:0 frame:0
          TX packets:42896354 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:96123409758 (89.5 GiB)  TX bytes:6300684197 (5.8 GiB)

phy1-ap0  Link encap:Ethernet  HWaddr 94:83:C4:xx:xx:47  
          inet6 addr: fe80::9683:xxxx:fea7:a47/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:306129 errors:0 dropped:0 overruns:0 frame:0
          TX packets:675842 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:40965269 (39.0 MiB)  TX bytes:531804441 (507.1 MiB)

not dsa but maybe help

You do have an (unconfigured) "eth0" interface, and you also have 5 "lan" ports. Are you sure "eth0" and "eth1" are not the 2.5Gbps ports, and "lan0" to "lan5" are the 1Gbps ports?

This is how it looks on the status page:

As you can see the current eth1 is the wan port and lan1 is the other 2.5 Gbps port.

On the devices page however eth0 is shown:

The wikidev page for this device says it has a switch for the two 2.5Gbps ports, and another one for the four 1Gbps ports. However, you have an unused eth port, a 2.5Gbps port on the other eth port, and the second 2.5Gbps port is configured as lan... it does not make much sense, at least to me.

Anyway, the point is you just need to move the ports around, to achieve the configuration you proposed.

maybe he wants to put on one wan 80mega upload and the other wan 50 mega upload if that's right

In my setup, I create a bridge for each interface. Not out of necessity, but for unified setup, so I can edit connections in the same steps for all connections. So I have a br-lan and a br-wan (+ others)

If you’d do the same, you would have br-wan cover lan5 only, and set your wan interface to br-wan.
Alternatively set your wan interface directly to lan5.
Then br-lan would cover eth1,lan1,lan2,lan3,lan4

you are just one isp ?? (fai )

try this like that ?

wan2

@anon78773196: I have no idea what you're proposing or how to do that and how it solves my question. And Yes i'm on one ISP.

@eduperez: I see your point. Maybe @daniel can shed some light on the inner workings of this device.

I have to wait until most client have left the network and make the proposed changes. See how this goes.

Didn't go so well. Made the changes as proposed.

....but lost access to internet. Connections within LAN worked.

I had a look at the dts: One 2.5G port (eth1 aka wan) is directly connected to the SoC via GMAC1, the other is connected to a switch where the other 1G LAN ports are also connected to. The switch is then connected to the SoC via GMAC0 (eth0).

So while you can technically move the ports around (add eth1 to the br-lan bridge, remove lan1 from the bridge; do not touch eth0, that's the DSA switch), all traffic going from the former 2.5G WAN port to any other LAN port has to pass through the CPU and is not switched. I don't know how powerful the CPU is or if anything can be offloaded so YMMV.

4 Likes