Home
Tuesday, June 27, 2017
10:18:36 AM
Users online: 0   You are here >> Home > Networking

Forums | Networking Forums search
Forum FAQ
   
  1  
Local hostname resolution issues
stickmangumby 
2/8/08 11:04:19 AM
Champion

I've got a bit of a gap in my network knowledge that I'm looking to fill, regarding the ability to ping a host by its hostname in a LAN.

Here's the network topology:
- Central modem/router, with internal IP 192.168.0.1, dishing out DHCP addresses from 192.168.0.100 - 192.168.0.150.
- Several wireless routers connected directly to the central modem/router, with internal IP addresses from 192.168.0.2 to 192.168.0.5, dishing out DHCP addresses from 192.168.2.100 - 192.168.2.150, 192.168.3.100 - 192.168.3.150 etc.
- Linux (Ubuntu 6.06) fileserver with static IP address 192.168.0.10

All hosts on the network can successfully ping 192.168.0.10.

All hosts with an IP address in the 192.168.0.* range can ping the server's hostname (ie ping Foo).

Hosts with an IP address in the range 192.168.[2-5].* can't ping the server's hostname.

Why is this the case? How can I set this up so that it works? Do I need a local nameserver or something?

Thanks for the help!

-----

segger 
2/8/08 4:53:52 PM
Guru

