It's easy and can be done in 4 easy and simple steps...
1. Choose a Network Address
* Any network address will do for this purpose, so long as you understand the basics of how IPv4 works as explained below.
* IPv4 (IP ver. 4) addresses are written like this: xxx.xxx.xxx.xxx (four number groups separated by three dots), in all RFC-1166 compliant countries. Each number ranges from 0 to 255. This is known as "Dotted Decimal Notation" or "Dot Notation" for short. The address is divided into two portions: the network portion and the host portion.
For "Classful" networks, the network and host portions are as follows:
("n" represents the network portion, "x" represents the host portion)
When the first number is 0 to 127 - nnn.xxx.xxx.xxx (ex. 10.xxx.xxx.xxx)
These are known as "Class A" networks.
When the first number is 128 to 191 - nnn.nnn.xxx.xxx (ex. 172.16.xxx.xxx)
These are known as "Class B" networks.
When the first number is 192 to 223 - nnn.nnn.nnn.xxx (ex. 192.168.1.xxx)
These are known as "Class C" networks.
When the first number is 224 to 239 - The address is used for multi-casting.
When the first number is 240 to 255 - The address is "experimental".
Multicast & Experimental addresses are beyond the scope of this article. However, because IPv4 does not treat them the same way as other addresses they should not be used.
For simplicity "non-classful networks" and sub-netting will not be discussed, as we will be connecting only two devices. If you wish to connect additional devices, see How to Set up a Private Network after reading this article.
The network portion specifies a network; the host portion specifies an individual device on a network.
For any given network:
o The range of all possible host portion numbers gives the Address Range.
(ex. 172.16.xxx.xxx the range is 172.16.0.0 to 172.16.255.255)
o The lowest possible address is the Network Address.
(ex. 172.16.xxx.xxx the network address is 172.16.0.0)
This address is used by devices to specify the network itself, and cannot be assigned to any device.
o The highest possible address is the Broadcast Address.
(ex. 172.16.xxx.xxx the broadcast address is 172.16.255.255)
This address is used when a packet is meant for all devices on a specific network, and cannot be assigned to any device.
o The remaining numbers in the range are the Host Range.
(ex. 172.16.xxx.xxx the host range is 172.16.0.1 to 172.16.255.254)
These are the numbers you can assign to computers, printers, and other devices.
Host Addresses are individual addresses within this range.
2. Connect the two computers together.
* To connect with a Crossover cable, simply plug an end of the cable into the Ethernet Port of each computer.
* To connect with a Hub or Switch, use two straight through cables to connect each computer to the switch or hub.
* See "Things you will need" section for more information on "Straight Through" -vs- "Cross-Over" Cables.
3. Configure the computers for networking. Go to internet options (this varies depending on the Operating System), and go to the dialog box that lets you change the TCP/IP protocol. Change the radio buttons from "Obtain from DHCP server automatically" to "Use the following IP address:".
* Give each computer a different address from the host range. Do not use the network address or the broadcast address.
* Leave the "Default Gateway" and "DNS server" fields blank.
* For the subnet mask, use the following:
Class "A" Networks
When the first number is 0 to 127
The Mask is - 255.0.0.0
Class "B" Networks
When the first number is 128 to 191
The Mask is - 255.255.0.0
Class "C" Networks
When the first number is 192 to 223
The Mask is - 255.255.255.0
IPv4 originally used the first number (ex. 192) to determine which part of the address is network and which part is host based on the address class. However, the advent of subnetting and nonclassful networking made it necessary to provide a mask because other ways of dividing the address into network and host portions are now possible.(More information in the Important Notes section.)
4. Verify connectivity. The simplest way to do this is with Ping. Bring up MS-DOS or the equivalent on other OS's, (In Windows open the command prompt which is located in the Start Menu - Accessories - Command Prompt) and type in: "ping [insert IP address of the othe