LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Have to login the root from terminal to enable the network (https://www.linuxquestions.org/questions/slackware-14/have-to-login-the-root-from-terminal-to-enable-the-network-657895/)

zhoun 07-24-2008 03:54 AM

Have to login the root from terminal to enable the network
 
I have a linux Server in IDC, Slackware 12.1
It had a wired problem.

The server occasionally can't be accessed from outside, and ping it from outside with no response.
It seemed that the server is down. But the server is ok and just can't be accessed.
reboot no use.

I have to go to IDC and link the CRT, keyboard to the box, and use root account to login.
After root login, the network ok immediately, and can ping the server from outside.

The problem occurs one or two times per month.
The server has no firewall.

Why i have to login the root from terminal to enable the network?
some ideas?

geek745 07-24-2008 11:26 PM

I had a similar problem on SW11.0 with a more recent kernel (2.6.23 or something). This was on a more-or-less workstation-class machine that I use at home as a fileserver. It seemed to be a hardware anomaly (or driver) that the net interface would die after awhile... I'd have to disconnect power from the box for some arbitrary long amount of time (half an hour) to be sure that I drained power from the system; then fire it up again, but I never had to do the root login.

You said that all you have to do when you lose the network on that server is login as root? Not run any commands that re-enable the network? I assume you've tried this a few times to be sure that it's the same behavior... You should look in the shell-based login scripts to see if there is something that root runs when logging in (/root/.profile, .login, .bashrc, .cshrc, etc... ) You need to know which shell root is using to determine which of those scripts are actually run on login. If there is not an obvious network setup step (like calling /sbin/ifconfig eth0 up or dhclient eth0, I might recommend replacing the NIC.

Also, when you find the machine in this disconnected state, after logging in as root, you should check the system logs to see any problems with the network interface dying. dmesg and syslog should be plenty, though there may be another log specific to the network drivers you are using... search for its files under /var/log/ or /usr/var/log or /usr/local/var/log

Finally it might be the driver, which is a part of the kernel, either compiled in or loaded as a module, manually or automatically... check out your kernel build; maybe upgrade.

Good luck!

zhoun 07-25-2008 05:01 AM

geek745, thanks a lot!

I had checked the log and nothing special happened.
I download the BCM driver from official website and use it to replace the default network driver module (tg3) in kernel.

Hope it works.

piete 07-25-2008 05:36 AM

For what it's worth, you might want to investigate bios-level power off routines. I've seen some motherboards (mostly on the newer boards) and laptops, especially, provide an option to sleep hardware after a period of inactivity to save power. Of course what happens then is they don't wake up through an external network event.

Let us know how it goes,
- Piete.

zhoun 07-29-2008 10:07 AM

I suspect that that's the network driver problem, so i do the following steps:

1. get BCM network driver source tar ball from the official website, use this kernel module to replace the tg3 module.
2. blacklist ipv6
3. use ethtool to turn auto-negotiation off and set the speed to 100M.
4. ping my dns server(run in background) two times every minute.

I have no idea which step works. Anyway, the server up 5 days and everything is ok.

zhoun 07-30-2008 12:59 AM

The problem still there!

Code:

eth0      Link encap:Ethernet  HWaddr 00:15:58:3d:80:59
          inet addr:61.xxx.xxx.xx  Bcast:61.xxx.xxx.xx  Mask:255.255.255.192
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4758486 errors:16462 dropped:0 overruns:0 frame:5885
          TX packets:3674873 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:736274139 (702.1 MiB)  TX bytes:426047610 (406.3 MiB)
          Interrupt:20

I found that the eth0 has many RX errors.
So i ping to nba.com from the server is ok.
But when i ping the server's ip from my laptop, about 50% packet loss.
So the TX is ok, RX has errors.

Is it the network card driver problem?

The network card is NetXtreme BCM5788 Gigabit Ethernet.

vbisis 07-30-2008 01:29 AM

Can you test another ethernet cable?
In my oppinion this sounds like a broken cable.


All times are GMT -5. The time now is 09:20 AM.