How to change speed / duplex setting of a network connection?

Daniel Urstöger
07-11-2012 19:51

Well, you can do this with mii-tool or ethtool, both should be working nicely. On Debian to install those, run this:

aptitude install ethtool net-tools

 After that you can check the interface status by running this command:

ethtool eth01

 Should give output like this:

Settings for eth1:
	Supported ports: [ TP ]
	Supported link modes:   10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Full 
	Supports auto-negotiation: Yes
	Advertised link modes:  10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Full 
	Advertised pause frame use: No
	Advertised auto-negotiation: Yes
	Speed: 1000Mb/s
	Duplex: Full
	Port: Twisted Pair
	PHYAD: 1
	Transceiver: internal
	Auto-negotiation: on
	MDI-X: off
	Supports Wake-on: pumbag
	Wake-on: g
	Current message level: 0x00000001 (1)
	Link detected: yes

here the alternative with mii-tool:

mii-tool eth1

Should give output just like this: 

eth1: negotiated 1000baseT-FD flow-control, link ok


So now, after we can see what is going on, remember this, before chaning the network speed: if you set the network speed manually, you have to do this on both sides. So you need to change the switch network speed, or whatever your server/computer is attached too to the matching setting. Otherwise you most likely will have duplex / speed missmatches with either leed in very slow performance or the network is not working at all!

This will set the network connection into 100mbit full duplex:

mii-tool eth1 -F 100baseTx-FD

 Same for ethtool:

ethtool -s eth1 speed 100 duplex full

 

 After that check if it was really set the way you wanted, if not, you need to disable auto negotiation first:

ethtool -s eth1 autoneg off

 

Average rating: 0 (0 Votes)

You cannot comment on this entry