No Internet via WAN - only via LAN

Hello,

I am currently having a small issue connecting to the internet. After installing OpenWRT onto ASUS RT-AX1800S V2, I am unable to connect to the internet using the WAN port. I was able to connect to the internet using one of the LAN ports though (I did this by re-configuring the br-lan, removing the lan4 device and adding a new WAN interface using the lan4 device).

The modem (BGW320-505) is now plugging into the LAN4 port of the router and there are no problems.

I am including some information below if it helps. Any information and advice is greatly appreciated. Thank you in advance for your time.

root@OpenWrt_Router:~# 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 'fd53:7f75:c3d6::/48'

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

config device
        option name 'lan1'
        option macaddr 'cc:28:aa:5c:9e:c6'

config device
        option name 'lan2'
        option macaddr 'cc:28:aa:5c:9e:c6'

config device
        option name 'lan3'
        option macaddr 'cc:28:aa:5c:9e:c6'

config device
        option name 'lan4'
        option macaddr 'cc:28:aa:5c:9e:c6'

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'
        list dns '192.168.1.2'

config interface 'WAN'
        option proto 'dhcp'
        option device 'lan4'
        option peerdns '0'
        list dns '192.168.1.2'

config interface 'WAN6'
        option proto 'dhcpv6'
        option device 'lan4'
        option reqaddress 'try'
        option reqprefix 'auto'
        option peerdns '0'
        list dns '192.168.1.2'

config interface 'WAN_eth1'
        option proto 'dhcp'
        option device 'eth1'
        option peerdns '0'
        list dns '192.168.1.2'

config interface 'WAN6_eth1'
        option proto 'dhcpv6'
        option device 'eth1'
        option reqaddress 'try'
        option reqprefix 'auto'

config device
        option name 'eth1'
        option ipv6 '1'

root@OpenWrt_Router:~# cat /etc/config/firewall

config defaults
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option synflood_protect '1'
        option flow_offloading '1'
        option flow_offloading_hw '1'

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

config zone
        option name 'wan'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'
        option mtu_fix '1'
        list network 'WAN'
        list network 'WAN6'
        list network 'WAN_eth1'
        list network 'WAN6_eth1'

config forwarding
        option src 'lan'
        option dest 'wan'

config rule
        option name 'Allow-DHCP-Renew'
        option src 'wan'
        option proto 'udp'
        option dest_port '68'
        option target 'ACCEPT'
        option family 'ipv4'

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'

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'

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'

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'

Can you make br-wan with lan4 and wan, so that you can re-connect wan cable and diagnose the wan port:

ubus call system board
ethtool wan
ethtool -S wan | grep -v ": 0$"
mii-tool -v wan 
#(and repeat this for any connected lanX port)

your modem doesn't happen to use the 192.168.1 subnet, by any chance ?
and what's 192.168.1.2 ?

your modem doesn't happen to use the 192.168.1 subnet, by any chance ?

I don't believe so. From the modem:


Home Network Status
Device IPv4 Address 	192.168.2.254
DHCPv4 Netmask 	255.255.255.0
DHCP Server 	On
DHCPv4 Start Address 	192.168.2.64
DHCPv4 End Address 	192.168.2.250
DHCP Leases Available 	182
DHCP Leases Allocated 	5
DHCP Primary Pool 	Private
Secondary Subnet 	Disabled
Public Subnet 	
Cascaded Router Status 	Disabled
IP Passthrough Status 	On (public IP address)
IP Passthrough Address 	104.182.156.118

and what's 192.168.1.2 ?

A raspberrypi running PiHole (and a few other services on my home network)

Apparently mii-tool isn't installed? Here is the rest of the requested info.

Also, I did create a br-wan with lan4 and wan (I believe I did this correctly?). After that and plugging into the WAN port, still nothing (if I need to post something specific to that, please let me know).


root@OpenWrt_Router:~# ubus call system board
{
        "kernel": "5.15.167",
        "hostname": "OpenWrt_Router",
        "system": "ARMv8 Processor rev 4",
        "model": "ASUS RT-AX57M",
        "board_name": "asus,rt-ax57m",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "23.05.5",
                "revision": "r24106-10cc5fcd00",
                "target": "mediatek/filogic",
                "description": "23.05.5 241021"
        }
}

root@OpenWrt_Router:~# ethtool wan
Settings for wan:
Cannot get device settings: No such device
Cannot get wake-on-lan settings: No such device
Cannot get message level: No such device
Cannot get link status: No such device
No data available
root@OpenWrt_Router:~# ethtool -S wan | grep -v ": 0$"
Cannot get stats strings information: No such device
root@OpenWrt_Router:~# mii-tool -v wan
-ash: mii-tool: not found

root@OpenWrt_Router:~# ethtool lan4
Settings for lan4:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  100baseT/Half 100baseT/Full
                                             1000baseT/Half 1000baseT/Full
        Link partner advertised pause frame use: Symmetric
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: external
        Auto-negotiation: on
        MDI-X: Unknown
        Supports Wake-on: d
        Wake-on: d
        Link detected: yes
root@OpenWrt_Router:~# ethtool -S lan4 | grep -v ": 0$"
NIC statistics:
     tx_packets: 261226
     tx_bytes: 60023482
     rx_packets: 263294
     rx_bytes: 82683318
     TxUnicast: 505677
     TxMulticast: 119
     TxBroadcast: 20
     TxPktSz64: 66593
     TxPktSz65To127: 150337
     TxPktSz128To255: 36959
     TxPktSz256To511: 51125
     TxPktSz512To1023: 22687
     Tx1024ToMax: 178115
     TxBytes: 300208192
     RxUnicast: 590065
     RxMulticast: 10567
     RxBroadcast: 23709
     RxPktSz64: 73408
     RxPktSz65To127: 129227
     RxPktSz128To255: 46141
     RxPktSz256To511: 24220
     RxPktSz512To1023: 18218
     RxPktSz1024ToMax: 333127
     RxBytes: 486622640

