Reclassification of network ports on a Dynalink DL-WRX36

Hi

On a Dynalink DL-WRX36 I have default four 1 GB ethernet ports and one for wan with 2,5 GB.
In Germany we will probably not be able to use 2.5 GB Ethernet for the Internet hmm I think the next 20 years :wink: Then I'd rather like to use the bandwidth for internal traffic. And one of the current LAN-Ports to establich a 100 Mbit pppoe connection.

So I want use the WAN port internally and the last LAN port of those four LAN ports then as a WAN port instead.
But the LAN ports currently all have the same MAC address. Which confuses me a lot right now. This behavor is normal? Or it is because all LAN-Ports are member of a bridge? Could I seperate safetly one of those LAN-Ports as an dedcated Netzwork-Port? To use it as the cheaper WAN instead the current one.

This should be pretty easy...

Just to make sure there aren't any surprise, and to ensure that we can give you the right advice:

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network

Hello psherman, thank you about your answer :slight_smile:

ubus:

{
	"kernel": "5.15.134",
	"hostname": "matschfirke",
	"system": "ARMv8 Processor rev 4",
	"model": "Dynalink DL-WRX36",
	"board_name": "dynalink,dl-wrx36",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "23.05.0",
		"revision": "r23497-6637af95aa",
		"target": "ipq807x/generic",
		"description": "OpenWrt 23.05.0 r23497-6637af95aa"
	}
}

network:

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 'fd66:61ef:73d6::/48'

config device
	option type 'bridge'
	option name 'wifi'
	option bridge_empty '1'

config interface 'wifi'
	option proto 'static'
	option ip6assign '60'
	list ipaddr '192.168.2.1/24'
	option device 'wifi'

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

config interface 'lan'
	option device 'lan'
	option proto 'static'
	option ip6assign '60'
	list dns_search 'webterrorist.lan'
	list dns '127.0.0.1'
	list ipaddr '192.168.1.5/24'
	list ipaddr '192.168.3.1/30'
	list ipaddr '192.168.3.2/30'

This is a very unusual configuration... why do you have 3 addresses on the lan? It is not recommended to do this.

But more importantly, you said that you want to make the physical wan port into the lan port... I don't see any wan interfaces (physical or logical). Is this file complete?

When you've set it up to your liking, make sure that you do a performance check, as I'm not so confident that you'll actually gain anything with your endeavour (ipq807x has badly optimizied network/ switch drivers and the bridge-vlan filtering && bridging of the 2.5GBASE-T port in software might give you more of a blow, than keeping the default setup).

This is the current real configuration :slight_smile: This Router is the first of two. The first Router connects to the internet only. I don't like the specific part of the current WAN config because I don't like to share my ISP Data with the planet... The additional IP addresses I'm using to bind services like luci and haproxy to a specific internal address. Which makes it easy and compfortable for me to handle request about the firewall.

lan       Link encap:Ethernet  HWaddr 4C:AB:F8:47:D6:02
          inet addr:192.168.1.5  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fd66:61ef:73d6::1/60 Scope:Global
          inet6 addr: fe80::4eab:f8ff:fe47:d602/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1178 errors:0 dropped:0 overruns:0 frame:0
          TX packets:206 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:178133 (173.9 KiB)  TX bytes:28384 (27.7 KiB)

lan1      Link encap:Ethernet  HWaddr 4C:AB:F8:47:D6:02
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:45177 errors:0 dropped:0 overruns:0 frame:0
          TX packets:19889 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:5675716 (5.4 MiB)  TX bytes:12273419 (11.7 MiB)
          Base address:0x1600

lan2      Link encap:Ethernet  HWaddr 4C:AB:F8:47:D6:02
          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)
          Base address:0x1400

lan3      Link encap:Ethernet  HWaddr 4C:AB:F8:47:D6:02
          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)
          Base address:0x1200

lan4      Link encap:Ethernet  HWaddr 4C:AB:F8:47:D6:02
          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)
          Base address:0x1000

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:75261 errors:0 dropped:0 overruns:0 frame:0
          TX packets:75261 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:5388712 (5.1 MiB)  TX bytes:5388712 (5.1 MiB)

mesh0     Link encap:Ethernet  HWaddr 4E:AB:F8:47:D6:03
          inet6 addr: fe80::4cab:f8ff:fe47:d603/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:114 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1178 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:33730 (32.9 KiB)  TX bytes:204883 (200.0 KiB)

mesh1     Link encap:Ethernet  HWaddr 4E:AB:F8:47:D6:04
          inet6 addr: fe80::4cab:f8ff:fe47:d604/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:436 (436.0 B)  TX bytes:1292 (1.2 KiB)

miireg    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          [NO FLAGS]  MTU:0  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)

phy0-ap0  Link encap:Ethernet  HWaddr 4C:AB:F8:47:D6:03
          inet6 addr: fe80::4eab:f8ff:fe47:d603/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:915 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:190335 (185.8 KiB)

phy1-ap0  Link encap:Ethernet  HWaddr 4C:AB:F8:47:D6:04
          inet6 addr: fe80::4eab:f8ff:fe47:d604/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:2980 (2.9 KiB)

wan       Link encap:Ethernet  HWaddr 4C:AB:F8:47:D6:01
          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)
          Base address:0x7000

wifi      Link encap:Ethernet  HWaddr 4C:AB:F8:47:D6:04
          inet addr:192.168.2.1  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fd66:61ef:73d6:10::1/60 Scope:Global
          inet6 addr: fe80::4eab:f8ff:fe47:d604/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:380 (380.0 B)  TX bytes:1272 (1.2 KiB)

