cannot connect to computer on LAN by hostname after router change


Recommended Posts

I just had to change to a new router in my network from a 2wire supplied by my old ISP to a DIR-615. (I had to change as I changed ISP's). With my old router I was able to access some computers running ubuntu server or pfsense simply by hostname, by putting the hostname into a browser. However, since the change this no longer works. I can access them by ip address both in a web browser and by SSH, but not by host name.

Would anyone have an idea of what I need to change in order to access these computers by hostname again or is this a limitation of the new router?

Interesting enough, the DHCP tables in the router do list these computers both by IP address as well as by hostname, so I don't understand why this isn't working.

Thanks much for any help you can give.

I'm using OS X 10.7, so I flushed it with "dscacheutil -flushcache" But no change. Attempts to ssh to them give "Could not resolve hostname"

All computers are using the same subnet as they were on the last last router. I can also connect by ip address, but I would far rather use hostname just for ease.

Any other ideas are welcome, but I hope that it's not a limitation of this router.

netbios is used for internal name resolution. the dns on the router just forwards to the internet. I have not seen a router with an internal db for resolving internal names. nice try though.

on the setup screen of the dir-615, enablenetbios advertisement. This should not be disabled. You will need to reboot your router then reboot all devices (to be on the safe side, and make sure that netbios is enabled on your devices. but if nothing changed on your computers, verifying netbios configs is a moot point).

you can go through this if you want, all of the settings in the router are here for netbios.

http://forums.dlink.com/index.php?topic=3354.0

  On 05/07/2012 at 13:34, sc302 said:

netbios is used for internal name resolution. the dns on the router just forwards to the internet. I have not seen a router with an internal db for resolving internal names. nice try though.

That is absolutely true. My mistake.

So what is this router doing if your running pfsense? Pfsense is meant to be the gateway/firewall/router of your network - you mention it as you can not resolve it my name. But it in a normal setup it would be your dns and gateway for the local boxes on your network.

As sc302 mentions yes you could resolve hostname via netbios on a local network. With linux this is not very common, but sure can be setup.

If you want to resolve your local machines names, I would suggest you setup dns to accomplish that. Sure you could use ddns if you want. Maybe this is what your old router did? Or just resolved names off its dhcp table?

So I can resolve any host on my network, because I have dns working and a search domain (local.lan) so when I ask for say pfsense, it auto adds local.lan to the end of it and resolves it via dns

C:\Windows\System32>ping pfsense

Pinging pfsense.local.lan [192.168.1.253] with 32 bytes of data:

Reply from 192.168.1.253: bytes=32 time<1ms TTL=64

Reply from 192.168.1.253: bytes=32 time<1ms TTL=64

C:\Windows\System32>nslookup ubuntu

Server: pfsense.local.lan

Address: 192.168.1.253

Name: ubuntu.local.lan

Address: 192.168.1.7

Okay, I have this router configured as such:

NetBIOS announcement is on

NetBIOS scope is blank

NetBIOS nodetype is Broadcast only

I restarted absolutely every device on the network and then had this list for LAN computers:

lancomps.jpg

So, the router sees the hostname of these computers, but this information doesn't seem to get passed to other computers in the LAN. The problem remains.

I cannot access web servers or ssh by hostname, but SAMBA does work by host name.

The computer called veyofileserver is actually a WD NAS device and is configured by going to http://veyofileserver. This worked just fine with the last router; it does not with the current router.

As far as I know, and I know that I don't know a lot, hostnames were resolved by the dhcp table itself on the last router.

I'm using pfsense to control a second network that's used for guests who access through a captive portal. What we see in the table above as pfsense is the WAN port of the pfsense computer so that we can configure accounts from outside the guest network and ensuring that our guests have no access to our shared printers or files.

Thanks for any help and for putting up with my ignorance.

dhcp has nothing to do with name recognition. dns and netbios do. dhcp is just a address request table, your pc asks the dhcp server for an address and your dhcp server provides the address...there is nothing else that dhcp does really (well in a pos dhcp client table in a dlink router, that is).

if pfsense is the outside interface, then pfsense is not being used by this network and can be thought of as a stand alone pc.

So when you try pinging the host name what happens? Does it resolve to the ip?

I get this:

C:\Documents and Settings\Library>nbtstat -n

Local Area Connection:

Node IpAddress: [192.168.2.109] Scope Id: []

NetBIOS Local Name Table

Name Type Status

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

VEYO-WORK <00> UNIQUE Registered

WORKGROUP <00> GROUP Registered

VEYO-WORK <20> UNIQUE Registered

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

Interface: 192.168.2.109 --- 0x2

Internet Address Physical Address Type

192.168.2.1 b8-a3-86-51-31-04 dynamic

192.168.2.101 00-90-a9-b2-2e-5d dynamic

Some names are missing from the NetBIOS table? It should be auto-generated, no?

So I am was confused on what you meant your router is configured

Okay, I have this router configured as such:

NetBIOS announcement is on

NetBIOS scope is blank

NetBIOS nodetype is Broadcast only

That is what your dhcp server is handing out.. Those are just the dhcp netbios settings, so your setting your nodetype of your dhcp to broadcast, etc. That does not mean the other boxes are going to answer.

What is output of ipconfig /all of that machine -- is your node type actually being set to broadcast only.

C:\Windows\System32>ipconfig /all

Windows IP Configuration

Host Name . . . . . . . . . . . . : i5-w7

Primary Dns Suffix . . . . . . . : local.lan

Node Type . . . . . . . . . . . . : Broadcast

IP Routing Enabled. . . . . . . . : No

WINS Proxy Enabled. . . . . . . . : No

DNS Suffix Search List. . . . . . : local.lan

If you want to resolve via netbios broadcast then machines have to answer if asked. I still do not understand why you don't just setup DNS to work! This is the correct way to ensure name resolution, if you really want netbios resolution then setup WINS. Broadcasting and hoping boxes answer is not a very reliable name resolution method.

edit: So what your old router might have been doing is registering dhcp clients in the dns forwarder rules. So for example, pfsense has this option

Register DHCP leases in DNS forwarder

If this option is set, then machines that specify their hostname when requesting a DHCP lease will be registered in the DNS forwarder, so that their name can be resolved. You should also set the domain in System: General setup to the proper value.

Not all that common of feature for the soho I would guess. What was the old router make and model and we could look up what feature sets it had. But if you want stuff to resolve on your local network, then set it up to do so. Many ways to do this, be it netbios broadcast for those systems that answer - a linux box is not going to answer to this unless you set it up, not out of the box that is for sure. SAMBA would have to be installed I am fairly sure.

As stated before I would go with DNS if you want to resolve names, does your router support DDNS? If so set that up or run a real name server on your network that does. Bind does for sure.

So you use pfsense to isolate another portion of your network, why not use another copy as your actual gateway? Then you could use for example the above feature to allow for what you want.

The previous router was a 2wire 2701 DSL modem and router combined, offered by my ISP. I changed ISP's so hat to return the modem/router and buy my own.

I hear what your saying that perhaps the previous router supported registering DHCP leases in the DNS forwarder and that the replacement one does not. If this is true, then I'll have to come up with another solution:

1. set up a DNS or WINS server on my network.

2. configure these computers with static IP addresses and access them that way instead.

3. set up another computer using pfsense as my router.

4. DDNS.

My understanding is that with option 1 or 3 I would have to sacrifice another computer to be a DNS or WINS server or a pfsense router. I would sorta rather not do that simply because I'm out of old computers that can be sacrificed and because my basement is already fairly cluttered with three old computers acting as servers (one running ubuntu server to host an database of contacts, one for testing websites and one for pfsense for the guest network). As it is I'm trying to consolidate these three machines into one if I can but my very limited understanding of command line and server software is slowing me down. These three computers put out a fair amount of heat and I think that they're wasting an undue amount of electricity, heat and space for what I actually need them for.

My router does appear to support DDNS services and seems pre-setup to use d-link's own or dyndns. But, I thought that ddns was so that other computers on the internet could access my network through a hostname even though my own ip address might change periodically? I would have to buy a domain for this, no?

Does this leave me only with option 2?

I really am just looking for a simply way where clients hooked to this network can be accessed by hostname only and no special configurations have to be done on them. Maybe I expect too much and was spoiled by that 2wire router?

not expecting too much at all, but something isn't right on your network...figuring it out with back and fourth forum responses are slow at best.

lets go in the direction of dns or wins, I am sure one of your servers can be a dual role dns or wins server, can it not? doesn't take much processing power to do.

IPconfig gives me the following:

C:\Documents and Settings\Library>ipconfig /all

Windows IP Configuration

Host Name . . . . . . . . . . . . : veyo-work

Primary Dns Suffix . . . . . . . :

Node Type . . . . . . . . . . . . : Broadcast

IP Routing Enabled. . . . . . . . : No

WINS Proxy Enabled. . . . . . . . : No

DNS Suffix Search List. . . . . . : cogeco.net

That all looks fine to me.

I don't believe that this is an issue with any of my computers since all of them show the same issue.

If I set up a DNS server on one of these computers, would I then have to configure every computer on the network individually to use this DNS server? Currently, they all seem to want to use the router as the DNS server by default.

Why do you have a search list of cogeco.net??

DNS Suffix Search List. . . . . . : cogeco.net

I show that as a public domain

Domain servers in listed order:

NS4.CGOCABLE.NET

NS.CGOCABLE.NET

NS2.CGOCABLE.NET

And no its not going to resolve pfsense.cogeco.net

dig @NS.CGOCABLE.NET pfsense.cogeco.net

;; QUESTION SECTION:

;pfsense.cogeco.net. IN A

;; AUTHORITY SECTION:

cogeco.net. 604800 IN SOA ns4.cgocable.net. dnsadmin.cgocable.net. 2009366394 1800 900 604800 86400

So if doing DNS query to your router, it would add that to the query, and you then go ask those name servers. They resolve www for exmaple

;; QUESTION SECTION:

;www.cogeco.net. IN A

;; ANSWER SECTION:

www.cogeco.net. 86400 IN A 24.226.1.243

Here is the thing your ROUTER would have nothing to at all with a netbios broadcast, NOTHING!! Other than the dhcp server on the router handing out dhcp info about it, ie the broadcast setting. The actual query and response would have nothing to do with your router. Nothing.. You would put the broadcast out on the wire, and then you would get a response from that box. But I can tell you for example pfsense wan interface is never in a million years going to respond to a netbios broadcast.

So for example, I have disabled my dns server then just pinged for host names (netbios) - and then showing you a sniff of this traffic.

So for example you see that pfsense does not ping, but one of my windows boxes does

C:\Windows\system32>ping pfsense

Ping request could not find host pfsense. Please check the name and try again.

C:\Windows\system32>ping storage

Pinging storage [192.168.1.8] with 32 bytes of data:

Reply from 192.168.1.8: bytes=32 time=1ms TTL=128

Reply from 192.168.1.8: bytes=32 time<1ms TTL=128

Here from sniff you can see it try dns first with my domain added (local.lan) because all my boxes are in this domain and they use that as search domain, since my dns server was OFF, no replies. So then it tries to broadcast for the name. You see it ask for pfsense - he is never going to respond. See storage responded.. It went out on broadcast address for my segment 192.168.1.255, and then the acutal box says hey thats my netbios names and sends a directed response saying hey my IP is 192.168.1.8

post-14624-0-61955700-1341577528_thumb.p

If you want your boxes to respond to a netbios broadcast for their name, they would have to be setup to do so. Doubt your going to get pfsense to. Or setup dns to correctly resolve for your local machines, be it your router or another one. Use the correct search suffix, I doubt your router thinks its authoritative for cogeco.net? So even if your router did put its dhcp clients in dns, not sure it would be that domain - if you told your router it was owner of that domain, you would prob have issue resolving actual hosts on that domain.

So how do you want to resolve, be it broadcast, dns or wins? You could always just put host files on your boxes with your computer names. That is if you were static and nothing changes, etc. when it did you would have to update your hosts or in windows for netbios it would be lmhost. But host file works on them as well.

I hear ya, that my ISP's DNS server, cogeco.net, won't resolve host names on my private network.

It seems to me that DNS is the way to go.

Can this router be setup correctly to resolve hostnames, or not without some DNS server on my private network?

I don't understand why this was a non-issue with my last router, unless, of course, the last router did put it's own DHCP clients into DNS where the new one does not?

Thanks for the help and for clearing up some of my lack of understanding.

Its quite possible that old router had a feature like pfsense does.

From the pfsense dns forwarder tab.

Register DHCP leases in DNS forwarder

If this option is set, then machines that specify their hostname when requesting a DHCP lease will be registered in the DNS forwarder, so that their name can be resolved. You should also set the domain in System: General setup to the proper value.

Your clients should not be using a search list of your ISPs domain -- that is pointless.. and just going to cause dns traffic that would never resolve.

So took a look see on the help of a 615 emulator

http://support.dlink...ic.html#Network

I don't see anything about dhcp clients and dns, etc. So no it does not look like this router has that feature.

So if you want to be able to resolve hostnames to dns on your local network your going to have to run your own dns. BIND runs on either windows or linux, I would assume OS X as well - but not sure.

BIND can do DDNS if you so that your different boxes could register then IPs in your dns.

I would look to using your own local domain if your going to run your own local dns. Be it somemadeupname.lan or .local or .localdomain, etc. I would suggest you not use some public domain name or tld. Your boxes will then need to be setup to use that box as your dns, and then have it forward to your ISP or your router to look up internet fqdn.

If you router was a bit more feature rich it would have for example domain over ride for its dns where you could point to a NS for specific domains.

Why don't you just run pfsense as your router/gateway vs that POS soho 615? Your running pfsense to isolate another network, why not just move that box to your edge and then do the isolation you want with a simple vlan?

I think that I'm going to take some of your advice. Our setup here is getting a bit too complicated for what is essentially an home/office with controls for guests. There's also the fact that I won't be around here forever. So I think that I'm going to try setting up one ubuntu server with LAMP and VirtualBox and have pfsense run in that virtual box. Then, either through two nic's and some vlans or three nic's, I should be able to separate office and house from guests. I just have to be sure that there are options to have the captive portal active on one nic or vlan and not the other.

I'd like to get the three computers all running one service each down to one computer just to make it simpler, cleaner and easier for my successor.

Think it will work?

Why not just run esxi or some other real hypervisor, xen or kvm maybe openVZ. Not sure why run full blown OS to just run VM application on top of that.

If you go with something like esxi, then you have VM with lamp on it, your router, and any other VMs you might need, etc.

I currently run my pfsense as vm on esxi, plus I run multiple other vms, 2k8r2, couple w7 instances, ubuntu, centos, mint, WSSE (windows storage server essentials), openbsd, and then whatever else I might need to play with at any given point. Just created a new blank 12.04 ubuntu server to clone for a ntop vm and snort ids vm, etc.

But you can run your boxes in VM without much issue these days.

As to captive portal on specific interfaces - in pfsense sure. Yeah for sure you can run it on whatever interfaces you want, setup different zones, etc. I thought you said you ran it on pfsense already - just look at the captive portal setup section. Unless they have made some really drastic changes in 2.1 line for captive portal - yeah what your wanting to do is part of the design.

post-14624-0-05552000-1341676995.png

Thanks for all your help. In the end I couldn't get one of these old computers do any VM, probably too old. However, I did manage to get one of them and now have one as a local web server and one for pfsense with three interfaces (1 wan 2 lan) to divvy up traffic between two isolated networks.

Thanks again.

So now your using pfsense as your resolver? And its resolving your host names via dhcp into dns resolver, or have you created the entries in its dns forwarder by hand?

No, pfsense is resolving the names all on its own. It's all very simple and everything now works again as it did before. Running pfsense on a computer with three NIC's seems to be working great. Both LAN's can take advantage of filtering and firewall and captive portal and logging is applied to the guest LAN flawlessly. The only thing that I don't like in my setup is that I wasn't able to reduce the number of computers acting as various servers to less than two, but I guess that's what I get for depending on machines that are more than 5 years old. (it bothers me a bit that one computer is being devoted entirely to hosting a SQL based address book, but that's another problem for another time and for now this is okay.)

I didn't enter any entries at all by hand. I've wasted way too much time on this current setup, but now everything works automatically; I can add another webserver if I need to and whatever hostname I give it will automatically be discovered in pfsense and available by hostname to other computers on the LAN.

Thanks much for your help and suggestions. I'm fairly capable, but very inexperienced in setting up any networks or servers beyond home routers. This one is just slightly more complicated because it's for a home, office and provisions for guests.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.