Basics of Networking

September 6, 2023

Introduction

What is a Network?

A network is a collection of computers and devices that are connected to enable communication and data exchange.

What is the Internet?

The Internet is a vast, global system of interconnected computer networks that use the standard Internet protocol suite (TCP/IP) to communicate between devices. It can be thought of as a network of networks, encompassing millions of private, public, academic, business, and government networks, ranging from local to global scale.

The Internet is a network of networks.

Origins: The Internet has its roots in the 1960s and 1970s when researchers in the U.S., funded by the Department of Defense, developed ARPANET, a project to create a robust, fault-tolerant network. This project laid the groundwork for many of the protocols and structures of today's Internet.

The Internet is connected by wires that are under the oceans. Here is a map of the undersea cables.

Types of Networks :

Here are the main types of Networks based on geographic span:

  1. Local Area Network (LAN): LAN is a computer network that interconnects computers within a limited area such as residences, schools, offices, buildings, etc. via ethernet cables.
  2. Metropolitan Area Network (MAN): MAN is a computer network that interconnects users with computer resources in a geographical region of the size of a metropolitan area, such as a city or large campus.
  3. Wide Area Network (WAN): WAN is a telecommunications network that extends over a large geographical area, such as a country or continent.
  4. Personal Area Network (PAN): PAN covers a small, typically within an individual reach. It connects personal devices like smartphones, tablets, and laptops to peripherals such as Bluetooth headsets.

Introduction to networking devices

Networking devices also known as networking hardware, are physical devices that facilitate communication between computers and other network-enabled devices. It helps in directing and managing data as it travels through a network.

Here are some of the primary networking devices :

  1. Router:

    • Purpose: Directs data packets between networks. It determines the best path for data packets to travel from one network to another.

    • Features: Routers can be used in homes and other larger settings like businesses, ISPs, and data centers.

  2. Modem:

    • Purpose: Modulates and demodulates digital and analog signals, allowing digital devices to communicate over telephone or cable lines.

    • Features: Commonly used for broadband internet connections, such as DSL, cable, or fiber services.

  3. Hub:

    • Purpose: Connects multiple Ethernet devices, making them act as a single network segment. It broadcasts data to all connected devices.

    • Features: Considered less efficient than switches since they send data to all connected devices regardless of the intended recipient. Mostly obsolete in modern networking due to inefficiencies.

Protocols

A network protocol is an established set of rules that determine how data is transmitted between different devices in the same network.

Types of Protocols:

  1. Transmission Control Protocol (TCP): TCP is a popular communication protocol that is used for communicating over a network. It divides any message into a series of packets that are sent from source to destination and there it gets reassembled at the destination.

  2. Internet Protocol (IP): It is designed explicitly as an addressing protocol. It is mostly used with TCP. The IP addresses in packets help in routing them through different nodes in a network until they reach the destination system. TCP/IP is the most popular protocol connecting the networks.

  3. User Datagram Protocol (UDP): UDP is a substitute communication protocol to TCP implemented primarily for creating loss-tolerating and low-latency linking between different applications.

  4. Post Office Protocol (POP): POP3 is designed for receiving incoming e-mails.

  5. Simple Mail Transport Protocol(SMTP): SMTP is designed to send and distribute ongoing E-mails.

  6. File Transfer Protocol (FTP): FTP allows users to transfer files from one machine to another. Types of files may include program files, multimedia files, text files, documents, etc.

  7. Hyper Text Transfer Protocol (HTTP): HTTP is designed for transferring a hypertext among two or more systems. HTML tags are used for creating links like text or images. HTTP is designed on Client-Server principles which allows a client system to establish a connection with the server machine for making a request. The server acknowledges the request initiated by the client and responds accordingly.

  8. Hyper Text Transfer Protocol Secure (HTTPS): HTTP is used for transferring data between the client browser and the web server in hypertext format same in the case of HTTPS except that the transfer of data is done in an encrypted format.

There are some other protocols :

  • Address Resolution Protocol (ARP)
  • Dynamic Host Configuration Protocol (DHCP)

IP Address

It is a unique address that identifies a device or internet or a local network. IP stands for 'Internet Protocol' which is a set of rules governing the format of data sent via the internet or local network.

Format: X.X.X.X [X -> 0 to 255]

Do you know how the data is transferred? The data is transferred via the internet through Packets to individual IP Addresses.

To check your IP Address: Open terminal and type curl ifconfig.me -s and press Enter.

ISP

Port Numbers

A port number is the logical address of each application or process that uses a network or Internet to communicate. A port number uniquely identifies a network-based application on a computer. It is a 16-bit number.

Total Port numbers are available: 2^6 = 65536

Port numbers of some applications:

  • HTTP: 80
  • Mongo DB: 27017
  • SQL: 1433

Port Numbers from 0 - 1023 are reserved ports, 1024 - 49152 are registered for applications like MongoDB, SQL, etc. The remaining ones, we can use.

Topology

Topology defines the structure of the network of how all computers or components are interconnected to each other.

Types of Topologies:

  1. Bus Topology: Bus Topology is a network type in which every computer and network device is connected to a single cable.

    Advantages

    • If N devices are connected in a bus topology then the number of cables required to connect is 1, which is known as the backbone, 'N' droplines are required.

    • The cost of the cable is less as compared to other topologies, but it is used to build small networks.

    Problems

    • If the common cable fails, then the whole system will crash down.

    • Security is very low.

  2. Ring Topology: It forms a ring connecting devices with exactly two neighboring devices.

    Advantages:

    • The possibility of collisions is minimal in this type of topology.

    • Cheap to install and expand.

    Problems:

    • Troubleshooting is difficult in this topology.

    • The addition of stations in between or the removal of stations can disturb the whole topology.

    • Less secure.

  3. Star Topology: In star topology, all the devices are connected to a single hub through a cable.

    Advantages:

    • If N devices are connected in a star topology, then the number of cables required to connect them is N, so it is easy to set up.

    • Each device requires only 1 part, i.e., to connect to the hub.

    Problems:

    • The cost of installation is high.

    • Performance is based on a single concentrator, i.e., hub.

    • If the concentrator (hub) on which the whole topology relies fails, the whole system will crash down.

  4. Tree Topology: This topology is the variation of star topology. This topology has a hierarchical flow of data.

    Advantages:

    • It allows more devices to be attached to a single central hub thus, it decreases the distance that is traveled by the signal to come to the devices.

    • It allows the network to get isolated and also prioritize from different computers.

    Problems:

    • If the central hubs get fails the entire system fails.

    • The cost is high because of the cabling.

  5. Mesh Topology: In a mesh topology, every device is connected to the device via a particular channel.

    Advantages:

    • It is robust.

    • The fault is diagnosed easily. Data is reliable because data is transferred among the devices through dedicated channels or links.

    • Provides security and privacy.

    Problems:

    • Installation and configuration is difficult.

    • The cost of cables is high as bulk wiring is required, hence suitable for less number of devices.

    • The cost of maintenance is high.