# ethtool and modinfo equivalent commands in FreeBSD



## ekta (Aug 19, 2011)

Hi,

I am new to Free BSD. I want to know the equivalent commands  for the following Linux commands.

1. modinfo
2. ethtool -i <interface> - this gives driver version and hardware firmware details.

Thanks
Ekta


----------



## SirDice (Aug 19, 2011)

ekta said:
			
		

> 1. modinfo


kldstat(8)



> 2. ethtool -i <interface> - this gives driver version and hardware firmware details.


No idea.


----------



## ekta (Aug 19, 2011)

I feel that kldstat is equivalent to lsmod because this command will not give the driver version. How do i get teh driver version?


----------



## SirDice (Aug 19, 2011)

There are no driver versions as they are all part of the same FreeBSD kernel.


----------



## ekta (Aug 22, 2011)

Thanks


----------



## AndyUKG (Aug 22, 2011)

ekta said:
			
		

> 2. ethtool -i <interface>



Try

```
grep <interface> /var/run/dmesg.boot
```

ta Andy.


----------



## jiskjoy (Sep 2, 2011)

View Current Speed and Duplex Settings
`# ifconfig em0`
`# ifconfig interface-name`
`# ifconfig | grep media`
ifconfig command to change speed and duplex settings
`ifconfig <interface-name> <IP_address> media 100baseTX mediaopt full-duplex`
Make speed and duplex settings permanent
`# vi /etc/rc.conf`

```
ifconfig_em0="inet x.x.x.x netmask y.y.y.y media 10baseT/UTP mediaopt full-duplex"
```
Make sure you replace x.x.x.x and y.y.y.y with actual IP and netmask address. 
	
	



```
ifconfig_em0="inet 10.10.1.2 netmask 255.255.255.0 media 100baseT/UTP mediaopt full-duplex"
```
`# /etc/rc.d/netif restart`


----------



## anomie (Sep 2, 2011)

ekta said:
			
		

> I am new to Free BSD. I want to know the equivalent commands  for the following Linux commands.
> ...
> 2. ethtool -i <interface> - this gives driver version and hardware firmware details.



I'd add to the previous posts: 

FreeBSD names Ethernet devices after the drivers they use. This makes it trivial to learn more about the driver via the manpages. 

For instance, on my system: 

```
% /sbin/ifconfig | grep -i running
igb0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
...
```

My Ethernet device is using the igb(4) (Intel PRO/1000 PCIe Gb) driver. To view details about that driver:

`% man igb`


----------

