Here full duplex, half duplex and auto-negotiation have the following meanings.
Full Duplex - Logic that enables concurrent sending and receiving. This is usually desirable and enabled when your computer is connected to a switch.
Half Duplex - This logic requires a card to only send or receive at a single point of time. When your machine is connected to a Hub, it auto-negotiates itself and uses half duplex to avoid collisions.
Auto-negotiation - This is the process of deciding whether to work in full duplex mode or half duplex mode. An Ethernet card supporting autonegotiation will decide for itself which mode is the optimal one depending on the network it is attached to.
Task: Find full or half duplex speed
You can use dmesg command to find out your duplex mode:# dmesg | grep -i duplex
Output:
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
ethtool command
Uss ethtool to display or change Ethernet card settings. To display duplex speed, enter:# ethtool eth1
Output:
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 auto-negotiation: Yes Speed: 10Mb/s Duplex: Full Port: Twisted Pair PHYAD: 0 Transceiver: internal Auto-negotiation: on Supports Wake-on: umbg Wake-on: g Current message level: 0x00000007 (7) Link detected: yes
mii-tool command
You can also use mii-tool to find out your duplex mode. Type following command at shell prompt:# mii-tool
Output:
eth0: negotiated 100baseTx-FD flow-control, link ok
Remember,
- 100baseTx-FD: 100Mbps full duplex (FD)
- 100baseTx-HD: 100Mbps half duplex (HD)
- 10baseT-FD: 10Mbps full duplex (FD)
- 10baseT-HD: 10Mbps half duplex (HD)
This utility is useful for forcing specific Ethernet speed and duplex settings too, setup 100Mbps full duplex speed under Linux:
# mii-tool -F 100baseTx-FD
Setup 10Mbps half duplex:
# mii-tool -F 10baseT-HD
0 comments:
Post a Comment