OpenWrt Forum Archive

Topic: Internet speed on second router (OpenWRT) is slow

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

New to OpenWRT, please help


installed official BB 14.07 on RG100A (a 5-port router including 1 WAN and 4 LAN ports)

This OpenWRT enabled router acts as second router connected to an ADSL router. Using static IP to connect to the ADSL Router. But the internet speed is only half for the PC connected to the OpenWRT compared with straight on connection to the ADSL Router (both wired or wireless connection to the OpenWRT).


internet

"above diagram credit to member eone"


network config:

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

config interface 'lan'
    option ifname 'eth1'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.1.1'
    option netmask '255.255.255.0'

config interface 'wan'
    option ifname 'eth0'
    option proto 'static'
    option ipaddr '192.168.9.2'
    option netmask '255.255.255.0'
    option gateway '192.168.9.1'
    option dns '192.168.9.1'

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

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

I did not change the firewall or other settings.

Please help.

Many thanks.

(Last edited by simonexpert on 22 Sep 2015, 19:33)

What's the reason for using 2 routers? Is the OpenWRT box just being used as an additional wireless access point? If so, you should bridge the ethernet to the wireless so your traffic doesn't have to pass through 2 layers of NAT needlessly.

(Last edited by Degeneratescum on 22 Sep 2015, 17:33)

Is it really the internet connection speed, which is slow, or slow browsing ?
I have a very similar setup, also DSL, 6MBit, and  on openwrt-box IP via dhcp from DSL-router. No real difference.
Actually, I question your
option dns '192.168.9.1'
option gateway '192.168.9.1'
Where is the DNS-server/gateway in your diagram ?
You might consider caching-dns (dnsmasq) on openwrt-box.

Degeneratescum wrote:

What's the reason for using 2 routers? Is the OpenWRT box just being used as an additional wireless access point? If so, you should bridge the ethernet to the wireless so your traffic doesn't have to pass through 2 layers of NAT needlessly.

Thank you for the reply.


The reason is to use the OpenWRT to connect to VPN only.

(Last edited by simonexpert on 22 Sep 2015, 18:40)

augustus_meyer wrote:

Is it really the internet connection speed, which is slow, or slow browsing ?
I have a very similar setup, also DSL, 6MBit, and  on openwrt-box IP via dhcp from DSL-router. No real difference.
Actually, I question your
option dns '192.168.9.1'
option gateway '192.168.9.1'
Where is the DNS-server/gateway in your diagram ?
You might consider caching-dns (dnsmasq) on openwrt-box.


Thank you for the reply.

My ADSL speed is 12MBit, for connection to the ADSL, download speed can reach 1.4M.
For connection to the OpenWRT, download speed reduced to half at 700K and not stable.

The diagram is taken from member eone, so, the ip addresses in the diagram are not accurate.

Actual IP in the ADSL is 192.168.9.x
Actual IP in the OpenWRT is assigned to 192.168.1.x


[EDIT: the download speed test performed on both wired and wireless connection to the OpenWRT]

(Last edited by simonexpert on 22 Sep 2015, 19:34)

simonexpert wrote:

The reason is to use the OpenWRT to connect to VPN only.

You need to elaborate on this. What sort of VPN setup? This could be the cause of lower speeds.

Degeneratescum wrote:
simonexpert wrote:

The reason is to use the OpenWRT to connect to VPN only.

You need to elaborate on this. What sort of VPN setup? This could be the cause of lower speeds.


hello again,

I mean the ultimate reason of having this OpenWRT second router is to run a VPN client on it that would allow this secondary network to connect to the VPN server on the internet. But this is my next step.

My first step is to have the OpenWRT fully operational at full speed for both wired and wireless connection to the OpenWRT, which brings us to this post.

Any thoughts?

(Last edited by simonexpert on 22 Sep 2015, 19:35)

firewall configuration as below:

/etc/config/firewall



config defaults
    option syn_flood '1'
    option input 'ACCEPT'
    option output 'ACCEPT'
    option forward 'REJECT'

config zone
    option name 'lan'
    option input 'ACCEPT'
    option output 'ACCEPT'
    option forward 'ACCEPT'
    option network 'lan'

config zone
    option name 'wan'
    option input 'REJECT'
    option output 'ACCEPT'
    option forward 'REJECT'
    option masq '1'
    option mtu_fix '1'
    option network 'wan wan6 VPN vpn'

config forwarding
    option src 'lan'
    option dest 'wan'

config rule
    option name 'Allow-DHCP-Renew'
    option src 'wan'
    option proto 'udp'
    option dest_port '68'
    option target 'ACCEPT'
    option family 'ipv4'

config rule
    option name 'Allow-Ping'
    option src 'wan'
    option proto 'icmp'
    option icmp_type 'echo-request'
    option family 'ipv4'
    option target 'ACCEPT'

config rule
    option name 'Allow-DHCPv6'
    option src 'wan'
    option proto 'udp'
    option src_ip 'fe80::/10'
    option src_port '547'
    option dest_ip 'fe80::/10'
    option dest_port '546'
    option family 'ipv6'
    option target 'ACCEPT'

config rule
    option name 'Allow-ICMPv6-Input'
    option src 'wan'
    option proto 'icmp'
    list icmp_type 'echo-request'
    list icmp_type 'echo-reply'
    list icmp_type 'destination-unreachable'
    list icmp_type 'packet-too-big'
    list icmp_type 'time-exceeded'
    list icmp_type 'bad-header'
    list icmp_type 'unknown-header-type'
    list icmp_type 'router-solicitation'
    list icmp_type 'neighbour-solicitation'
    list icmp_type 'router-advertisement'
    list icmp_type 'neighbour-advertisement'
    option limit '1000/sec'
    option family 'ipv6'
    option target 'ACCEPT'

