8.8. Do the Network Cards Work?

With the command

ifconfig

you can see the current condition of the network cards.

Tip

This command is also good for finding out which IP address the machine has, as well as its MAC address (which is called "HWaddr"). Another way to collect MAC addresses is to have a look at the syslog file at the time that you start up the machine whose MAC address you want to find. Then all you have to do is cut and paste. Use the command, as root,

tail -f /var/log/syslog

then you will see something like
Jun  2 22:52:28 tjener dhcpd-2.2.x: DHCPDISCOVER from 00:02:b3:8f:66:76 via eth1
Jun  2 22:52:28 tjener dhcpd-2.2.x: DHCPOFFER on 192.168.0.13 to 00:02:53:8f:66:76 via eth1
Jun  2 22:52:29 tjener dhcpd-2.2.x: DHCPREQUEST for 192.168.0.13 from 00:02:53:8f:66:76 via eth1
Jun  2 22:52:29 tjener dhcpd-2.2.x: DHCPACK on 192.168.0.13 to 00:02:53:8f:66:76 via eth1
Use CTRL-C to stop the process.

This is what the output from the ifconfig on a mainserver should look:


tjener:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:04:75:81:AA:78
          inet addr:10.0.2.2  Bcast:10.0.3.255  Mask:255.255.254.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:27892 errors:0 dropped:0 overruns:0 frame:0
          TX packets:26194 errors:0 dropped:0 overruns:0 carrier:0
          collisions:5 txqueuelen:100
          RX bytes:23495725 (22.4 MiB)  TX bytes:2810447 (2.6 MiB)
          Interrupt:11 Base address:0xdc00

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:44174 errors:0 dropped:0 overruns:0 frame:0
          TX packets:44174 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:11789085 (11.2 MiB)  TX bytes:11789085 (11.2 MiB)

While the output from ifconfig should look like this on a thinclient server:


eth0      Link encap:Ethernet  HWaddr 00:30:05:75:95:5E
          inet addr:10.0.2.10  Bcast:10.0.3.255  Mask:255.255.254.0
          inet6 addr: fe80::230:5ff:fe75:955e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9749550 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12174337 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:851989409 (812.5 MiB)  TX bytes:3820253778 (3.5 GiB)
          Interrupt:169

eth1      Link encap:Ethernet  HWaddr 00:0E:0C:59:5E:84
          inet addr:192.168.0.254  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20e:cff:fe59:5e84/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:430966587 errors:0 dropped:0 overruns:0 frame:0
          TX packets:511993119 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:584433596 (557.3 MiB)  TX bytes:361859667 (345.0 MiB)
          Base address:0x2800 Memory:fc420000-fc440000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:269981 errors:0 dropped:0 overruns:0 frame:0
          TX packets:269981 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:126747627 (120.8 MiB)  TX bytes:126747627 (120.8 MiB)

If what you see is similar to the above, but you still can't get on the net, then you may have to do something with your DNS-setup. Have a look at this section in the documentation about Coyote Linux, Section 3.11.

Sometimes "someone" tries to change the configuration of the network card eth0 on the Main-server :do not do that! If you despite this advice have tried to change the eth0 setup, and things mysteriously stops working, then most likely your /etc/resolv.conf is messed up and wrong.

The file /etc/resolv.conf should on a Main-server look like this:


tjener:~# more /etc/resolv.conf
search intern
nameserver 127.0.0.1