D7800 wan not working with 100Mbit

Hello,

i've got a problem with my D7800: since now i used it as AP only.
But now i configured it as router with wan.
OOB the eth0 interface is a vlan 2 with cpu port 0 tagged plus port 5 (wan-port).
But it doesn't get any traffic if i connect it to my modem with 100mbit link.
If i connect a 1Gbit switch between modem an wan-port it works.
I am on snapshot release.
Can anyone confirm this?

Thanks

Does it work if you use a cross cable to connect the two devices?
If it is not a cable issue and it works with a switch in between them, my guess is that the ports are not auto sensing for tx and rx.

Well, the port is syncing with 100mbit.
I dont have a cross cable and i dont think it is a cable issue, because i use the same cable if i configure the port as second vlan on eth1. There it works.

I don't exactly follow you.
Are you suggesting that the speed of the wan port is locked to 1Gbps and if you connect it on the modem that supports 100Mbps it won't work, but with a switch between them it works?

With a gigabit switch. Yes.

In other words the WAN port doesn't seem to correctly auto sense the port speed?

The Port is connected with 100Mbit as ethtool is showing. But it won't receive any traffic.
The WAN Port is normally in a vlan with the interface eth0. If connected to gigabit it works normally.
Now i configured it as a vlan with interface eth1 (where also the other "LAN"-Ports are configured). It is auto sense 100Mbit correct. But now it is also receiving traffic.

Could you paste here the output of ethtool eth0 ? Preferably when connected to the modem.

root@rectangle ~# ethtool eth0
Settings for eth0:
	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: No
	Advertised auto-negotiation: Yes
	Advertised FEC modes: Not reported
	Link partner advertised link modes:  10baseT/Half 10baseT/Full 
	                                     100baseT/Half 100baseT/Full 
	Link partner advertised pause frame use: Symmetric
	Link partner advertised auto-negotiation: Yes
	Link partner advertised FEC modes: Not reported
	Speed: 100Mb/s
	Duplex: Full
	Port: MII
	PHYAD: 4
	Transceiver: internal
	Auto-negotiation: on
	Supports Wake-on: ug
	Wake-on: d
	Current message level: 0x0000003f (63)
			       drv probe link timer ifdown ifup
	Link detected: yes


root@rectangle ~# ethtool eth0.2
Settings for eth0.2:
	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: No
	Advertised auto-negotiation: Yes
	Advertised FEC modes: Not reported
	Link partner advertised link modes:  10baseT/Half 10baseT/Full 
	                                     100baseT/Half 100baseT/Full 
	Link partner advertised pause frame use: Symmetric
	Link partner advertised auto-negotiation: Yes
	Link partner advertised FEC modes: Not reported
	Speed: 100Mb/s
	Duplex: Full
	Port: MII
	PHYAD: 4
	Transceiver: internal
	Auto-negotiation: on
	Link detected: yes


root@rectangle ~# swconfig dev switch0 show
Global attributes:
	enable_vlan: 1
	enable_mirror_rx: 0
	enable_mirror_tx: 0
	mirror_monitor_port: 0
	mirror_source_port: 0
	arl_age_time: 300
	arl_table: address resolution table
	igmp_snooping: 0
	igmp_v3: 0
Port 0:
	mib: MIB counters
RxBroad     : 0
RxPause     : 0
RxMulti     : 0
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 0
Rx128Byte   : 0
Rx256Byte   : 0
Rx512Byte   : 0
Rx1024Byte  : 0
Rx1518Byte  : 0
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 0
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 0
TxBroad     : 0
TxPause     : 0
TxMulti     : 69
TxUnderRun  : 0
Tx64Byte    : 0
Tx128Byte   : 70
Tx256Byte   : 0
Tx512Byte   : 0
Tx1024Byte  : 0
Tx1518Byte  : 0
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 4782 (4.6 KiB)
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

	enable_eee: ???
	igmp_snooping: 0
	vlan_prio: 0
	pvid: 0
	link: port:0 link:up speed:1000baseT full-duplex 
Port 1:
	mib: MIB counters
RxBroad     : 119
RxPause     : 0
RxMulti     : 2472
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 709
Rx128Byte   : 3145
Rx256Byte   : 281
Rx512Byte   : 188
Rx1024Byte  : 73
Rx1518Byte  : 3
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 501282 (489.5 KiB)
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 0
TxBroad     : 28
TxPause     : 0
TxMulti     : 509
TxUnderRun  : 0
Tx64Byte    : 324
Tx128Byte   : 905
Tx256Byte   : 335
Tx512Byte   : 61
Tx1024Byte  : 25
Tx1518Byte  : 47
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 254032 (248.0 KiB)
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

	enable_eee: 0
	igmp_snooping: 0
	vlan_prio: 0
	pvid: 1
	link: port:1 link:up speed:1000baseT full-duplex txflow rxflow auto