1. What subnet mask are you using on each of the machines?
2. What is the default gateway configured on each machine?
3. Are you running a DNS server? (and if so, what's its IP address?)
4. You're saying you can't ping the hostname. Can you ping each of the machines by IP address?

-----
Random spam line #7:
Give her womb a good massage with your newly augmented pole

spielentwickler 
2/8/08 10:42:15 PM
Guru

Why not have all machines on the same subnet?

-----
http://www.last.fm/user/spielentwickler/
<= knight of the 6fAOEC =>

eckythump 
3/8/08 3:28:19 PM
Overlord

Having multiple routers on a network is generally a bad idea.

Wireless routers are something I've come to loathe, given people really should be buying access points a lot of the time, and APs aren't that easy to come by these days.

Here's what I would do:

1. Turn off DHCP on all the wireless routers.
2. Reconfigure DSL router to have a bigger DHCP pool, if necessary.
3. Connect the wireless routers to the DSL router, using a LAN port on each of the routers, rather than the WAN port.
4. Set wireless routers to "Access Point" mode and/or disable NAT on them.
5. Leave the IP addresses of all devices as is, but confirm that they all have a subnet mask of 255.255.255.0
6. Configure each wireless router to have its own SSID and use different channels.

Providing your wireless routers aren't too retarded, this should give you a much less complicated network.

With the above, all DHCP requests, even for wireless clients should be serviced by the DSL router, and therefore they should all get given the exact same details, 'cept for unique IP addresses.

As for using hostnames for local machines, instead of IP addresses, this will need a nameserver of some description. You may find taht your ADSL router has functionality to assign hostnames to local IPs.

If not, you've got a linux box there that'll do the job just fine. You may even consider disabling DHCP on the DSL router, too, and having the linux box handle that as well. Using isc-dhcpd on the linux box will likely give you more options for customising what details get handed out to DHCP clients.

Let us know how you go. What hardware are you using, too, btw?

-----
"Grandfather had an accident, he got burnt." "Oh no, how bad?" "Well, they don't fuck around at the crematorium."

SquallStrife 
3/8/08 7:26:15 PM
Titan

Quote by stickmangumby
I've got a bit of a gap in my network knowledge that I'm looking to fill, regarding the ability to ping a host by its hostname in a LAN.

Here's the network topology:
- Central modem/router, with internal IP 192.168.0.1, dishing out DHCP addresses from 192.168.0.100 - 192.168.0.150.
- Several wireless routers connected directly to the central modem/router, with internal IP addresses from 192.168.0.2 to 192.168.0.5, dishing out DHCP addresses from 192.168.2.100 - 192.168.2.150, 192.168.3.100 - 192.168.3.150 etc.
- Linux (Ubuntu 6.06) fileserver with static IP address 192.168.0.10

All hosts on the network can successfully ping 192.168.0.10.

All hosts with an IP address in the 192.168.0.* range can ping the server's hostname (ie ping Foo).

Hosts with an IP address in the range 192.168.[2-5].* can't ping the server's hostname.

Why is this the case? How can I set this up so that it works? Do I need a local nameserver or something?

Thanks for the help!



Short answer:

What you're expecting won't work, because the "routers" aren't routers, they're NAT boxes.

-----
Q6600 @ 3.6GHz | 8800GTS | XP x64 | Vista HP x64 | OSX 10.5.4

Quote by TinBane
The ONLY fuel saving benefit of this product, is that the car expends less energy to accelerate, because your wallet is lighter.

stickmangumby 
3/8/08 9:28:32 PM
Champion

Firstly, thanks for all of the help.

@segger: I don't have much control over hosts (new users bring in their personal laptops on a regular basis), but I'm pretty sure they'd all have a subnet mask of 255.255.255.0. The wireless routers have been set up with their default gateway as the main modem/router. All wireless clients are using DHCP. They can get on the Internet fine. I'm not running a DNS server. Machines on any subnet and any transmission medium can ping all other machines by IP address.

@spielentwickler: I don't have a reason to have the machines on different subnets, apart from the fact that that's the way things are currently set up.

@eckythump: Thanks for all the advice. I'll definitely keep it in mind when I get to set up a network like this from scratch! I've got the wireless routers set up with the same SSID but on different channels to make one big network, and it's all working ok, but there is a lot more work to do in terms of configuring network hardware than there would be if the wireless routers were essentially being used as APs and all the configuration were isolated to the modem.

Most of the network hardware is low-end Linksys stuff for home use.

The ADSL router has an "Attached devices" section in its configuration, which lists the IP/Hostname pair of each device directly attached to it. The server appears in this list correctly. However, I'm not sure if/where this information can be specified for routing purposes.

In terms of making changes, they need to involve zero configuration on the client end. If I were to set up a nameserver for local stuff only, would I set up the modem so that it's DNS servers were the IP address of the server, and have the server query the ISPs DNS servers for remote stuff? Or would I need to set up a full blown DNS server locally?

Thanks again, your help is very much appreciated!

-----

segger 
3/8/08 10:35:22 PM
Guru

Oh shit. I'll delete the 5 paragraphs I just wrote.

I didn't notice you said you had multiple routers. You need to do what Ecky said, unless you can get some decent hardware which will do this properly.

Anything else and you're just going to make the situation more fucked up than it already is.

-----
Random spam line #7:
Give her womb a good massage with your newly augmented pole

spielentwickler 
4/8/08 6:22:51 AM
Guru

First, you should disconnect the wireless routers from the main router.

Then, connect to each one individually and set their local addresses to an address on the subnet of the main router < 192.168.x.100

Disable their DHCP.

Then, you should attach your main router to one of the computer ports on the wireless routers, instead of using the wan port. Then configure the main router to dish out addresses > 192.168.x.100

Then, connect a wireless devices to whichever wireless router is closest, and when it gets to acquiring an address, the wireless router will ignore the request, but it should be responded to by the main router, which is now on the same subnet.

Also, unless the hardware has a distributed wireless setup option available, that you can understand, run each of the wireless networks with a different SSID and different channel. They'll all still be on the same IP network, on the physical network layer, they'll be different. This should be no problem.


The only changes to client configuration are selecting which wireless network you want to connect to. If you have set up a distributed wireless network correctly, this won't be an issue either.



Edited by spielentwickler: 4/8/2008 6:24:04 AM

-----
http://www.last.fm/user/spielentwickler/
<= knight of the 6fAOEC =>

SquallStrife 
4/8/08 8:32:43 AM
Titan

What segger and spielentwickler said.

But, if he MUST run this lousy setup, he will need a WINS server, because P2P name resolution uses broadcast packets, which won't traverse his segments, which means each segment will have its own elected master browser, that won't know about anything outside its own segment..


Edited by SquallStrife: 4/8/2008 8:33:39 AM

-----
Q6600 @ 3.6GHz | 8800GTS | XP x64 | Vista HP x64 | OSX 10.5.4

Quote by TinBane
The ONLY fuel saving benefit of this product, is that the car expends less energy to accelerate, because your wallet is lighter.

segger 
4/8/08 1:48:19 PM
Guru

Quote by SquallStrife
But, if he MUST run this lousy setup, he will need a WINS server, because P2P name resolution uses broadcast packets, which won't traverse his segments, which means each segment will have its own elected master browser, that won't know about anything outside its own segment..



This setup would likely still be broken if the Wireless Routers are doing NAT, since inbound unsolicited SMB sessions (or anything else) will be dropped.

-----
Random spam line #7:
Give her womb a good massage with your newly augmented pole

garlic 
4/8/08 1:54:24 PM
Overlord

If you can't convert to a flat network, I would look at setting up a caching nameserver (and add a zone for you Linux box and domain) on your Linux box, and re-configuring each of the DHCP servers (presumably on each router) to assign your Linux box as the default DNS server (192.168.0.10)

That way, you can throw out netbios name resolution, and use an internet standard instead.


-----

eckythump 
6/8/08 7:28:57 PM
Overlord

The setup I described won't require any changes to your client machines. They'll jsut continue to connect to a selected wireless AP, and then get assigned details from the DHCP server, be it on your DSL rotuer or linux box.

And while it's probably possible to "fix" your current setup a little, it's likely more complicated, more flakey, and really, it's just not the right way of doing things.

I think the important thing here is that you understand clearly what a wireless AP actually does. Imagine this network topology:
[DSL Router]<-->[Wireless AP]<-->[Johnny's Laptop]

The AP merely acts as a transparent bridge between the laptop and the DSL router, just as if he's connected directly to the DSL router via ethernet.

It's worth noting that I'm talking about wireless ACCESS POINTS, and not wireless routers. You can generally turn a wireless router into an access point by disabling DHCP and using a LAN port instead of the WAN port. Some routers, like the Linksys wrt54g have a proper config option for "Access Point Mode" and that's worth switching on. I think you still need to disable DHCP when you do this.

Once you have all your wireless routers configured like that, it's as if they're not there as far as the TCP/IP level network cares.

It *really* shouldn't be that difficult to make the changes required to get this nice, flat and uncomplicated network layout.

Also, once you've got all hosts within the same logical network and on the same subnet, you'll probably find that pinging by hostname will work more as you expect it. When I say "by hostname", I am referring to the hostname of the windows machine, and by "ping" I am referring specifically to Windows ping command. Given you won't have real hostname resolution in place, and only retarded netbios stuff, you should only expect to see this work on windows machines, and even then, potentially not 100%.

You'll probably find that the DHCP server on your ADSL router will allow you to provide the IP address of the nameserver IP to pass to clients. For this, you would put in the local IP of the linux machine. If there's provision for a local domain, that'd be well worth putting in also. If the DSL router doesn't support this, then you can disable DHCP on that and do it on the linux box with isc-dhcp, as it definitely does. This is what I do here at home.

I realise this may all be a bit overwhelming, but it's not that huge a project if you do it bit by bit, and it's the kind of thing that you can easily to that way.

Select the least used wireless router. Turn off DHCP, conenct it via a LAN port (instead of the WAN port) to the DSL router and then try and associate with it and get an IP via DHCP. If all works fine, then go on and do the rest of the routers. If not, then revert back to old settings and come back here with detailed info of the troubles you had.

-----
"Grandfather had an accident, he got burnt." "Oh no, how bad?" "Well, they don't fuck around at the crematorium."

stickmangumby 
7/8/08 9:05:56 AM
Champion

Thanks again for all the feedback!

Quote by SquallStrife
... if he MUST run this lousy setup, he will need a WINS server, because P2P name resolution uses broadcast packets, which won't traverse his segments...



Quote by garlic
If you can't convert to a flat network, I would look at setting up a caching nameserver (and add a zone for you Linux box and domain) on your Linux box, and re-configuring each of the DHCP servers (presumably on each router) to assign your Linux box as the default DNS server (192.168.0.10)

That way, you can throw out netbios name resolution, and use an internet standard instead.



The above 2 quotes filled the gap precisely.

All of the other helpful info has raised 3 more questions though:

1. What is the difference between the WAN and LAN ports on the wireless routers? I get that using the LAN port removes the tree kinda hierarchy of routers, but does that affect their operation/addressing at all?

2. What happens when you have more than 254 hosts? At this point are you more likely to have some sensible divisions you can make (ie different buildings, different departments etc)? Do you put relevant servers on the same subnet as clients they serve to reduce traffic, or do you centralize them on one subnet?

3. In general, how do you learn about such implementation details? I'm studying Computer Science, which is pretty light on the practical stuff, and I want to find out more about standard/sensible network topology... anyone know any good books?

Thanks again!
Nick

-----

garlic 
7/8/08 10:26:21 AM
Overlord

Quote by stickmangumby
Thanks again for all the feedback!

Quote by SquallStrife
... if he MUST run this lousy setup, he will need a WINS server, because P2P name resolution uses broadcast packets, which won't traverse his segments...



Quote by garlic
If you can't convert to a flat network, I would look at setting up a caching nameserver (and add a zone for you Linux box and domain) on your Linux box, and re-configuring each of the DHCP servers (presumably on each router) to assign your Linux box as the default DNS server (192.168.0.10)

That way, you can throw out netbios name resolution, and use an internet standard instead.



The above 2 quotes filled the gap precisely.

All of the other helpful info has raised 3 more questions though:

1. What is the difference between the WAN and LAN ports on the wireless routers? I get that using the LAN port removes the tree kinda hierarchy of routers, but does that affect their operation/addressing at all?

2. What happens when you have more than 254 hosts? At this point are you more likely to have some sensible divisions you can make (ie different buildings, different departments etc)? Do you put relevant servers on the same subnet as clients they serve to reduce traffic, or do you centralize them on one subnet?

3. In general, how do you learn about such implementation details? I'm studying Computer Science, which is pretty light on the practical stuff, and I want to find out more about standard/sensible network topology... anyone know any good books?

Thanks again!
Nick



To answer your questions...

1: Basically the WAN (routed port) is a network boundary. If you ignore the WAN port, and daisy chain (as in, uplinking one switch port, to another switch port on another device) all the LAN switches together, what you will get is a single layer 2 network / broadcast domain. This will mean all addresses should be within the same network. Basically by doing this, you have removed all routing from your network, and turned it into a purely switched network.

2: A simple response would be Yes, you probably would split the network into different areas and route between the networks. Another answer could be to change the network mask to /23 or /22, which doubles or quadruples the number of host allocations available. This also doubles or quadruples the broadcast domain which is not generally the best idea.. The best answer is very complicated. This is where it would be to look into network design and have a good think about what the requirements are for your network, and how to best acheive them. My company has a 100 page document describing how to allocate IP addresses and another one on the network design. In essence we divide our networks into the following:

MAN networks
WAN networks
Server Networks
User Networks
Special Purpose networks
DMZ networks

and my business only has about 6000 employee's, so not even that big.

3: I don't really know how to help here. I would suggest you look into the materials required for the CCDA (Cisco Certified Design Associate)

-----

  1  
Forums | Networking