Nieuws:

Welkom, Gast. Alsjeblieft inloggen of registreren.
Heb je de activerings-mail niet ontvangen?

Auteur Topic: Netwerk snelheid verlagen van 1Gbps naar 100Mbps  (gelezen 1260 keer)

Offline Tetje

  • Lid
    • opnieuwgestart (Christelijke Blog)
Netwerk snelheid verlagen van 1Gbps naar 100Mbps
« Gepost op: 2012/12/12, 10:10:46 »
Hallo

Hoe kan je in Xubuntu 12.04 LTS de netwerk snelheid van 1G naar 100Mbps verlagen?
Waarom ik dit wil?
Mijn router (tp- link tl-wr1043nd) crasht (na +/- een half uur) wanneer ik met mijn Xubuntu Desktop PC, met XBMC een film bekijk, deze staan op de HDD die via USB aan deze Router gekoppeld is.
Tuurlijk kan ik een NAS of een andere Router kopen, maar dat is op dit moment nog niet mogelijk.

Mijn overige laptops kunnen via wifi 54Mbps wel fatsoenlijk een film kijken via XBMC, Dit zijn trouwens Windows Laptop's

Het is natuurlijk ook mogelijk om de HDD aan de Xubuntu PC te koppelen en dan te sharen,  maar aangezien ik er voor gekozen heb om over 1/2 jaar een andere router te kopen die dit wel aankan, laat ik de infra structuur zitten.

Deze verlaging is dan ook tijdelijk totdat ik wel deze router ga vervangen.

Alvast bedankt voor jullie reactie(s)
DELL Insparion 530 4GRAM 500GB + 1Tb HDD Dualboot Ubuntu 18.04 & Win7
HP 8510 : Linux Mint 18.2 xfce 64b  4GRam  128G SSD (Prive Laptop)
Packet Bell Dot_SE-750NL Dualboot Ubuntu 18.04 & Win10 2GRam test-netbook

Re: Netwerk snelheid verlagen van 1Gbps naar 100Mbps
« Reactie #1 Gepost op: 2012/12/12, 11:20:44 »
Install mii-tool and ethtool tools

If you are using Debian or Ubuntu Linux you can install both of these package with following command:# apt-get install ethtool net-tools

Task: Get speed and other information for eth0

Type following command as root user:
$ ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 32
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: d
Current message level: 0×00000007 (7)
Link detected: yes

Or use mii-tool command as follows:
$ mii-tool eth0
eth0: negotiated 100baseTx-FD flow-control, link ok

Change the speed and duplex settings

Setup eth0 negotiated speed with mii-tool
Disable autonegotiation, and force the MII to either 100baseTx-FD, 100baseTx-HD, 10baseT-FD, or 10baseT-HD:
$ mii-tool 10baseT/Half
$ mii-tool 10baseT/Full
$ mii-tool 100baseT/Half
$ mii-tool 100baseT/Full
$ mii-tool 1000baseT/Half
$ mii-tool 1000baseT/Full

Setup eth0 negotiated speed with ethtool
$ ethtool -s eth0 speed 100 duplex full
$ ethtool -s eth0 speed 10 duplex half

To make these settings permanent you need to create a script into the directory /etc/init.d/ directory and run update-rc.d command to update the script.

Install script to make changes permanent

$ vi /etc/init.d/100Mbs
or
$ sudo vi /etc/init.d/100Mbs

#!/bin/sh
ETHTOOL=”/usr/sbin/ethtool”
DEV=”eth0″
SPEED=”100 duplex full”
case “$1″ in
start)
echo -n “Setting eth0 speed 100 duplex full…”;
$ETHTOOL -s $DEV speed $SPEED;
echo ” done.”;;
stop)
;;
esac
exit 0

Save and close the file. Setup executable permission:
$ chmod +x /etc/init.d/100Mbs
or
$ sudo chmod +x /etc/init.d/100Mbs

Now run script when Debian or Ubuntu Linux boots up. Use update-rc.d command install System-V style init script links:
$ update-rc.d 100Mbs defaults
or
$ sudo update-rc.d 100Mbs defaultsOutput:

Adding system startup for /etc/init.d/100Mbs …
/etc/rc0.d/K20100Mbs -> ../init.d/100Mbs
/etc/rc1.d/K20100Mbs -> ../init.d/100Mbs
/etc/rc6.d/K20100Mbs -> ../init.d/100Mbs
/etc/rc2.d/S20100Mbs -> ../init.d/100Mbs
/etc/rc3.d/S20100Mbs -> ../init.d/100Mbs
/etc/rc4.d/S20100Mbs -> ../init.d/100Mbs
/etc/rc5.d/S20100Mbs -> ../init.d/100Mbs

Reboot the system to take effect or just type scrit name:
$ /etc/init.d/100Mbs start
or
$ sudo /etc/init.d/100Mbs start

Read man page of mii-tool and ethtool for more information.

Offline DeBaas

  • Lid
