Archer C7 v5 WAN port packet loss

Hi, I recently installed OpenWrt 18.06.4 on my TP-Link Archer C7 v5 and I am seeing severe packet loss and latency spikes on the WAN port.

Here's a ping sample:

64 bytes from 1.1.1.1: seq=60 ttl=58 time=15.981 ms
64 bytes from 1.1.1.1: seq=61 ttl=58 time=16.256 ms
64 bytes from 1.1.1.1: seq=104 ttl=58 time=1044.304 ms
64 bytes from 1.1.1.1: seq=105 ttl=58 time=44.731 ms
64 bytes from 1.1.1.1: seq=106 ttl=58 time=15.892 ms
64 bytes from 1.1.1.1: seq=107 ttl=58 time=15.923 ms
64 bytes from 1.1.1.1: seq=108 ttl=58 time=15.724 ms

The Archer C7 v5 WAN port is connected to my ISP router/modem via Ethernet and receives an IP address via DHCP.

Pinging 1.1.1.1 from my ISP router/modem's diagnostics page has 0% packet loss and a stable ~15ms latency.

The packet loss is not related to Archer C7's wireless radios because they're both disabled and I am SSH'd in and testing directly against the WAN port.

I have tried installing OpenWrt 18.06.2, 18.06.3, 18.06.4 and the latest snapshot and I am seeing the same problem in every version.

I don't think it's related to CPU load because top and iftop are all normal.

Any help or debugging guidance would be much appreciated.


Additional info:

Model: TP-LINK Archer C7 v5
Architecture: Qualcomm Atheros QCA956X ver 1 rev 0
Firmware Version: OpenWrt 18.06.4 r7808-ef686b7292 / LuCI openwrt-18.06 branch (git-19.170.32094-4d6d8bc)
Kernel Version: 4.9.184

cat /etc/config/network 

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fd90:9847:4e9f::/48'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0.1'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config interface 'wan'
	option ifname 'eth0.2'
	option proto 'dhcp'

config device 'wan_dev'
	option name 'eth0.2'
	option macaddr <snip>

config interface 'wan6'
	option ifname 'eth0.2'
	option proto 'dhcpv6'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '2 3 4 5 0t'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '1 0t'

Hi,
first of all, check/replace your Wan and Lan cable.

Hi, thanks for the reply. I've already tried this - I've used multiple different cables for both LAN and WAN but I still have the same issue.

Check the output of
ifconfig eth0
ifconfig eth1
But to be honest, I am not quite sure whether the error counters really work.

And check the output of
swconfig dev switch0 port 0 show
for the corresponding ports.
Evtl. a duplex mismatch?

Hi @riodoro

Here's the output of those commands - does anything look wrong?

root@Archer-C7:~# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr <snip>  
          inet6 addr: fe80::9ada:c4ff:fe30:9502/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:371155 errors:0 dropped:0 overruns:0 frame:0
          TX packets:37876 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:264543487 (252.2 MiB)  TX bytes:3408361 (3.2 MiB)
          Interrupt:4 

root@Archer-C7:~# ifconfig eth0.2
eth0.2    Link encap:Ethernet  HWaddr <snip>  
          inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::9ada:c4ff:fe30:9503/64 Scope:Link
          inet6 addr: fe80::9ada:c4ff:fe30:9503/64 Scope:Link
          inet6 addr: 2405:9800:ba00:b1e3:9ada:c4ff:fe30:9503/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:371155 errors:0 dropped:0 overruns:0 frame:0
          TX packets:37265 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:257862971 (245.9 MiB)  TX bytes:3173558 (3.0 MiB)

root@Archer-C7:~# swconfig dev switch0 port 0 show
Port 0:
	mib: MIB counters
RxBroad     : 154
RxPause     : 0
RxMulti     : 480
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 30134
Rx128Byte   : 5657
Rx256Byte   : 941
Rx512Byte   : 257
Rx1024Byte  : 383
Rx1518Byte  : 438
RxMaxByte   : 84
RxTooLong   : 0
RxGoodByte  : 3627331 (3.4 MiB)
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 609
TxBroad     : 1165
TxPause     : 0
TxMulti     : 281735
TxUnderRun  : 0
Tx64Byte    : 9
Tx128Byte   : 14238
Tx256Byte   : 9154
Tx512Byte   : 103519
Tx1024Byte  : 163732
Tx1518Byte  : 79945
TxMaxByte   : 676
TxOverSize  : 0
TxByte      : 266078175 (253.7 MiB)
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 txflow rxflow 

root@Archer-C7:~# swconfig dev switch0 port 1 show
Port 1:
	mib: MIB counters
RxBroad     : 1165
RxPause     : 0
RxMulti     : 281738
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 4785
Rx128Byte   : 9637
Rx256Byte   : 8994
Rx512Byte   : 103513
Rx1024Byte  : 163736
Rx1518Byte  : 80618
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 264595036 (252.3 MiB)
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 0
TxBroad     : 4
TxPause     : 0
TxMulti     : 21
TxUnderRun  : 0
Tx64Byte    : 30009
Tx128Byte   : 5591
Tx256Byte   : 564
Tx512Byte   : 227
Tx1024Byte  : 380
Tx1518Byte  : 523
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 3510931 (3.3 MiB)
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:1 link:up speed:100baseT full-duplex auto

I don't see any errors there.
I assume switch0 port 1 is your WAN port.
It says link: port:1 link:up speed:100baseT full-duplex auto.
Can you configure it manually to 100/half-duplex for testing purposes?

Is your modem's port gigabit? It should connect at gigabit then. Is it a Puma 6 cable modem?

Hi @riodoro

I'm struggling to configure it manually to half duplex - I am getting Failed to set attribute: Operation not supported errors. Is there anything I am doing wrong?

root@Archer-C7:~# swconfig dev switch0 port 1 help
switch0: ag71xx-mdio.0(Atheros AR8337), ports: 7 (cpu @ 0), vlans: 128
     --switch
	Attribute 1 (int): enable_vlan (Enable VLAN mode)
	Attribute 2 (none): reset_mibs (Reset all MIB counters)
	Attribute 3 (int): enable_mirror_rx (Enable mirroring of RX packets)
	Attribute 4 (int): enable_mirror_tx (Enable mirroring of TX packets)
	Attribute 5 (int): mirror_monitor_port (Mirror monitor port)
	Attribute 6 (int): mirror_source_port (Mirror source port)
	Attribute 7 (int): arl_age_time (ARL age time (secs))
	Attribute 8 (string): arl_table (Get ARL table)
	Attribute 9 (none): flush_arl_table (Flush ARL table)
	Attribute 10 (int): igmp_snooping (Enable IGMP Snooping)
	Attribute 11 (int): igmp_v3 (Enable IGMPv3 support)
	Attribute 12 (none): apply (Activate changes in the hardware)
	Attribute 13 (none): reset (Reset the switch)
     --vlan
	Attribute 1 (int): vid (VLAN ID (0-4094))
	Attribute 2 (ports): ports (VLAN port mapping)
     --port
	Attribute 1 (none): reset_mib (Reset single port MIB counters)
	Attribute 2 (string): mib (Get port's MIB counters)
	Attribute 3 (int): enable_eee (Enable EEE PHY sleep mode)
	Attribute 4 (none): flush_arl_table (Flush port's ARL table entries)
	Attribute 5 (int): igmp_snooping (Enable port's IGMP Snooping)
	Attribute 6 (int): vlan_prio (Port VLAN default priority (VLAN PCP) (0-7))
	Attribute 7 (int): pvid (Primary VLAN ID)
	Attribute 8 (unknown): link (Get port link information)
root@Archer-C7:~# swconfig dev switch0 port 1 get link
port:1 link:up speed:100baseT full-duplex auto
root@Archer-C7:~# swconfig dev switch0 port 1 set link "duplex half"
Failed to set attribute: Operation not supported
root@Archer-C7:~# swconfig dev switch0 port 1 set link "speed 100 duplex half"
Failed to set attribute: Operation not supported

To answer your other question: yes, I believe port 1 is my WAN port (according to this diagram: https://openwrt.org/_media/media/tplink/tl-wdr7500/archerc7v2-switch-diagram.png)

No, the ISP modem is not gigabit - it's 100Mb/s only. The model is HG180 manufactured by FiberHome

I can confirm that there isn't a systemic problem with 18.06.4 on an Archer C7 v5 – I have that arrangement running here and I have no packet loss or latency problems running your test.

How is your ISP modem configured? NAT? Bridge? Is your ISP using CG-NAT or do you get a public IP address on the Archer WAN port? If the modem is giving the Archer a private address, is there a conflict with your 192.168.1.0/24?

In your position, I would reflash a fresh download of 18.06.4, reset to defaults and try the ping test without any configuration added, except any minimum to get a connection to your modem, if necessary. If you can put the ISP modem into bridge mode, that would be good.

@jamesc
Perhaps the half-duplex setting isn't supported on your switch.
Can you see the duplex settings in your modem?
Do you ping directly from the OpenWRT box?

For me, it sounds like an L2-Ethernet prob.
But may be, I am totally wrong.

Bingo! this was the cause. The ISP modem was using the 192.168.1.0/24 range which is OpenWrt's default. Changing to a new range with uci set network.lan.ipaddr='192.168.10.1' did the trick.

I feel stupid for not changing that before, especially because [0] mentions it's a common source of problems:

A common source of internet connectivity failure is your OpenWrt and upstream WAN routers having conflicting IP address ranges. To correct this, adjust the OpenWrt router subnet by changing the network settings in the file /etc/config/network

[0] https://openwrt.org/docs/guide-quick-start/checks_and_troubleshooting

Thanks for the help @riodoro and everyone else - much appreciated!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.