Xiaomi 4a router (gigabit edition) Internet not working

I'm not sure if it is significant, but your 21.02.2 config differs from my 21.02.1 openwrt default. Specifically:

ie. 'bridge' is enabled ?

edit - I changed the ip to and it seems to be working but when I type ( the url changes to a openwrt link. is there any way to stop it ?

Do you witness same problem when using another device such as a phone?


the internet is not working again.

If you reboot the router, does the Network > interfaces page report IP address on WAN port?

If yes, can you ping ?

Is the WAN port faulty or suffering from poor ethernet cable connection?
Try wiggling the cable and see if the plug comes out....

I notice the OpenWRTInvasion had been amended in last 30 days. It may have introduced a bug in the linux install method?

Did you remove the bridge setting from the WAN and WAN6 interfaces?

it says that the network is unreachable

no. Even if it is a bad wan port or a ethernet cable, it should not randomly loose the connection without me touching/moving it.

How do you do it ?

I can't find the 'Bridge' settings in LUCI within 21.02.2, or it's been 'moved'. It exists in 19.07. I've not checked 21.02.1.

ssh into the router and use VI to edit /etc/config/network, or use WinSCP


I tested adding the 'bridge' line, and it caused the MAC address for the WAN and WAN6 interfaces to disappear on my HH5a.

How did the line get added to your config?

(If you return openwrt to default settings, does the 'bridge' line appear?)

Is this correct ?

I verified with ssh.

After the edit, I rebooted the router and I could not connect to the router (Both lan and 5G).
Even using the reset button on the router did nothing. (There was no dynamic ip when I ran arp -a and I could not acces the gui)

It was there by default.

Btw, the internet connection status led blinks randomly which normally means that there is internet.

Removing br-lan would indeed kill the LAN and wireless connection !

I perhaps didn't make it clear in my earlier post that the following two lines which need to be removed:

config interface 'wan'
        option device 'wan'
        option proto 'dhcp'
        option type 'bridge'     <<<<< REMOVE THIS LINE

config interface 'wan6'
        option device 'wan'
        option proto 'dhcpv6'
        option type 'bridge'   <<<<< REMOVE THIS LINE

Your earlier posted config did not have the bridge setting in the WAN interfaces btw.

I just used Mi WIfi repair too x86 to return my R4AG to stock firmware. Then I flashed 21.02.2 onto my R4AG 'Giga' from OEM using Windows method. Then used LuCI to do a reset. Then created a backup of the settings, from which I posted the /etc/config/network file below

(nb. My ISP does not support IPv6)

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

config globals 'globals'
	option packet_steering '1'
	option ula_prefix 'fdf8:db89:b375::/48'

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

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

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

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

I then enabled wifi on 5 GHz, and changed the LAN IP address. Rebooted and all it still working in 21.02.2, including internet access.

For reset button to work in OpenWrt,
ie. turn on router for 1 minute. Press and hold Reset button down for 10 seconds to return OpenWrt to default settings.

Is your R4AG the chinese or Global version?

It is the Global version

I will try to flash stock firmware and flash openwrt again

fyi, I just reinstalled 21.02.2 onto my R4AG. Got openvpn client working.

I then moved the R4AG to another room, to temporarily replace another model of router, and guess what. No internet !

The only difference is I set up the R4AG when WAN port was wired to a gigabit switch which is the one I normally use for testing. The other room where R4AG reports no WAN connection has a 100mb switch (TPlink SF1008D). The switch and cables are fine. I ran a long cable from the R4AG to another gigabit switch and WAN access was restored.

I had come across another thread where someone was reporting a router would not negotiate a link when wired to a 100mb port of a modem. I don't know if it is for a R4AG at this time. I need to find the thread, unless another reader knows which thread I am referring to.

Can you draw a topology diagram of your network? that may help clarify some things.

This is an unmanaged switch. I hope that you are not attempting to put multiple networks/VLANs through this switch.

I have one flat network. No VLANs. I do use wireless bridges (Padavan)


This is the same as my issue.

OEM firmware works 100% every time with the following 100mb switches:
Netgear FSM726 antique 24x100mb + 2x1Gb ports managed switch
TPlink TL-SF1008D v9 - 8x 100mb port unmanaged
TPlink TL-SF1005D v10.1 - 5x 100mb port unmanaged

Netgear FSM726 antique managed switch - some times but not always fails on 100mb ports when R4AG power cycled. Port status light on switch flashes when it should be constant. Works OK wired to the spare gigabit port on FSM726.
TPlink TL-SF1008D v9 - 8x 100mb port unmanaged - fails Everytime when R4AG power cycled.
TPlink TL-SF1005D v10.1 - 5x 100mb port unmanaged - 100% OK

Both TPlinks removed from their usual locations and currently wired into 100mb ports of the FMS726 during this investigation.

The Huawei router is a LTE (sim based) router.

I do have a unmanaged 5 port gigabit switch (1000 Mbps) plugged in to the router but it worked flawlessly using both the huawei and the xiaomi router.

Are there only 2 infrastructure devices in your entire network? You were talking about multiple switches, presumably in different rooms. A topology diagram should indicate all of the relevant hardware as well as the wiring between them (so that we can understand where there are limitations or potential other possible options).

I've concluded my issue is as reported by two other users here

From my observations, the 100mb port negotiation issue with OpenWrt 21.02.2 does not affect ALL 100mb switches.

There is no issue when wired into gigabit ports of routers, and my Netgear FSM726 100mb switch has two 1Gb ports. I can't reproduce the issue using OEM firmware.

Update: problem with 100mb port autonegotiation appears to be fixed in snapshot. Early indication is my R4AG with 10 March 2022 snapshot when power cycled, is behaving correctly with the TL-SF1008D v9.1 100mb switch.

btw, does this mean your original install problems with the R4AG have now been resolved?

In which case, perhaps you should mark this thread as 'Solved'?

It worked when I ran the stock firmware.

I have a LTE router because getting a wired connection to my house is expensive. Right now, I have a 5 port unmanaged ( 1000/100/10 mbps ) switch, 2 cat5 ethernet cables, 2 cat 6 ethernet cables, the xiaomi router and the huawei router (isp router) and a laptop that runs kali linux and windows 10.

I didn't ask why you are using an LTE router... I asked to see your topology -- a digram of how things are connected that includes things like switches and the wires between the rooms and such. What you provided was simply 2 devices (your LTE router and your 4A), connected together without anything in between. You mentioned that you have switches between your devices, but you didn't show us anything about how things actually work in your network.

I think you original question about 'topology' was directed at me, not to @Cool-Guy-101....

Cool-Guy-101 appears to have gigabit connections, so I can only speculate his R4AG openwrt issues is not related to the 100mb auto negotiation issue reported by others and myself.

(fwiw, R4AG running today's snapshot seem to be working fine so far with 100mb TL-SF1008D switch)