Re: Netwerk snelheid verlagen van 1Gbps naar 100Mbps
« Reactie #2 Gepost op: 2012/12/12, 11:39:25 »
http://forum.ubuntu-nl.org/internet-en-draadloos/snelheid-netwerkkaart-moet-omlaag/msg520425/#msg520425

Daar is deze vraag al eerder gesteld en opgelost ;) mii-tool en ethtool zijn de oplossingen.
Voorbeeld:
sudo ethtool -s eth0 speed 100 duplex full autoneg on

mii-tool
mii-tool --help
usage: mii-tool [-VvRrwl] [-A media,... | -F media] [interface ...]
       -V, --version               display version information
       -v, --verbose               more verbose output
       -R, --reset                 reset MII to poweron state
       -r, --restart               restart autonegotiation
       -w, --watch                 monitor for link status changes
       -l, --log                   with -w, write events to syslog
       -A, --advertise=media,...   advertise only specified media
       -F, --force=media           force specified media technology
media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,
       (to advertise both HD and FD) 100baseTx, 10baseT

ethtool
ethtool --help
ethtool version 6
Usage:
ethtool DEVNAME Display standard information about device
        ethtool -s|--change DEVNAME     Change generic options
                [ speed 10|100|1000|2500|10000 ]
                [ duplex half|full ]
                [ port tp|aui|bnc|mii|fibre ]
                [ autoneg on|off ]
                [ advertise %%x ]
                [ phyad %%d ]
                [ xcvr internal|external ]
                [ wol p|u|m|b|a|g|s|d... ]
                [ sopass %%x:%%x:%%x:%%x:%%x:%%x ]
                [ msglvl %%d ]
        ethtool -a|--show-pause DEVNAME Show pause options
        ethtool -A|--pause DEVNAME      Set pause options
                [ autoneg on|off ]
                [ rx on|off ]
                [ tx on|off ]
        ethtool -c|--show-coalesce DEVNAME      Show coalesce options
        ethtool -C|--coalesce DEVNAME   Set coalesce options
                [adaptive-rx on|off]
                [adaptive-tx on|off]
                [rx-usecs N]
                [rx-frames N]
                [rx-usecs-irq N]
                [rx-frames-irq N]
                [tx-usecs N]
                [tx-frames N]
                [tx-usecs-irq N]
                [tx-frames-irq N]
                [stats-block-usecs N]
                [pkt-rate-low N]
                [rx-usecs-low N]
                [rx-frames-low N]
                [tx-usecs-low N]
                [tx-frames-low N]
                [pkt-rate-high N]
                [rx-usecs-high N]
                [rx-frames-high N]
                [tx-usecs-high N]
                [tx-frames-high N]
                [sample-interval N]
        ethtool -g|--show-ring DEVNAME  Query RX/TX ring parameters
        ethtool -G|--set-ring DEVNAME   Set RX/TX ring parameters
                [ rx N ]
                [ rx-mini N ]
                [ rx-jumbo N ]
                [ tx N ]
        ethtool -k|--show-offload DEVNAME       Get protocol offload information
        ethtool -K|--offload DEVNAME    Set protocol offload
                [ rx on|off ]
                [ tx on|off ]
                [ sg on|off ]
                [ tso on|off ]
                [ ufo on|off ]
                [ gso on|off ]
        ethtool -i|--driver DEVNAME     Show driver information
        ethtool -d|--register-dump DEVNAME      Do a register dump
                [ raw on|off ]
                [ file FILENAME ]
        ethtool -e|--eeprom-dump DEVNAME        Do a EEPROM dump
                [ raw on|off ]
                [ offset N ]
                [ length N ]
        ethtool -E|--change-eeprom DEVNAME      Change bytes in device EEPROM
                [ magic N ]
                [ offset N ]
                [ value N ]
        ethtool -r|--negotiate DEVNAME  Restart N-WAY negotation
        ethtool -p|--identify DEVNAME   Show visible port identification (e.g. blinking)
               [ TIME-IN-SECONDS ]
        ethtool -t|--test DEVNAME       Execute adapter self test
               [ online | offline ]
        ethtool -S|--statistics DEVNAME Show adapter statistics
        ethtool -h|--help DEVNAME       Show this help

Ik beantwoord GEEN hulpvragen via PB en/of MAIL

Offline Tetje

  • Lid
    • opnieuwgestart (Christelijke Blog)
Re: Netwerk snelheid verlagen van 1Gbps naar 100Mbps
« Reactie #3 Gepost op: 2012/12/12, 14:27:06 »
Bedankt voor de reacties.

Ik zal het proberen.

thanks
DELL Insparion 530 4GRAM 500GB + 1Tb HDD Dualboot Ubuntu 18.04 & Win7
HP 8510 : Linux Mint 18.2 xfce 64b  4GRam  128G SSD (Prive Laptop)
Packet Bell Dot_SE-750NL Dualboot Ubuntu 18.04 & Win10 2GRam test-netbook