Learn Computer Networking Basics.

A network is composed of connected devices that can communicate with each other. In a real-world example, in a social media network like Facebook, people connect to each other using chat and other channels. Similarly, if we have a group of connected computing devices, it is known as a computer network.

With a standalone computer, a user can perform computation tasks by accessing a computer physically. A connected computer brings many advantages. e.g., file sharing, remote access, etc. You can book a flight ticket from the USA while sitting in India only because of the widest network that is called the Internet. The Internet connects your computer to the airline ticket booking system.

The tutorial covers the basics of computer networking. The basics include what computer networking is and how to set up a network using devices. The role of computer networking has been very crucial for a long time in communication. With time, we have faster and better technology options for a network.

A network consists of multiple devices  – routers, HUB, Switch, and Computers, that connect to each other using a wired or wireless medium. Understanding how to connect components is essential to build a computer network at any premises.

The tutorial covers the basic understanding of the following:

  • Addressing Of devices(IP address) – How connected devices are discovered on the network.
  • Hubs, Switches, and cables are the hardware components for a network.
  • How to do traffic flow shaping using Routers and security using firewalls.
  • Role of Clients and servers—how services, e.g., e-mail and web pages, work using networks.

Client and Server in networking

On the network, a server and a client have an essential relationship. The Server is a computing element that holds the necessary resources for a service, such as a mail server, a website for a web service, etc. For example, the computer hosting www.gmail.com is the Server for mail service, and any other website (e.g., www.cspsprotocol.com) is an example of a web server. The Server sends the content or pages when requested.

A client is another computing device. It can be a phone or laptop requesting to use the service or downloading the content from a server. The client first connects to the Server, then sends the service request. For example, when you open GMAIL, your computer is the client, and Gmail is the Server. The client connects to the Server using TCP/IP and then sends the login request. Web browsing is another example where your computer (a web browser) is the client.

In the following example, we are demonstrating an example of a client-server on a Local Area Network (LAN)

  • Both computers are reachable from each other over the LAN cable.
  • The client requests a web page from the Server by typing a URL in the web browser and hitting the enter key.
  • The Server returns the requested page to the client. The client’s web browser displays the contents to the user.

Mainly computer networking works in a client-server model. A server is a computer that can be located anywhere.

Machine Addressing with IP Address:

To accomplish any communication, there is a need for origination and destination addresses. The same applies to computer networks. The address of a computer is an Internet Protocol(IP) address. Here we will only discuss the IPv4 address only (no IpV6), which is four bytes long. Each byte is separated by a dot(.). An example of an IP address is

Based on accessibility, there are two types of IP addresses: public and private. A public IP address or network is accessible from anywhere in the world. At the same time, private IP addresses are not.

E.g., www.google.com is hosted in the public domain.   The public address range is allocated to the ISPs as a country from IANA/ICANN. While routing a packet with the public destination address, the network knows to which country packed needs to route. When it reaches ISP in that county, ISP knows how to send the packet to the final destination. The house’s address is similar to the Public IP address in the real world. When we send a post(similar to a network packet) first reaches the country and the exact address after the next hop.

A private IP may communicate with an external computer via another public IP, mostly a LAN router. The LAN is an example of a private network, which may be hidden behind the internet router with public IP assigned by the ISP. When a packet originates from a LAN computer,  and the destination is private IP. The router sends the packet to the local machine. If public IP, the router sends outside via ISP.

Network Elements – Hubs and Switches

The first thing to create a computer network is to connect the devices via Cable. Mostly the Cable is the Ethernet cable, which has four pairs of wires in plastic packing. It looks similar to a regular phone cable. But can transfer much more data than phone wires. With a cable, there can be a connection between the two computers only. But a computer network may have multiple computers that can communicate with each other.

The first basic solution is the hub. In the hub, there are multiple ports for ethernet. A connected network looks like a star. With a hub, the network topology is the star topology.

The following example shows how the HUB works. When the sender wants to send a network message to the receiver’s computer, it sends it using a directly connected ethernet cable with the HUB. To send further, the hub broadcasts the same message to all the connected computers.

This may slow down if multiple computers send messages, as one packet generates many network packets. There may be a collision too.

To overcome this problem, a network can use a switch. A switch does not send a repeat message to the network, it only sends it to the destination computer. This reduces the network bandwidth usage and increases performance.

Hubs and Switches can only transmit the message to the directly connected computers. To achieve forward a message, there is a router.

Network Router and Firewall:

The routes are the core part of the networking. As the name suggests, they have the capability to route the messages. Apart from routering, there may be a firewall along with the router, which does traffic shaping. Most routers are located between the edges of WAN or LAN. Following are a  few functions a router performs:

Bridging two different networks:

One of the basic functions is to bridge two or more different types of networks. If there there are two networks with different subnets, a router can connect them. One example of bridging is the internet connection in the house, where the internet router bridges the home network to ISP.

Other functions of the router:
  1. As DHCP Server – Optionally, a router can work as a DHCP server. In DHCP, a router assigns the IP addresses to the connected computers.
  2. As Firewall – A router may block a packet based on network parameters.
  3. VPN Server/Client – With the VPN feature, a router can connect to any other VPN server to transfer messages securely. When a router works in client mode, VPN accounts can be created to access a company machine.
  4. Port Forwarding – Another way to access an internal company machine from an external device. The routers forward a particular port to an internal machine.

Standard definitions in computer networking.

  1. LAN – Local Area Network is a private network inside a home or office.
  2. WAN – Wide area networks – connect two widely separated LANs.
  3. VPN – A private, secure network.
  4. NIC – Network Interface Card – Hardware card in a computer to plug an Ethernet cable.
  5. HUB – Device to connect computers.
  6. Intranet – Internal network based on internet technologies.