config rule
    option name 'Allow-ICMPv6-Forward'
    option src 'wan'
    option dest '*'
    option proto 'icmp'
    list icmp_type 'echo-request'
    list icmp_type 'echo-reply'
    list icmp_type 'destination-unreachable'
    list icmp_type 'packet-too-big'
    list icmp_type 'time-exceeded'
    list icmp_type 'bad-header'
    list icmp_type 'unknown-header-type'
    option limit '1000/sec'
    option family 'ipv6'
    option target 'ACCEPT'

config include
    option path '/etc/firewall.user'

In your WAN zone you have

option network 'wan wan6 VPN vpn'

If your network config at the top is correct, you do not have the VPN or vpn interfaces, and I do not see the expected WAN6 interface either.

RangerZ wrote:

In your WAN zone you have

option network 'wan wan6 VPN vpn'

If your network config at the top is correct, you do not have the VPN or vpn interfaces, and I do not see the expected WAN6 interface either.


Shall I delete them? alone with the IP6? I don't use IP6 at all.

As I have similar setup, incl. double NAT, but withoutvpn, having no problem, you might try a plain "vanilla" openwrt config, as to be downloaded pre-built. And check, whether DSL also slow or not. To have an idea, where problem is located.

augustus_meyer wrote:

As I have similar setup, incl. double NAT, but withoutvpn, having no problem, you might try a plain "vanilla" openwrt config, as to be downloaded pre-built. And check, whether DSL also slow or not. To have an idea, where problem is located.


thank you for the info. I am using the vanilla openwrt straight from this official website.

It's very strange that if I connect to an ADSL modem (not router) with this OpenWRT router and pppoe dial up the internet, it can achieve full speed.

So I guess it's the DHCP or Static on the WAN of this OpenWRT is not working properly.

You imply in post 7 that you do not have VPN installed, and your config files seem to indicate the same.   So the VPN entries are at least confusing.  If you have VPN installed, start by disabling it in start up.  Check.  If still an issue yes delete them.

Do you have a WAN6 Interface?  if not also delete this element.  If yes, review the first posts config against your current config.   I think something is not in alignment.

As agustus_meyer suggests, reset and restart the config. 

Of course make backups along the way.

RangerZ wrote:

You imply in post 7 that you do not have VPN installed, and your config files seem to indicate the same.   So the VPN entries are at least confusing.  If you have VPN installed, start by disabling it in start up.  Check.  If still an issue yes delete them.

Do you have a WAN6 Interface?  if not also delete this element.  If yes, review the first posts config against your current config.   I think something is not in alignment.

As agustus_meyer suggests, reset and restart the config. 

Of course make backups along the way.


Thank you for the reply.

I have reinstalled the 14.07 and delete all unnecessary items in the firewall and network config, but still no help.

Strangely, the Realtime Graph shows some unstable speed.

realtime traffic

I hope you will resolve the issue and post your solution here. I have several OpenWRT devices connected directly to my cablemodem box. They all can get up to 15 MBps download speed. However, transferring files from one OpenWRT device to another can only go as high as 4.3 MBps. I don't know why, but it sure does not look right to me.

I am glad you started this topic as I have a similar setup so I do not have to bother my self with the explanation. I have done a ping test from both devices and you can see a small delay for the Openwrt router.

#########This is from my ISP modem/router###########

PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=55 time=20.6 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=55 time=20.3 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=55 time=20.7 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=55 time=21.0 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=55 time=21.8 ms
64 bytes from 8.8.8.8: icmp_seq=6 ttl=55 time=20.4 ms
64 bytes from 8.8.8.8: icmp_seq=7 ttl=55 time=26.2 ms
64 bytes from 8.8.8.8: icmp_seq=8 ttl=55 time=20.8 ms
64 bytes from 8.8.8.8: icmp_seq=9 ttl=55 time=21.2 ms
64 bytes from 8.8.8.8: icmp_seq=10 ttl=55 time=19.8 ms

--- 8.8.8.8 ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9015ms
rtt min/avg/max/mdev = 19.836/21.314/26.217/1.718 ms

############This is from my Openwrt router###########

PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=54 time=21.5 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=54 time=22.4 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=54 time=20.7 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=54 time=21.0 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=54 time=22.4 ms
64 bytes from 8.8.8.8: icmp_seq=6 ttl=54 time=22.2 ms
64 bytes from 8.8.8.8: icmp_seq=7 ttl=54 time=21.4 ms
64 bytes from 8.8.8.8: icmp_seq=8 ttl=54 time=21.5 ms
64 bytes from 8.8.8.8: icmp_seq=9 ttl=54 time=22.2 ms
64 bytes from 8.8.8.8: icmp_seq=10 ttl=54 time=23.0 ms

--- 8.8.8.8 ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9014ms
rtt min/avg/max/mdev = 20.730/21.860/23.009/0.691 ms

Should I be worried?

Id0n0tunderstand wrote:

I am glad you started this topic as I have a similar setup so I do not have to bother my self with the explanation. I have done a ping test from both devices and you can see a small delay for the Openwrt router.

#########This is from my ISP modem/router###########
[...]
rtt min/avg/max/mdev = 19.836/21.314/26.217/1.718 ms

############This is from my Openwrt router###########
[...]
rtt min/avg/max/mdev = 20.730/21.860/23.009/0.691 ms

Should I be worried?

On average you see 0.5 ms delay added by the additional hop. Nothing to worry about, for the class of machines doing duty as routers that is pretty okay. You could try to confirm this by pinging yje ISP-modem from he openwrt-router and vice versa..


Best Regards
        M.

The discussion might have continued from here.