Port 2:
	mib: No MIB data
	enable_eee: 0
	igmp_snooping: 0
	vlan_prio: 0
	pvid: 1
	link: port:2 link:down
Port 3:
	mib: No MIB data
	enable_eee: 0
	igmp_snooping: 0
	vlan_prio: 0
	pvid: 1
	link: port:3 link:down
Port 4:
	mib: No MIB data
	enable_eee: 0
	igmp_snooping: 0
	vlan_prio: 0
	pvid: 1
	link: port:4 link:down
Port 5:
	mib: MIB counters
RxBroad     : 0
RxPause     : 0
RxMulti     : 71
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 72
Rx128Byte   : 0
Rx256Byte   : 0
Rx512Byte   : 0
Rx1024Byte  : 0
Rx1518Byte  : 0
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 4608 (4.5 KiB)
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 3
TxBroad     : 0
TxPause     : 0
TxMulti     : 0
TxUnderRun  : 0
Tx64Byte    : 0
Tx128Byte   : 0
Tx256Byte   : 0
Tx512Byte   : 0
Tx1024Byte  : 0
Tx1518Byte  : 0
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 0
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

	enable_eee: 0
	igmp_snooping: 0
	vlan_prio: 0
	pvid: 2
	link: port:5 link:up speed:100baseT full-duplex auto
Port 6:
	mib: MIB counters
RxBroad     : 28
RxPause     : 0
RxMulti     : 521
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 318
Rx128Byte   : 919
Rx256Byte   : 354
Rx512Byte   : 62
Rx1024Byte  : 27
Rx1518Byte  : 39
RxMaxByte   : 8
RxTooLong   : 0
RxGoodByte  : 265420 (259.1 KiB)
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 12
TxBroad     : 119
TxPause     : 0
TxMulti     : 2472
TxUnderRun  : 0
Tx64Byte    : 0
Tx128Byte   : 3849
Tx256Byte   : 303
Tx512Byte   : 189
Tx1024Byte  : 73
Tx1518Byte  : 3
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 520210 (508.0 KiB)
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

	enable_eee: ???
	igmp_snooping: 0
	vlan_prio: 0
	pvid: 0
	link: port:6 link:up speed:1000baseT full-duplex 
VLAN 1:
	vid: 1
	ports: 1 2 3 4 6t 
VLAN 2:
	vid: 2
	ports: 0t 5 

Looks like it is only receiving traffic and not sending anything. Can you verify that with tcpdump?

Have you tried manually locking to 100Full? Should be with ethtool -s eth0 autoneg off speed 100 duplex full. If there is no luck, try also the mdix yes option.

Tried everything. 100 Full/half 10 1000 autoneg off on etc .... nothing works.
I think the issue is in the dts file.
Comparing with the dts from the Netgear R7800 (which is almost the same HW without VDSL modem) there are some differences for the gmac devices.
But who knows if it is only my router or a bug in config/dts/driver/whatever ...

I can confirm mine works with a switch too, I couldn't find any configuration to make it work without it.

