Learn Computer Networking Basics
A network is composed of connected elements 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 the 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 is very crucial for a long time in communication. With time, there are faster and better technology options we have for a network.
A network consists of multiple devices – routers, HUB, Switch, and Computers, connect each other using a wired or wireless medium. To build a computer network at any premises, understanding how to connect components to each other is essential.
The tutorial covers the basic understanding of the following:
- Addressing Of devices(IP address) – How connected devices are discovered on the network.
- Hub, 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 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, that requests to use the service or to download the content from a server. The client first connects to the server, then sends the service request. For example, when you open the GMAIL, your computer is the client and Gmail is the server. The client connects to the server using TCP/IP then sends the login request. Web browsing is another example where your computer (more precisely web browser) is the client.
In the following example, we are demonstrating an example of client-server on 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. In turn, the client’s web browser displays the contents to the user.
Most of the 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 address. 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 220.127.116.11.
Based on accessibility there are two types of IP addresses one is public and another is private. A public IP address or network is accessible from anywhere in the world. While private IP addresses are not.
For e.g, www.google.com is hosting 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. In the real world, the address of the house is similar to the Public IP address. 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 the regular phone cables 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, those 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 computer. It sends the message using a directly connected ethernet cable with the HUB. To send further, the hub broadcast the same message to all the connected computers.
This may lead to slow done if multiple computers start sending messages, as one packet generating 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, only sends it to the destination computer. This reduces the network bandwidth usage and increases performance.
Both Hub 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 edges of WAN or LAN. Following are few functions a router performs:
Bridging two different networks:
One of the basic functions, to bridge two or more different types of networks. If there there are two networks with different subnets a router can connect them to each other. One example of bridging is the internet connection we use in the house. Wen the internet router bridges home network to ISP.
Other functions of the router:
- As DHCP – Optionally a router can work as a DHCP server. In DHCP, a router assigns the IP addresses to the connected computers.
- As Firewall – A router may block a packet based on network parameters.
- 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 a client mode, there can be VPN accounts created to access a company machine.
- Port Forwarding – Another way to access an internal company machine from an external device. The routers forward a particular port to an internal machine.
Common definitions in computer networking.
- LAN – Local Area Network, is a private network inside a home or office.
- WAN – Wide area networks – connects two widely separated LANs.
- VPN – A private secure network.
- NIC – Network Interface Card – Hardware card in a computer to plug an Ethernet cable.
- HUB – Device to connected computers.
- Intranet – Internal network based on internet technologies.