Posts Tagged ‘ eth

Debian eth0, eth1, eth2, in Virtualbox or VMware Virtual machines when copying

Debian uses udev. Udev handles mapping MAC’s to the appropriate /dev/eth(X) file. If you copy a Virtual machine, Udev will remember the MAC address of the old NIC. When you copy the machine, the virtual host usually generates a new MAC address for the VM.
Udev will assign the new Device to eth1, eth2, and so on. If you want to change your NIC assignments make Udev forget the old MAC.
In Debian 5 (lenny) it is in this file:

/etc/udev/rules.d/70-persistent-net.rules

In Debian 4 (etch) it is in this file:

/etc/udev/rules.d/z25_persistent-net.rules

To apply changes in Lenny: “udevadm trigger” or “udevtrigger” (in Etch)

Linux command line bandwidth monitor

You can find out how much bandwidth your linux machine is using with a simple tool called “bwm-ng”. In Debian, install it with

aptitude install bwm-ng

Then, just type ‘bwm-ng’ in the command line. It will give you something like this:

bwm-ng v0.6 (probing every 5.000s), press 'h' for help
  input: /proc/net/dev type: rate
  -         iface                   Rx                   Tx                Total
  ==============================================================================
               lo:           0.00 KB/s            0.00 KB/s            0.00 KB/s
             eth0:        2221.47 KB/s           48.13 KB/s         2269.60 KB/s
  ------------------------------------------------------------------------------
            total:        2221.47 KB/s           48.13 KB/s         2269.60 KB/s

Pressing the “h” key while it is running wil actually pull up a nice menu to change some of the options you are looking at.

bwm-ng is very basic, “iptraf” is another tool that provides some more functionality if you want to drill further into what is moving in and out of your box.

 

Switch to our mobile site