You are not logged in.
Hello,
While trying to fix another problem, I inadvertently screwed up my entire server.
I went ahead an replaced my /etc/resolv.conf file to point to the OpenDNS servers; before, it was using my router as a nameserver (192.168.1.1), and the router then used the OpenDNS servers. Well, I restarted the server without thinking of the consequences (>.<), and now the networking on my server is useless...
I've tried to add my old nameserver (router) back to the resolv.conf file and run `/etc/rc.d/network restart`, only to have it hang for about a minute and finally fail, while also overwriting resolv.conf in the process to include nothing. I've also tried to restart the server (without restarting networking prior) with a new resolv.conf only to still have it fail.
I've tried creating a /etc/resolv.conf.head file, only to find that it seems to be useless.
I've tried multiple commands with `ifconfig` to try to bring my interface (eth0) to connect to the router, but it doesn't work.
My interface is supposed to get it's IP Address from the router via DHCP, however I have it set up to serve a static DHCP address via a MAC match, thus the server should always be 192.168.1.10. Currently, eth0 displays NO ip address (except a ipv6 ip address, which is useless for me...). Likewise, running `ping 192.186.1.1` it says (paraphrased) "No network connection", further supporting that eth0 doesn't even see the router...
I dunno what else to do. All I need it to do is connect to 192.168.1.1 to get it's IP Address via DHCP and it should be fine after that.
Any suggestions?
Offline
# dhcpcd eth0
Offline
Tried it already. It said something about sending the command to the master process or something like that. I'm not physically at the server at the moment and I can't SSH in (obviously), so I can't say what the exact output is... <_<
Offline
You can try to turn off dhcp services and try to set the IP manually:
ifconfig eth0 down
ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up
route add default gw your.router.ip.address
Offline
Changing DNS servers doesn't break networking - you're not using DNS on your internal subnet anyway, just IP addresses. Whenever you get to the server, check your logs for anything useful. If your router has logs, there might be something relevant there too.
To rule out a dhcp problem, reconfigure with a static address.
Offline
You can try to turn off dhcp services and try to set the IP manually:
ifconfig eth0 down ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up route add default gw your.router.ip.address
woot! That works! Now how do I get it to do that automatically during start-up?
Offline
Easiest would be to set it in your /etc/rc.conf:
HOSTNAME="yourhostname"
eth0="eth0 192.168.1.10 netmask 255.255.255.0 broadcast 192.168.1.255"
INTERFACES=(eth0)
gateway="default gw gw.ip"
ROUTES=(gateway)
Make sure to comment out any dhcp stuff in the networking section, and also prefix dhcp daemons with a ! in the DAEMONS array.
Offline
Well, what I meant was how would I go about fixing the DHCP. =P
Offline
Well, what I meant was how would I go about fixing the DHCP. =P
Haha, well in that case I am not 100% sure -- I don't use DHCP myself, but you could try switching dhcpcd for dhclient. Or stick to dhcpcd and try to gather info from log files as to why it's not properly getting an IP.
Offline
Ugh. I hate log files. My log files are always in a disarray. Can anyone tell me which one specifically I need to look into.
I don't understand how DHCP could have broken. The only thing I changed was resolv.conf. I guess it won't hurt to go with the static method until I fix stuff or re-install Arch. dhcpcd keeps timing out when I try to use it.
Thanks for the help, btw.
Last edited by XtrmGmr99 (2009-08-26 18:03:05)
Offline
Hmm... it seems that I can't get to any website from the server using the static IP. Every ping or web connection to a outside site returns a couldn't resolve host error. however, I can connect to the server via ssh and Apache works... =/
So, incoming works, outgoing doesn't... what the hell is going on? =3
Offline
For logs, I would grep anything in /var/log for dhcp to see if you can find anything.
As for the no outgoing issue, maybe try the following:
Flush any iptables rules you may have.
dig @your.current.resolv.conf.nameserver google.com
If it returns a valid answer, then outgoing name resolution should work... if it doesn't try:
dig @208.67.222.222 google.com
If that works, do the whole resolv.conf switch until you have the dhcp issue figured out.
Offline
I found the problem. The DHCP service on my router was turned off for some strange reason. I probably accidentally switched it when messing with my other problem... But now I can't seem to connect to my Samba shares... *sigh* Oh well, I'll figure it out.
Thanks to everyone who helped.
Last edited by XtrmGmr99 (2009-08-27 02:16:16)
Offline
General rule of thumb: if it doesn't work, check if it's turned on You don't know how many embarrassing moments I've had with related events.
Offline
=P Thanks for that helpful advise xD
Offline