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:
- Open a shell (if you are using a graphical interface, open a Terminal window).
- 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.
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
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
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.
- 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: