[Solved] Unstable Amazon Music - narrow down the problem

My topic is a bit off-topic as I don't know yet if it's related to OpenWRT.

Since a few days, Amazon Music does not work properly on my Amazon Echos. The playback pauses every few seconds, does not start or stops completely.

Now I'm trying to detect the cause of this and I'm coming to the end of my network knowledge.
I would like to narrow down the error to a specific area: The amazon-music-server, my lte-based internet connection or my own network configuration. Actually i do not know where the cause of this is.

My network is basically structured as follows:

What i already tried?:

  • i changed the APs where the echos connected to (even to a non openwrt device)
  • I read out the port statistics at the main switch. I got 185 bad received packets from 32043 at all at the router and 103(from 21044) at ap1 and 32(from 41814) at ap2. This sounds too much to me so i tried:
    • Changing Ports at the switch and the aps
    • replaced ap 1 with a fresh installed Mi 3G with 19.07.7
    • replaced cables
    • the bad received packets still persists.
  • i made several tcpdumps at the router and the APs.
    • At the router i got nearly 9% of all packets are tcp.analysis.duplicate_ack, tcp.analysis.retransmission or tcp.analysis.spurious_retransmission
    • most of them are reated to a amazon-music server (hosted at cloudfront)

However, now I do not know how to break down the problem. I therefore hope that one of the network experts can help me.

You're not simply maxing out your LTE connection ?

2 Likes

Unfortunately no.
My data volume has still ~60GB left and my bandwith is quite stable over the time in the speed tests at 50 Mbit/s down and 25 Mbit/s up.

Have the Xiaomi router any wifi enabled ?

The APs, are they set up in any kind of mesh ?

1 Like

Yes. The Router has 2 2,4 Ghz Wifis and 2 5Ghz. (in sum 2 SSIDs). I share the ssids over all the APs and separate these networks by VLAN. So i have VLAN 1 for my main network, VLAN 2 for the WAN connection (only untagged at the router wan port) and vlan 3 for guest and vlan 4 for tor.

The APs are not set up as mesh because i have a cable connection so they are real access points.

I have my C2600s as APs too, but they have 802.11r enabled for easy transition between all three of them.

Point is, you don't know your devices are connected to the best AP, signal wise, since there's no set up letting them to roam.

But to try find the issue, kill the WLAN used by your Amazon music devices on the APs, and recreate it on the Xiaomi router. It'll bypass the APs and the switch.

1 Like

Yes i also enabled 802.11r for all of them. But this is no mesh like 802.11s - isn't?

This is a good idea but unfortunately it is currently obsolete, as an echo is already attached to the router only and it has the same problems.

Well, it that case move it further down stream, and hook it up to the LTE modem, if doable.

1 Like

Hm - or something in the router setting?

Well,

if you want to rule out as much as possible, it's better to be as close as possible to the source of your internet.

Theoretically you could move one of your APs to the LTE modem, since it's (the modem) most probably FW:ed anyway, and you're (probably) double NATing.

1 Like

I can try it - even if it's not so easy because the modem is at the attic.

[quote="frollic, post:10, topic:89061"]
ed anyway, and you're (probably) double NATing.
[/quote]Probably yes - the modem is nating to the isp and the router is nating in direction to the modem. Is this configuration kind of wrong?

I also can share the config files or the tcpdumps if this would be helpful.

Thank you very much for your help until now.

you could replace the Xiaomi with one of the Redmis, I assume there's a cable going between those two.

It's not wrong, but it's sub optimal ...
But if you've always had it like that, then it's probably not the source of your issues.

1 Like

No - all access points and the router are directly connected to the main switch (with tagged vlan).

If it's suboptimal then I should probably change that. How would I make it better?

Currently the modem spans the subnet 192.168.1.0/24 and has itself the IP 192.168.1.1. The upstream side of the router has the static IP 192.168.1.2 with the 192.168.1.1 as gateway.