The wan interface has a port, and then one of three protocols: DHCP, static IP, or PPPoE. In the case of DHCP, no private details should exist there. For static or PPPoE, you can simply redact the details.

This is not how the lan addresses should be used. in particular, you've assigned three different subnets to the lan -- this can cause problems. I would recommend that you remove the two /30 addresses.

I'm not following this logic at all. Can you elaborate?

Shure. I've two choises. I could change the ports for lucy and for haproxy. Or like I did, I bound it to an specific address. Without any hassels about used ports. By example Port 443 has been bound to address 192.168.3.1 and the another app with port 443 has been bound to 192.168.3.2. I'm a Linux Senior Admin with two RHCE's worked as an Trainer and Examiner and I did this very often on my job. SNI is not everytime the first choise...
From outside the firewall makes dnat to one of those addresses and ships a litte webssite. The anotherone is used to use luci

hope I've explained it clearly to you shortley without to write an new bible...

could we go back now to my question please? On my time in the school, long time ago before my beart has been turned to grey. I've learned an interface should have exclusively one uniqe MAC address. And I guess that hasn't been changed until today.

And what we see is that each all the 4 LAN Ports are using the same MAC Address. If they are used in a bridge, that works well. Fair enough. But that what I'm asking for is about, if it is possible one of those ports to use exclusivly. Like a dedicated network card. Or it is impossible because it is an silly network hub by example

Did I have described it now well and good to understand?

at last the running current config. Sorry I've forgotten that ifconfig doesn't diesplay everything

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: miireg: <> mtu 0 qdisc noop state DOWN qlen 1000
    link/generic
3: lan4: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN qlen 1000
    link/ether 4c:ab:f8:47:d6:02 brd ff:ff:ff:ff:ff:ff
4: lan3: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq master lan state DOWN qlen 1000
    link/ether 4c:ab:f8:47:d6:02 brd ff:ff:ff:ff:ff:ff
5: lan2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq master lan state DOWN qlen 1000
    link/ether 4c:ab:f8:47:d6:02 brd ff:ff:ff:ff:ff:ff
6: lan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master lan state UP qlen 1000
    link/ether 4c:ab:f8:47:d6:02 brd ff:ff:ff:ff:ff:ff
7: wan: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen 1000
    link/ether 4c:ab:f8:47:d6:01 brd ff:ff:ff:ff:ff:ff
28: lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 4c:ab:f8:47:d6:02 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.5/24 brd 192.168.1.255 scope global lan
       valid_lft forever preferred_lft forever
    inet 192.168.3.1/30 brd 192.168.3.3 scope global lan
       valid_lft forever preferred_lft forever
    inet 192.168.3.2/30 brd 192.168.3.3 scope global secondary lan
       valid_lft forever preferred_lft forever
    inet6 fd66:61ef:73d6::1/60 scope global noprefixroute
       valid_lft forever preferred_lft forever
    inet6 fe80::4eab:f8ff:fe47:d602/64 scope link
       valid_lft forever preferred_lft forever
29: wifi: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 4c:ab:f8:47:d6:04 brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.1/24 brd 192.168.2.255 scope global wifi
       valid_lft forever preferred_lft forever
    inet6 fd66:61ef:73d6:10::1/60 scope global noprefixroute
       valid_lft forever preferred_lft forever
    inet6 fe80::4eab:f8ff:fe47:d604/64 scope link
       valid_lft forever preferred_lft forever
30: phy1-ap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master wifi state UP qlen 1000
    link/ether 4c:ab:f8:47:d6:04 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::4eab:f8ff:fe47:d604/64 scope link
       valid_lft forever preferred_lft forever
31: mesh1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master wifi state UP qlen 1000
    link/ether 4e:ab:f8:47:d6:04 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::4cab:f8ff:fe47:d604/64 scope link
       valid_lft forever preferred_lft forever
32: phy0-ap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master lan state UP qlen 1000
    link/ether 4c:ab:f8:47:d6:03 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::4eab:f8ff:fe47:d603/64 scope link
       valid_lft forever preferred_lft forever
33: mesh0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master lan state UP qlen 1000
    link/ether 4e:ab:f8:47:d6:03 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::4cab:f8ff:fe47:d603/64 scope link
       valid_lft forever preferred_lft forever

For OpenWrt, you should be doing this with additional network interfaces, not the lan. Don't forget, this is a router... having multiple addresses on the same interface may mess up routing (and other services like DHCP).

Well, you didn't show your wan interface (/etc/config/network), but theoretically you just remove of the lan ports from br-lan and use that lan port as the port assignment for the wan interface. Then, you can add the wan port to br-lan.

Again, I believe that your current configuration is quite unusual and I can tell you from my extensive OpenWrt experience that your approach is indeed not recommended.

this is the current configuration. And why I've asked for. Or in my case before...
I still don't know, are those four 1 GB Ports some strange network cards they may need a special configuration they I currently don't know. Or it is dummy switch and I'm well advised never to do that.
Is they a way to find it out by installing something like e.G lsusb or lspci however.

And that was the reaseon why I'm asking for. Which means better before then after

A bit of both, given the very basic unoptimized switchdev driver.

Technically, the LAN ports are on a common switch - see ipq40xx for a rough idea of the setup (yes, it's more advanced on ipq807x, but the same principles apply to the hardware side of it). As far as the kernel is concerned, it sees individual devices - but technically they are not independent, but (the 1 GBit/s ports) all members of the same switch.

1 Like

Do you have got a link? By googleing it, I've found binary downloads and another unusual stuff instead what about I've searched for.

I am doing exactly that on the same router. My internal network is 2.5 gigabit, and my internet connection is 500 megabit. I have not expierenced any issues.

Edit: I think tye switch iperates similar to the one described here:

1 Like