Settings for lan1:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
                                             1000baseT/Full
        Link partner advertised pause frame use: Symmetric
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 3
        Transceiver: external
        Auto-negotiation: on
        MDI-X: Unknown
        Supports Wake-on: d
        Wake-on: d
        Link detected: yes

root@OpenWrt_Router:~# ethtool -S lan1 | grep -v ": 0$"
NIC statistics:
     tx_packets: 300236
     tx_bytes: 154758894
     rx_packets: 442268
     rx_bytes: 83093597
     TxUnicast: 701187
     TxMulticast: 616
     TxBroadcast: 1365
     TxPktSz64: 60335
     TxPktSz65To127: 146425
     TxPktSz128To255: 59253
     TxPktSz256To511: 31309
     TxPktSz512To1023: 21944
     Tx1024ToMax: 383902
     TxBytes: 568987665
     RxFiltering: 21
     RxUnicast: 581049
     RxMulticast: 48298
     RxBroadcast: 52428
     RxPktSz64: 120422
     RxPktSz65To127: 228578
     RxPktSz128To255: 64072
     RxPktSz256To511: 56955
     RxPktSz512To1023: 29578
     RxPktSz1024ToMax: 182170
     RxBytes: 329629969

Also... just noticed what "wan" returned. It is over eth1 I believe:

root@OpenWrt_Router:~# ethtool eth1
Settings for eth1:
        Supported ports: [ MII ]
        Supported link modes:   2500baseT/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  2500baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  2500baseT/Full
        Link partner advertised pause frame use: Symmetric
        Link partner advertised auto-negotiation: No
        Link partner advertised FEC modes: Not reported
        Speed: 2500Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Current message level: 0x000000ff (255)
                               drv probe link timer ifdown ifup rx_err tx_err
        Link detected: yes

root@OpenWrt_Router:~# ethtool -S eth1 | grep -v ": 0$"
NIC statistics:
     tx_bytes: 1221908
     tx_packets: 3578
     rx_pp_alloc_fast: 725093
     rx_pp_alloc_slow: 33
     rx_pp_alloc_empty: 33
     rx_pp_alloc_refill: 11789
     rx_pp_recycle_ring: 734857
     rx_pp_recycle_released_ref: 10
root@OpenWrt_Router:~# mii-tool -v lan1
lan1: negotiated 1000baseT-FD flow-control, link ok
  product info: vendor 00:e8:a5, model 4 rev 1
  basic mode:   autonegotiation enabled
  basic status: autonegotiation complete, link ok
  capabilities: 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
  advertising:  1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control
  link partner: 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control
root@OpenWrt_Router:~# mii-tool -v lan4
lan4: negotiated 100baseTx-FD flow-control, link ok
  product info: vendor 00:e8:a5, model 4 rev 1
  basic mode:   autonegotiation enabled
  basic status: autonegotiation complete, link ok
  capabilities: 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
  advertising:  1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control
  link partner: 100baseTx-FD 100baseTx-HD flow-control

root@OpenWrt_Router:~# mii-tool -v eth1
  No MII transceiver present!.
root@OpenWrt_Router:~# mii-tool -v wan
SIOCGMIIPHY on 'wan' failed: No such device


It is strange as it looks fixed 2.5Gbps (and kind of connected at that speed) ?
Public spec (AX57M) says it is "gigabits WAN" go figure what do they mean....

What's on the other end of gmac1?

Datasheet by-line for ethernet:

Ethernet HSGMII x 2; integrate 1G PHY for extender
Only support SGMII-1 or internal-GBE due to MAC sharing

ALso I got very confused until I checked the forum and found that this wasn't supported until I found this on the forum hahaha.

I don't see where it's got a phy on the DTS? It's HSGMII? What are you trying to link to on the other end? Openwrt one had a phy on mdio bus that was 2500-base-x? I'd need to do more looking at what various other 2.5gb enabled devices have on other targets....

1 Like

What's on the other end of gmac1?

Running internet thru AT&T fiber. Coming it via the following:

System Information
Manufacturer 	NOKIA
Model Number 	BGW320-505
Serial Number 	N93VB2GX002786
Software Version 	4.27.7
MAC Address 	ac:8f:a9:51:9c:d1
First Use Date 	2022/07/29 22:40:14
Time Since Last Reboot 	00:11:22:05
Current Date/Time 	2024-11-08T20:26:55
Hardware Version 	02001E0046004F
Legal Disclaimer 	Open Source Licenses

errm. What about showing ip link without mac addresses.
2.5gb no mii looks like dsa port.

At least on the commit I linked the switch is on gmac0?

Yeah so didn't look like a phy was configured on gmac1 which I guess means it would link at whatever bootloader sets the phy up for if any?

	gmac0: mac@0 {
		compatible = "mediatek,eth-mac";
		reg = <0>;
		phy-mode = "2500base-x";
		local-mac-address = [000000000000];
		fixed-link {
			speed = <2500>;
			full-duplex;
			pause;
		};
	};
				port@6 {
					reg = <6>;
					label = "cpu";
					ethernet = <&gmac0>;
					phy-mode = "2500base-x";
					fixed-link {
						speed = <2500>;
						full-duplex;
						pause;
					};
				};