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.
  • Posts

    • I really hate it that I can't access the historical changes in my notes and if I accidentally delete large portions of the text which happens more often than not, sometimes, there's no recovering. There should always be a way to go backwards in time, simply because we have iCloud. And why is there no normal export capability? There should be a historical-change-back up and export capability.
    • SeaMonkey 2.53.21 by Razvan Serea The SeaMonkey project is a community effort to develop the SeaMonkey all-in-one internet application suite. Such a software suite was previously made popular by Netscape and Mozilla, and the SeaMonkey project continues to develop and deliver high-quality updates to this concept. Containing an Internet browser, email & newsgroup client with an included web feed reader, HTML editor, IRC chat and web development tools, SeaMonkey is sure to appeal to advanced users, web developers and corporate users. Under the hood, SeaMonkey uses much of the same Mozilla source code which powers such successful siblings as Firefox, Thunderbird, Camino, Sunbird and Miro. Legal backing is provided by the Mozilla Foundation. SeaMonkey 2.53.21 changelog: Unable to load JSON Bookmarks file, Open/Cancel do the same thing bug 1940204. Move replaceVars helper into menu-manager.js for cZ bug 1937379. Remove dumpObject helper from utils.js in cZ bug 1937380. Remove toOpenWindowByType helper from utils.js in cZ bug 1937382. Fix makeLogName helper to not encode twice in prefs.js in cZ bug 1937387. Remove use of escapeFileName helper and tidy up pref_mungeName helper in cZ bug 1937395. Add helper to file-utils.js for ensuring an nsIFile is returned in cZ bug 1937397. Remove unused http.js file from cZ bug 1937890. Remove unused IRC tests from static.js in cZ bug 1937896. Switch from deprecated escape/unescape in cZ bug 1938933. Tidy up use of prefBranch outside of pref-manager in cZ bug 1938935. Make use of pref fallbacks in pref-manager in cZ bug 1938937. Remove unused edit context menu from cZ bug 1939929. Use XPCOMUtils.generateQI in connection-xpcom in cZ bug 1939930. Merge menus.xul, popups.xul and scripts.xul into chatzilla.xul bug 1939958. Make use of toSOutputStream and toSInputStream helpers in DCC code in cZ bug 1939965. Stop hard-coding commandkey for reloadui in cZ bug 1939968. Use suite's FillInHTMLTooltip helper instead of having own version in cZ bug 1939969. Split custom-away from other away/back commands in cZ bug 1942655. Remove ChatZilla Homepage link from Help menu and about command in cZ bug 1942916. Re-arrange toolbar menus in cZ bug 1943783. Remove ChatZilla Homepage link from about and prefs dialogs in cZ bug 1943844. Use custom controller for userlist and tidy up some controller use in cZ bug 1945325. Make use of observes for show/hide elements in cZ bug 1945378. Don't dynamically create focus-input key element in cZ bug 1947028. Remove unused toolbar creation code in cZ bug 1947030. Remove unused updateMenus code from cZ bug 1947031. Clean up whitespaces in cZ package manifest bug 1947040. Remove unused uninstallKeys code from cZ bug 1950002. Use node.remove(), especially instead of node.parentNode.removeChild(node) in cZ bug 1951250. Remove __cz_condition from cZ bug 1951253. Remove outputWindowURL pref from cZ bug 1951256. Remove unused JS tests in cZ bug 1951297. Use includes, startsWith and endsWith instead of indexOf and substr in cZ bug 1951302. Use {} and [] instead of new Object() and new Array() in cZ bug 1951303. Fixup function naming for lint in cZ bug 1955141. Fixup method naming for lint in cZ bug 1955767. Remove old Mozilla 1.0 code from updateAppMotif in cZ bug 1955771. Use throw Components.Exception in cZ bug 1955774. Migrate output-window from HTML to XHTML to make localisation more standard in cZ bug 1955825. Merge munger.js into mungers.js in cZ bug 1956373. Remove unused tagName from mungers.js in cZ bug 1956374. Flatten directory structure in cZ bug 1956375. Tidy up about dialog page in cZ bug 1956376. Add helper to commands.js for sending CTCP commands in cZ bug 1956377. Migrate to standard menus for menu toolbar in cZ bug 1957763. Install plugin dialog broken in cZ bug 1961599. cZ change nick menu not working bug 1962112. Away status isn't reflected correctly in all channels in cZ bug 1962234. Fix dark motif userlist in cZ bug 1967072. SeaMonkey Composer adds moz-do-not-send attribute for links and images bug 1827146. Use menu_Toolbars overlay for navigatorOverlay and console bug 1945335. Remove defunct 2.53 prerelease builds from debugQA extension bug 1947043. Handling of MOZ_LANGPACK_CONTRIBUTORS in defines.inc files should be less custom bug 1951101. Control + U shortcut for underlined text is not working bug 1872514. Context menu search (with default search engine) does not work in the content area of a message compose or SM-Composer window bug 1062092. The following bugs were fixed in our branch of the Gecko source code only: on FreeBSD sqlite3 fails to link for missing math functions bug 1944954. Expand init.configure to use version_package.txt to set MOZ_PKG_VERSION bug 1952757. Change supported msvc Compilers for SeaMonkey 2.53 bug 1954176. SeaMonkey 2.53.21 contains (among other changes) the following major changes relative to SeaMonkey 2.49.5: The Bookmarks Manager has switched its name to Library, and now also includes the History list. When History is invoked, the Library will be shown with the History list selected. The extensive modifications were needed because of Mozilla Gecko platform API changes. Download Manager has been migrated to a new API. Although it looks pretty much the same as before, the search option is missing and some other minor details work differently. The previous downloads history is removed during the upgrade. The layout panel was added to the CSS Grid tools. TLS 1.3 is the default SSL version now. Support for all NPAPI plugins like Flash, Java and Silverlight has been removed. For displaying pdf files in the browser you can use pdf.js-seamonkey from Isaac Schemm. SeaMonkey now uses a new api for formatting regional data like time and date. Default is to use the application locale of the current SeaMonkey build. If you use a language pack or a different OS formatting this is usually not desired. You can change the formatting from the application locale to the regional settings locale (OS) in the preferences dialog under "Appearance". SeaMonkey 2.53.21 uses the same backend as Firefox and contains the relevant Firefox 60.8 security fixes. Download: SeaMonkey 64-bit | Portable SeaMonkey 64-bit ~60.0 MB (Freeware) Download: SeaMonkey 32-bit | Portable SeaMonkey 32-bit View: SeaMonkey Website | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • It doesn't work for the view, but the music gets me every time:  
    • I remember when it first came about and the rubbish that was on it, and I did have a look now and again to see if it improved, and it really did not. I have never downloaded anything from it. Even on my Mac I tend to avoid the store, i prefer to download from source.
    • Are there any others that are as good?
  • Recent Achievements

    • First Post
      Uranus_enjoyer earned a badge
      First Post
    • Week One Done
      Uranus_enjoyer earned a badge
      Week One Done
    • Week One Done
      jfam earned a badge
      Week One Done
    • First Post
      survivor303 earned a badge
      First Post
    • Week One Done
      CHUNWEI earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      428
    2. 2
      +FloatingFatMan
      206
    3. 3
      snowy owl
      194
    4. 4
      ATLien_0
      190
    5. 5
      Xenon
      141
  • Tell a friend

    Love Neowin? Tell a friend!