11

I would like to set up a home network with the various Ubuntu machines I have at my home. They are all running 10.04. It would have to be able to share files and maybe even chat. :)

Any information on how to set this up would be beneficial.

Please and thank you.

4 Answers 4

12

Networking in general with Linux is a wide field. It is one of those parts where the operating system is strong and offers lots possibilities. I would suggest different steps:

Getting an IP address

DHCP

At first every computer in your network needs an IP address. Most home networks have some kind of (DSL) router which offers DHCP. That means you'll get automatically an IP from your router and don't have to worry about.

Avahi

Avahi is another easy form to connect your computers in your home network. You need avahi-daemon installed. Furthermore the package libnss-mdns is needed. If the avahi daemon runs, you can connect to other computers in your network with computername.local. They will assign an IP and use their hostname for connections (If you forget the hostnames, open a terminal and type hostname.).

Fixed IP address

If the above is not the case the next easy solution (in my opinion) is to give every computer a fixed IP address. For me the easiest way is to edit etc/network/interfaces:

auto eth0
iface eth0 inet static
   address 192.168.0.42

Those lines assign the IP 192.168.0.42 to the network interface eth0 on that computer. Other information like netmask, default router etc. can also be entered into that file.

DHCP-Server

Another possibility is to install an DHCP server. This is usually more complex. I will not cover this here.

Getting a name

Under normal circumstances only connecting via IP addresses is not nice. You have to remember all those numbers. So it gets easier with names. If you only have a few computers in your network, you can edit /etc/hosts like:

127.0.0.1  localhost
192.168.0.23 server
192.168.0.42 laptop
192.168.0.65 images
192.168.0.123 router

The first entry is the IP address and the second is the name you want to use. Now you can use images to connect to the computer with IP 192.168.0.65. This file has to be on every computer in your network.

If you don't want to distribute that file across your computers, you can use a DNS server like BIND. But setting this up is too complex for my answer. ;)

Now every computer has an IP address and a name. You can connect to them.

Share files

Nautilus allows you to share files. Just click right on a folder and choose it too be shared. Eventually Ubuntu will install some missing files. Choose a name and access rights for that share and you're done. If you use the service-discovery-applet or ahavi-discover it is easy to access the files.

A special application is giver. Every computer needs to run this software. With drag&drop you can share files between computers. Besides this you can also use Pidgin, an FTP server or Samba to access files.

Chat

Here we need Avahi again. Install python-avahi and choose Pidgin as chat software (also Gajim is able to chat via Bonjour). Make a new account and choose Bonjour as communication protocol. If you start Pidgin and other Bonjour-users are active in your network, you'll see them and can chat.

As said before there are several other possibilities to chat. I chose only this. Furthermore you can configure those services in specific ways. If you have questions it would be the best to ask them in more detail. Have fun with your network. :-)

1

It's really easy. Takes just a couple of minutes.

Creating Network:
Just click the network icon in the panel and click create new wireless network. Choose a name and password and click create. Now this wireless network should be available on all nearby machines. You can share files, chat, remote desktop, share internet connection etc. You can also create a LAN/Wired connection, to do that edit connections, then add a wired network and in the IPV4 tab, select shared to others or local link only. Shared to other will share your internet connection to other machine on lan. Local Link will not.

Enabling Chat:
To enable chat on local network, add a people nearby account in empathy chat application on all machines.

Hope that helps.

1

Easier way to do this IN 3 Easy Steps!

First find out your Mac Address and current IP Address on you current connected network: Open Terminal and type (keep terminal open for last step): sudo ifconfig

you will see an output of your network card information like this:

Link encap:Ethernet  HWaddr 00:11:22:33:44:55 
inet addr:192.168.1.2

Second, Set up your router as the DHCP server and bind a static internal IP address to your network card(s) or wireless card(s) MAC Address under the "DHCP" section of your router. In a browser go to:

http://192.168.1.1 (usually the routers IP Address) (if your username & password is "admin" please change the password so nobody dosent mess with your router settings!!!!!!!!!!!!)

192.168.1.2 = 00:11:22:33:44:55 MyComputer
192.168.1.3 = 11:22:33:44:55:66 MyBrothersComputer

Third Edit hosts file:

sudo gedit /etc/hosts

Add your specific configuration:

192.168.1.2 My Computer
192.168.1.3 My Brothers Computer

Configuring BIND & DHCP in your computer system can be a pain, especially for newbies and dads & moms that know nothing about networking. Your router sets up static IP addresses for you automatically. Its a no brainer.

0

You could run one of those in a server. Just install Ubuntu Server Edition and then install Samba (if you have Windows PC if not don't install) and you could have a local IRC server. A server would be a lot easier then connecting 5 (just guessing here). If you have 2 or 3 then just connect right to that PC but a server will make it a lot easier.

To connect just use the Network Location in Ubuntu and connect via SSH.

3
  • That's too complicated for someone like my dad.
    – Owais Lone
    Aug 5, 2010 at 17:02
  • Where did your dad come into this? Aug 5, 2010 at 17:38
  • Hey, I'm a dad. And I have GOT to figure out home networking. And my son knows it!
    – Smandoli
    Aug 17, 2010 at 20:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .