domoticity Posted April 8, 2018 Posted April 8, 2018 Hy, I have a Tinkerboard with armbian ( debian jessie). When I put behind my fiber router, and i do a speed test i have : With iperf3 ==> download : 980M and upload : 240M with speedtest-cli ==> More or less Results. I wanted to conenct my Asus's card behind the ONT(Optical Termination Boxes) i can connect with pppoe or dhcp. And in pppoe or dhcp my speed test show this : With iperf3 ==> download : 110M and upload : 80M with speedtest-cli ==> More or less Results. I have tested with anorther Board, bananapi mé with Bananian and i have the same Results if I put behind my fiber router so : With iperf3 ==> download : 980M and upload : 240M with speedtest-cli ==> More or less Results. Someone can help me
Rfreire Posted April 8, 2018 Posted April 8, 2018 Hello domoticity; Odd. Have you checked the actual negotiated speed of your interface card (in the Tinkerboard)? Looks like it is running in 100 Mbps instead. Check out my result: [root@tinkerboard ~]# ethtool eth0 Settings for eth0: Supported ports: [ TP AUI BNC MII FIBRE ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Supported pause frame use: No Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Link partner advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Link partner advertised pause frame use: No Link partner advertised auto-negotiation: Yes Speed: 1000Mb/s <======================== HERE Duplex: Full Port: MII PHYAD: 0 Transceiver: external Auto-negotiation: on Supports Wake-on: ug Wake-on: d Current message level: 0x0000003f (63) drv probe link timer ifdown ifup Link detected: yes [root@tinkerboard ~]# Check your board result with # ethtool eth0 and let us know. Ah. For what is worth, I have just finished a stress test here (I will replace the raspi with this tinkerboard) with netcat using the Tinkerboard both as the final destination (netcat running in the Tinkerboard) and NATting (using VLAN tag from two different VLANs). I got effective routing throughput of ~ 930 Mbps from both up and downstream. For completeness, this is a diagram of the test: +-------------+ +-------------+ +--------------+ | Computer 1 | | Tinkerboard | | Computer 2 | | 172.16.3.1 | | | | 172.16.8.1 | +---+---------+ +------+------+ +------------+-+ | | | | eth0.3 | eth0.8 | Untagged VLAN 3 | VLAN 3 | VLAN 8 |Untagged VLAN 8 | 172.16.3.13 | 172.16.8.13 | | +-----------+----------------+ | | | | | +-------+ Switch +------+ | | +----------------------------+ The tinkerboard is acting as a NAT / Gateway for VLAN 8. So we have here: # sysctl -w net.ipv4.ip_forward=1 # iptables -t nat -I POSTROUTING -o eth0.3 -j MASQUERADE So in Computer 1 I have: # cat /dev/zero | nc -l 3333 In computer 2: # nc 172.16.3.1 > /dev/null Monitoring the traffic in Tinkerboard, using # iptraf-ng This puts double penalty over the Tinkerboard. Instead of just routing, which is easy-peasy, it also does makes the Traffic pass through the Netfilter engine, and remember that I'm using VLAN tag, meaning the same physical inetraface servers both endpoints. But wait, there's more: I'm using the Asus-provided heatsink (Tony will surely roll his eyes) with temperatures not going above 56 Celsius. Even with this scenario I managed to pull ~930 Mbps of effective NAT traffic. The reverse is also true. Scenario: Tinkerboard: # iptables -t nat -I PREROUTING -p tcp --dport 4444 -j DNAT --to 172.16.8.1 Computer 2: # cat /dev/zero | nc -l 4444 Computer 1: # nc 172.16.8.13 4444 The second test is even more costly, because it has both the NAT and the Destination NAT. Still ~930 Mbps. <3'ing my tinkerboard!!!! \o/ 1
domoticity Posted April 8, 2018 Author Posted April 8, 2018 19 minutes ago, Rfreire said: Hello domoticity; Odd. Have you checked the actual negotiated speed of your interface card (in the Tinkerboard)? Looks like it is running in 100 Mbps instead. Check out my result: [root@tinkerboard ~]# ethtool eth0 Settings for eth0: Supported ports: [ TP AUI BNC MII FIBRE ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Supported pause frame use: No Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Link partner advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Link partner advertised pause frame use: No Link partner advertised auto-negotiation: Yes Speed: 1000Mb/s <======================== HERE Duplex: Full Port: MII PHYAD: 0 Transceiver: external Auto-negotiation: on Supports Wake-on: ug Wake-on: d Current message level: 0x0000003f (63) drv probe link timer ifdown ifup Link detected: yes [root@tinkerboard ~]# Check your board result with # ethtool eth0 and let us know. Ah. For what is worth, I have just finished a stress test here (I will replace the raspi with this tinkerboard) with netcat using the Tinkerboard both as the final destination (netcat running in the Tinkerboard) and NATting (using VLAN tag from two different VLANs). I got effective routing throughput of ~ 930 Mbps from both up and downstream. For completeness, this is a diagram of the test: +-------------+ +-------------+ +--------------+ | Computer 1 | | Tinkerboard | | Computer 2 | | 172.16.3.1 | | | | 172.16.8.1 | +---+---------+ +------+------+ +------------+-+ | | | | eth0.3 | eth0.8 | Untagged VLAN 3 | VLAN 3 | VLAN 8 |Untagged VLAN 8 | 172.16.3.13 | 172.16.8.13 | | +-----------+----------------+ | | | | | +-------+ Switch +------+ | | +----------------------------+ The tinkerboard is acting as a NAT / Gateway for VLAN 8. So we have here: # sysctl -w net.ipv4.ip_forward=1 # iptables -t nat -I POSTROUTING -o eth0.3 -j MASQUERADE So in Computer 1 I have: # cat /dev/zero | nc -l 3333 In computer 2: # nc 172.16.3.1 > /dev/null Monitoring the traffic in Tinkerboard, using # iptraf-ng This puts double penalty over the Tinkerboard. Instead of just routing, which is easy-peasy, it also does makes the Traffic pass through the Netfilter engine, and remember that I'm using VLAN tag, meaning the same physical inetraface servers both endpoints. But wait, there's more: I'm using the Asus-provided heatsink (Tony will surely roll his eyes) with temperatures not going above 56 Celsius. Even with this scenario I managed to pull ~930 Mbps of effective NAT traffic. The reverse is also true. Scenario: Tinkerboard: # iptables -t nat -I PREROUTING -p tcp --dport 4444 -j DNAT --to 172.16.8.1 Computer 2: # cat /dev/zero | nc -l 4444 Computer 1: # nc 172.16.8.13 4444 The second test is even more costly, because it has both the NAT and the Destination NAT. Still ~930 Mbps. <3'ing my tinkerboard!!!! \o/ Hy, Thank you for you Answer Quote root@diagbox:~# ethtool eth0 Settings for eth0: Supported ports: [ TP AUI BNC MII FIBRE ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Supported pause frame use: Symmetric Receive-only Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Link partner advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Link partner advertised pause frame use: No Link partner advertised auto-negotiation: Yes Speed: 1000Mb/s =======> it seems be in gigabit Duplex: Full Port: MII PHYAD: 0 Transceiver: external Auto-negotiation: on Supports Wake-on: ug Wake-on: d Current message level: 0x0000003f (63) drv probe link timer ifdown ifup Link detected: yes When i do a speedtest in my lan behind the router, i have 9300M uo and down. But when i what to replace my fiber box by my Asus Tinkerboard, plugging in directly behind my optical terminal i have 150M maximum
Rfreire Posted April 8, 2018 Posted April 8, 2018 Hello question. Is the TinkerBoard routing / NATing to your internal LAN or is the TinkerBoard the final traffic destination? If You are routing / NATing, how is your environment set up?
domoticity Posted April 8, 2018 Author Posted April 8, 2018 10 minutes ago, Rfreire said: Hello question. Is the TinkerBoard routing / NATing to your internal LAN or is the TinkerBoard the final traffic destination? If You are routing / NATing, how is your environment set up? the TinkerBoard is the final traffic destination. thank you for your help
Rfreire Posted April 8, 2018 Posted April 8, 2018 Hnm. Interesting. ok then. Let's try to find the bottleneck. 1. Install the dstat package: # apt-get install -y dstat 2. Leave running in a terminal: # dstat -cdnm 3. Run the speed test 4. Send to this thread some 20-30 lines of dstat output while running the speed test
domoticity Posted April 8, 2018 Author Posted April 8, 2018 1 hour ago, Rfreire said: Hnm. Interesting. ok then. Let's try to find the bottleneck. 1. Install the dstat package: # apt-get install -y dstat 2. Leave running in a terminal: # dstat -cdnm 3. Run the speed test 4. Send to this thread some 20-30 lines of dstat output while running the speed test here the dstat root@diagbox:/diagbox/scripts_sh# dstat -cdnm ----total-cpu-usage---- -dsk/total- -net/total- ------memory-usage----- usr sys idl wai hiq siq| read writ| recv send| used buff cach free 0 1 99 0 0 0| 226k 47k| 0 0 | 115M 12.0M 177M 1702M 1 1 98 0 0 0| 0 0 |5678B 172k| 115M 12.0M 177M 1702M 0 0 100 0 0 0| 0 0 |6016B 176k| 115M 12.0M 177M 1702M 0 0 100 0 0 0| 0 0 |3820B 179k| 115M 12.0M 177M 1702M 0 0 100 0 0 0| 0 0 |4908B 189k| 115M 12.0M 177M 1702M 0 0 100 0 0 0| 0 0 |4169B 179k| 115M 12.0M 177M 1702M 0 0 99 0 0 0| 0 0 |3922B 182k| 115M 12.0M 177M 1702M 0 0 100 0 0 0| 0 0 |3820B 176k| 115M 12.0M 177M 1702M 0 0 100 0 0 0| 0 0 |4148B 176k| 115M 12.0M 177M 1702M 0 0 100 0 0 0| 0 0 |3922B 176k| 115M 12.0M 177M 1702M 0 0 100 0 0 0| 0 0 |3596B 170k| 115M 12.0M 177M 1702M 0 1 99 0 0 0| 0 0 |3730B 176k| 115M 12.0M 177M 1702M 1 5 95 0 0 0| 0 0 |6198B 49k| 115M 12.0M 177M 1702M 0 0 100 0 0 0| 0 0 |2398B 2404B| 114M 12.0M 177M 1702M 1 1 98 0 0 0| 0 0 |5217k 13k| 115M 12.0M 177M 1702M 1 5 94 0 0 1| 0 0 | 108M 156k| 115M 12.0M 177M 1701M 0 4 96 0 0 0| 0 0 | 85M 152k| 115M 12.0M 177M 1702M 0 4 95 0 0 0| 0 0 | 83M 152k| 115M 12.0M 177M 1701M 0 3 96 0 0 0| 0 0 | 85M 152k| 115M 12.0M 177M 1701M 0 5 95 0 0 1| 0 0 | 90M 152k| 115M 12.0M 177M 1701M 0 4 95 0 0 1| 0 0 | 86M 154k| 115M 12.0M 177M 1701M 0 5 93 0 0 2| 0 0 | 100M 151k| 115M 12.0M 177M 1702M 0 3 95 0 0 1| 0 0 | 89M 154k| 115M 12.0M 177M 1701M 0 4 96 0 0 1| 0 0 | 82M 152k| 115M 12.0M 177M 1702M 0 4 94 0 0 2| 0 0 | 102M 142k| 115M 12.0M 177M 1702M 0 0 100 0 0 0| 0 0 |1626B 2866B| 115M 12.0M 177M 1702M 0 0 100 0 0 0| 0 0 | 192B 668B| 115M 12.0M 177M 1702M And here the speedtest for upload : ==> normally i have between 200 and 280M root@diagbox:~# iperf3 -c bouygues.iperf.fr -4 -p 5202 Connecting to host bouygues.iperf.fr, port 5202 [ 4] local 2.15.12.45 port 48846 connected to 89.84.1.222 port 5202 [ ID] Interval Transfer Bandwidth Retr Cwnd [ 4] 0.00-1.00 sec 129 KBytes 1.05 Mbits/sec 0 36.8 KBytes [ 4] 1.00-2.00 sec 105 KBytes 857 Kbits/sec 0 41.0 KBytes [ 4] 2.00-3.00 sec 90.5 KBytes 741 Kbits/sec 0 45.2 KBytes [ 4] 3.00-4.00 sec 102 KBytes 834 Kbits/sec 0 53.7 KBytes [ 4] 4.00-5.00 sec 84.8 KBytes 695 Kbits/sec 0 63.6 KBytes [ 4] 5.00-6.00 sec 84.8 KBytes 695 Kbits/sec 0 63.6 KBytes [ 4] 6.00-7.00 sec 84.8 KBytes 695 Kbits/sec 0 70.7 KBytes [ 4] 7.00-8.00 sec 113 KBytes 926 Kbits/sec 0 97.6 KBytes [ 4] 8.00-9.00 sec 130 KBytes 1.07 Mbits/sec 0 97.6 KBytes [ 4] 9.00-10.00 sec 65.0 KBytes 533 Kbits/sec 0 97.6 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth Retr [ 4] 0.00-10.00 sec 988 KBytes 810 Kbits/sec 0 sender [ 4] 0.00-10.00 sec 877 KBytes 718 Kbits/sec receiver and here the download : ==> normally i have between 880 and 940M root@diagbox:~# iperf3 -c bouygues.iperf.fr -4 -p 5202 -R Connecting to host bouygues.iperf.fr, port 5202 Reverse mode, remote host bouygues.iperf.fr is sending [ 4] local 2.15.12.45 port 48850 connected to 89.84.1.222 port 5202 [ ID] Interval Transfer Bandwidth [ 4] 0.00-1.00 sec 50.4 MBytes 423 Mbits/sec [ 4] 1.00-2.00 sec 41.6 MBytes 349 Mbits/sec [ 4] 2.00-3.00 sec 40.5 MBytes 339 Mbits/sec [ 4] 3.00-4.00 sec 41.1 MBytes 344 Mbits/sec [ 4] 4.00-5.00 sec 42.7 MBytes 358 Mbits/sec [ 4] 5.00-6.00 sec 43.6 MBytes 366 Mbits/sec [ 4] 6.00-7.00 sec 45.3 MBytes 380 Mbits/sec [ 4] 7.00-8.00 sec 47.0 MBytes 394 Mbits/sec [ 4] 8.00-9.00 sec 39.8 MBytes 334 Mbits/sec [ 4] 9.00-10.00 sec 51.7 MBytes 433 Mbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth Retr [ 4] 0.00-10.00 sec 446 MBytes 374 Mbits/sec 0 sender [ 4] 0.00-10.00 sec 446 MBytes 374 Mbits/sec receiver
Rfreire Posted April 8, 2018 Posted April 8, 2018 Hello there, Check this snippet: ----total-cpu-usage---- -dsk/total- -net/total- ------memory-usage----- usr sys idl wai hiq siq| read writ| recv send| used buff cach free [...] 1 5 94 0 0 1| 0 0 | 108M 156k| 115M 12.0M 177M 1701M 0 4 96 0 0 0| 0 0 | 85M 152k| 115M 12.0M 177M 1702M 0 4 95 0 0 0| 0 0 | 83M 152k| 115M 12.0M 177M 1701M 0 3 96 0 0 0| 0 0 | 85M 152k| 115M 12.0M 177M 1701M 0 5 95 0 0 1| 0 0 | 90M 152k| 115M 12.0M 177M 1701M 0 4 95 0 0 1| 0 0 | 86M 154k| 115M 12.0M 177M 1701M 0 5 93 0 0 2| 0 0 | 100M 151k| 115M 12.0M 177M 1702M 0 3 95 0 0 1| 0 0 | 89M 154k| 115M 12.0M 177M 1701M 0 4 96 0 0 1| 0 0 | 82M 152k| 115M 12.0M 177M 1702M 0 4 94 0 0 2| 0 0 | 102M 142k| 115M 12.0M 177M 1702M [...] Well, I do see something entirely different here. dstat reports data traffic in BYTES. So, in order to get a rough approximation with BITS, multiply it times 9, you will get the approx. value in megabits. So I do see RX performance ranging from 85 MBytes/s (~765 Mbps) to 108 MB/s (~972 Mbps). Which sounds to be very well in line with the NIC total possible bandwidth. I do see good (low) CPU usage So, in total effective bandwidth, it seems that your Tinker is doing just fine. You should then investigate what else is going on with your iperf to account for your 'hidden' traffic :-) Have a great week, - RF.
chrisf Posted April 9, 2018 Posted April 9, 2018 I've learnt: Use the router supplied by your ISP. I had a 100/20M fibre service and they supplied a Netgear gigabit wifi router. I replaced it with a Ubiquiti EdgeRouter X and all was well. I upgraded to 1000/450M and they sent me a new router, despite the old one being gigabit on both WAN and LAN. The new one is a Fritzbox. I thought I knew better and tried using my UBNT router, but it could never get the full speed. It was down in the 200 - 300M speeds. I gave up and used the Fritzbox. Speeds went up to 950M. There must be some weird network settings required to get the high speeds. I didn't get around to finding out what they were. See if there are any differences in your fibre routers WAN interface settings or routing config compared to your Tinkerboard. Like MTU. Maybe you're fragmenting packets or something.
domoticity Posted April 9, 2018 Author Posted April 9, 2018 14 hours ago, chrisf said: I've learnt: Use the router supplied by your ISP. I had a 100/20M fibre service and they supplied a Netgear gigabit wifi router. I replaced it with a Ubiquiti EdgeRouter X and all was well. I upgraded to 1000/450M and they sent me a new router, despite the old one being gigabit on both WAN and LAN. The new one is a Fritzbox. I thought I knew better and tried using my UBNT router, but it could never get the full speed. It was down in the 200 - 300M speeds. I gave up and used the Fritzbox. Speeds went up to 950M. There must be some weird network settings required to get the high speeds. I didn't get around to finding out what they were. See if there are any differences in your fibre routers WAN interface settings or routing config compared to your Tinkerboard. Like MTU. Maybe you're fragmenting packets or something. Hy Thank you for your help. For a Dhcp fiber connexion, which Mtu do you recommend?
chrisf Posted April 9, 2018 Posted April 9, 2018 1 hour ago, domoticity said: For a Dhcp fiber connexion, which Mtu do you recommend? I don't know, that's why I suggested checking the configuration on the supplied router that works. It may be different for different connections. Mine is in New Zealand, we have half a dozen different providers supplying different ONT's on the same "national" fibre network. If you're lucky you might get some help from your ISP's technical service desk. Although most of the people you talk to there will probably say "sorry, unsupported device"
Ren Ping Posted February 20, 2019 Posted February 20, 2019 I have installed debian on tinker board. Tried ethtool to change the speed to 1000, it gives 100Mb/s after reboot. Any idea to modify the setting to Speed: 1000Mb/s Duplex:Full and off in Autoneg? thx in advance.
Recommended Posts