Page 1 of 1

local network name resolution

Posted: Mon Feb 12, 2007 5:26 am
by Jonathan
I have a WRT54G. I'm using rsync to back up Amber's Macbook onto my Linux computer. The WRT54G uses DHCP and I'd prefer to stay away from static IP addresses. What's the best way to have a cron job that can always access my Linux computer? I want to just say `rsync -avz /local/directory amber@pughbert:/home/amber/backup/` and have it work. Trying to access 192.168.2.101 is stupid when it keeps changing.

Posted: Tue Feb 13, 2007 5:46 am
by Jonathan
you guys suck. I've done the dumb thing and just told the computer to try opening an rsync connection with every computer from 192.168.2.10[1-6].

Posted: Tue Feb 13, 2007 7:22 am
by VLSmooth
Unfortunately, I'm not exactly a Linux guru here.

Where's the Hock?

Posted: Tue Feb 13, 2007 4:21 pm
by Jonathan
Huh? It's TCP/IP networking. Just give me the Windows solution and I'll fake it on Linux/OS X.

Posted: Tue Feb 13, 2007 4:22 pm
by Jonathan
That is, give me the TCP/IP Windows solution, not the NetBios solution.

Posted: Tue Feb 13, 2007 5:37 pm
by VLSmooth
Windows XP does a good job of "hiding" the solution by automating name address resolution, which is actually first configured during installation. There's no need to deal with network settings directly.

To access the controls, so to speak, simply:
  • go to "System Properties" via (windows_key + pause_break) or (right-click on my_computer)
  • go to the "Computer Name" tab
  • click on "Change"
  • enter your desired computer name
    ie. example, the name "sn25p", is accessed via "\\sn25p\"
  • enter your domain or workgroup
    • chances are, if this is your local network, you're using a workgroup, unless you have a domain controller
    • all the computers that you want to communicate should be on the same workgroup
  • wait for changes to propogate, or just reboot everything on the network and hopefully wait for a shorter time
    • Windows seems to background this and does NOT tell you when it's done
    • only confirmation is when you can access \\desired_name\ via explorer
Hope that helps.

Posted: Tue Feb 13, 2007 6:07 pm
by Jonathan
Dwindlehop wrote:That is, give me the TCP/IP Windows solution, not the NetBios solution.
Anyone else?

Posted: Tue Feb 13, 2007 6:14 pm
by VLSmooth
Hmm... didn't know that was considered the NetBIOS approach. Maybe this is more useful:

http://en.wikipedia.org/wiki/NetBIOS
Host name

A Windows machine's NetBIOS name is not to be confused with the computer's host name. Each computer running TCP/IP (whether it's a Windows machine or not) has a host name (also sometimes called a machine name). You can view/change it on the DNS tab in Control Panel → Network → TCP/IP → Properties. Host names are used by applications such as telnet, ftp, web browsers, etc. In order to connect to a computer running the TCP/IP protocol using its HOST name, the host name must be resolved into an IP Address (the host name or FQDN (Fully Qualified Domain Name)-IP address resolution is typically done by something called DNS — Domain Name System/Service). Changing a computer's Host name does not change its NetBIOS name.
So essentially, you want your own local DNS server.
How To Set Up Linux DNS Services

Posted: Tue Feb 13, 2007 6:16 pm
by VLSmooth
Potentially scratch that, still skimming, can't seem to figure out a way to auto-update the hosts file without at least the server hosting the hosts.txt file using a static IP.

You might just want to read it anyway though, since I'm not looking at it in terrible depth. There is a DDNS section, but it seems more akin to your external IP changing.

Posted: Tue Feb 13, 2007 6:21 pm
by VLSmooth
Btw, you said you're opposed to static IP addresses, but what about IP reservations?

For example, my DGL-4300 router has a configurable list of MAC to IP addresses. When a computer requests an IP via DHCP, the router looks at its internal mapping first. This allows you to set IP addresses transparent to the clients. I primarily use this to set my ReadyNAS IP address.

Edit: Shorter name "DHCP Table"

Posted: Tue Feb 13, 2007 6:33 pm
by VLSmooth
Setting up Linux DHCP Server with Dynamic DNS Support
http://www.digitalpeer.com/id/setting

Potentially useful, but no guarantees. At least the article is short.

Posted: Tue Feb 13, 2007 6:44 pm
by VLSmooth
More notes
  • Seems that the Linksys WRT54G does not support IP reservations by default. You might require a hacked firmware release or run linux on it (if you haven't already). Silly Linksys.
    More on your router firmware choices here.
  • Alternatively, there are threads out their that mention connecting to your "router's" DNS server. Truth be known, I'm not sure this actually exists, so I can't confirm the validity of the threads.
  • Provided they work for you, both of these alternatives seem cleaner than a cron job imho.

Posted: Tue Feb 13, 2007 6:47 pm
by Jonathan
VLSmooth wrote:Btw, you said your opposed to static IP addresses, but what about IP reservations?

For example, my DGL-4300 router has a configurable list of MAC to IP addresses. When a computer requests an IP via DHCP, the router looks at its internal mapping first. This allows you to set IP addresses transparent to the clients. I primarily use this to set my ReadyNAS IP address.

Edit: Shorter name "DHCP Table"
Sweet. I'll see about changing the firmware on my router to get this going. This will do nicely. Then I can set my /etc/hosts file and rock on. DNS is too heavyweight.

The cron job is just to do the backup and not meant to be part of the name resolution.

Posted: Tue Feb 13, 2007 6:54 pm
by VLSmooth
Glad that helped then. Too bad you quoted my post before I s/your/you're/ :(