OpenWrt Forum Archive

Topic: [SOLVED] Packet loss between router and modem.

The content of this topic has been archived on 6 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,
I'm having problems with a very unstable internet connection. I'm having timeouts, low speeds, but the for some times, maybe a couple of minutes, it will work OK.
I started seeing this behaviour like a week ago. I can't remember changing any configuration at that moment. Now, trying to fix it, I think I have changed everything a couple of times smile

My connection looks like this:

  • a modem configured in bridge mode with no NAT, no DHCP server, and a fixed IP 192.168.1.1.

  • an OpenWrt router

    • WAN configured for PPPoE;

    • connected to the modem through an interface with IP 192.168.1.2

    • LAN bridge through an interface 192.168.2.1

   
If I ping from the router to the modem (192.168.1.2 to 192.168.1.1), I see a 15%-30% packets lost.
If I plug my computer directly to the modem interface and ping, I dont have any packet loss and my internet works ok.
If I plug my computer directly to the router WAN interface and ping, I dont have any packet loss.
I'm using the same ethernet cable for all testing.

So, I suspect that the source of my problem is the packet loss between the router and the modem.


My setup:   
I have an TP-Link TL-WDR4300 v1 running OpenWrt Chaos Calmer 15.05.1 / LuCI 15.05-149-g0d8bbd2 Release (git-15.363.78009-956be55).
The modem is a P-660R-T1 v2 from ZyXEL.


root@router:~# 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 'fd03:7ece:934b::/48'

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

config interface 'wan'
        option ifname 'eth0.2'
        option _orig_ifname 'eth0.2'
        option _orig_bridge 'false'
        option proto 'pppoe'
        option username 'USER@SERVICE'
        option password 'PASSWORD'
        option peerdns '0'
        option dns '208.67.222.222 208.67.220.220'

config interface 'wan6'
        option ifname 'eth0.2'
        option _orig_ifname 'eth0.2'
        option _orig_bridge 'false'
        option proto 'pppoe'
        option username 'USER@SERVICE'
        option password 'PASSWORD'
        option auto '0'

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

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

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

config interface 'modem'
        option proto 'static'
        option ifname 'eth0.2'
        option netmask '255.255.255.0'
        option ipaddr '192.168.1.2'
        option auto '0'
        option delegate '0'

I will appreciate any help. Thanks.

(Last edited by inakiregister on 13 Feb 2017, 00:59)

It could be a hardware problem.  Change your switch config so that you're using a different physical port to the modem.

mk24 wrote:

It could be a hardware problem.  Change your switch config so that you're using a different physical port to the modem.

Thanks mk24. Can I ask you assistance as how to do that? I never configured the switch side of the router and I'm not sure what am I suppose to try.

Again, thank you

Just change it so that instead of port 1 being in VLAN 2, it is one of the other ones.  And take that port out of VLAN 1.

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

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

Then you plug the modem into port 2, and the WAN port is now the fourth LAN port instead.

mk24 wrote:

Just change it so that instead of port 1 being in VLAN 2, it is one of the other ones.  And take that port out of VLAN 1.

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

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

Then you plug the modem into port 2, and the WAN port is now the fourth LAN port instead.

I tried this and it didn't solve the problem. I was able to use port 2 as WAN, but packet loss persisted. It was a nice shot anyway :-/

So I'm still with the crappy trough-router-connection...

I was thinking, could it be a problem with my modem configured as a Bridge? When I am using it connected directly to my computer, I set it up as Router and I have no problems. I'm just not sure how should I configure OpenWRT for connecting to the modem in Bridge mode and at the same time work as a router.

SOLVED

I'm posting this message just for closure.

Finally, it was a problem on the modem side. A new modem from the company fixed the lost of packets.

So if you ever face a similar scenario, just remember that hardware problems can also appear as a graceful degradation of service rather than a catastrophic event.

Thanks everyone for your help.

The discussion might have continued from here.