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:
em0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=19b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4>
ether 00:30:48:98:9c:bc
inet 10.24.116.2 netmask 0xffffffc0 broadcast 10.24.116.63
media: Ethernet 10baseT/UTP
status: active
🐧 Get the latest tutorials on Linux, Open Source & DevOps via:
- RSS feed or Weekly email newsletter
- Share on Twitter • Facebook • 2 comments... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
Is there anyway to determine the actual speed when ifconfig gives the following output?
[john@myserver ~]$ /sbin/ifconfig le0 | grep media
media: Ethernet autoselect
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