Howto: change Port OR Network Interface Speed?

Posted by admin     Category: Linux Administration

How to change Port speed OR Network Interface Speed?

To set a specific speed limit on a Network Interface say 10mbps, edit the file network interface file and set the limit which will make the changes permanent even after a reboot.

Edit the file:

root@server [~]# pico /etc/sysconfig/network-scripts/ifcfg-eth0

Add the following line at the end of the file:

ETHTOOL_OPTS=”speed 10 duplex full autoneg off”

Save the file and restart the network service.

root@server [~]# service network restart

This way you can set the duplex or auto negotiation as well. Once done, you can check the network speed using the ethtool command

root@server [~]# ethtool eth0

Tags: , , , , , , ,

4 Responses to “Howto: change Port OR Network Interface Speed?”

  1. Peter Quinn Says:

    Hi. I am a long time reader. I wanted to say that I like your blog and the layout.

    Peter Quinn

  2. greg Says:

    Thanks for support!

    But what’s wrong if I don’t have the file
    /etc/sysconfig/network-scripts/ifcfg-eth0 ?
    and if i made new one it’s useless :(

    Greg

  3. admin Says:

    If ifcfg-eth0 isn’t there, then check if the network interface is something else i.e. eth1 in which case the file would be ifcfg-eth1. If the “network-scripts” directory doesn’t exist at all, then you surely should be on Debian OR Ubuntu system in which case, the interface file is /etc/network/interfaces

  4. greg Says:

    actually I am on Dabian,
    the ethtool_opt didn’t work in my interfaces,
    so i put ethtool in rc.local, now it works.

    thanks a lot.

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-spam image