[SOLVED] Unstable WAN connection

Hi. I just installed openwrt on my C7 v5 router. I have configured my vlans as needed but i am experiencing major unstable connection to WAN. When running ping from the diagnostic page i get random results fromt 100% to 0%. Not sure what im doing wrong, or what i have forgotten to configure.

My WAN connection is 500/500 fiber and was stable until i put it to bridge mode and added my new openwrt c7 v5 in between.

A TLDR on my setup. I've created two VLANs (10 is my personal network, and 50 is for the apartment im renting out in the basement). I've so far only tested it on my personal network, via wired connection)

root@OpenWrt:~# 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 'fd20:9267:6335::/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 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 vid '1'
        option ports '0t 2 5'

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

config switch_vlan
        option device 'switch0'
        option vlan '3'
        option ports '0t 3'
        option vid '10'

config switch_vlan
        option device 'switch0'
        option vlan '4'
        option ports '0t 4'
        option vid '50'

config interface 'vlan10_home'
        option proto 'static'
        option ifname 'eth0.10'
        option ipaddr '10.10.10.1'
        option netmask '255.255.255.0'
        option gateway '10.10.10.1'
        option broadcast '10.10.10.255'
        option dns '8.8.8.8'
        option type 'bridge'

config interface 'vlan50_apart'
        option proto 'static'
        option ifname 'eth0.50'
        option ipaddr '10.10.50.1'
        option netmask '255.255.255.0'
        option gateway '10.10.50.1'
        option broadcast '10.10.50.255'
        option dns '8.8.8.8'

Remove broadcasts and gateways for a start.
Use mtr to test the whole path for losses.

remove broadcast and gateways on the vlans? There is no issue between the vlan and the openwrt router. These packet losses of 50-80% happens even if i run pings directly from the router itself to 8.8.8.8 or any other external ip.

                                                                              My traceroute  [v0.85]
OpenWrt (0.0.0.0)                                                                                                                                         Sat May 11 16:38:50 2019
Keys:  Help   Display mode   Restart statistics   Order of fields   quit
                                                                                                                                          Packets               Pings
 Host                                                                                                                                   Loss%   Snt   Last   Avg  Best  Wrst StDev
 1. ???
 2. ae7-0.no-323-rt2.get.no                                                                                                             68.1%    48   17.4 202.4  14.3 1928. 524.9
 3. ae10-0.prg-peer2.osl.no.ip.tdc.net                                                                                                  70.2%    48   16.8 192.5  14.1 1776. 492.1
 4. ae0-0.stkm2nqp7.se.ip.tdc.net                                                                                                       70.2%    48   27.8 177.8  22.7 1623. 440.0
 5. peer-as15169.stkm2nqp7.se.ip.tdc.net                                                                                                69.6%    47   25.1 155.8  23.1 1471. 392.1
 6. ???
 7. google-public-dns-a.google.com                                                                                                      69.6%    47   24.3 269.8  23.3 2231. 641.4

Yes, I am aware where the problem is.
Did you remove them?

No. But i saw that my lan interface and wan interface were on the same ip range so i changed the lan interface to 192.168.2 while my wan remains on 192.168.1. and the packet losses have gone away!

--- 8.8.8.8 ping statistics ---
203 packets transmitted, 203 packets received, 0% packet loss
round-trip min/avg/max = 22.520/25.915/37.287 ms

Regardless, remove the gateway and broadcast from the LAN interfaces.

If your problem is solved, feel free to mark the relevant post as the solution; and edit the title to add "[SOLVED]" to the beginning (click the pencil behind the topic).

grafik

Could you explain why i should remove them? I just followed a guide on youtube for setting up vlans on the archer and the guy there did it the same way with broadcast and gateway on the vlans.

The default gateway is the router that has reachability to the Internet (0.0.0.0/0.0.0.0)
The router doesn't have such reachability. The router gets the default gateway from the WAN upstream router.
Even the words he is mumbling in the video "This is all information that's gonna send to itself" while filling in the default gw make no sense. So no wonder that he is clueless about why he fills in the default gateway in an LAN interface.

Broadcast is calculated from the IP address and mask, so no need to add it. Set aside that a mistake there can mess up the router.

2 Likes

Ok, i will try to remove them then! Thanks a lot for the help!

1 Like