1

I will have several laptops which will be used by other side to build a local network. Some of these laptops will be working as web servers and other as clients. I will not have any control over the network (I do not know how it will be build and which IP addresses will be assigned to the laptops). So, I wonder how user of the "client" laptops can find available web servers. Can computers in the network be identified by their names. I mean, the IP addresses will be not fixed, but the names of the laptops should be fixed. Can I use names of the computer to identify the web servers. For example on the client side I open browser with the following address in the address line: http://nameofthe_computer.

Roman
  • 2,569
  • 10
  • 32
  • 32
  • Thank you everybody for your answers. But I still do not know if I can use names of laptops to make connections to tham. It should be just a "Yes/No" answer. – Roman Mar 02 '10 at 10:07
  • If you have no control over the network, you don't know if the DNS entry will be updated with the names of the machine. You have no guarantee over anything in that case. If you're doing a demo, you *MIGHT* be able to assign static IP's so that just those machines can talk to each other, but you still don't know if the switch will block them or you'll collide with other addresses! Your best bet is to take a small switch or hub with you and create a mini-network of your own, if it's a demo situation. So your answer isn't yes/no, it's maybe. You need to find out from the site what they accomodate – Bart Silverstrim Mar 02 '10 at 12:29
  • The answer is that unless you control the DHCP/DNS servers, you cannot guarantee anything. It might work, but it may break easily. You would need to specify to your client your needs and have it test the application, or use an application that will autolocate via bonjour or other autodiscovery service to discover each other and keep in touch with each other on your subnetwork. There is no guarantee that the system will work to just use a name to communicate with each other. Depends on your scenario of usage. – Bart Silverstrim Mar 02 '10 at 12:32
  • Browsing the network by name isn't magic and isn't reliant on clients only. It interacts with other services on the network, so without controlling it, you are asking for it to break. – Bart Silverstrim Mar 02 '10 at 12:33

3 Answers3

1

How do you mean "other side"? do you mean the Russians in the 1950's? Ghosts? the US hockey team?

If it's literally a single network with no routing then there's lots of ways for the machines to find each other based on what OS they're running - for instance simply sharing a resource on most if not all Windows boxes will broadcast their name around the local network, it doesn't have to be the resource you actually want to use, just an empty directory will do. Also there's zeroconf/bonjour, that does something very similar too.

Let us know if it's one big network or if it's segmented in some way and also the OS/s used and we can add some more details ok.

Chopper3
  • 101,299
  • 9
  • 108
  • 239
  • Actually, by the "other side" I mean Russians cosmonauts (I am serious). – Roman Mar 02 '10 at 09:20
  • It will be small network (from 3 to 7 laptops). We use Windows XP. The network will be used by users, so it should be really simple. I thought they can start browser which opens a page with frames containing web pages generated by all possible web servers. But for that the web servers should have fixed addresses. – Roman Mar 02 '10 at 09:24
  • ok, understood, well try this; create an empty directory on an XP box, share it, now go to another XP box on the same network and try to connect to it by UNC (i.e. '\\machinename\share') - if this works then you should be able to web browse to the same machine if it has a web server running ok. – Chopper3 Mar 02 '10 at 09:37
  • Chopper, what does "XP box" means? Laptop running under XP? How can I "share" a directory? How do I try to connect? Using web browser? – Roman Mar 02 '10 at 10:03
  • I do mean an XP laptop yes, and I think that this question might be better answered on superuser.com if you need help with that type of issue. – Chopper3 Mar 02 '10 at 10:07
1

Assuming these are Windows machines and assuming all of the computers will sit on the same subnet (no routing involved), they will attempt to locate the computer by name via a NetBIOS broadcast. This works pretty well on a small network. If you find this causes problems, host files are another option.

icky3000
  • 4,848
  • 1
  • 21
  • 15
  • But can I use names? I mean, I just put a name of a potential web server in the address line and see of the web server is responding. – Roman Mar 02 '10 at 09:26
  • Yep. If the name of the server is AwesomeServer the clients can just go to http://awesomeserver and that's it. This isn't DNS so no need for fully qualified domain names. You can test this yourself by setting any two Windows computers that don't participate in a domain on the same subnet and trying pinging each other by name and you'll see it works. – icky3000 Mar 02 '10 at 12:29
1

Yes, you can, given you have access to the DHCP.

Essentially that is what the internet does. However, configuring your own DNS is quite tricky. If you have access to the DHCP server, you can tell it to also perform simple DNS for you, e.g. using DNSMasq. That is the easiest solution I found, it works in heterogenous environments and allows use of sub-domains (i.e. test1.mylaptop).

Moreover, you can easily integrate that into the internet, e.g. by making test1.mylaptop.office.mycompany.com available.

Without DNSMasq, you'd have to use BIND, but that is very complicated I'm afraid. In that case, I'd stick to the NetBIOS solution.

mnemosyn
  • 277
  • 2
  • 3
  • 11