This is very beginner question. How to configure a LAN of two System?

I have only theory knowledge of LAN. Given two computers, i have to configure a LAN.

What are the steps I have to follow? What components needed? How to construct the LAN?


This is a simple question, so I will keep the answer simple.

Components needed, either:

* 1 x crossover cable; or
* 2 x normal UTP cable and 1 x switch

A normal UTP cable is usually blue - it's also called a LAN or Ethernet cable. I'm going to make an assumption that you know what a switch is - a little box full of UTP ports that multiple computers plug into. A crossover cable is a special kind of UTP cable where it is wired slightly differently.

Physical configuration, either:

* Connect both computers directly with the crossover cable; or
* Use the normal cables to plug both computers into the switch.

Logical configuration:

Again, I'm not going to go into the finer points of subnetting. Just use these settings:

* PC1: IP =, Netmask:
* PC2: IP =, Netmask:

Have fun gaming!

| improve this answer | |
  • 1
    You can bypass the manual setting of the IP address (at least on a Microsoft Box). Leave the box on DHCP and it will automatically assign an 169.254.X.X IP ( subnet) address using the Automatic Private IP Addression feature. – Keith Sirmons Jun 5 '09 at 14:07
  • +1 for simple and to the point answer. – Hondalex Jun 5 '09 at 14:10
  • If at least one of the computers has a 1gig ethernet interface, you don't even need the crossover cable. The gigabit ethernet standard says that copper interfaces (as opposed to fiber) must do auto xover. – chris Jun 26 '09 at 20:32

The easiest way will be to get a simple gateway router that serves DHCP. These can be had for ~$30. You can plug both computer into the router, and set them to acquire network addresses automatically. For a little more money you can get one that works as a wireless access point.

Alternatively, if you don't have a router or don't want to buy one, you can use a crossover ethernet cable (a cable with the wires crossed so the "in" on one computer is the "out" on the other) and set static IP addresses on both machines. You can read more here. Note that with some newer NICs (Network Interface Cards) you don't need a special cable as they will autodetect a direct connection and configure appropriately.

| improve this answer | |
  • A router is the best option as it makes sharing an Internet connection easy and safe. – Scott Jun 5 '09 at 15:08

LANs are made up of layers - it's probably best to work through these layers, but for each layer you are going to have to make decisions ok.

Firstly do your machines each have a network port of some form? probably an ethernet port? If so then you need to connect the two machines via these two ports. Now you CAN often just link the two with a single ethernet cable (sometimes called a Cat5 or Cat6 cable) but most people would normally connect them via a central device called a switch. The switches can be very cheap or very very expensive depending on their functionality but for this requirement I'd suggest you need a very cheap one. Generally you plug the switch into the electric mains and then run some ethernet cable from each machine into the switch. That should be all you need to so to setup your 'layer 1'.

Secondly you need to make sure that your ethernet ports in each machine are being managed properly by your operating system. Now you don't mention which OS you're using.

I've just realised this could take all day to respond to correctly and I have to get on - I'm going to open this up as a community wiki - would someone like to do the whole L2/3 thing with this question please - then perhaps someone could do L4/5 or whatever? Does that make sense?

| improve this answer | |

Some more modern computers will automatically detect the connection type and don't even require a crossover cable between. They test the cable when it's connected to see which pins to use.

If you have a modern NIC you might be able to get away with a straight cable.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.