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 |
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.
|
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 |
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?
|
-------------------------------------------------------------------- xebian:/# /sbin/ifconfig -a eth0 Link encap:Ethernet HWaddr 00:0D:3A:51:DC: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 |
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. |
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:51:DC: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 |
All times are GMT -5. The time now is 04:39 PM. |