|
发表于 2007-3-24 00:21:39
|
显示全部楼层
不太明白你的意思。我在TUX上看到有一段和你的情况差不多,摘下来给你看看,或许能帮得上。
Some computers have two network cards built into the motherboard. You
probably use only one of them. Sometimes Linux makes a mistake and changes the device names for the network cards. First it makes the one you
use eth2, and the next time you boot, it makes the same card eth3. I give these examples because Linux sometimes thinks the network cards are eth2 and eth3, even if you have only two network cards. This does not make sense, but it is true. It should see the two cards as eth0 and eth1 even if it confuses them, but it doesn’t always do that. Sometimes it sees them as eth2 and eth3.
Say your computer sees them as eth2 and eth3. You configure eth2. The next
time you boot it thinks the same card is eth3. Now your network does not work, because it sets up the card that does not have a cable connection. This is why your network stops working. If you know how to change your BIOS
settings, you may be able to disable one of the network cards. This fixes the problem sometimes. Here is another way to fix the problem. Configure eth2 and eth3 to be the same. I assume your computer is using eth2 and eth3. If it is using two other device names, like eth0 and eth1, configure them the same, but my example is eth2 and eth3.
Install the package called ifplugd with the command:
$ sudo apt-get install ifplugd
You must edit a system configuration file now. Do a command like the following.
(I use gedit in my example because this happens on Ubuntu many times. You can use your favorite editor instead of gedit.)
$ sudo gedit /etc/default/ifplugd
Look in the file and find this:
INTERFACES=""
HOTPLUG_INTERFACES=""
ARGS="-q -f -u0 -d10 -w -I"
SUSPEND_ACTION="stop"
Change the INTERFACES line so that it looks like this:
INTERFACES="eth2 eth3"
ifplugd will look for a cable on eth2 and eth3. It will configure the interface that has a cable connected. You have only one cable connected. It does not matter if Linux thinks it is eth2 or eth3. ifplugd will configure the one that has a cable, so maybe one time it will configure eth2 and the next time it will configure eth3. It does not matter. Now you should have a network that works every time you boot. This will stop working if you disable one of the network cards. So do not do that. |
|