Setting network interface speed and duplex in RedHat

In this article you will find information how to set speed and duplex value for network interface in RedHat.

 


1. Check current interface settings:

# ethtool eth1

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:  Not reported
Advertised auto-negotiation: No
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000007 (7)
Link detected: yes

2. Set speed to 1000Mbits, duplex to full and turn off autonegatiation:
# ethtool -s eth1 speed 1000 duplex full autoneg off
3. Check if settings properly applied:

# ethtool eth1

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:  1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: off
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000007 (7)
Link detected: yes

4. To make changes permanent:

Open the file ifcfg-eth1:

# vi /etc/sysconfig/network-scripts/ifcfg-eth1

Append following line to eth1 interface configuration:

ETHTOOL_OPTS=”speed 100o duplex full autoneg off”

Save and restart network services or reboot server to check if modification is working:

# /etc/init.d/network restart

 

Need more information? You didn’t find what you were looking for? Ask on our forum:

www.admindot.eu/forum

we will help.

Leave a Response