Newbie's Guide to Small Home LAN

Newbie's Guide to Small Home LAN

  • Pridružio: 20 Apr 2003
  • Poruke: 2416
  • Gde živiš: NS

How to Network 2 Computers on LAN with a Crossover Cable.

There may be a lot of people turned off by Linux because most of the tutorials available as of now, are significantly technical in nature, and you need to read a lot of jargon before you get to the point of 'what exactly is to be done to get it working'. And the 'what exactly to be done...' tends to rely on the jargon that you just skipped because it went over your head. A lot of users who would like to switch over from other operating systems to Linux would like
simple steps on how to connect to the internet, set up printers, set up a LAN, connect and use various peripherals. This tutorial is intended to provide simple steps, that are supposedly easy to follow. I will also mention some terms that you really need to know with their "newbie definitions" ;-)

This is kinda inspired by Eric S. Raymond's CUPS Horror Story,

This is intended for the Linux Newbie, or regular Linux users who are not into networking or system administration. This is a networking newbie telling others how he went about networking his 2 computers on a LAN using a crossover cable, setting up NFS shares, Samba shares, sharing the printer and sharing the internet connection. This is NOT meant for experts, and a lot of technical jargon is kept away.

Thanks to,,,,, and of course, which helped me find all the above sites.

DISTRO USED: Fedora Core 2. I will mention that I have used GUI components, and not commands. So those trying this tutorial on other Linux flavours should look out for differences.
GUI: Gnome Desktop v2.6

Part 1 has been tested by others and have had a good feedback when I posted it to my circle of friends and acquaintances. Please provide a feedback for the next parts. I will continue the newbie series as I get the time to do so.

CONTACT ME: neenad AT gmail <DOT> com


I have 2 computers. I've called them TOM and JERRY. TOM has Fedora Core 2. JERRY is a dual boot with Fedora Core 2 and Windows XP. I connect to the internet using TOM. I have the printer on JERRY. I want to set up a small home network, so that I can surf the web/send mail with both computers sharing one internet connection, and also share the printer. I would also like to access files on each comp, from both operating systems.

I have LAN (Ethernet) cards installed on both. I can connect the two together without buying a hub. This can be done with a crossover cable. A crossover cable has some wires interchanged so that input of one comp is the output of the other and vice versa. (I do not know the restrictions on cable length) In my case, both comps are in the same room, and I have a cable 5m long.

You need to know the root password for both machines. I will skip the step where you will need to enter the root password. Please do so.


PART 1: Setting up the Network
Connect the crossover cable into the slots on the LAN card. When both computers are on, you will see the led on the ethernet card light up. This means that the connection is recognized by the hardware. Now you need the software to recognize it (without which you cannot use the connection). I assume you have booted up in Linux.

On TOM: Click on 'Hardware Browser' in 'System Tools'. The hardware browser will start and you will get a listing of hardware in your computer. Click on 'Network Devices' on the left. You will be shown the detected LAN Card and device information. Keep this window open so that you can recheck the card name & number, manufacturer, driver file and device. This is just in case, as mostly the card will be autodetected.

Next, go to 'System Settings' >> 'Network'. You will get a network configuration dialog. Click on the Hardware tab. You should see your device here. If no, click on new. Select Ethernet. Select the adapter that has the same number as the number of the card in the hardware browser. (If there are multiple numbers, you can select any one). Select device eth0. Keep IRQ to unknown and click OK. Your hardware is set.

Click on the devices tab. Click on New. Select Ethernet Connection and click Forward. Click on your Ethernet card name and click forward. Click on statically set IP addresses. There are only certain addresses that are legal to be used on the local network. Using any other address will screw up your internet connection as well. You can use 192.168.XXX.XXX with a subnet mask of For example, I have used for TOM and for JERRY. Click forward and click on apply. Your device is now shown, and will be inactive.

Go to DNS tab. Enter a hostname of your choice (eg: In the Primary DNS (and secondary DNS) enter the primary (and secondary) DNS addresses of your Internet Service Provider (ISP). If you do not know what they are, open a terminal window and type:
cat /etc/resolv.conf
In this there will be something like:
nameserver XXX.YYY.ZZZ.AAA
These numbers are your primary and secondary DNS addresses. Enter them in corresponding fields on the DNS tab.

If you cannot find resolv.conf or it is empty, then skip the above step. It means that the internet connection is not set up properly. We shall handle this later.

Come back to the devices tab, select the device and click activate.

Repeat the above for JERRY. Remember to give it a different IP address and hostname. (eg:,

Open a terminal and type:
ping (or tom's address/hostname)
ping (or jerry's address/hostname)
Do this for both machines. You will get a response, which means your network is working! If not, please post the procedure that you followed in the forums and ask for a networking guru to help you.

Now we have to set up NFS shares, SAMBA shares, share the printer, and share the
internet connection.

PART 2: Sharing files Linux-to-Linux using NFS (Network File System)
NFS Shares: Sharing your files among Linux comps.
Tom & Jerry: both running Linux
This is just a basic configuration of the NFS. Please read the NFS Help document in case
you wish to customise your shares.
You are on Tom. In the menu, click on System Settings > Server Settings > NFS
In the NFS Server Configuration driver that comes up, click on 'Add'. In the directory, enter the directory you wish to share, or click on Browse and select the directory you wish to share. In Hosts, you will want to enter the hosts to which you want to share your directory. You can specify or even * Use the radio buttons to set the share as read-only (recommended) or read/write. You do not need to change any other options in the other tabs, so click on OK. Go through the NFS Help files (obtained by clicking on the Help button) if you want more details of configuration of NFS, or if you want
to configure it more. Assume that the '/home/username/shared' directory is shared. You
will have to start the NFS Server. Go to the menu System Settings > Server Settings >
Services, and search for nfs. Click it and click on the start button and wait for confirmation.
You may check the nfs checkbox to start the NFS Server at startup.

Once you have set up this directory, move to Jerry. Open a terminal window on Jerry. Get into superuser mode and change directory to /mnt. Create a directory that will map to the shared directory of Tom. Suppose you call that directory as tom_share, then type the following command:
mount ./tom_share
The shared directory from Tom will now be available in the /mnt/tom_share directory on Jerry. You will have your permissions as you have set them.

PART 3: Sharing files Linux-to-Windows using the Samba Server
Samba Shares: Setting up Samba: Sharing a Linux directory to be accessed from Windows.
Tom: running Linux, Jerry: running Windows, and has networking services turned ON.
You are on Tom. In the menu, click on System Settings > Server Settings > Samba
In the Samba Server Configuration driver that comes up, click on 'Add'. In the directory,
In directory, enter the directory you wish to share or click on browse and select the directory you wish to share. You may leave the description blank, or enter an appropriate description.
Provide the permissions. In the next tab "Access", you can either allow access to specific users or to all users. Since it is a small home network, you may set it to all to avoid access denials. Read help (obtained by clicking on the Help button) for more details.

Go to the menu System Settings > Server Settings > Services, and search for smb. Click it and click on the start button and wait for confirmation. You may check the smb checkbox to start the Samba Server at startup.

Once you have set up this directory, move to Jerry (windows). Refresh the network places. The shared Samba directory will now be seen from windows and you will be able to browse it in the windows explorer.;artid=316

Registruj se da bi učestvovao u diskusiji. Registrovanim korisnicima se NE prikazuju reklame unutar poruka.
  • Data Center Engineer
  • Pridružio: 13 Avg 2004
  • Poruke: 3048
  • Gde živiš: Holandija

Jako dobar tutorial! Slazem se da je problem sa vecinom howto-a i tutoriala napisan za one koji se vec razumeju u linux. Pomocu ovog ce svako moci da namesti kucni LAN.

Ko je trenutno na forumu

Ukupno su 882 korisnika na forumu :: 58 registrovanih, 7 sakrivenih i 817 gosta   ::   [ Administrator ] [ Supermoderator ] [ Moderator ] :: Detaljnije

Najviše korisnika na forumu ikad bilo je 3466 - dana 01 Jun 2021 17:07

Korisnici koji su trenutno na forumu:
Korisnici trenutno na forumu: 357magnum, Apok, arsa, babaroga, Batinas, Ben Roj, Bobrock1, bojank, bozo13, Bubimir, cenejac111, Dejan84, djo97, Doca, doklevise, draganca, Drug pukovnik, Georgius, goran.vvv, GreenMan, Hektor, ILGromovnik, Istoricar2015, ivan979, kaptain, kunktator, ljuba, Luka Blažević, madza, MB120mm, mb1213, mercedesamg, Mercury, Mihajlo, Mirage 2000N, Miškić, mushroom, nuke92, ofbeyond, ostoja, Panter, Pomorac1, RobinHood12, Romibrat, Sale1423, shone34, solic, srbijaiznadsvega, Srki94, Srle993, stemark, Stoilkovic, Toni, trikomso, Vlada1389, Vlada78, zxstole, |_MeD_|