What's new

Help wanted: mapping LAN / ETH ports for MerVLAN device support

r80xcore

Regular Contributor
Help wanted: mapping LAN / ETH ports for MerVLAN device support

I’m looking for help from users willing to map the physical LAN ports on their router so proper MerVLAN device support can be added upstream.

I’ve created a fully standalone helper script that:

  • Detects the WAN/uplink interface
  • Walks you through mapping each physical LAN port (LAN1, LAN2, …)
  • Generates a ready-to-use hw_probe.sh case snippet
  • Saves a full report under /tmp
  • Provides a pre-filled GitHub issue link for submitting the results
  • Optionally patches a local MerVLAN install with temporary support (until official support is added)

Run it with this one-liner​

Code:
mkdir -p /tmp/mervlan_tmp && /usr/sbin/curl -fsL --retry 3 "https://raw.githubusercontent.com/r80xcore/mervlan/dev/functions/device_support_mapper.sh" -o "/tmp/mervlan_tmp/device_support_mapper.sh" && chmod 0755 /tmp/mervlan_tmp/device_support_mapper.sh && sh /tmp/mervlan_tmp/device_support_mapper.sh

How to use the script​

  1. Start with only the WAN cable connected
    Unplug all LAN cables before running the script.
  2. WAN detection (Step 1/2)
    The script will attempt to detect which interface is used as WAN/uplink.
  3. LAN port mapping (Step 2/2)
    • You’ll be asked how many physical LAN ports your router has (excluding WAN)
    • For each LAN port (LAN1 → LANX):
      • Unplug the LAN cable
      • When prompted, plug the cable into the requested LAN port
      • Press Enter and confirm the detected interface
    • You can retry, skip, or quit at any step
  4. Report generation
    • A detailed report is printed and saved under /tmp/mervlan_tmp/results
    • The script outputs a direct GitHub link with a pre-filled device support request
    • Copy/paste any extra notes if needed and submit the issue
  5. Optional local patch
    • If MerVLAN is already installed, the script can patch hw_probe.sh
    • This enables temporary local support for your device
    • This does not replace official upstream support
⚠️ Important notes

  • You do NOT need to have MerVLAN installed to be able to run this.
  • /tmp is cleared on reboot, nothing persistent is left on the unit — save the report or submit the GitHub issue.
  • Local patching is only meant as a stopgap; please submit the report so official support can be added
  • This is for AP mode testing, but if we can verify if it works in router mode too it would be greati for debugging

Community added model support:

MODELCONTRIBUTOR

RT-AX86U
GT-AX6000

mistermoonlight1
kstamand

If you know the mapping already you can just fill in a template, example below:
Code:
RT-AX86U) MODEL="RT-AX86U"; ETH_PORTS="eth4 eth3 eth2 eth1 eth5"; LAN_PORT_LABELS="LAN1 LAN2 LAN3 LAN4 LAN5"; MAX_ETH_PORTS=5; WAN_IF="eth0" ;;
In this example we map eth4->LAN1, eth3->LAN2, eth2->LAN3, eth1->LAN4 and the eth5 (2.5gb port) to LAN5. We map WAN to eth0 and set the map LAN ports to 5.
You do need to specify the name of the unit as it is printen in nvram. Run this command if you are unsure of it (only needed when manually editing):

Code:
nvram get productid

Any help testing different router models is hugely appreciated. Thanks for helping make MerVLAN better!
 
Last edited:
I'm not sure but for some devices (like my AX58U v2) it might be like this or similar:
eth0 = wan
eth1 = internal 4-port switch as one interface (?)
eth2-3 - wifi

Unless I'm mistaken but have not seen extra interfaces being created for more wired clients on my device...
 
Last edited:
Unless I'm mistaken but have not seen extra interfaces being created for more wired clients...
My XT8 maps:
LAN1-LAN3 --> eth1-eth3
WAN --> eth0
WiFi --> eth4-eth6

This have been verified on other devices too.
Thought it might differ if you are in router or AP-mode. MerVLAN is AP-mode only. Would be interesting to see if that makes a difference when testing.
 
Last edited:
Here you go
GT-AX6000) MODEL="GT-AX6000"; ETH_PORTS="eth4 eth3 eth2 eth1 eth5"; LAN_PORT_LABELS="LAN1 LAN2 LAN3 LAN4 LAN5"; MAX_ETH_PORTS=5; WAN_IF="eth0" ;;
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top