View Full Version : Empty /etc/resolv.conf
Sdq
2008-03-30, 03:40 PM CDT
hey ppl, iam a newbie concernig linux.my dell vostro 1400 has FC8..i was recently trying to install dhcp-3.0.6 src rpm from isc.org..before that i was a simple dhcp client using cable modem and it worked fine...but the dhcp program didnt install well..after i deleted it using rm -rf command my internet is not working..my configuration settings are for dhcp but the resov.conf file remains empty no name servers nothing..whereas i am getting an ipaddress.i checked that with ifconfig..the resov.conf file previosly used to show all the dynamic name servers, search path etc..but now it remains empty..i have even checked the Automatically get dns settings in the network manager..my eth0 interface is also cfgd for dhcp i have check that with ifcfg eth0..whats going on..plz help me out people..the resolv.conf file used to be filled up by itself but it is empty now..cannot go on the internet ..using Mozilla.. plz help!!!
Nokia
2008-03-30, 03:44 PM CDT
su -l
gedit /etc/resolv.conf
Add two lines:
nameserver 208.67.222.222
nameserver 208.67.220.220
Press Enter after the second line and save. It should work now.
stevea
2008-03-30, 04:41 PM CDT
if you aren't running dhcpd (verify this) then that dhcp package should be irrelevant.
If *may* have caused some problem with the dhclient tho'.
Remove the old lease files.
Verify that any dhclient.conf is correct.
Try killing (or not starting) any shclient and then run dhclient from a terminal with:
dhclient -d
If necessary run wireshark while you start dhclient and see what is wrong.
Nokia
2008-03-30, 04:59 PM CDT
I guess that's a bit too much to ask Steve...:)
Sdq
2008-03-31, 12:57 PM CDT
hey guys thank you so much for your help..i entered the name servers of my service provider although i know the ones u posted would've worked too..i just didnt knew what were they..i guess my problem was pretty common..what i dnt know is y didnt the dhcp server program worked when i installed it..i used ./configure, make , make install...and it kinda looked ok..but when i queried its status it always returned ...package not installed...
Sdq
2008-03-31, 01:24 PM CDT
one more thing ppl..i am a dhcp client .. i also want to be a dhcp server anytime when i wish to start the service not at boot though...i know when i have installed dhcp server a dhcpd.conf file have to be made.. i know a pc with a static ip is an ideal for server..but i dnt want to do it being a static ip user...i just know that it can be done.. but how to do it..i mean what should the contents of dhcpd.conf file shud be..?? i simultaneously want to be a dhcp client as well as a server..waht shud be done??
Nokia
2008-03-31, 02:20 PM CDT
I guess you don't know what you want and also you don't know how to ask for it.
The ONLY reason for having a dhcp-server on your PC is having more than one PC in administration in a local/private network, a Switch and the lack of a router which can also assume the dhcp-server role.
If you have only one PC, no Router and a direct connection to the net, and you manage somehow to start a dhcp-server which will automatically start feeding IP addresses into your ISP network, you're in BIG trouble.
If I assume correctly, then buy a router, learn what networking is all about (I highly recommend taking Cisco CCNA courses from a local academy if available) and also learn what Linux is. Not knowing doesn't absolve you of legal and financial liabilities if you start..."experimenting"
Sdq
2008-03-31, 03:32 PM CDT
hey thanks for ur concern buddy...i AM doing CCNA courses and they are almost finished..i know what routers do..and i am not that new to linux .. maybe ur right that i cannot explain myself .. ill try once more .. i am trying to give my PC the functionality of an access point .. some things are learnt by hit and trial only .. i know what i am trying to do can be done.. just dont know how to do it...u ppl have been helpful .. i accept that i am just experimenting and ill be trying only to assign my laptop an ipaddress which will connect via wireless..that ip would be a private one given by my PC which in turn gets its dynamic ip from the main dhcp server.. this hierarchy is possible..i will define the ip ranges myself IF i get the dhcp program to work..well thanx for ur help.. if u think it wont work ill be glad to know why...
Nokia
2008-03-31, 04:07 PM CDT
...i AM doing CCNA courses and they are almost finished..
Good for you. :)
I think you are trying to do much more than needed. Just assign two private IP addreses for laptop and wireless card on the other PC(+ same SSID and encryption), then bridge the wired and wireless cards. Default GW for the laptop should be the other PC.
If you manage to do that, you can try more complicated things ;)
Iron_Mike
2008-03-31, 07:25 PM CDT
Actually for the Lan side the first hop should resolve the private ip range, be it 192.168.xxx.xx, 10.10.xxx.xx or 172.xxx.xxx.xxx. BUT in your routers dns configuration is where you will see your ISP dns servers, OR you can input your dns servers whether it be the OPENdns ones or some other like 4.2.2.1 or 4.2.2.2
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.