Section B.6. I can t see the network. What should I do?


B.6. I can't see the network. What should I do?

You already know most of the steps to take if your LAMP server can't see the network: check that the cable's plugged in, that the machine next to it can see the network, and that the light on the network card is flashing. All of the common command line network tools, like ping and traceroute , are available on Linux. It may also be worth checking the output of ifconfig:

[kermit@swinetrek ~]$ /sbin/ifconfig -a [kermit@swinetrek ~]$ /sbin/ifconfig -a eth0 Link encap:Ethernet  HWaddr 00:03:FF:42:1E:92      inet addr:192.168.69.3 Bcast:192.168.255.255 Mask:255.255.0.0      inet6 addr: fe80::203:ffff:fe42:1e92/64 Scope:Link      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1      RX packets:22548 errors:0 dropped:0 overruns:0 frame:0      TX packets:24780 errors:0 dropped:0 overruns:0 carrier:0      collisions:0 txqueuelen:1000      RX bytes:2294916 (2.1 MiB)  TX bytes:18896789 (18.0 MiB)      Interrupt:11 Base address:0xa000 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:31198 errors:0 dropped:0 overruns:0 frame:0      TX packets:31198 errors:0 dropped:0 overruns:0 carrier:0      collisions:0 txqueuelen:0      RX bytes:24317998 (23.1 MiB)  TX bytes:24317998 (23.1 MiB) sit0 Link encap:IPv6-in-IPv4      NOARP  MTU:1480  Metric:1      RX packets:0 errors:0 dropped:0 overruns:0 frame:0      TX packets:0 errors:0 dropped:0 overruns:0 carrier:0      collisions:0 txqueuelen:0      RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b) [kermit@swinetrek ~]$

The key line above is highlighted in bold: it lists the IP address of the eth0 interface. If that line doesn't appear, the interface doesn't have an IP address. A quick solution is to restart networking with service network restart, and see if that brings the network interface back to life.


Tip: If you're working remotely on a machine that has two network cards, be aware that this action will briefly drop all the network connections to the machine. If you're connected by SSH, that SSH connection will be dropped, too. If you can, restart networking from the machine itself, rather than over a network connection.



Run Your Own Web Server Using Linux & Apache
Run Your Own Web Server Using Linux & Apache
ISBN: 0975240226
EAN: 2147483647
Year: 2006
Pages: 92

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net