Auteur Sujet: Carte asus tinkerboard orange fibre dhcp iperf3  (Lu 15123 fois)

0 Membres et 1 Invité sur ce sujet

domoticity

  • Abonné Orange Fibre
  • *
  • Messages: 12
  • Nice 06
Carte asus tinkerboard orange fibre dhcp iperf3
« le: 08 avril 2018 à 15:02:41 »
Hello à toutes et tous,
J'ai fait un petit script, à l'aide d'informations trouvées sur le net et plusieurs forum dont celui ci :p .
Ce dernier me permet de lancer une connexion en DHCP directement branché sur l'ONT.


Je ne travaille que depuis la carte TinkerBoard.(en la pilotant en ssh).

Quand je fais mes tests de débits avec Iperf ou speedtest-cli, ils sont cohérents : environ 800 méga descendant pour 240 montant.

Quand je les fais derrière l'ont en mode DHCP et meme en ppoe,
je suis loin de ces resultats.

pppoe
root@diagbox:~# speedtest-cli --server 4661
Retrieving speedtest.net configuration...
Testing from Orange (90.87.121.108)...
Retrieving speedtest.net server list...
Retrieving information for the selected server...
Hosted by Orange (Marseille) [662.05 km]: 27.018 ms
Testing download speed................................................................................
Download: 133.72 Mbit/s
Testing upload speed................................................................................................
Upload: 60.43 Mbit/s
root@diagbox:~# iperf3 -c bouygues.iperf.fr -4 -p 5202
Connecting to host bouygues.iperf.fr, port 5202
[  4] local 90.87.121.108 port 33782 connected to 89.84.1.222 port 5202
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  11.5 MBytes  96.6 Mbits/sec    0    176 KBytes
[  4]   1.00-2.00   sec  9.99 MBytes  83.8 Mbits/sec    0    117 KBytes
[  4]   2.00-3.00   sec  9.42 MBytes  79.0 Mbits/sec    0    169 KBytes
[  4]   3.00-4.00   sec  12.2 MBytes   102 Mbits/sec    0    153 KBytes
[  4]   4.00-5.00   sec  9.70 MBytes  81.3 Mbits/sec    0    149 KBytes
[  4]   5.00-6.00   sec  11.4 MBytes  96.0 Mbits/sec    0    200 KBytes
[  4]   6.00-7.00   sec  12.8 MBytes   107 Mbits/sec    0    127 KBytes
[  4]   7.00-8.00   sec  10.2 MBytes  85.3 Mbits/sec    0    179 KBytes
[  4]   8.00-9.00   sec  13.7 MBytes   115 Mbits/sec    0    229 KBytes
[  4]   9.00-10.00  sec  14.2 MBytes   119 Mbits/sec    0    200 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec   115 MBytes  96.5 Mbits/sec    0             sender
[  4]   0.00-10.00  sec   115 MBytes  96.3 Mbits/sec                  receiver

iperf Done.
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 90.87.121.108 port 33786 connected to 89.84.1.222 port 5202
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  17.7 MBytes   148 Mbits/sec
[  4]   1.00-2.00   sec  20.9 MBytes   176 Mbits/sec
[  4]   2.00-3.00   sec  20.8 MBytes   174 Mbits/sec
[  4]   3.00-4.00   sec  17.7 MBytes   149 Mbits/sec
[  4]   4.00-5.00   sec  20.3 MBytes   171 Mbits/sec
[  4]   5.00-6.00   sec  19.2 MBytes   161 Mbits/sec
[  4]   6.00-7.00   sec  19.9 MBytes   167 Mbits/sec
[  4]   7.00-8.00   sec  16.7 MBytes   140 Mbits/sec
[  4]   8.00-9.00   sec  14.5 MBytes   121 Mbits/sec
[  4]   9.00-10.00  sec  17.8 MBytes   150 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec   187 MBytes   157 Mbits/sec   85             sender
[  4]   0.00-10.00  sec   186 MBytes   156 Mbits/sec                  receiver

iperf Done.


dhcp
root@diagbox:/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 90.87.121.108 port 33970 connected to 89.84.1.222 port 5202
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  18.4 MBytes   155 Mbits/sec
[  4]   1.00-2.00   sec  17.3 MBytes   145 Mbits/sec
[  4]   2.00-3.00   sec  20.3 MBytes   170 Mbits/sec
[  4]   3.00-4.00   sec  17.9 MBytes   150 Mbits/sec
[  4]   4.00-5.00   sec  20.1 MBytes   169 Mbits/sec
[  4]   5.00-6.00   sec  16.8 MBytes   141 Mbits/sec
[  4]   6.00-7.00   sec  14.5 MBytes   122 Mbits/sec
[  4]   7.00-8.00   sec  17.9 MBytes   150 Mbits/sec
[  4]   8.00-9.00   sec  20.9 MBytes   175 Mbits/sec
[  4]   9.00-10.00  sec  22.3 MBytes   187 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec   189 MBytes   158 Mbits/sec   84             sender
[  4]   0.00-10.00  sec   187 MBytes   157 Mbits/sec                  receiver

