Linux operating systems come with a various set of tools allowing you to manipulate the Wireless Extensions and monitor wireless networks. Here is a list of Linux tools used for wireless network monitoring tools that can be used from your laptop or desktop system to find out wifi network speed, bit rate, signal quality/strength, and more.
ethtool or mii-tool utility checks or sets the status of a network interfaceâ€™s Media Independent Interface (MII) unit. Most fast ethernet adapters use an MII to autonegotiate link speed and duplex setting.
Due to software or hardware (network switch or Ethernet card ) error it may be possible that you need to restarts auto-negotiation on the specified ethernet device.
You donâ€™t have to reboot Linux box, all you have to do is type the following command :
# ethtool -r eth0
Or you can use mii-tool (outdated, use ethtool only)
# mii-tool -r eth0
# tail -f /var/log/messages
Jul 16 09:34:25 smtp1 kernel: e1000: eth0: e1000_watchdog_task: NIC Link is Up 10 Mbps Full Duplex Jul 16 09:34:25 smtp1 kernel: e1000: eth0: e1000_watchdog_task: 10/100 speed: disabling TSO
However, these settings are not permanent. If you reboot the system or if you just
need to upgrade/downgrade your port speed, run the ehtool command once your port change by network administrator. (If you want to read about how to make Windows 2000/2003 server port speed change, read my previous article.)
Changing your Network Interface Speed, Duplex or Auto Negotiate settings on Red Hat Linux
To set the interface speed, duplex or auto negotiation on Linux system boot up (make settings permanent), you need edit /etc/sysconfig/network-scripts/ifcfg-eth0 file for eth0 interface. This file used by Red Hat enterprise Linux, Fedora core, Cent Os etc.
Open the file:
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
Append following line:
ETHTOOL_OPTS="speed 100 duplex full autoneg off"
Save and close the system. It will set the eth0 device to 100Mbs, full duplex, with the auto negotiation off at boot time. You can simply restart the networking (it will disconnect all ssh or ftp session) or restart the server. Depend upon traffic and load it may take upto 1 minute to setup a new port speed:
# /etc/init.d/network restart
If you want 1000Mbs set line as follows:
ETHTOOL_OPTS="speed 1000 duplex full autoneg off"Update: if above command failed to work for 1000Mbps use following command (see below in comment sections for discussion) :
ETHTOOL_OPTS="speed 1000 duplex full autoneg on"
Debian or Ubuntu Linux permanent settings
Under Debian or Ubuntu Linux just create a script as follows:
# vi /etc/init.d/100Mbs
$ sudo vi /etc/init.d/100Mbs
Append following lines:
#!/bin/shSave and close the file. Setup executable permission:
SPEED="100 duplex full"
case "$1" in
echo -n "Setting eth0 speed 100 duplex full...";
$ETHTOOL -s $DEV speed $SPEED;
echo " done.";;
# chmod +x /etc/init.d/100MbsOR
$ sudo chmod +x /etc/init.d/100Mbs
Now run script when Debian or Ubuntu Linux boots up. Use update-rc.d command install System-V style init script links:
# update-rc.d 100Mbs defaultsOR
# sudo update-rc.d 100Mbs defaultsOutput:
Adding system startup for /etc/init.d/100Mbs ... /etc/rc0.d/K20100Mbs -> ../init.d/100Mbs /etc/rc1.d/K20100Mbs -> ../init.d/100Mbs /etc/rc6.d/K20100Mbs -> ../init.d/100Mbs /etc/rc2.d/S20100Mbs -> ../init.d/100Mbs /etc/rc3.d/S20100Mbs -> ../init.d/100Mbs /etc/rc4.d/S20100Mbs -> ../init.d/100Mbs /etc/rc5.d/S20100Mbs -> ../init.d/100Mbs
Reboot the system to take effect or just type scrit name:
# /etc/init.d/100Mbs startOR
$ sudo /etc/init.d/100Mbs start
Explains how to configure ip aliasing under Ubuntu Linux operating system so that you can have multiple IP address assigned to a single interface.
The iftop command listens to network traffic on a named network interface, or on the first interface, it can find which looks like an external interface if none is specified, and displays a table of current bandwidth usage by pairs of hosts. The iftop is a perfect tool for remote Linux server over an ssh based session.
Reading an IP address in shell script required many time. However, different Linux distribution stores IP address in different files. If you are looking to run script under different UNIX like OSes such as Solaris or FreeBSD then you need to use the ifconfig command. The ifconfig command is not just used to configure a network interface, but it can be use to obtained information such as network IP, netmask and much more.
Almost a year ago, I wrote about Linux MRTG configuration how-to. However, some user seems to confused with MRTG, most users would like to see how much traffic actually generated by ADSL/Cable service provider on daily and monthly basis.