Routes to hosts on the local network

On my private LAN, I have a number of hosts, but the two most important are my FreeBSD box–named so creatively as “bsd”–and “trantor“, my MacBook.  Typing the IP address of “bsd” when I want to access it gets old fast, and there is an easy way to be able to access it by name.  On my MacBook, I just have to add the following to /private/etc/hosts:

192.168.1.107      bsd

On my FreeBSD box, edit /etc/hosts and add:

192.168.1.105      trantor

Before hitting my ISP’s DNS server, the hosts file is consulted and used to obtain the IP address of the host on my private LAN.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s