Determining Ethernet Link Speed
Determining Ethernet link speed is an important part of troubleshooting connectivity. Below are examples for OS X and Linux.
In these examples, I am using en0 on OS X and eth0 for Linux.
OS X:
1
2
3
4
5
6
7
|
xs22:~ admin$ ifconfig en0 en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet6 fe80::21e:52ff:fef2:6111%en1 prefixlen 64 scopeid 0x5 inet 192.168.1.10 netmask 0xffffff00 broadcast 192.168.1.255 ether 00:1e:22:22:11:11 media: autoselect (1000baseT <full-duplex>) status: active supported media: autoselect 10baseT /UTP <half-duplex> 10baseT /UTP <full-duplex> 10baseT /UTP <full-duplex,hw-loopback> 10baseT /UTP <full-duplex,flow-control> 100baseTX <half-duplex> 100baseTX <full-duplex> 100baseTX <full-duplex,hw-loopback> 100baseTX <full-duplex,flow-control> 1000baseT <full-duplex> 1000baseT <full-duplex,hw-loopback> 1000baseT <full-duplex,flow-control> |
It is possible to filter out the command using grep:
1
2
|
xs22:~ admin$ ifconfig en0| grep active media: autoselect (1000baseT <full-duplex>) status: active |
This output is a bit easier to read without all the additional information.
Linux:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
[root@oneiric-01 ~] # ethtool eth2 Settings for eth2: Supported ports: [ FIBRE ] Supported link modes: 10000baseT /Full Supports auto-negotiation: No Advertised link modes: 10000baseT /Full Advertised pause frame use: No Advertised auto-negotiation: No Speed: 10000Mb /s Duplex: Full Port: FIBRE PHYAD: 0 Transceiver: external Auto-negotiation: off Supports Wake-on: d Wake-on: d Current message level: 0x00000004 (4) Link detected: yes [root@oneiric-01 ~] # |