The downstream nets (one of the 3) of the router are 192.168.0.0/24 (main private net), 192.168.3.0/24 (for guest net) and 192.168.4.0/24 (for tor net) where the router has the IP 192.168.0.2, 192.168.3.2 and 192.168.4.2. The clients then get their IP from these nets via DHCP. The router make a NAT for the requests towards the modem with its IP 192.168.1.2.

How would the configuration look like without Double-NAT?

Update: I did it like you said.
The LTE modem has the possibility to offer a WLan itself. I have now coupled the Echos to this.
Result: The music plays through without dropouts.

The problem seems to be on the side of the router. However, I am now quite perplexed what exactly could be the cause.

Me too, your config looks perfectly fine. Idouble NAT isn't great but it does work fine most of the time and obviously didn't suddenly change.

I'm wondering if maybe your neighbors brought some wifi online that interferes with your APs. All APs should be on different channels from each other.

1 Like

Until now i didn't post some portion of my config.
So maybe i should begin with the router settings:

/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 'fd18:c585:1ade::/48'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0.1'
	option proto 'static'
	option netmask '255.255.255.0'
	option ipaddr '192.168.0.2'
	option ip6ifaceid '::2'
	option force_link '0'
	option igmp_snooping '1'
	list dns 'fe80::xxxx:xxxx:xxxx:907d'
	list dns '192.168.0.9'
	option ip6assign '64'

config device 'lan_eth0_1_dev'
	option name 'eth0.1'
	option macaddr 'ec:xx:xx:xx:xx:88'

config interface 'wan'
	option ifname 'eth0.2'
	option proto 'static'
	option gateway '192.168.1.1'
	option ipaddr '192.168.1.2'
	option netmask '255.255.255.0'
	option ip6assign '64'
	option peerdns '0'
	option mtu '1472'

config interface 'wan6'
	option ifname 'eth0.2'
	option proto 'dhcpv6'
	option reqaddress 'try'
	option reqprefix 'auto'
	option peerdns '0'
	option mtu '1472'

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

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option vid '1'
	option ports '6t 3t 2t'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '6t 1'
	option vid '2'

config switch_vlan
	option device 'switch0'
	option vlan '3'
	option vid '3'
	option ports '6t 3t 2t'

config switch_vlan
	option device 'switch0'
	option vlan '4'
	option vid '4'
	option ports '6t 3t 2t'

config interface 'gast'
	option proto 'static'
	option ipaddr '192.168.3.2'
	option netmask '255.255.255.0'
	option ifname 'eth0.3'
	option type 'bridge'
	option igmp_snooping '1'
	option ip6ifaceid '::3:2'
	list ip6class 'wan6'
	option force_link '0'
	list dns '192.168.0.9'
	list dns 'fe80::xxxx:xxxx:xxxx:907d'
	option ip6assign '64'

config interface 'tor'
	option proto 'static'
	option ifname 'eth0.4'
	option type 'bridge'
	option netmask '255.255.255.0'
	option ipaddr '192.168.4.2'
/etc/config/dhcp
config dnsmasq
	option domainneeded '1'
	option localise_queries '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.auto'
	list server 'fe80::xxxx:xxxx:xxxx:907d'
	list server '192.168.0.9'
	option localservice '0'
	option rebind_protection '1'
	option rebind_localhost '1'
	option filterwin2k '1'

config dhcp 'lan'
	option interface 'lan'
	option limit '150'
	option leasetime '6h'
	option start '50'
	option force '1'
	option ndp 'relay'
	list dns 'fe80::xxxx:xxxx:xxxx:907d'
	option ra_management '1'
	option dhcpv6 'server'
	option ra 'hybrid'
	list dhcp_option '6,192.168.0.9'
	list dhcp_option '26,1472'
	option ra_mtu '1472'

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

