 |
 |
 |
 |
| Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc. |

6th March 2006, 09:13 PM
|
|
Registered User
|
|
Join Date: Dec 2005
Age: 24
Posts: 13

|
|
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.
|

6th March 2006, 10:11 PM
|
|
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
|

7th March 2006, 01:54 PM
|
|
Registered User
|
|
Join Date: Dec 2005
Age: 24
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.
|

7th March 2006, 02:01 PM
|
|
Registered User
|
|
Join Date: Feb 2005
Location: Buffalo, Ny
Posts: 875

|
|
|
Post back the contents of the host file: cat /etc/host
|

7th March 2006, 02:07 PM
|
|
Registered User
|
|
Join Date: Dec 2005
Age: 24
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
|

7th March 2006, 02:21 PM
|
|
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
|

7th March 2006, 02:39 PM
|
|
Registered User
|
|
Join Date: Dec 2005
Age: 24
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)
|

7th March 2006, 02:52 PM
|
|
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
|

7th March 2006, 02:58 PM
|
|
Registered User
|
|
Join Date: Dec 2005
Age: 24
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.
|

7th March 2006, 03:10 PM
|
|
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
|

7th March 2006, 03:14 PM
|
|
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
|

7th March 2006, 03:18 PM
|
|
Registered User
|
|
Join Date: Dec 2005
Age: 24
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?
|

7th March 2006, 03:20 PM
|
|
Registered User
|
|
Join Date: Dec 2005
Age: 24
Posts: 13

|
|
|
And what I don't understand, is why it worked and now it doesn't, without changing the configuration files?
|

7th March 2006, 03:36 PM
|
|
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
|

7th March 2006, 03:38 PM
|
|
Registered User
|
|
Join Date: Dec 2005
Age: 24
Posts: 13

|
|
|
Thanks for your help, Jeff. I'll try to change the hosts file.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 06:16 (Wednesday, 19-06-2013)
|
|
 |
 |
 |
 |
|
|