Network routing speed

Post Reply
deivid
Posts: 61
Joined: Wed Jun 05, 2013 11:34 pm
languages_spoken: english, spanish
ODROIDs: U2
Has thanked: 0
Been thanked: 2 times
Contact:

Network routing speed

Unread post by deivid » Mon Nov 25, 2019 5:04 am

Hi
I am looking to replace my aging espressobin with an H2 as a linux router. Can the H2 route at 1gbit/s? Has anyone tried this? With nat, iptables, etc?
My espressobin (clocked at 600mhz because of a hw defect) can only route at ~150mbit/s.

User avatar
odroid
Site Admin
Posts: 32732
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 220 times
Been thanked: 368 times
Contact:

Re: Network routing speed

Unread post by odroid » Mon Nov 25, 2019 10:38 am

Is there formal way to measure the routing performance?

User avatar
mad_ady
Posts: 6888
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 248 times
Been thanked: 181 times
Contact:

Re: Network routing speed

Unread post by mad_ady » Mon Nov 25, 2019 2:15 pm

I think a lot of small arm routers can only do ~300Mbps of NAT traffic without using special hardware acceleration.
On H2 it could be tested for example with iperf from within a container connected to the docker0 bridge (which is natted).
My hunch is it's powerful enough for gigabit nat.

User avatar
Mullcom
Posts: 120
Joined: Sun Jun 30, 2019 1:41 am
languages_spoken: english
Has thanked: 64 times
Been thanked: 7 times
Contact:

Re: Network routing speed

Unread post by Mullcom » Mon Nov 25, 2019 2:36 pm

odroid wrote:Is there formal way to measure the routing performance?
I don't think it should be any limitation CPU have power do to this.

How about

1 computer on wan Port with dhcp
2. Comport on lan.
3. Open Nat between wan and lan for fileshares,
4. Copy big files and see .

Or

iPerf ..


Solution 2

Install Pfsense or opensens

Skickat från min SM-G955F via Tapatalk


deivid
Posts: 61
Joined: Wed Jun 05, 2013 11:34 pm
languages_spoken: english, spanish
ODROIDs: U2
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Network routing speed

Unread post by deivid » Mon Nov 25, 2019 5:55 pm

you can do iperf to your own host having the odroid route 2 vlans.
at the moment doing this on my espressobin is limited by ksoftirqd pegging one core at 100%

User avatar
mad_ady
Posts: 6888
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 248 times
Been thanked: 181 times
Contact:

Re: Network routing speed

Unread post by mad_ady » Mon Nov 25, 2019 11:20 pm

I ran a quick test on my son's H2 (it's no longer mine if you ask him).
Traffic generated by iperf3 running in a docker container, going through the docker0 bridge, getting NAT'ed by the H2 and arriving at a N1 which is the iperf server (on a gigabit lan).
I got consistent 931Mbps between the two with a very low cpu load on the H2.
So it won't be a bottleneck. Didn't test vlans though, since that would require some network reconfiguration on my part.
These users thanked the author mad_ady for the post:
rooted (Tue Nov 26, 2019 4:59 pm)

User avatar
Mullcom
Posts: 120
Joined: Sun Jun 30, 2019 1:41 am
languages_spoken: english
Has thanked: 64 times
Been thanked: 7 times
Contact:

Re: Network routing speed

Unread post by Mullcom » Mon Nov 25, 2019 11:42 pm

mad_ady wrote:I ran a quick test on my son's H2 (it's no longer mine if you ask him).
Traffic generated by iperf3 running in a docker container, going through the docker0 bridge, getting NAT'ed by the H2 and arriving at a N1 which is the iperf server (on a gigabit lan).
I got consistent 931Mbps between the two with a very low cpu load on the H2.
So it won't be a bottleneck. Didn't test vlans though, since that would require some network reconfiguration on my part.
Bland should take up some CPU power but not all. So this configuration is Cindy of Prof. It take the way from Port 1 to port 2 ..

Maybe it's about driver?

Skickat från min SM-G955F via Tapatalk


joshua.yang
Posts: 301
Joined: Fri Sep 22, 2017 5:54 pm
languages_spoken: Korean, English
ODROIDs: XU4, XU4Q + Cloudshell2, H2, N2
Has thanked: 3 times
Been thanked: 50 times
Contact:

Re: Network routing speed

Unread post by joshua.yang » Tue Nov 26, 2019 2:42 pm

deivid wrote:
Mon Nov 25, 2019 5:55 pm
you can do iperf to your own host having the odroid route 2 vlans.
at the moment doing this on my espressobin is limited by ksoftirqd pegging one core at 100%
Hi.

I have tested with created two virtual LAN adapters by using vconfig command.

As I'm not familiar with vlan things, I think it is needed that you should check my test procedure. :)
This is the test steps I did. For that this link is many helped me: https://docs.oracle.com/cd/E37670_01/E4 ... 06s01.html

Code: Select all

# Installed vlan package to get vconfig command
sudo apt install vlan

# Configure vlans
sudo vconfig add enp2s0 1
sudo ip addr add 192.168.30.200/24 dev enp2s0.1
sudo ip link set enp2s0.1 up
# Did one more time to create the another one; enp2s0.2

# Performed iperf benchmark
sudo apt install iperf3
iperf3 -s -B 192.168.30.200
iperf3 -c 192.168.30.200
In my test environment, the iperf server is 192.168.30.200 (enp2s0.1) and the client is 192.168.30.201 (enp2s0.2).

Then I could get about 22~23 Gbps throughput results from the iperf outputs.
This is the screenshot, with htop screen during the benchmarking.
Screenshot from 2019-11-26 14-31-00.png
Screenshot from 2019-11-26 14-31-00.png (389.78 KiB) Viewed 671 times
Is these results could be the answer for you?

User avatar
rooted
Posts: 6924
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 278 times
Been thanked: 71 times
Contact:

Re: Network routing speed

Unread post by rooted » Tue Nov 26, 2019 5:12 pm

mad_ady wrote:I ran a quick test on my son's H2 (it's no longer mine if you ask him).
Traffic generated by iperf3 running in a docker container, going through the docker0 bridge, getting NAT'ed by the H2 and arriving at a N1 which is the iperf server (on a gigabit lan).
I got consistent 931Mbps between the two with a very low cpu load on the H2.
So it won't be a bottleneck. Didn't test vlans though, since that would require some network reconfiguration on my part.
That's good to know, been wanting to setup the H2 as a pfsense box just haven't gotten around to it. I recently updated my WAN to gigabit and don't really have a router capable of handling it.

I need to get rid of the rented ISP modem/router but it's a bit expensive for a DOCSIS 3.1 modem currently.

User avatar
mad_ady
Posts: 6888
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 248 times
Been thanked: 181 times
Contact:

Re: Network routing speed

Unread post by mad_ady » Tue Nov 26, 2019 5:47 pm

@rooted - how are you getting your internet? If it's DOCSIS - is it CATV? Does that still exist in the wild? If you need your ISP's modem just to terminate the connection, ask them to set it up in bridge mode so you can put layer 3 (PPPoE or whatever) on your router.
You may want to look into running openwrt as a VM or container: https://www.reddit.com/r/openwrt/commen ... er_x86_64/
These users thanked the author mad_ady for the post:
rooted (Wed Nov 27, 2019 3:03 am)

User avatar
Mullcom
Posts: 120
Joined: Sun Jun 30, 2019 1:41 am
languages_spoken: english
Has thanked: 64 times
Been thanked: 7 times
Contact:

Re: Network routing speed

Unread post by Mullcom » Wed Nov 27, 2019 12:35 am

Yes . Set modem in bridge mode. When I have modem I login to it and enable it in modem. Then add a vlan in my Cisco switch to my VM with pfsense installed.

Skickat från min SM-G955F via Tapatalk

