LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   No IP w/ DHCP on reboot at new location (https://www.linuxquestions.org/questions/linux-networking-3/no-ip-w-dhcp-on-reboot-at-new-location-188585/)

plan9 06-01-2004 04:41 PM

No IP w/ DHCP on reboot at new location
 
Hey there, and thanks to all for reading.

I have what I think should be an easy question to answer:

I'm running Slackware 9.1, with all updates. I had it configured for DHCP and all was swell. I moved the machine to another plate location and, upon reboot I had lost my network connectivity.

ifconfig shows an IP like, 127.0.0.1.

There has to be an easy fix for this, can anyone help me?


Thanks,

plan9 (as in the bad movie, not the OS!)

plan9 06-01-2004 05:11 PM

Well, I figured out how to fix it- but maybe someone could help me understand the how and why of it all.

I started messing around with ifconfig, stuff like this:

#ifconfig eth0 up

I was told that there was no such device... seemed strange to me. So I went into netconfig, and re-did the dhcp config with all of the same values that i was using.
nothing doing, no net access.

I went back into netconfig and configured the box for a static ip. while doing so, i was prompted to probe for my nic card. it seemed to me that the module was not being loaded for some reason. it found the card (i jotted down the mod it uses) and rebooted. upon reboot i once again fired up netconfig and went back with the dhcp settings i was using before. rebooted again, and it works fine now.

why was my nic's mod not loading? why did this change, just because i changed wall ports? Is there a way to start the nic and ip getting process without having to reboot?

thanks!!

superbondbond 06-01-2004 05:14 PM

Every once in a while I run into a problem trying to pull an IP from my ISP's DHCP server. What I do is go to /etc/dhcpc and look for dhcpc-interface.pid and I delete that file. Then I re-run /etc/rc.d/rc.inet1 and it works. Granted I don't know mine is caused by anything similar to you situation, but it's worth a try.

avarus 06-01-2004 05:21 PM

Hi,

Not an answer but some random and hopefully helpful points.

The command 'ifconfig -a' shows all available devices. 127.0.0.1 is the logical loopback - not a real device and should always be there. The eth0 device should automatically become available when the module for the device is loaded (unless if is usb or pcmcia in which case you need the hotplug system to perform some magic voodoo).

Anyway, once the module is loaded and the device is available, you should simply need to do '/etc/init.d/network restart' - not a full reboot. (Disclaimer - I use Gentoo so I may not be quite right there).

Do feel free to randomly hack that script - eg to always modprobe your driver - what's the worst that could happen?

TIM

superbondbond 06-01-2004 05:28 PM

Quote:

Originally posted by avarus
Anyway, once the module is loaded and the device is available, you should simply need to do '/etc/init.d/network restart' - not a full reboot. (Disclaimer - I use Gentoo so I may not be quite right there).
You're referring to SysV style whereas Slack is BSD style.
But your theory is correct. Simply restart network services and you're done. re-boot shouldn't be necessary. ;)

plan9 06-01-2004 05:54 PM

Quote:

Originally posted by superbondbond
Then I re-run /etc/rc.d/rc.inet1 and it works.
so to avoid having to reboot, i can:

#/etc/rc.d/rc.inet1 restart

to just restart everything that is run from inet1? Is there some way to do it
that will not affect all of the other daemons that are running, or does a restart
not affect running processes?

Thanks alot

9

superbondbond 06-01-2004 11:58 PM

the "restart" part is not needed. the script itself is executable with no other arguments necessary.
Simply type (as root)

/etc/rc.d/rc.inet1 [enter]
(this just restarts the network services, nothing else)

plan9 06-02-2004 08:40 PM

Thank you for all your help

9


All times are GMT -5. The time now is 04:44 PM.