3- making the network friendly

This journal entry is relatively short and sweet. I considered setting up BIND for DNS services, when I decided to go simple and use the path of least resistance, aka the hosts file.

DNS through BIND is not a trivial task. After taking stock of my situation, I realized that want I really wanted was trivial. I wanted to be able to communicate with the small number of machines on my local network by name instead of IP address. The easiest way to do this with the small number of machines I have on my network is by maintaing a synchronized hosts file. As long as each one has the same information about the other nodes on the network, everything will go right as rain. The small number of nodes on my network guarantees that the overhead of keeping the hosts file synced stays manageable.

First step was to get my main machine (Electric-lash) setup correctly.
1- Switch from using the router’s DHCP to a static IP address.
2- Add the correct entries under the /etc/hosts file.
127.0.0.1, the loopback address, was already in place. I add the following lines to the hosts file:


192.168.1.100 electric-lash electric-lash
196.198.1.101 lovemonkey lovemonkey
192.168.1.125 heyday heyday

This takes care of my main machine (Electric-lash), the lovely wife’s machine (Lovemonkey), and my server (Heyday).
3- Restart electric-lash and make sure everything works.

NB: on my first restart of Electric-lash, lovemonkey was still using DHCP and happened to be using .100 for an IP address. Shutting down lovemonkey and rebooting Electric-lash solved the problem

Upon restart I was able to successfully ping and make an ssh connection to Heyday using a name instead of IP. Remote Desktop also worked like a charm.
I was able to modify my password-less ssh connect script (from my previous post 2- enable remote access), to use the server name. The benefit is that I will expand this script to take the computer name I want a connection to as a command line argument.

Next: ?
Previous: [1-Building the server] [2- enable remote access]

This entry was posted in linux servers. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *