View previous topic :: View next topic |
Author |
Message |
Gnarg n00b


Joined: 04 Nov 2004 Posts: 27 Location: Toronto, Canada
|
Posted: Tue Sep 05, 2006 5:31 pm Post subject: resolve.conf question<SOLVED> |
|
|
Hi,
I'm setting up my system to use a static IP address. At this point I have successfully created a static IP address, I can ping all my system in my network and I can ping my router and access it VIA my browser. My wifes Windows box also has a static IP addres and can use the internet.
My problem is I cannot even ping www.google.com. I keep getting destination unusable ( can't remember exat wording ).
I'm using a wireless network ( I did have Mac Filtering enabled but disabled it for testing purposes ). In my /etc/resolv.conf file I have 2 nameservers pointing to my ISP when I was using DHCP. Now that I am using a Static IP address am I still to use those same nameservers? Or do I point the nameservers to my router's IP address?
Thank you,
Gnarg
Last edited by Gnarg on Fri Sep 08, 2006 12:21 pm; edited 1 time in total |
|
Back to top |
|
 |
Keruskerfuerst Advocate


Joined: 01 Feb 2006 Posts: 2289 Location: near Augsburg, Germany
|
Posted: Tue Sep 05, 2006 5:52 pm Post subject: |
|
|
The correct entry in resolv.conf is the IP adress of the router. |
|
Back to top |
|
 |
Gnarg n00b


Joined: 04 Nov 2004 Posts: 27 Location: Toronto, Canada
|
Posted: Wed Sep 06, 2006 1:20 am Post subject: Routers IP address did not work |
|
|
Thanks for the reply.
I added the routers IP address into resolv.conf and I still have the same problem.
Here are my "net", "wireless" and "resolv.conf" settings
/etc/conf.d/net
Code: |
modules=("ifconfig")
config_wlan0=( "192.168.1.202/24" )
config_ESSID=( "myessid" )
|
/etc/conf.d/wireless
Code: |
essid_wlan0="myessid"
key_myessid="<mykey>"
|
/etc/resolv.conf
Code: |
nameserver 192.168.1.100
domain mycpuname
|
I hope someone can see where I made a mistake.
Gnarg |
|
Back to top |
|
 |
robdd Tux's lil' helper

Joined: 02 Jan 2005 Posts: 142 Location: Sydney Australia
|
Posted: Wed Sep 06, 2006 3:36 am Post subject: |
|
|
Hi there Gnarg - This looks to me like you haven't got your default gateway set up, rather than a DNS problem.
You are on the right track using ping as a debugging tool - what you should try is to ping an external IP address using the numeric IP not the name. Try www.freebsd.org, which is 216.136.204.117. If you *can't* ping the numeric address then your packets don't know how to get out of your network. Another clue is what happened when you tried to ping google - you didn't say, but I'm assuming that the ping error message gave the numeric IP. If that's the case then DNS is working fine.
Try looking at the end of the /etc/conf.d/net file for a line starting 'gateway' - you need to uncomment that line and insert the IP address of your router (which is the gateway device for your network). When you were using DHCP the gateway address was provided by your router as part of the DHCP exchange of info. (Sorrry I can't give an example right now - I'm booted into Windoze which I *have* to use for work. Grrrrrrrr).
Good Luck  _________________ Rob Diamond
Gentoo Hack, hack, hacker
Sydney, Australia |
|
Back to top |
|
 |
Gnarg n00b


Joined: 04 Nov 2004 Posts: 27 Location: Toronto, Canada
|
Posted: Wed Sep 06, 2006 4:23 pm Post subject: It worked |
|
|
Hi Robdd,
Thanks for the reply. I found where to add the route and now I have access to the internet and I consider this solved.
I do have a slight problem if I ping www.freebsd.org I get the following:
ping www.freebsd.org
PING www.freebsd.org (216.136.204.117) 56(84) bytes of data.
64 bytes from 216.136.204.117: icmp_seq=1 ttl=51 time=103 ms
64 bytes from 216.136.204.117: icmp_seq=2 ttl=51 time=103 ms
64 bytes from 216.136.204.117: icmp_seq=3 ttl=51 time=103 ms
--- www.freebsd.org ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 20230ms
rtt min/avg/max/mdev = 103.072/103.412/103.946/0.532 ms
It looks fine but when watching it, about 3 or 4 seconds goes by with no update on the display then I get a response on the screen from the ping. Another 3-4 seconds goes by and another ping response. But if I use the numeric address I get the ping reponse right away.
Any ideas? I have a suspesion it may be what is in my routing table. Here it is.
$>route
Code: |
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 wlan0
loopback localhost 255.0.0.0 UG 0 0 0 lo
default 192.168.1.100 0.0.0.0 UG 0 0 0 wlan0
|
Where it says "Default", that was added after I modified /etc/conf.d/net and added my router as the gateway. I use to have another router with DHCP until I switched it with a wireless one. I think the 192.168.1.0 may be my problem but can't delete it. I don't know how to delete it yet.
Gnarg |
|
Back to top |
|
 |
robdd Tux's lil' helper

Joined: 02 Jan 2005 Posts: 142 Location: Sydney Australia
|
Posted: Wed Sep 06, 2006 10:51 pm Post subject: |
|
|
Hi again Gnarg - your routing table is correct - the 192.168.1.0 destination is your local LAN, and so this entry is saying to just pump out packets with this address to the wlan0 interface, and anyone on the local LAN with that address can pick it up. So don't delete this entry !
I'm not sure why the pings to a name rather than the numeric address should take so long *every* time - it sounds like ping is doing a DNS lookup for every packet. If this DNS lookup is going to your ISP it could take "a while" but 3 or 4 seconds sounds excessive ?? In my setup at home I have a D-Link ADSL modem/router/firewall that can act as a DNS server, and I've got my first nameserver in resolv.conf pointing to it. The D-Link caches the DNS info, so any lookups after the first only traverse the local LAN, and don't go off to my ISP. So you could try your ADSL/wireless gateway as the primary DNS server and see if it makes a difference.
If you really want to get techo you could emerge wireshark (used to be called ethereal) and watch your network traffic while you ping. It will tell you *exactly* what is going on (but then you may just want to use your computer to do some real work rather than being a network geek !).
Regards, _________________ Rob Diamond
Gentoo Hack, hack, hacker
Sydney, Australia |
|
Back to top |
|
 |
robdd Tux's lil' helper

Joined: 02 Jan 2005 Posts: 142 Location: Sydney Australia
|
Posted: Wed Sep 06, 2006 11:22 pm Post subject: |
|
|
Hi Gnarg - I got curious and tried watching some pings from my own network. It looks like if you ping a numeric IP address ping doesn't do any lookups. If you ping a name then ping does a DNS lookup for the numeric IP, BUT THEN it does a reverse lookup of numeric IP to name on every ping packet so it can tell you the name of the host you are pinging. Reading the ping man page - you can turn this feature off by doing a "ping -n www.freebsd.org".
Anyway, bottom line is your DNS lookups are woefully slow. You should check the address of your ISP's nameservers to make sure you've got the right ones configured. Even if you use your router as a DNS cache it will still have to do the first lookup to your ISP, which will be slow. If it turns out that your ISP's DNS servers are always pathetically slow you could cheat, and try using faster servers from neighbouring ISPs.
Regards, _________________ Rob Diamond
Gentoo Hack, hack, hacker
Sydney, Australia |
|
Back to top |
|
 |
Gnarg n00b


Joined: 04 Nov 2004 Posts: 27 Location: Toronto, Canada
|
Posted: Fri Sep 08, 2006 12:21 pm Post subject: Thanks for your help |
|
|
Thanks robdd for your help,
I'll play around a bit and see what will be faster for me. Really pinging is the only slow thing. Everything else is just fine.
Gnarg. |
|
Back to top |
|
 |
|