PDA

View Full Version : can't get ip from dhcp, static doesn't connect


TazMan1
19th February 2009, 01:45 PM
Hello all,

We currently have some servers that have fedora on them. I upgraded one which had fedora 5 installed. Since I couldn't update it i installed fedora 9 and then 10. Each time i was unable to get it to get an ip address and get out to the network. there were no issues with this before the upgrade. I've tried setting a static ip to it as well with no results. I am not a linux expert by any means so I am unsure of where to look. I've played with the system-config-network command and set everything to what it should be but nothing. I have to do this via command line due to the fact that startx, kde and gnome aren't loaded onto the system and I am unsure of how to get those installed since i can't get out to the internet. Any help you could provide would be greatly appreciated. Thank you much.

metaltux
19th February 2009, 06:32 PM
try to run dhclient with root to get a IP (you need to be sure that there's a DHCP server to give you an IP) and to set a static ip you can use the ifconfig command or edit the file /etc/sysconfig/network-script/ifcfg-ethX and change X by the number of your interface ;)

fedora (http://www.linux-archive.org/fedora-user/)

arvinddeshpande
19th February 2009, 06:36 PM

Oh! One more suggestion, check your logs /var/log/messages to see what happened to the DHCP requests if your server is sending any.
You can "tail -f /var/log/messages" in one terminal and run "service network restart" in another. Oh! I forgot you on console.....CTEL-ALT-F1-7 should be able to give you access to multiple consoles if not terminals.

TazMan1
19th February 2009, 09:40 PM
thanks for the help. I was able to get it set to a static ip but when i go to try and ping something on our network i get a destination host unreachable. i've tried it with both nm on and off with the same results. Any idea of where to go from here?

arvinddeshpande
19th February 2009, 10:16 PM
nm does not have anything to do in this. If you hand edited the file mostly you set your gateway ip/netmask wrong.
Check the output of "route -n" to see if anything seems obvious. Also try pinging your gateway to check it is working and reachable.

TazMan1
3rd March 2009, 09:21 PM
I am still at a loss here. I have rebooted the system from the install disk to the recover mode and from there i am able to ping out and get an ip address and ping to the machine from other machines on the network. I edited the ifcfg-eth0 file to have the same info as the one contained in the recover mode. But when i reboot and try to ping I get a network is unreachable message. Anyone have any ideas?

blittle
3rd March 2009, 10:09 PM
post your ifcfg file

TazMan1
4th March 2009, 01:24 PM
heres the ifcfg

DEVICE=eht0
BOOTPROTO=static
GATEWAY=10.10.10.1
HWADDR=00:19:b9:de:9c:fa
IPADDR=10.10.10.51
NETMASK=255.255.255.0
ONBOOT=yes