How To Set Up a Home Network With Ubuntu, Part 1
Building a home network can make the management and use of multiple computers in your home much more convenient. For example, you can set up shared folders so that you have access to your files from any computer in the house. Another nice thing you can do is share your printer with all of your other computers, so you can print from anywhere.
For this post I'm going to assume that you already have a router (wired or wireless) set up per the instructions from the manufacturer.
The first step to making your home network easy to manage is to assign static IP addresses to each of your computers. That's what I'm going to cover in this post. I have three computers on my home network; the main desktop/data server, a secondary desktop/media center, and a laptop. All three are running various versions of Ubuntu Linux. Here's a basic block diagram.
First, we're going to configure the Main Desktop/Data Server. Login to that computer and use your favorite text editor to edit /etc/network/interfaces to include the following lines:
This assumes that you are connected to the router using a LAN cable and eth0 is the name of your configured network card. Also, the gateway address should be set to the IP address of your router. This is the same address you use to access the web based configuration of the router. Yours may be 192.168.1.1.
Now, restart the network to make the settings take effect.
Now, just repeat the process on your Secondary Desktop/Media Center making sure to substitute the name of your network device for eth0 and set the address to 192.168.2.11. You can use the ifconfig command to view information about your network devices to get an idea of what name to use. Some common names for wireless devices are ath0, wlan0, ra0.
Again, repeat the process for the laptop using 192.168.2.12 as the address.