iperf Done.
root@diagbox:/diagbox# iperf3 -c bouygues.iperf.fr -4 -p 5202
Connecting to host bouygues.iperf.fr, port 5202
[  4] local 90.87.121.108 port 33974 connected to 89.84.1.222 port 5202
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  5.29 MBytes  44.4 Mbits/sec    0    105 KBytes
[  4]   1.00-2.00   sec  8.86 MBytes  74.3 Mbits/sec    0    156 KBytes
[  4]   2.00-3.00   sec  12.2 MBytes   103 Mbits/sec    0    208 KBytes
[  4]   3.00-4.00   sec  11.6 MBytes  97.7 Mbits/sec    0    193 KBytes
[  4]   4.00-5.00   sec  11.2 MBytes  93.6 Mbits/sec    0    125 KBytes
[  4]   5.00-6.00   sec  7.55 MBytes  63.4 Mbits/sec    0    132 KBytes
[  4]   6.00-7.00   sec  10.6 MBytes  89.0 Mbits/sec    0    184 KBytes
[  4]   7.00-8.00   sec  14.0 MBytes   118 Mbits/sec    0    235 KBytes
[  4]   8.00-9.00   sec  15.1 MBytes   127 Mbits/sec    0    141 KBytes
[  4]   9.00-10.00  sec  11.1 MBytes  93.2 Mbits/sec    0    191 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec   108 MBytes  90.3 Mbits/sec    0             sender
[  4]   0.00-10.00  sec   107 MBytes  90.0 Mbits/sec                  receiver

iperf Done.

J'ai fait le test sur une bananapi m2, sous l'os Bananian et les tests en dhcp étaient bons.


Voici mon script :
#!/bin/bash
#Effacer les fichier tempo si presents
if [ -f "/diagbox/web/tmp/dhclient.conf" ];then
echo "Le fichier de configuration existe !";
if sudo rm /diagbox/web/tmp/dhclient.conf; then
echo "fichier dhclient efface"
else
echo "Echec suppression tempo dhclient deja existant" >> /diagbox/web/tmp/error.log
exit
fi
fi

if [ -f "/diagbox/web/tmp/iperf_upload.txt" ];then
echo "Le fichier de iperf upload existe !";
if sudo rm /diagbox/web/tmp/iperf_upload.txt; then
echo "fichier iperf upload efface"
else
echo "Echec suppression tempo iperf upload deja existant" >> /diagbox/web/tmp/error.log
exit
fi
fi

if [ -f "/diagbox/web/tmp/iperf_download.txt" ];then
echo "Le fichier de iperf download existe !";
if sudo rm /diagbox/web/tmp/iperf_download.txt; then
echo "fichier iperf download efface"
else
echo "Echec suppression tempo iperf download deja existant" >> /diagbox/web/tmp/error.log
exit
fi
fi

#fti conversion
USERNAME=$1
AUTHSTRING=00:00:00:00:00:00:00:00:00:00:00:66:74:69:2f
for (( i=0; i<${#USERNAME}; i++ )); do
  HEXCHAR=$(echo -n ${USERNAME:$i:1} | od -An -txC | xargs)
  AUTHSTRING=${AUTHSTRING}:${HEXCHAR}
done
echo ${AUTHSTRING}

#Fichier dhclient
#Ecriture
echo 'option rfc3118-authentication code 90 = string;' >> /diagbox/web/tmp/dhclient.conf
echo "interface \"orange\" {" >> /diagbox/web/tmp/dhclient.conf
echo "send vendor-class-identifier \"sagem\";" >> /diagbox/web/tmp/dhclient.conf
echo "send user-class \"+FSVDSL_livebox.Internet.softathome.Livebox3\";" >> /diagbox/web/tmp/dhclient.conf
echo "send rfc3118-authentication ${AUTHSTRING} ;" >> /diagbox/web/tmp/dhclient.conf
echo 'request subnet-mask, routers,' >> /diagbox/web/tmp/dhclient.conf
echo 'domain-name, broadcast-address, dhcp-lease-time,' >> /diagbox/web/tmp/dhclient.conf
echo 'dhcp-renewal-time, dhcp-rebinding-time,' >> /diagbox/web/tmp/dhclient.conf
echo 'rfc3118-authentication;' >> /diagbox/web/tmp/dhclient.conf
echo 'supersede domain-name-servers 8.8.8.8, 8.8.4.4;' >> /diagbox/web/tmp/dhclient.conf
echo '}' >> /diagbox/web/tmp/dhclient.conf


#Deplacement
if sudo cp /diagbox/web/tmp/dhclient.conf /etc/dhcp/dhclient.conf; then
echo 'fichier dhclient modifie';
else
echo "Echec déplacement fichier dhclient" >> /diagbox/web/tmp/error.log
exit
fi

#iptables
if sudo cp /etc/iptables.ipv4.nat.backup_rescue_dhcp /etc/iptables.ipv4.nat; then
echo 'fichier iptables modifié';
else
echo "Echec déplacement fichier iptables" >> /diagbox/web/tmp/error.log
exit
fi
sudo iptables-restore < /etc/iptables.ipv4.nat

#Modification interfaces eth0
if sudo ifdown eth0; then
echo 'arret eth0';
else
echo "Echec arret ethO" >> /diagbox/web/tmp/error.log
exit
fi

if sudo cp /etc/network/interfaces_RESCUE_DHCP /etc/network/interfaces; then
echo 'configuration interfaces modifié';
else
echo "Echec modification configuration ethO" >> /diagbox/web/tmp/error.log
exit
fi

if sudo ifup -a; then
echo 'activation eth0';
else
echo "Echec activation ethO" >> /diagbox/web/tmp/error.log
exit
fi
#!/bin/bash
sudo ping 8.8.8.8 -c10 -q
if [ $? != 1 ]; then
echo "ok"
else
echo "nok"
fi

Je sais qu'il y a beaucoup mieux, mais je débute en script :p

Si quelqu'un aurait une idéee je suis preneur :)