LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-28-2005, 09:55 AM   #1
ikk
LQ Newbie
 
Registered: Aug 2005
Distribution: xebian, cygwin
Posts: 10

Rep: Reputation: 0
DNS, Linux doesnt resolve domain names for me


Hello.

I instaled linux on my second computer in my home, it works in LAN but when im trying simply acces internet it cant resolve domain names. Ssh and things like FTP works.

I have internet via ADSL modem, i have external router installed and oter computers are connected via network cards with RJ45 cables. Router ip is 10.0.0.2 and this ip i typed as DNS server in Windows XP and everything works there, but i typed in linux /etc/resolv.conf line:

nameserver 10.0.0.2

and this does nothing

im really pissed cos in windows it simply works and on linux not

need help with this plz
 
Old 08-28-2005, 10:18 AM   #2
cdhgee
Member
 
Registered: Oct 2003
Location: St Paul, MN
Distribution: Fedora 8, Fedora 9
Posts: 513

Rep: Reputation: 30
Can you ping 10.0.0.2 from the linux machine? Double-check /etc/resolv.conf to make sure that the nameserver is still listed - some programs overwrite the file. Check firewalls to make sure that DNS is allowed through (UDP port 53). Check also that you can ping the linux box from your DNS server.
 
Old 08-28-2005, 10:29 AM   #3
ikk
LQ Newbie
 
Registered: Aug 2005
Distribution: xebian, cygwin
Posts: 10

Original Poster
Rep: Reputation: 0
i think i cant ping 10.0.0.2, this is what i get:

xebian:/# ping 10.0.0.2
Do you want to ping broadcast? Then -b
xebian:/#
xebian:/# ping 10.0.0.2 -b
WARNING: pinging broadcast address
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.

- and now i can only press Ctrl+C, cos shell hangs

--- 10.0.0.2 ping statistics ---
238 packets transmitted, 0 received, 100% packet loss, time 237012ms

I didnt installed any firewals. How to check if particular port isnt blocked?

EDIT:
My router is configurable through HTTP interface, i dont see a way there to make it ping my linux machine.

/etc/resolv.conf seems to be untouched even when i reboot

Last edited by ikk; 08-28-2005 at 10:35 AM.
 
Old 08-28-2005, 12:44 PM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Maybe your IP configuration is screwed up, since 10.0.0.2 should not be interpreted as a broadcast IP address. Can you post the results of "/sbin/ifconfig -a" and "netstat -rn" as run on your system?
 
Old 08-28-2005, 02:22 PM   #5
ikk
LQ Newbie
 
Registered: Aug 2005
Distribution: xebian, cygwin
Posts: 10

Original Poster
Rep: Reputation: 0

--------------------------------------------------------------------

xebian:/# /sbin/ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:0D:3A:51C:1F
inet addr:10.0.0.8 Bcast:10.0.0.2 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:379 errors:0 dropped:0 overruns:0 frame:0
TX packets:494 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:39405 (38.4 KiB) TX bytes:64488 (62.9 KiB)
Interrupt:4 Base address:0x3000

lo Link encap:Local Loopback
LOOPBACK MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

xebian:/#

---------------------------------------------------------------------

xebian:/# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
xebian:/#

---------------------------------------------------------------------


Dont know if that mater, but my switch in "Factory Default" settings was configured to be 10.0.0.2 so i didnt changed it. As i said, i have winxp that works ok with this
 
Old 08-28-2005, 02:29 PM   #6
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
You have 10.0.0.2 set as the interface's broadcast address, which is almost certainly incorrect unless you're using some really wacko network gear -- the correct broadcast for your subnet would be 10.0.0.255 (all bits beyond the subnet mask set to 1). You can change it with:

/sbin/ifconfig eth0 boadcast 10.0.0.255

and it should start working again. You'll probably also need to change it in whatever network setup scripts set the interface at boot. To tell you how to do that, we need to know what distro you are using.

[edit]

Oh, you'll also need to set your gateway, as it does not appear to be set. You can set it with

route set default gatway <IP of gateway>

again you'll need to modify the setup files to make it permanent.

Last edited by btmiller; 08-28-2005 at 02:30 PM.
 
Old 08-28-2005, 03:29 PM   #7
ikk
LQ Newbie
 
Registered: Aug 2005
Distribution: xebian, cygwin
Posts: 10

Original Poster
Rep: Reputation: 0
THANK YOU!
This works, DNS working and i have internet access on linux.
Im using xebian/debian linux instaled on xbox console, xebian is 1.1.3 version.
Ive already find out place where to insert startup scripts, its /etc/init.d/bootmisc.sh file, i dont know if its best place though, but working.


my network settings are now:

xebian:/# iconfig eth0 10.0.0.8 netmask 255.255.255.0 broadcast 10.0.0.255

xebian:/# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:0D:3A:51C:1F
inet addr:10.0.0.8 Bcast:10.0.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2291 errors:0 dropped:0 overruns:0 frame:0
TX packets:2880 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:235237 (229.7 KiB) TX bytes:395914 (386.6 KiB)
Interrupt:4 Base address:0x3000

xebian:/# route add default gw 10.0.0.2

xebian:/# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 * 255.255.255.0 U 0 0 0 eth0
default 10.0.0.2 0.0.0.0 UG 0 0 0 eth0
xebian:/#


thanx again man

Last edited by ikk; 08-28-2005 at 03:59 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to resolve domain names natekris2331 Slackware 9 02-12-2011 12:27 PM
DNS, Linux doesnt resolve domain names for me ikk Linux - Networking 6 08-28-2005 03:35 PM
DNS will not resolve non-domain qualified names arobinson74 Linux - Networking 2 10-25-2004 04:13 PM
Unable to resolve domain names holdem Linux - Networking 4 02-01-2004 10:50 PM
unable to resolve domain names.. shazbot Slackware 5 02-05-2003 07:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration