Ruijie RG-X60 Pro WAN Problem

Alcon,

I recently bought a Ruijie RG-X60 Pro from China and of course the first thing I did was to wipe out stock firmware and use OpenWRT. I soldered TTL pins, tried many versions and different forks, bricked a few times, updated uboot etc and now finally using 24.10.0-rc2 (r28161-ea17e958b9)

I have a FTTH connection; fiberoptic cable is connected to a Nokia G-240G-C ONT from my ISP and a good quality CAT7 ethernet cable coming out from its LAN port to my Ruijie X60's WAN port. I didn't touch any stock settings 24.10.0-rc2 coming OOTB, except setting up wireless. I must say that it's kinda inconvenient that wireless radios come as disabled at first boot. Hope the devs will change this for future versions. So I was using a Netgear R7800 for almost 8 years now, with stock fw and everything was fine.

My problem is, I don't have an internet connection on my X60, please help me in this regard. Checked the cables, all good. I have internet when I plug in the CAT7 cable coming from ONT directly on my laptop.

Below are my settings, which are also stock, except wireless.

Thanks in advance.

Board:

root@OpenWrt:~# ubus call system board
{
        "kernel": "6.6.63",
        "hostname": "OpenWrt",
        "system": "ARMv8 Processor rev 4",
        "model": "Ruijie RG-X60 Pro",
        "board_name": "ruijie,rg-x60-pro",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "24.10.0-rc2",
                "revision": "r28161-ea17e958b9",
                "target": "mediatek/filogic",
                "description": "OpenWrt 24.10.0-rc2 r28161-ea17e958b9",
                "builddate": "1733226068"
        }
}
root@OpenWrt:~#

Network:

root@OpenWrt:~# cat /etc/config/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 'fda1:b1f:bd72::/48'

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

config device
        option name 'lan1'
        option macaddr 'd4:31:27:60:35:04'

config device
        option name 'lan2'
        option macaddr 'd4:31:27:60:35:04'

config device
        option name 'lan3'
        option macaddr 'd4:31:27:60:35:04'

config device
        option name 'lan4'
        option macaddr 'd4:31:27:60:35:04'

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 'd4:31:27:60:35:03'

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

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

root@OpenWrt:~#

DHCP:

root@OpenWrt:~# cat /etc/config/dhcp

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option cachesize '1000'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option nonwildcard '1'
        option localservice '1'
        option ednspacket_max '1232'
        option filter_aaaa '0'
        option filter_a '0'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        option ra_slaac '1'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'

root@OpenWrt:~#

Wireless:

root@OpenWrt:~# cat /etc/config/wireless


config wifi-device 'radio0'
        option type 'mac80211'
        option path 'platform/soc/18000000.wifi'
        option band '2g'
        option channel '1'
        option htmode 'HE20'
        option disabled '1'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

config wifi-device 'radio1'
        option type 'mac80211'
        option path 'platform/soc/18000000.wifi+1'
        option band '5g'
        option channel '36'
        option htmode 'HE80'
        option country 'ZA'
        option cell_density '0'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt_5G'
        option encryption 'none'

root@OpenWrt:~#

Firewall:

root@OpenWrt:~# cat /etc/config/firewall
config defaults
        option syn_flood        1
        option input            REJECT
        option output           ACCEPT
        option forward          REJECT
# Uncomment this line to disable ipv6 rules
#       option disable_ipv6     1

config zone
        option name             lan
        list   network          'lan'
        option input            ACCEPT
        option output           ACCEPT
        option forward          ACCEPT

config zone
        option name             wan
        list   network          'wan'
        list   network          'wan6'
        option input            REJECT
        option output           ACCEPT
        option forward          REJECT
        option masq             1
        option mtu_fix          1

config forwarding
        option src              lan
        option dest             wan

# We need to accept udp packets on port 68,
# see https://dev.openwrt.org/ticket/4108
config rule
        option name             Allow-DHCP-Renew
        option src              wan
        option proto            udp
        option dest_port        68
        option target           ACCEPT
        option family           ipv4

# Allow IPv4 ping
config rule
        option name             Allow-Ping
        option src              wan
        option proto            icmp
        option icmp_type        echo-request
        option family           ipv4
        option target           ACCEPT

config rule
        option name             Allow-IGMP
        option src              wan
        option proto            igmp
        option family           ipv4
        option target           ACCEPT

