Solved Router as DNS Server?

Varies
October 15, 2008 at 10:24:47
Specs: XP & Vista, Varies

I have a LinkSys WRT54G router on IP 192.168.6.27
My laptop and desktop are set to automatically get an IP address from the router. However, I have noticed lately that the two computers cannot communicate using their friendly names but I can ping them and do filesharing by their IP addresses. Upon doing an ipconfig /all on both machines, I think I have discovered the problem. The computers each have two DNS servers, but neither is my router. I could manually tell my machines to use 192.168.6.27 as my DNS server, but because I travel with my laptop it would be much easier if I could just leave it on autoconfig.
How, then, can I get my router to tell my machines that it is the DNS server they should use and have the router handle all requests to my ISP's external DNS servers?

See More: Router as DNS Server?

Report •


✔ Best Answer
October 20, 2008 at 19:14:53

They are able to build a name resolution table via broadcasts [last ditch effort]. Problem is when you reboot that information is lost. It also takes time to build that information. You can see this because the first time is slow or fails [depending on response time]. Then after it works. This is because its cached. The hosts file populates that cache upon bootup by reading the host entries into memory.


#1
October 15, 2008 at 12:18:16

Your router is not a dns server.

Pointing to it as dns server just gets the requests passed to the isps dns servers.

Proper config would be to list your isp's dns servers in the routers dhcp properties so they are listed as dns servers when you are home and using dhcp for your ip addressing.

Note that no isp dns server is going to store your home pcs name information. Private vs public ip addressing. If you want to address that directly you need to list them in a hosts file on both pcs


Report •

#2
October 15, 2008 at 12:24:21

well what do i do to get my computers to be able to ping each other by name? this should be something that happens by default when file & printer sharing is enabled and both pc's are on the same network (or behind the same router)

Report •

#3
October 15, 2008 at 12:29:42

i believe that the main problem is with my xp machine (my laptop) because when i set the dns server *manually* to my router's ip (192.168.6.27), both computers can access each other.
i don't have to touch any settings on my vista desktop. so am i missing something, some kind of setting on my xp computer that would fix this problem?

Report •

Related Solutions

#4
October 15, 2008 at 13:27:57

question already answered
"If you want to address that directly you need to list them in a hosts file on both pcs"

here's a hosts how to
http://kickenhardware.net/forum/sho...


again your isps dns servers will never know the names/ips of your home pcs. Pointing to your router may seem to work but it doesn't. Once the pcs name is resolved one time it's stored in the local cache.

If you want you can always configure the routers dhcp server to give the gateway ip as dns so the system does this for you automatically.


Report •

#5
October 15, 2008 at 13:44:38

This is not something I'm really familiar with, but have you tried using the WRT54G's DHCP settings to pass the router's IP as the DNS server? I'm not sure of the implications of that, but from what you've posted it sounds like it might get the behavior you desire. It's not clear to me why you are expecting to use DNS to ping your computers using names. DNS is Domain Name Service, your 2 computers plugged into a WRT54G aren't a "Domain", so why would the computers' names be resolved as if they were Domain Names? I'm surprised it works when you set up the router as the DNS server. I think the right way to do what you want is to write a simple Hosts file on each computer.

Report •

#6
October 15, 2008 at 14:10:15

PING is a poor test. XP with service packs or firewalls block the ping test.
So it won't work.

Name is not dns it is netbios.

Many soho routers IP can be used as dns server. It just passes the information it doesn't cache or store any or only a few requests.


Might be easier to set ip's to static in the range of your router. Use the router's ip as dns and add in at least two of your ISP's dns server ip's.


Use \\IPaddress\sharename instead of \\friendlyname\sharename.

"Best Practices", Event viewer, host file, perfmon, antivirus, anti-spyware, Live CD's, backups, are in my top 10


Report •

#7
October 15, 2008 at 20:31:03

"Name is not dns it is netbios."

Sorry but this statement is incorrect concerning the present subject matter because the netbios name does not come into play.

We are discussing ip address to host name and host name to ip address resolution. Netbios has no knowledge of ip.

Name resolution has nothing to do with ip addressing wheither static or dhcp.

