Fedora Linux Support Community & Resources Center
  #1  
Old 6th March 2006, 09:13 PM
umi Offline
Registered User
 
Join Date: Dec 2005
Age: 25
Posts: 13
Exclamation DNS resolve problem. Need Help !!!

Hi. I've got a strange problem. I have Fedora Core 4 on my computer. This computer is behind a TrendNET router. Until a month ago, my ISP provided me static IP's and DNS. Now, they set me on DHCP. Before this change, I had no problem with DNS resolving. After this, I can't ping any hostname, although "dig", "nslookup" and "host" work perfectly.
[root@fedora ~]# host www.google.com
www.google.com is an alias for www.l.google.com.
www.l.google.com has address 216.239.59.104
www.l.google.com has address 216.239.59.147
www.l.google.com has address 216.239.59.99
www.l.google.com has address 216.239.59.103
www.google.com is an alias for www.l.google.com.
www.google.com is an alias for www.l.google.com.
[root@fedora ~]# nslookup www.google.com
Server: 192.168.1.1
Address: 192.168.1.1#53

Non-authoritative answer:
www.google.com canonical name = www.l.google.com.
Name: www.l.google.com
Address: 216.239.59.104
Name: www.l.google.com
Address: 216.239.59.147
Name: www.l.google.com
Address: 216.239.59.99
Name: www.l.google.com
Address: 216.239.59.103
[root@fedora ~]# ping www.google.com
ping: unknown host www.google.com
I don't know what to do . My /etc/resolv.conf is correct, I guess, because it worked.
nameserver 192.168.1.1
nameserver 89.33.112.254
nameserver 83.103.223.17
192.168.1.1 is my router's lan IP, and the other 2 are my ISP's DNS.
Reply With Quote
  #2  
Old 6th March 2006, 10:11 PM
jhetrick62 Offline
Registered User
 
Join Date: Feb 2005
Location: Buffalo, Ny
Posts: 875
You don't need your ISP's DNS addresses in there to make your box work. Are you connected to your router by dhcp or static? If dhcp, you definietly don't need those addresses and by static, your router should be providing the dns resolution back to your box. I've got one of each type and by pointing to my router, it all works.

How is your router set up. If you router is grabbing the correct DNS addresses then you should be fine. If your router is getting a dhcp feed from your isp, then you don't need dns addresses in that either. They should be retrieved automatically.

Jeff
Reply With Quote
  #3  
Old 7th March 2006, 01:54 PM
umi Offline
Registered User
 
Join Date: Dec 2005
Age: 25
Posts: 13
I have static IP's from my router. But how should I configure the /etc/resolv.conf to get the DNS from router?
P.S. The router works fine, because I have a Windows computer which has no problem accessing the DNS.
Reply With Quote
  #4  
Old 7th March 2006, 02:01 PM
jhetrick62 Offline
Registered User
 
Join Date: Feb 2005
Location: Buffalo, Ny
Posts: 875
Post back the contents of the host file: cat /etc/host
Reply With Quote
  #5  
Old 7th March 2006, 02:07 PM
umi Offline
Registered User
 
Join Date: Dec 2005
Age: 25
Posts: 13
Here is my /etc/hosts content:

