How to setup a local network over the CAT5 cable?

First you will need to assign IP addresses to your eth interface, then you'll need to setup shared folders. Both can be done quite easily:

Assign IP addresses

I will show you how to add a seperate setup only for this connection, so you can switch back to the default behaviour when connecting to the Internet over LAN (if you don't want this, instead of step 2.-6. click edit.. on your eth0/1/... wherever your cable is plugged in.

  1. Rightclick your network-manager (=nm) symbol in your panel, choose edit Connections...
  2. Select eth0/1/... (your interface where the cable is plugged in), klick edit...
  3. Copy your Device MAC Address (eg. 55:55:55:55:55:55)
  4. klick cancel
  5. Click add
  6. Connection name: somethin like direct connection, Device MAC Address: paste the addres you copied in step 3, uncheck connect automatically
  7. Click IPv4 Settings tab
  8. Method: Manual, click Add, Address: 192.168.1.1 (on one Computer, 192.168.1.2 on the other), Netmask: 24, gateway: leave blank, click Apply
  9. Leftclick your nm-symbol, you can now choose your connection (do this on both computers when the cable is plugged in)

To verify your settings, rightclick nm -> Connection Information - and verify your IP address.

Now it should be possible to ping the other computer. Open a terminal, type

ping 192.168.1.2 (or 192.168.1.1; the ip address of the other computer)

If your output looks like this:

ping 192.168.1.2
PING 192.168.1.2 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.2: icmp_seq=1 ttl=255 time=0.431 ms
64 bytes from 192.168.1.2: icmp_seq=2 ttl=255 time=0.407 ms

Your connection works!

If it looks like this:

ping 192.168.1.2 PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data.
From 192.168.1.1 icmp_seq=1 Destination Host Unreachable
From 192.168.1.1 icmp_seq=2 Destination Host Unreachable

something is wrong, sharing won't be posible

Enable shared Folder

Now, to transfer files between computers, at least one computer has to share a folder. We will do this with nautilus:

  1. Rightclick the folder you want to share
  2. Select sharing options
  3. Check "Share this folder"
  4. You might want to allow create/delete files
  5. Check Guest access (be aware that this also opens this folder for people on your WLAN - if you are in a public location you might not want to do that. Instead create a user account or give him your password...)
  6. Click create share
  7. On the other computer (the one that wants to access this share) open nautilus, press Ctrl+l (to open the location bar) and type smb://192.168.1.1 (or smb://192.168.1.2; the IP address of the computer that opened the share)

Now you should see the share (you might have to give a username/password depending on your decision on step 5).

Please note that creation shares on a NTFS-Partition might not work out of the box!


I assume your router will have ethernet rj45 ports for wired connections. instead of cross connecting your pc, you can easily connect them via the router.

In any caseYou can then set up file sharing under windows and then connect to the windows share via nautilus. or install samba in ubuntu and share a folder with Microsoft windows.

For simple file sharing i would recommend Giver

http://code.google.com/p/giver/

its easily installed under ubuntu.