FreeBSD Find Out Network Card / Port Speed

by on August 12, 2008 · 2 comments· LAST UPDATED August 18, 2008

in , ,

Q. Under Linux I can use Ethtool and mii-tool, but they are not available under FreeBSD. How do I tell the port speed of the nic under FreeBSD operating system?

A. Under FreeBSD the ifconfig utility is used to assign an address to a network interface and/or configure network interface parameters.

The ifconfig utility must be used at boot time to define the network address of each interface present on a machine; it may also be used at a later time to redefine an interface's address or other operating parameters.

It can also display port speed of the nic under FreeBSD. Simply type /sbin/ifconfig and look for media in output:
$ /sbin/ifconfig | grep media
$ /sbin/ifconfig {interface} | grep media
$ /sbin/ifconfig em0 | grep media
$ /sbin/ifconfig

Sample output:

        ether 00:30:48:98:9c:bc
        inet netmask 0xffffffc0 broadcast
        media: Ethernet 10baseT/UTP 
        status: active
Tweet itFacebook itG+ itDownload PDF versionFound an error/typo on this page?

{ 2 comments… read them below or add one }

1 John Bosco September 25, 2009 at 6:30 pm

Is there anyway to determine the actual speed when ifconfig gives the following output?

[john@myserver ~]$ /sbin/ifconfig le0 | grep media
media: Ethernet autoselect


2 Mayank Jain March 25, 2010 at 5:22 am

Looks like your cable is not connected.
Is the status showing no carrier.
/sbin/ifconfig le0 | grep status
status: no carrier

Try connecting cable and then issue the
/sbin/ifconfig le0 | grep media


Leave a Comment

Tagged as: , , , , , , , , , , , ,

Previous Faq:

Next Faq: