Press "Enter" to skip to content

Networking 101

adminwho 0

The most common network protocol used today is TCPIP, there are others such of which NETBIOS is the most common but if you are developing a local network today it will almost certainly be TCPIP. At a local office level computers are connected to each other and to other devices through cat 5 (category 5) or the later cat 6 (category 6) cables. A group of computers connected together in a localized network is called a LAN or Local Area Network.

Starting at the cable level, the cat 5 or cat 6 cable consists of 8 wires bundled together, with a connector at each end. The difference between cat 5 and cat 6 is simply the transmission length specification, the cat 6 cable can be used in longer cable runs. The connecter at each end of the cable is like a telephone jack, just a bit fatter. One end of the cable usually plugs into the NIC on a computer and the other end usually plugs into a network switching device (more about the switching device later).

The NIC or Network Interface Card is a card in your computer for the purpose of connecting your computer to a network. Each NIC has a unique identifier called a MAC Address (the NETBIOS protocol works on the MAC address level). When implementing a TCPIP based network, each machine on the network must be given an IP or internet protocol address.

TCPIP or Transmission Control Protocol/Internet Protocol is a multilayered communication protocol and you can find out about the protocol specification by going to http://www.faqs.org/rfcs/rfc793.html where the specification is laid out. An IP address has 4 parts where each part is a number from 0 to 255. A typical IP address might be 168.10.25.52. All the possibilities of all the 4 segment number combinations is the unrestricted network (in reality only the internet itself approaches this concept). Any case which allows combinations up to the last 3 segments is called a subnet.

The size of a subnet for any LAN is defined by the subnet mask, it is also required that a subnet mask is configured for each NIC. On most small office LANs the subnet mask will be 0.0.0.255. What this means is that the first 3 segments for the IP address on all computers in the LAN must be the same and the last segment can be any number from 1 to 254 (the numbers 0 and 255 are always reserved for routing purposes).

For example, computers with IP addresses 168.10.25.52 and 168.10.25.103 both having a 0.0.0.255 subnet mask can communicate with each other but not with a computer with the address 168.10.26.68. This is because the third computer is different on the third segment, 26 rather than 25.

So does this mean that we have to configure an IP address and subnet mask for every machine on the network, the answer is NO because we can use DHCP (Dynamic Host Configuration Protocol) to automatically allocate new IP addresses for new machines coming onto the network. DHCP can be set up to run on a computer or a router (see later). To enable the computer to get its IP address from DHCP you simply have to click the button the TCPIP protocol configuration to ‘Obtain an IP address automatically’.

How can you check that an IP address has been obtained from DHCP? On a windows system you can go to a command prompt and type ipconfig, this will come up with the IP address and subnet mask for every NIC on the computer. Be careful here, if the NIC is not connected to a network, ipconfig will come back with ‘media disconnected’.

When we are building a network we can’t just connect the computers together by a cat 5 cable because this would limit the network to 2 computers. Normally we only consider it a network if there are more than 2 computers communicating. In this case we would connect the computer to a network switching device. The most basic network switching device used today is called a switch. You may have heard the term hub, hubs are not used anymore because they make the network much slower I will explain this later.

A network switch is a device with a number of ports that computers can be connected to through cat 5 or cat 6 cables. A switch is like a computer dedicated to passing communications from one computer to another. In the old days they used hubs, the difference between a switch and a hub is that the old hub used to broadcast all messages sent to it to all computers connected to it. The switch is capable of figuring out the address of the computer connected to any particular port and switching the message only to the computer it is intended for. Switches very much reduce network traffic as compared to hubs.

Using a switch is perfect for connecting all your computers into an isolated network with each other but it won’t let you connect to the internet from your network, or another network for that matter. For this you need a router.

A router or a router switch as it should be more correctly known consists of 2 parts:

1. A switch which your network of computers are connected to and

2. A NIC which can act as a gateway to the internet or another network and can have a completely different IP address which means it can be on a different subnet than your LAN.

The router is called a router because it routs all the communications to the internet or another network through the same communication line. The router can also be set up to do DHCP which is what I would recommend in a home or small office application.

So there you have it, you can build your home or small office LAN and connect it to the internet but when you want to communicate from one machine to another you want to see computer names and not IP addresses. How does this happen? Please keep an eye out for my upcoming article ‘WINS, DNS and name resolution’.

Regards Simon

Source by Simon R Meadowcroft

Leave a Reply

Your email address will not be published. Required fields are marked *