These users thanked the author Mullcom for the post:
rooted (Wed Nov 27, 2019 3:03 am)

User avatar
rooted
Posts: 6924
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 278 times
Been thanked: 71 times
Contact:

Re: Network routing speed

Unread post by rooted » Wed Nov 27, 2019 3:02 am

mad_ady wrote:@rooted - how are you getting your internet? If it's DOCSIS - is it CATV? Does that still exist in the wild? If you need your ISP's modem just to terminate the connection, ask them to set it up in bridge mode so you can put layer 3 (PPPoE or whatever) on your router.
You may want to look into running openwrt as a VM or container: https://www.reddit.com/r/openwrt/commen ... er_x86_64/
I poked around in the modem and it does have bridge mode, my problem with the modem is it has a monthly rental fee which I don't like to pay.

Yes it's gigabit over copper (DOCSIS 3.1), unfortunately it's not symmetrical like fiber. It's 984 down and 40 up and is unlimited unlike most all WAN connections here in the US.
Mullcom wrote:Yes . Set modem in bridge mode. When I have modem I login to it and enable it in modem. Then add a vlan in my Cisco switch to my VM with pfsense installed.

Skickat från min SM-G955F via Tapatalk
Thanks for the hint, my switch does support vlan.

User avatar
mad_ady
Posts: 6888
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 248 times
Been thanked: 181 times
Contact:

Re: Network routing speed

Unread post by mad_ady » Wed Nov 27, 2019 4:11 am

Do you have a model? I'm not familiar with docsis over copper...

User avatar
rooted
Posts: 6924
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 278 times
Been thanked: 71 times
Contact:

Re: Network routing speed

Unread post by rooted » Wed Nov 27, 2019 4:33 am

mad_ady wrote:Do you have a model? I'm not familiar with docsis over copper...
The gateway is a Technicolor CGM4141

User avatar
mad_ady
Posts: 6888
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 248 times
Been thanked: 181 times
Contact:

Re: Network routing speed

Unread post by mad_ady » Wed Nov 27, 2019 3:39 pm

Ok, I did some reading and it's similar to how the customers of the ISP I work for connect to the internet.
This is a bit offtopic, but should help others understand what the H2 can or can't do as a router.

A modem (aka CPE) does more things than a router. A router works at layer 3 while the modem does more layer 2 stuff. Of course, your device does both things. But the thing is - the layer two part is pretty vendor/technology specific. It runs custom protocols that allow your CPE to register on the network (typically by using MAC/SN or some vendor/ISP ID), gets bandwidth configuration(*), etc.
Usually after the modem registers on the network it sets up a remote management interface (either on a specific vlan or on the internet vlan) and connects to the ISP's TR69 platform which does remote router configuration and management. This can do automatic firmware upgrades, mew service deployment (e.g. activating voip/iptv or some sort of business/vpn setup).
On top of all this you get the normal, router stuff with dhcp/pppoe/nat/ipv6 maybe/port forwarding/etc, that the H2 can do.

(*) The way bandwidth configuration works in GPON networks (where a single fiber gets passively split between 32-64 customers) is this way (should be somewhat similar to docsis):
- download traffic (1.25Gbps total shared bandwidth for typical installations) is sent on a specific wavelength and is broadcast to all subscribers. So everyone receives the same packets, but the ONT (Optical Network Terminal aka "modem") keeps only traffic destined to itself.
- upload traffic is using a different lightwave and the CPEs are using Time Division Multiple Access to send data upstream without collisions. This means each CPE gets one or more timeslots where it can send traffic. Because the upload bandwidth is lower than the download, this means traffic is asymetric.
The aggregator device (DSLAM) controls the bandwidth for each customer - it applies a line profile per customer. It does shaping for the download and allocates upload timeslots dynamically. This is usually done using a vendor custom protocol, or if there is a standard protocol, vendors don't usually make cross-vendor compatible implementations to keep you locked in.

Now, if you configure your CPE in bridged mode, all of this will still happen in the background and only the internet vlan will get bridged to a lan port where you can plug in a router.

To ditch the device completely is more difficult. You'd need a card that speaks docsis and is compatible with what your isp is using. You'd need to convince your ISP to allow it on the network (the card's id needs to be discovered/provisioned and associated to your account in your ISP's systems) - good luck doing that without having a friend on the inside.
You could live without TR69, but you'd need to configure the services manually (this means configuring vlans for voip, internet, iptv, etc, configuring addresses per vlan, setting sip accounts, and a lot of things that can be done, except the information is not public or static and is typically served via TR69).

In your case, I'd ask the ISP if there is a cheaper, bridge-only CPE that you can buy and that is supported in their network.

Hope this helps.
These users thanked the author mad_ady for the post:
rooted (Wed Nov 27, 2019 5:25 pm)

anomeome
Posts: 1
Joined: Fri Nov 29, 2019 10:19 am
languages_spoken: english
ODROIDs: H2 C1
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Network routing speed

Unread post by anomeome » Fri Nov 29, 2019 10:32 am

A user posted numbers running OpenWrt on various devices including a H2:
https://forum.openwrt.org/t/comparative ... nvpn/44724
These users thanked the author anomeome for the post:
mad_ady (Fri Nov 29, 2019 4:33 pm)

deivid
Posts: 61
Joined: Wed Jun 05, 2013 11:34 pm
languages_spoken: english, spanish
ODROIDs: U2
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Network routing speed

Unread post by deivid » Sat Nov 30, 2019 1:05 am

I received my H2. I am currently routing 109MB/s and I see one core at 63.2% of cpu usage (out of 400%) in kernelspace. I can't route any faster wan-to-lan but for me this is perfect.
These users thanked the author deivid for the post:
rooted (Sat Nov 30, 2019 6:20 am)

User avatar
rooted
Posts: 6924
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 278 times
Been thanked: 71 times
Contact:

Re: Network routing speed

Unread post by rooted » Sat Nov 30, 2019 6:21 am

deivid wrote:I received my H2. I am currently routing 109MB/s and I see one core at 63.2% of cpu usage (out of 400%) in kernelspace. I can't route any faster wan-to-lan but for me this is perfect.
What OS are you running?

deivid
Posts: 61
Joined: Wed Jun 05, 2013 11:34 pm
languages_spoken: english, spanish
ODROIDs: U2
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Network routing speed

Unread post by deivid » Sat Nov 30, 2019 7:02 am

rooted wrote:
Sat Nov 30, 2019 6:21 am
deivid wrote:I received my H2. I am currently routing 109MB/s and I see one core at 63.2% of cpu usage (out of 400%) in kernelspace. I can't route any faster wan-to-lan but for me this is perfect.
What OS are you running?
debian. i use shorewall to manage my routing roules
These users thanked the author deivid for the post:
rooted (Sat Nov 30, 2019 11:25 am)

MrTee
Posts: 1
Joined: Thu Oct 17, 2019 12:07 am
languages_spoken: english
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Network routing speed

Unread post by MrTee » Fri Dec 13, 2019 1:25 am

I just set the H2 up this morning.

I am running unraid on the H2, and using pFsense in a VM (I've heard the cons, but it works very well for me in another setup)

I passthrough 1 Realtek NIC for WAN and have a virtual vmxnet3 for LAN on the pFSense Setup.

My pFsense runs snort on top of a VPN, so some fairly heavy lifting.

With default pFSense drivers when I hit the system with a speed test I was getting almost 50% packetloss... and 65Mb/sec on a 100Mb line
Updated the realtek drivers and this changed to 15-20% packet loss and about 90Mb/sec.

I have the same setup on my i9 9900K with intel NICs and it is hitting 1% packet loss and 96Mb/sec.

CPU is getting hit pretty hard, but I am using hardware AES-NI for the VPN and it is active.
These users thanked the author MrTee for the post:
odroid (Fri Dec 13, 2019 11:03 am)

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 0 guests