Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-users: Re: [Wireshark-users] Ethernet Port Speed

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Sun, 9 Sep 2012 12:18:28 -0700
On Sep 8, 2012, at 10:53 AM, Ed Stuart <fcache@xxxxxxxxx> wrote:

> I'm a newbie and I need to know if I can determine port speed settings of an ethernet port.

If you're logged into the machine with the Ethernet port, then there's probably a command and/or GUI tool to do so; what tool it is depends on the operating system.

In at least some versions of some BSD-flavored OSes, including recent versions of OS X, the ifconfig command will report that:

	$ ifconfig en0
	en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	        options=b<RXCSUM,TXCSUM,VLAN_HWTAGGING>

			...

	        media: autoselect (1000baseT <full-duplex>)
	        status: active

(OS X Lion - on a virtual machine, so it's not "really" gigabit, but the same thing happens on real interfaces; the host machine doesn't have an Ethernet interface so I can't try it)

	$ ifconfig em0
	em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
		options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>

			...

		media: Ethernet autoselect (1000baseTX <full-duplex>)
		status: active

(FreeBSD 7.3, again on a virtual machine), but some versions of some OSes might not support it (NetBSD 5.1 didn't show the speed, for example).

In Windows XP, the Network Connections item in the Control Panel lets you see the properties of a "network connection"; these include the speed of the Ethernet port (at least on my virtual machine).  The ipconfig command, at least when run with /all, didn't report anything, but I guess that's not part of the IP configuration; I don't know if there's a command that will report it.  Windows 7 is similar, except that it's "Network and Sharing Center" rather than "Network Connections" in Control Panel.

As Ilias el Matani noted in his reply, in Linux you can use the ethtool command (which, at least on my Ubuntu 7.10 machine, had to be run as root - unlike ifconfig on *BSD/OS X):

	$ sudo ethtool eth2
	Settings for eth2:

			...

	        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: 1000Mb/s

			...

ifconfig doesn't report the speed on my Solaris 10 virtual machine; neither AIX nor HP-UX run on PCs, so I have no virtual machines for them on which to try this.