How to know which network adapter I’m using?

To know the manufacturer of the network adapter of your computer in Linux, type this command in terminal:

sudo lshw -C network

The output of the command may look something like this:

       description: Wireless interface
       product: BCM4313 802.11b/g/n Wireless LAN Controller
       vendor: Broadcom Corporation
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: wlan0
       version: 01
       serial: 70:f1:a1:c2:f2:e9
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=brcm80211 driverversion=2.6.38-8-generic firmware=N/A ip= latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn
       resources: irq:17 memory:f0500000-f0503fff
       description: Ethernet interface
       product: AR8152 v1.1 Fast Ethernet
       vendor: Atheros Communications
       physical id: 0
       bus info: pci@0000:04:00.0
       logical name: eth0
       version: c1
       serial: b8:ac:6f:67:11:46
       capacity: 100Mbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=atl1c driverversion= firmware=N/A latency=0 link=no multicast=yes port=twisted pair
       resources: irq:43 memory:f0400000-f043ffff ioport:2000(size=128)

Check the output closely. It gives information about both Wired and Wireless Network Adapter. No need to specify that one with Wireless Interface describes wireless adapter and one with Ethernet Interface describes Wired Network Adapter. As you can see in the output, I have Broadcom’s wireless adapter and Atheros Ethernet (wired) adapter.

Questions, suggestions and feedbacks are welcomed. If you liked the post then please acknowledge it by liking/voting/commenting on the post. Enjoy :)

How to measure the throughput of a network with ipmt Unix command

ipmt, for IP measurement tools, is a set of tools able to carry out performance measurements on IP networks at the transport layer. tcpmt and udpmt are network performance measurement tools at the transport layer (respectively TCP and UDP). Every second, they generate a throughput report.
By default, they transmit on the discard port of the destination station. This means that, for UDP, the measured throughput at the sender cannot be the effective transmitted throughput since UDP is not reliable.

How to use them :
# tcpmt [-p port] [-s pktsz] [-n pktnb] host
# udpmt [-p port] [-s pktsz] [-n pktnb] host

Where :
port is the destination port number (discard, by default).
pktsz is the size of sent packets (1024 bytes by default) This parameter is only significant in the UDP context.
pktnb is the packet number to send (by default, press Control-C to stop the transmission).
host is the destination address.
A report is generated every second

  • transmission time (in ms since 0h),
  • the number of sent packets during the time interval,
  • the total number of sent packets,
  • the measured throughput during the time interval in kbit/s,
  • the average throughput on the last ten seconds,
  • the average throughput since the beginning.

tcptarget and udptarget are two programs which measure the trhoughput at the destination. Thay can be launched with no argument and they display the port number on which they are listening. We must use the -p option of tcpmt/udpmt in order to specify a port. As soon as tcptarget/udptarget start to receive packets, they display a report every second. This report is easier to understand than the sender report but it is less detailed. It displays the reception time in seconds with a precision around the millisecond and the throughput in kbit/s.

If you want to measure the behavior of concurrent flows sent on the same target station, Tcp/udptarget are the perfect tools since the arrival times are computed on the same station. Thus you can easily compare the packet arrival times of the different flows without having to synchronize the sending stations.