[root@fedora ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 fedora localhost.localdomain localhost
Reply With Quote
  #6  
Old 7th March 2006, 02:21 PM
jhetrick62 Offline
Registered User
 
Join Date: Feb 2005
Location: Buffalo, Ny
Posts: 875
I believe that your hosts file is wrong. Here is a copy of my two files and I also am running static IP on this box.

[jeff@jeffserver ~]$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost jeffserver
192.168.0.48 jeffserver.localdomain
[jeff@jeffserver ~]$ cat /etc/resolv.conf
; generated by /sbin/dhclient-script
nameserver 192.168.0.1


What is your local domain name? You have "Fedora" in front of your localhost.localdomain localhost statement
I have added my server name "jeffserver" after that statement and also added it as it's own host along with the static IP address that I assigned.
As you can see by my resolv.conf file, I don't need any dns servers other than the router's gateway address. I believe that is the better way to set it up, but I believe your problem is in your hosts definitions.
I altered mine as I have another FC3 box on the same network so I didn't want them both to be localhost.localdomain.


Jeff
Reply With Quote
  #7  
Old 7th March 2006, 02:39 PM
umi Offline
Registered User
 
Join Date: Dec 2005
Age: 25
Posts: 13
How can I find out my local domain name? I didn't set one. "Fedora" is my computer's name. Is it possible that it adds my local domain name to the hostname I want? (www.google.com.localdomain)
Reply With Quote
  #8  
Old 7th March 2006, 02:52 PM
jhetrick62 Offline
Registered User
 
Join Date: Feb 2005
Location: Buffalo, Ny
Posts: 875
These settings are usually set in the gui for network configuration. Run system-config-network to get the utility to run.

What name shows up on your GUI login screen? Every time you logoff and log back in, in the bottom right hand corner of the screen it lists your machine name. By default it lists localhost.localdomain unless you have changed it.

I would first go back through the network setup utility and modify that and it should fix your hosts file. The alternative would be to modify the host file manually.

Jeff
Reply With Quote
  #9  
Old 7th March 2006, 02:58 PM
umi Offline
Registered User
 
Join Date: Dec 2005
Age: 25
Posts: 13
Hmm, I don't have GUI installed, because of low hardware resources (K6-II 400 MHz). I have 2 network cards on my pc. When I run system-config-network, it configures automatically eth1, not eth0, which is my default card. I cannot select eth0. When I start it, it displays :

What do you want to configure?
‚ Ethernet
‚ Modem
‚ ISDN

If I select Ethernet, it is eth1.
Reply With Quote
  #10  
Old 7th March 2006, 03:10 PM
jhetrick62 Offline
Registered User
 
Join Date: Feb 2005
Location: Buffalo, Ny
Posts: 875
There is the problem. Your card(s) are not configured properly. What are you using the second card for?

I would install that gui interface if it doesn't require many dependencies. yum install system-config-network

Then you can get this fixed. You are getting into deep stuff to set all of this manually. I looked it up and you need to look at the files in /etc/sysconfig/networking/devices in order to set this manually, and then this only ids the devices. Where to set the active device manually I don't know.

Install the GUI utility at this point.

Jeff
Reply With Quote
  #11  
Old 7th March 2006, 03:14 PM
jhetrick62 Offline
Registered User
 
Join Date: Feb 2005
Location: Buffalo, Ny
Posts: 875
In pondering this further, if it brings up eth1, then can you configure from there? What is the next question.

Jeff
Reply With Quote
  #12  
Old 7th March 2006, 03:18 PM
umi Offline
Registered User
 
Join Date: Dec 2005
Age: 25
Posts: 13
Well, I want to make an Internet Server, that's why I put 2 cards on it. I cannot use yum because it doesn't resolve DNS. I have system-config-network installed. The GUI I was talking about was the X. Here is my eth0 config, from /etc/sysconfig/networking/devices/ifcfg-eth0, which I guess it's correct :

GATEWAY=192.168.1.1
DHCP_HOSTNAME=fedora
BOOTPROTO=none
TYPE=Ethernet
HWADDR=00:10:4B:62:9F:31
DEVICE=eth0
NETMASK=255.255.255.0
BROADCAST=192.168.1.255
IPADDR=192.168.1.103
NETWORK=192.168.1.0
ONBOOT=yes

Will it work if I set my IP to dhcp? How can I do this?
Reply With Quote
  #13  
Old 7th March 2006, 03:20 PM
umi Offline
Registered User
 
Join Date: Dec 2005
Age: 25
Posts: 13
And what I don't understand, is why it worked and now it doesn't, without changing the configuration files?
Reply With Quote
  #14  
Old 7th March 2006, 03:36 PM
jhetrick62 Offline
Registered User
 
Join Date: Feb 2005
Location: Buffalo, Ny
Posts: 875
This setup is beyond my capabilities as I have never attempted to set up an Internet server like that. The problem obviously came into play when you had to switch from static IP to DHCP and it isn't set right. I would back up the hosts file and change it to reflect more closely to mine.
127.0.0.1 localhost.localdomain locahost fedora

If you are running static ip add that line next
192.168.1.? fedora.localdomain

All of this is assuming that you have this box named as fedora.

Then reboot to restart your eth devices unless you know how to restart manually. I always restart through the GUI so I'm not familiar with manual.

As I said above, if this doesn't work, hopefully someone more familar with manual setup will post to help you as you are beyond what I normally use. My stuff works great for me and I have manually edited that hosts file that I posted above so maybe that will work for you. I did not set that one up on the GUI, but again, not sure how it picks the active eth card other than through hosts file.

Goodluck,
Jeff
Reply With Quote
  #15  
Old 7th March 2006, 03:38 PM
umi Offline
Registered User
 
Join Date: Dec 2005
Age: 25
Posts: 13
Thanks for your help, Jeff. I'll try to change the hosts file.
Reply With Quote
Reply

Tags
dns, problem, resolve

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable so far to resolve virtualhost problem tarzy Servers & Networking 1 10th December 2008 04:31 PM
How YUM resolve dependencies titus Using Fedora 5 26th November 2007 01:56 AM
fedora 8 sometimes can not resolve dns helloworld1 Using Fedora 10 10th November 2007 02:36 PM
unable to resolve "LABEL=/boot" for F7 but no problem for FC6 zwfed EOL (End Of Life) Versions 3 8th June 2007 01:36 PM


Current GMT-time: 11:52 (Friday, 01-08-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletinģ Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat