DistributedNetworks DistributedNetworks


TCP/IP Configuration  «Prev

Output of the dmesg command in Linux

The image below examines the following output, which describes an Intel EtherExpress card identified by the kernel:
1) interface name 2)ethernet address
1) interface name 2) ethernet address

  1. The interface name. This particular ethernet interface is eth0. Later references to it will be through that name.
  2. The ethernet address. Every ethernet card is shipped with a hard-wired ethernet address. This address is 48 bits long, and is usually written as six colon-separated sets of two-digit hexadecimal numbers. In this example, the ethernet address is 00:A0:C9:8A:A0:09.

Understanding Your Internet Connection

If your Ethernet interface to the Internet is not working, there are ways to check what is happening that will work on many Linux distributions. Use the following procedure to find out how your network interfaces are working:
  1. Open a shell (if you are using a graphical interface, open a Terminal window).
  2. Type the following right after you boot your computer to verify whether Linux found your card and installed the Ethernet interface properly:
    dmesg | grep eth | less
    

    The dmesg command lists all the messages that were output by Linux at boot time.
    The grep eth command causes only those lines that contain the word eth to be printed. Here are a couple of examples:
    eth0: NE2000 Compatible: port 0x300, irq3, hw_addr 00:80:C8:8C:8E:49
    eth0: OEM i82557/i82558 10/100 Ethernet at 0xccc0, 00:90:27:4E:67:35, IRQ 17.
    

    The first message appeared on my laptop computer with the Netgear card. It shows that a card was found at IRQ3 with a port address of 0x300 and an Ethernet hardware address of 00:80:C8:8C:8E:49. The second example is from my computer with the EtherExpress Pro/100 card. In it, the card is at IRQ 17, the port address is 0xccc0, and the Ethernet address is 00:90:27:4E:67:35.
    If the eth0 interface is not found, but you know that you have a supported Ethernet card, type
    lspci -vv | grep -i eth
    

    to see if the Ethernet card is detected on the PCI bus. If it does not appear, check that your Ethernet card is properly seated in its slot.
  3. To view which network interfaces are up and running, type the following:
    $ /sbin/ifconfig -a
    

    eth0 Link encap:Ethernet HWaddr 00:D0:B7:66:9A:46
    inet addr:10.0.0.5 Bcast:10.0.0.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:326100 errors:0 dropped:0 overruns:0 frame:0
    TX packets:215931 errors:0 dropped:0 overruns:0 carrier:0
    collisions:5919
    RX bytes:168378315 (160.5 Mb) TX bytes:40853243 (38.9 Mb)
    Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:37435 errors:0 dropped:0 overruns:0 frame:0
    TX packets:37435 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0
    RX bytes:2353172 (2.2 Mb) TX bytes:2353172 (2.2 Mb)
    

    The output shows a loopback interface (lo) and one Ethernet card (eth0). The Ethernet interface (eth0), is assigned the IP address of 10.0.0.5. In this example, the eth0 has an IP address of 10.0.0.5.
  4. Communicate with another computer on the LAN. The ping command can be used to send a packet to another computer and to ask for a packet in return. You can give ping either a host name (pine) or an IP address (10.0.0.10). For example, to ping a computer on the network called pine, type the following command:
# ping pine
If the computer can be reached, the output will look similar to the following:
PING pine (10.0.0.10): 56(84) data bytes
64 bytes from pine (10.0.0.10): icmp_seq=1 ttl=255 time=0.351 ms
64 bytes from pine (10.0.0.10): icmp_seq=2 ttl=255 time=0.445 ms
64 bytes from pine (10.0.0.10): icmp_seq=3 ttl=255 time=0.409 ms
64 bytes from pine (10.0.0.10): icmp_seq=4 ttl=255 time=0.457 ms
64 bytes from pine (10.0.0.10): icmp_seq=5 ttl=255 time=0.401 ms
64 bytes from pine (10.0.0.10): icmp_seq=6 ttl=255 time=0.405 ms
64 bytes from pine (10.0.0.10): icmp_seq=7 ttl=255 time=0.443 ms
64 bytes from pine (10.0.0.10): icmp_seq=8 ttl=255 time=0.384 ms
64 bytes from pine (10.0.0.10): icmp_seq=9 ttl=255 time=0.365 ms
64 bytes from pine (10.0.0.10): icmp_seq=10 ttl=255 time=0.367 ms