config dhcp 'wan6'
	option dhcpv6 'relay'
	option ra 'relay'
	option ndp 'relay'
	option master '1'
	option interface 'wan6'
	option start '100'
	option leasetime '12h'
	option limit '150'

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

config dhcp 'gast'
	option start '100'
	option limit '150'
	option interface 'gast'
	option leasetime '1h'
	option ra_management '1'
	option force '1'
	option dhcpv6 'server'
	option ndp 'relay'
	option ra 'hybrid'
	list dns 'fe80::xxxx:xxxx:xxxx:6687'
	list dhcp_option '6,192.168.0.2'
	list dhcp_option '26,1472'
	option ra_mtu '1472'
/etc/config/wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option hwmode '11g'
	option path 'pci0000:00/0000:00:00.0/0000:01:00.0'
	option htmode 'HT20'
	option distance '13'
	option channel '1'
	option country 'DE'
	option legacy_rates '0'
	option beacon_int '250'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option ft_over_ds '1'
	option ssid 'XXXX'
	option encryption 'psk2'
	option ft_psk_generate_local '1'
	option key 'xxxxxxxxxxxx'
	option ieee80211r '1'
	option mobility_domain '1a2b'
	option pmk_r1_push '1'
	option nasid 'xxxRouter2G'

config wifi-iface 'wifinet2'
	option ssid 'InternetOnly'
	option encryption 'psk2'
	option device 'radio0'
	option isolate '1'
	option ieee80211r '1'
	option ft_over_ds '1'
	option key 'xxxxxxxxx'
	option mode 'ap'
	option network 'gast'
	option ft_psk_generate_local '1'
	option pmk_r1_push '1'
	option mobility_domain '1a2b'

config wifi-device 'radio1'
	option type 'mac80211'
	option hwmode '11a'
	option path 'pci0000:00/0000:00:01.0/0000:02:00.0'
	option distance '15'
	option htmode 'VHT80'
	option channel '60'
	option country 'DE'
	option legacy_rates '0'
	option beacon_int '250'

config wifi-iface 'default_radio1'
	option device 'radio1'
	option network 'lan'
	option mode 'ap'
	option ssid 'XXXX'
	option ft_over_ds '1'
	option key 'xxxxxxxxxxxx'
	option encryption 'psk2'
	option ft_psk_generate_local '1'
	option ieee80211r '1'
	option mobility_domain '1a2b'
	option pmk_r1_push '1'
	option nasid 'XXXXRouter5G'

config wifi-iface 'wifinet3'
	option ssid 'InternetOnly'
	option encryption 'psk2'
	option device 'radio1'
	option isolate '1'
	option ieee80211r '1'
	option ft_over_ds '1'
	option key 'xxxxxxxxx'
	option mode 'ap'
	option network 'gast'
	option ft_psk_generate_local '1'

I can also post some tcpdumps if it would be senseful.

My wifi neighbourhood is quite clear. My own wifis use the 2,4Ghz channels 1,5,9,13 at 20Mhz and for 5Ghz 40 and 46 at 40 Mhz and 58 at 80 Mhz. None of these channels is used twice. The neighbours wifis are very poor and should not interference much.

So how to avoid this in my setup?

It depends on the modem, if it has a "bridge mode" then use that.

1 Like

Unfortunately no. Okay, then I have understood that correctly. I have not yet thought of a sensible configuration how I could avoid the double NAT.

Put the Xiaomi on the same subnet as the modem.
Disable the DHCP in the modem, and let the Xiaomi run it.

Connect LAN-LAN, unless you convert Xiaomis WAN port to LAN.

In the DHCP put the modem as the default gateway.

You can run the Xiaomi as dumb AP, but with DHCP enabled.

1 Like

Do not do this. Although it will eliminate double NAT it will also eliminate all control you have over your own network, now a Xiaomi device with who knows what firmware on it is in control. Double NAT is not your problem because your problem only started a few days ago but double NAT has been there the whole time.

1 Like