-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
,--- Rikishi 42 writes:
| This is the situation: a friend and I both use a broadband router with a few
| machines behind them, at our respective homes. We each picked a name for our
| 'domain'. His is fictional. Mine also exists on the net, but with only the
| www and ftp of rikishi42.net defined in the DNS, not my home machines.
| He's added 2 of my PC's in the /etc/hosts of his laptop, for use when he
| visits and connects it to my LAN.
| This would be a sample from that file:
| # Home net
| 192.168.108.101 desktop.myDomain desktop
| 192.168.108.124 laptop.myDomain laptop
| 192.168.108.101 server.myDomain server
| #Rikishi's net
| 192.168.8.142 gramps.rikishi42.net gramps
| 192.168.8.181 pigmy.rikishi42.net pigmy
| We've allways used this, works just fine.
| When connectiong to my machines, he's allways used the short (host only)
| name. Last time, he accidentally tried with the full name. It failed.
How is he trying connect to your box ? And are you sure, it failed at
name resolution step, not something like connection etc. ? To resolve
a hostname yourself, you can try "getent hosts <hostname>" .
| My guess is that, upon finding that rikishi42.net exists, there is an
| attempt to get the address from the DNS, skipping hosts all together.
| But do I presume correctly, or is there more to it?
It all depends on "/etc/nsswitch.conf"'s "hosts" entry. Usually
"hosts" entry has "files" first and then "dns". But anyways, even if
order is reverse, then also it should work, if it is not able to
resolve from DNS.
Anyways I added your records in my /etc/hosts and it is able to
resolve 'gramps.rikishi42.net' without any problems.
| --
| There is an art, it says, or rather, a knack to flying.
| The knack lies in learning how to throw yourself at the ground and miss.
| Douglas Adams
Anyways, you can instead of adding each other's boxes in /etc/hosts,
there is one more way, which you can try. i.e. Avahi
(
http://avahi.org/ ) .
HTH
- --
Ashish Shukla आशीष शुक्ल
http://wahjava.wordpress.com/
·-- ·- ···· ·--- ·- ···- ·- ·--·-· --· -- ·- ·· ·-·· ·-·-·- -·-· --- --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
iD8DBQFHK3KdHy+EEHYuXnQRArHrAJ0dOR9cpFYjjqCMoxozdP yhi555wwCg7kdV
lndtGZxKxNnPX5e3Avip+0A=
=4AKA
-----END PGP SIGNATURE-----