Maybe someone who has the device or sees something obvious can make us of this....

			mdio0_pins: mdio0_pins {
			};
			#R7##################################################
			mdio0_pins: mdio0_pins {
>				clk {
>					pins = "gpio1";
>					input-disable;
>				};
			};




		#D7##################################################
		mdio0: mdio { }
        #R7##################################################
		mdio0: mdio { }
			

		#D7##################################################
			phy0: ethernet-phy@0 {
				reg = <0>;
				qca,ar8327-initvals = <
					0x00004 0x7600000   /* PAD0_MODE */
					0x00008 0x1000000   /* PAD5_MODE */
					0x0000c 0x80        /* PAD6_MODE */
					0x000e4 0x6a545     /* MAC_POWER_SEL */
					0x000e0 0xc74164de  /* SGMII_CTRL */
					0x0007c 0x4e        /* PORT0_STATUS */
					0x00094 0x4e        /* PORT6_STATUS */
					>;
			};

			phy4: ethernet-phy@4 {
				reg = <4>;
			};
		};

		#R7##################################################
			phy0: ethernet-phy@0 {
				reg = <0>;
				qca,ar8327-initvals = <
					0x00004 0x7600000   /* PAD0_MODE */
					0x00008 0x1000000   /* PAD5_MODE */
					0x0000c 0x80        /* PAD6_MODE */
					0x000e4 0xaa545     /* MAC_POWER_SEL */
					0x000e0 0xc74164de  /* SGMII_CTRL */
					0x0007c 0x4e        /* PORT0_STATUS */
					0x00094 0x4e        /* PORT6_STATUS */
					0x00970 0x1e864443  /* QM_PORT0_CTRL0 */
					0x00974 0x000001c6  /* QM_PORT0_CTRL1 */
					0x00978 0x19008643  /* QM_PORT1_CTRL0 */
					0x0097c 0x000001c6  /* QM_PORT1_CTRL1 */
					0x00980 0x19008643  /* QM_PORT2_CTRL0 */
					0x00984 0x000001c6  /* QM_PORT2_CTRL1 */
					0x00988 0x19008643  /* QM_PORT3_CTRL0 */
					0x0098c 0x000001c6  /* QM_PORT3_CTRL1 */
					0x00990 0x19008643  /* QM_PORT4_CTRL0 */
					0x00994 0x000001c6  /* QM_PORT4_CTRL1 */
					0x00998 0x1e864443  /* QM_PORT5_CTRL0 */
					0x0099c 0x000001c6  /* QM_PORT5_CTRL1 */
					0x009a0 0x1e864443  /* QM_PORT6_CTRL0 */
					0x009a4 0x000001c6  /* QM_PORT6_CTRL1 */
					>;
				qca,ar8327-vlans = <
					0x1	0x5e	    /* VLAN1 Ports 1/2/3/4/6 */
					0x2	0x21	    /* VLAN2 Ports 0/5 */
				>;
			};


		#D7##################################################
		gmac1: ethernet@37200000 {
			phy-handle = <&phy4>; # phy4: ethernet-phy@4 { reg = <4>; };
			mtd-mac-address = <&art 6>;

<    FIXEDLINK?

		};
		#R7##################################################
		gmac1: ethernet@37200000 {
>			qcom,phy_mdio_addr = <4>;
>			qcom,poll_required = <0>;
>			qcom,rgmii_delay = <1>;
>			qcom,phy_mii_type = <0>;
>			qcom,emulation = <0>;
>			qcom,irq = <255>;
>>>			mdiobus = <&mdio0>;
>			mtd-mac-address = <&art 6>;

>>			fixed-link {
>>				speed = <1000>;
>>				full-duplex;
>>			};
		};




		#D7##################################################
			phy4: ethernet-phy@4 {
				reg = <4>;
>>				qca,ar8327-initvals = <
>>					0x000e4 0x6a545     /* MAC_POWER_SEL */
>>					0x0000c 0x80        /* PAD6_MODE */
>>					>;
			};
		};






		#D7##################################################
		gmac2: ethernet@37400000 {
			mtd-mac-address = <&art 0>;
		};
		#R7##################################################
		gmac2: ethernet@37400000 {
>			qcom,phy_mdio_addr = <0>;	/* none */
>			qcom,poll_required = <0>;	/* no polling */
>			qcom,rgmii_delay = <0>;			qcom,phy_mii_type = <1>;
>			qcom,emulation = <0>;
>			qcom,irq = <258>;
>			mdiobus = <&mdio0>;

			mtd-mac-address = <&art 0>;

		};

Old topic I know, but this can actually work without a switch. I found a topic from vvolcano TL-WR1043NDv2 WAN connection and reboots that had a clue. Swapping the Wan and Lan eth ports did the trick. In LuCI, in interfaces edit LAN and in physical settings change it to eth0.2 (remember to un-tick eth1.1), and in WAN change the interface to eth1.1. If you've added an interface for a bridged modem, also change that to eth1.1 so you can still access it. Now put the WAN cable into port LAN 1, and put the LAN cable into the red WAN port. Now you can access the internet without needing a switch. I don't think the other ports will work, I only need the one.

1 Like

@ebswift this works!

However now the 'LAN' port doesn't work anymore for me after swapping them, Wifi works though so it's still usable, just wondering if there is anything else you did to get the LAN port working?

This should be fixed via https://git.openwrt.org/b163bfbba59b62c05a404e3cc3c59103c93aff68

2 Likes

Thanks @ynezz was just looking at doing a custom build, I'll be sure to include this fix.