You can't use two isp dns ips and the routers ip [gateway]. There are only two entries for dns and usually the second is never used. If you are going to list dns ips in the routers dhcp properties it should be the same dns servers listed in the routers wan interface which you got from your isp.

Jefro does bring up an excellent point about the firewalls. They [the pcs] should be configured to "trust" each other. Part of your problem maybe in how they are configured.


Report •

#8
October 16, 2008 at 08:30:27

Depending on which platform you're using for an OS, arp can also help.

I know in UNIX it will resolve IP to hostname to MAC.

MS seems to just do IP to MAC, see below for comparison:

UNIX (OpenBSD v4.2) version of ARP

curtr@cs5:~> arp -a
cs5.pc.domainname.ca (131.XXX.4.57) at 00:11:2f:74:7e:5c on em0 static
qkb.pc.domainname.ca (131.XXX.4.110) at 00:11:d8:9c:b4:10 on em0
qkbnt.pc.domainname.ca (131.XXX.4.111) at 08:00:20:fe:30:42 on em0
reuben.pc.domainname.ca (131.XXX.4.116) at 00:15:c5:24:e2:85 on em0
cs29.pc.domainname.ca (131.XXX.4.117) at 00:e0:18:f9:bb:9a on em0
cs6.pc.domainname.ca (131.XXX.4.119) at 00:15:c5:cc:8d:fb on em0
cs9.pc.domainname.ca (131.XXX.4.120) at 00:13:d4:0a:2b:82 on em0
cs32.pc.domainname.ca (131.XXX.4.121) at 00:1c:23:55:d9:24 on em0
cs44.pc.domainname.ca (131.XXX.4.122) at 00:11:d8:df:27:34 on em0
qbtest.pc.domainname.ca (131.XXX.4.128) at 00:a0:c5:ee:5b:20 on em0
cs10.pc.domainname.ca (131.XXX.4.129) at 00:11:25:d6:20:92 on em0
cs18.pc.domainname.ca (131.XXX.4.130) at 00:15:c5:b5:f2:6a on em0
? (131.XXX.4.249) at 00:16:ca:81:82:04 on em0
net4gw.cs.domainname.ca (131.XXX.4.250) at 00:00:5e:00:01:07 on em0
net4gwbk.cs.domainname.ca (131.XXX.4.251) at 00:1a:8f:21:a2:04 on em0
curtr@cs5:~>

MS version of ARP

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\curtr>arp -a

Interface: 131.XXX.4.120 --- 0x230003
Internet Address Physical Address Type
131.XXX.4.12 00-10-83-94-cd-94 dynamic
131.XXX.4.20 00-11-85-8e-17-1f dynamic
131.XXX.4.38 00-10-83-72-ae-e9 dynamic
131.XXX.4.130 00-15-c5-b5-f2-6a dynamic
131.XXX.4.250 00-00-5e-00-01-07 dynamic

C:\Documents and Settings\curtr>

Take a look and compare arp tables on both PC's when they're communicating, and when they're not, it could be the entry for the other PC is missing.

All in all, configuring the info in the hosts file is a solid way to ensure you never have name resolution issues in your workgroup.


Report •

#9
October 16, 2008 at 13:53:47

"using their friendly names"

I assumed that to be workgroup names, MS type stuff.

Nbtstat should help.

Guess the OP left us.


"Best Practices", Event viewer, host file, perfmon, antivirus, anti-spyware, Live CD's, backups, are in my top 10


Report •

#10
October 17, 2008 at 10:28:10

so basically i just gave up, took the original suggestion, and added the computers to each other's HOSTS file. i'm not sure what changed but at some point they were both able to see each other using their computer names without having to create entries in the HOSTS file. thanks for all the replies.

tmc


Report •

#11
October 20, 2008 at 19:14:53
✔ Best Answer

They are able to build a name resolution table via broadcasts [last ditch effort]. Problem is when you reboot that information is lost. It also takes time to build that information. You can see this because the first time is slow or fails [depending on response time]. Then after it works. This is because its cached. The hosts file populates that cache upon bootup by reading the host entries into memory.

Report •


Ask Question