# Allow DHCPv6 replies
# see https://github.com/openwrt/openwrt/issues/5066
config rule
        option name             Allow-DHCPv6
        option src              wan
        option proto            udp
        option dest_port        546
        option family           ipv6
        option target           ACCEPT

config rule
        option name             Allow-MLD
        option src              wan
        option proto            icmp
        option src_ip           fe80::/10
        list icmp_type          '130/0'
        list icmp_type          '131/0'
        list icmp_type          '132/0'
        list icmp_type          '143/0'
        option family           ipv6
        option target           ACCEPT

# Allow essential incoming IPv6 ICMP traffic
config rule
        option name             Allow-ICMPv6-Input
        option src              wan
        option proto    icmp
        list icmp_type          echo-request
        list icmp_type          echo-reply
        list icmp_type          destination-unreachable
        list icmp_type          packet-too-big
        list icmp_type          time-exceeded
        list icmp_type          bad-header
        list icmp_type          unknown-header-type
        list icmp_type          router-solicitation
        list icmp_type          neighbour-solicitation
        list icmp_type          router-advertisement
        list icmp_type          neighbour-advertisement
        option limit            1000/sec
        option family           ipv6
        option target           ACCEPT

# Allow essential forwarded IPv6 ICMP traffic
config rule
        option name             Allow-ICMPv6-Forward
        option src              wan
        option dest             *
        option proto            icmp
        list icmp_type          echo-request
        list icmp_type          echo-reply
        list icmp_type          destination-unreachable
        list icmp_type          packet-too-big
        list icmp_type          time-exceeded
        list icmp_type          bad-header
        list icmp_type          unknown-header-type
        option limit            1000/sec
        option family           ipv6
        option target           ACCEPT

config rule
        option name             Allow-IPSec-ESP
        option src              wan
        option dest             lan
        option proto            esp
        option target           ACCEPT

config rule
        option name             Allow-ISAKMP
        option src              wan
        option dest             lan
        option dest_port        500
        option proto            udp
        option target           ACCEPT


### EXAMPLE CONFIG SECTIONS
# do not allow a specific ip to access wan
#config rule
#       option src              lan
#       option src_ip   192.168.45.2
#       option dest             wan
#       option proto    tcp
#       option target   REJECT

# block a specific mac on wan
#config rule
#       option dest             wan
#       option src_mac  00:11:22:33:44:66
#       option target   REJECT

# block incoming ICMP traffic on a zone
#config rule
#       option src              lan
#       option proto    ICMP
#       option target   DROP

# port redirect port coming in on wan to lan
#config redirect
#       option src                      wan
#       option src_dport        80
#       option dest                     lan
#       option dest_ip          192.168.16.235
#       option dest_port        80
#       option proto            tcp

# port redirect of remapped ssh port (22001) on wan
#config redirect
#       option src              wan
#       option src_dport        22001
#       option dest             lan
#       option dest_port        22
#       option proto            tcp

### FULL CONFIG SECTIONS
#config rule
#       option src              lan
#       option src_ip   192.168.45.2
#       option src_mac  00:11:22:33:44:55
#       option src_port 80
#       option dest             wan
#       option dest_ip  194.25.2.129
#       option dest_port        120
#       option proto    tcp
#       option target   REJECT

#config redirect
#       option src              lan
#       option src_ip   192.168.45.2
#       option src_mac  00:11:22:33:44:55
#       option src_port         1024
#       option src_dport        80
#       option dest_ip  194.25.2.129
#       option dest_port        120
#       option proto    tcp
root@OpenWrt:~#

Start by cloning the 7800s WAN MAC onto the X60s ditto.

1 Like

Didn't work unfortunately



Just to be clear about this point... they are disabled by default for security. If they weren't, they would have an open (or known) SSID + password which is very dangerous.

Oh, so in order to enable the radios, user need to physically connect to the router and meanwhile this also enables them to set a login password. I got it, thank you. Didn't think that way before.

Any heads up for my problem too? I don't know what's missing here...

I'm not seeing any obvious issues... what happens if you reconnect R7800? Does it get a proper connection?

And for the RG-X60, what do you see in the output of:

ifstatus wan | grep address
logread -e udhcpc

When I connect R7800, I can connect to the Internet, no problem at all. Here's a screenshot of it below:

image

This is the speed I get without any antennae attached to R7800 (my wireless adapter is a BE200 and there's a 10cm thick basic brick wall between the computer and R7800):

image

And below is the output of the commands on X60, nothing happened:

image

run logread -f, and try pulling and reinserting the WAN cable, if you're still using serial, do the same with the LAN cable.

So this situation led me to think if my WAN socket is faulty or something. It's a seperate, 2.5G RJ-45 socket. The rest 4 LAN socks are 1G. Here's a photo of my device below:

In order to test the health of my WAN socket (eth1), I've assigned my WAN port as a LAN port, which is basically adding eth1 in br-lan device.

And that's when I noticed my 2.5G WAN port is not working. (the yellow one)

Also I just noticed now that the small action led in the corner is not blinking at all. It doesn't give any life sign.

So my device has a seperate Realtek RTL8221B-VB-CG Phy for 2.5G WAN port. I have mentioned that I've bricked this device several times before being able to use this latest rc2 version of OpenWRT. So my actions might have fried this Realtek controller maybe? But I can see that it's loaded during boot:

Man, it's just an interesting situation.

it could also be a bug in openwrt.

try connecting the 2.5GbE to a 1GbE port.

did the 2.5GbE work with the stock fw ?

Here it is, first command was I plugged the cable coming from my ONT in and out to WAN socket several times. Second is doing the same for LAN 1 and then LAN 4 socket.

Okay I'm 100% sure there's something wrong with the yellow socket (2.5G WAN) It's not working.

So I won't be able to use 2.5G WAN port on this device and map a LAN port as WAN port instead? :frowning:

2.5G doesn't seem to work at all.

About the stock fw - I don't know... I didn't test it at all, I didn't even connect to the Internet with stock fw, I wiped it out right away. Is there a chance for me to return back to stock fw and test?

can always try a snapshot before you go that way, but yes, it should be doable.

same as flashing openwrt - https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=3de3c2bdfa6b757a1ac9fa4d9905e0d268d98e5f

Welp, I'm afraid going back to stock isn't working for me.

So I have only one option left - using a LAN port as WAN since my 2.5G is dead?

file probably shouldn't be archived.

image
pretty sure you also "upgraded" the wrong partition...

I have somehow managed to flash the stock fw. But not thanks to the official firmware Ruijie provided here... EW_3.0(1)B11P265_X60_11240117【For X60/X60 PRO】

that doesn't work with flashing on TTL.

Anyway... it's an OpenWRT bug, like you said before. 2.5G socket is actually fine.

Realtek driver is missing, which can be seen below stock fw bootlog.

I'm attaching boot logs of both OpenWRT 24.10-rc2 and stock fw here for you to check thoroughly... and other people who might be interested.

Stock FW bootlog:
x60pro_stock_fw_bootlog - Pastebin.com

OpenWRT 24.10-rc2 bootlog:
x60pro_openwrt_24.10-rc2_bootlog - Pastebin.com

So, as a summary, my problem arised due driver of a seperate chip (Realtek RTL8221B-VB-CG) controlling 2.5G WAN socket missing in 24.10-rc2 build for Ruijie RG-X60 Pro. Of course, as a regular user, I plugged the cable coming from my ONT into the WAN port as the first step.

I don't know if this is a proprietary driver or not, or can be added in OpenWRT or not.

Until then, I guess I have no option but to use my device with one of the LAN ports assigned as a WAN port, am I wrong?

WAX206 - Realtek RTL8221B not working in kernel 6.6 · Issue #15093 · openwrt/openwrt

This seems like a similar problem with mine. Maybe I should build my custom OpenWRT as in this issue? But eh... I am on Windows and virtualization (WSL) is disabled on my laptop because I undervolted my CPU. Plundervolt, you know.

Anyway... let's see.

I looked at it too, start by installing a snapshot, the fix should be in it.

once booted, if WAN doesn't work, try installing kmod-rtl8821ae.

Alright. I just requested a snapshot build on OpenWRT firmware selector for X60 Pro with below packages:

apk-mbedtls base-files ca-bundle dnsmasq dropbear firewall4 fitblk fstools kmod-crypto-hw-safexcel kmod-gpio-button-hotplug kmod-leds-gpio kmod-nft-offload kmod-phy-aquantia libc libgcc libustream-mbedtls logd mtd netifd nftables odhcp6c odhcpd-ipv6only ppp ppp-mod-pppoe procd-ujail uboot-envtools uci uclient-fetch urandom-seed urngd wpad-basic-mbedtls kmod-mt7915e kmod-mt7986-firmware mt7986-wo-firmware luci

How about I add kmod-rtl8821ae among them too?