DEV Community

Dipsan Kadariya
Dipsan Kadariya

Posted on

Computer Networks 101 πŸ’‘| Understanding the Fundamentals in Networking.πŸ“ΆπŸŒ

Computer Network

Computer Network is a group of computers and other hardware devices that are linked together via communication channels to process communication and enable resource sharing among a wide range of users.

Uses:

  • Enable multiple users to share a single hardware devices like printer, scanner
  • Enable communication among wide range of uses
  • Easy data sharing and communication

Advantages:

  • Highly flexible
  • Inexpensive
  • Allows resource sharing
  • Cost efficient

Disadvantages:

  • Low security
  • Centralized
  • Doorway for viruses and malware
  • Requires a handler

Network Topology

Network Topology refers to the physical or logical layout of network. It defines the way different nodes (computer) are placed and interconnected with each other. Network Topology helps to describes the way the data is transferred into these nodes.

Bus topology

Type of Network Topology where devices are connected sequentially to the same transmission line.

Advantages:

  • Low cost
  • Simple to use

Disadvantages:

  • Low security
  • If wire fails, the network is down

Star Topology

Nodes are connected to a central devices like switch via cable.

Advantages:

  • Most preferred way and most popular
  • Easy to use

Disadvantages:

  • If hub is down, network is also down

Ring topology

Nodes are connected sequentially same as bus topology but the transmission line ends at the starting node, forming a circular ring.

Advantages:

  • Overcomes the limitation of bus
  • Fast

Disadvantages:

  • Costly because of wire

Tree topology

  • Nodes are connected in hierarchical network structure resembling a tree
  • The first node is the parent node (central node, has it has multiple sub nodes connected to it)

Advantages:

  • High security
  • Scalable

Disadvantages:

  • Expensive
  • Maintenance

Mesh Topology

  • Nodes are interconnected to each other in decentralized manner
  • Each node directly connects to multiple other devices forming a mesh like structure

Advantages:

  • Flexible
  • Scalable

Disadvantages:

  • High cost
  • Complex structure

Types of network:

1. Personal area network (PAN)

  • Small and basic network
  • Uses mobile smartphones as the networking devices
  • Connect devices within an individual space with few meter range
  • Average speed and cost

2. Local Area Network (LAN)

  • Also Simple and basic network
  • Uses router as a networking device
  • Connects within a limited range such as home, school or building
  • High speed and low cost

3. Wide area network (WAN)

  • Spans over a large geographical area, often country or continent
  • Connects multiple LAN or MAN
  • Used by big organizations with multiple location for connecting to the internet
  • Uses satellite links, MPLS (Multiprotocol label switching) for networking

4. Metropolitan area network (MAN)

  • Covers large geographical area than LAN but smaller than WAN, typically covering city or large campus
  • Connects multiple LANs within a WAN
  • Uses fiber optic cables or wireless broadband
  • Used by school, campus and hospital

Types of Networking

1. Peer to Peer Networking (p2p)

  • Each computer, or "peer," acts as both a client and a server
  • No central server or administrator, instead, all peers are equal and communicate directly with each other
  • Peers can perform all the functions of a server and a client, such as requesting data from other peers, providing data to other peers, and performing processing tasks
  • Highly decentralized model

2. Client-Server Network

  • A central server or a group of servers, provide data, resources and services to multiple clients
  • Clients are typically end-users that request services or resources from the server
  • The server processes these requests and sends the required data or services back to the clients
  • This establishes a clear distinction between the service providers (servers) and the service consumers (clients)
  • Servers are dedicated machines that run server software to handle various tasks, such as hosting websites, managing databases, running applications, or controlling network access. Clients use client software to interact with the server and utilize the provided services.

Network Protocols

  • Established set of rules that determine how data is transmitted between different devices
  • Allows to connect and communicate with other users and devices
  • Is the reason we are able to communicate easily all around the world

Commonly used Networking Protocols

1. HTTP

  • Hypertext transfer protocol
  • Defines how data is transmitted over the internet and determines how the web browsers respond to the commands
  • Appears at the beginning of various URLs or web address online

2. SSH (Secure Shell protocol)

  • Provides secure access to a computer, even on an unsecured network
  • Particularly useful for network administrators who need to manage the system remotely

3. SMS (Short message services)

  • Service that allows users all around the world to communicate via text over cell

The key elements to the protocols are:

  • Syntax: Structure or format of the data
  • Semantics: Meaning of each section
  • Timing: Time for sending data

Networking Standards

  • Standard agreed upon rules for data communications

Types:

  • De facto: Rules that are not approved as standard (not approved as a standard)
  • De jure: Approved by the law (official)

OSI model

  • Stands for Open System Interconnection model
  • Developed by ISO (International Standard Organization)
  • Developed to Standardize the functions of a telecommunication or computing system into seven distinct layers for better communication between different systems and networks

Application Layer (Layer 7)

  • Manages human-computer interaction and network services
  • Handles: Services and programs that use the network to transmit and receive data, such as web browsers and email clients
  • Includes protocols like HTTP, FTP, SMTP

Presentation Layer (Layer 6)

  • Formats and encrypts data for the application layer
  • Handles services like compression (reducing data size), encryption (unreadable format so that secure and back to the original format upon receiving)

Session Layer (Layer 5)

  • Manages sessions and authentication between devices
  • Handles services like session establishment, authentication and authorization (Ensuring that connections are secure and that users have permission to access resources)

Transport Layer (Layer 4)

  • Ensures reliable data transfer and manages ports
  • Handles services like managing ports and data segmentation
  • Has protocols like TCP (Transfer Control Protocol) for reliability

Network Layer (Layer 3)

  • Responsible for packet forwarding and routing between different networks
  • Handles traffic control and logical addressing i.e., managing IP addresses

Data Link Layer (Layer 2)

  • Responsible for node-to-node data transfer and error detection
  • Handles MAC Addressing: Uses MAC addresses to identify devices on a local network
  • Error Detection and Correction: Detects and corrects errors from the Physical layer and data formatting

Physical Layer (Layer 1)

  • Responsible for: Transmitting data over a physical medium
  • Handles the transmission and reception of raw binary data

The TCP/IP Model

  • The TCP/IP model combines OSI layers 1&2 (Physical, Data Link) into a single layer 1 (Network Access)
  • Similarly layer 5,6,7 (Application, Presentation, Session) into a single layer 4 (Application)
  • It also renames the network layer (layer 3) into Internet

Layer 1 - Network Access

  • Combines OSI layers 1 & 2 (Physical and Data Link)
  • Handles the physical transmission of data and hardware-level protocols

Layer 2 - Internet

  • Renamed from the OSI Network layer (layer 3)
  • Deals with logical addressing and routing

Layer 3 - Transport

  • Equivalent to OSI layer 4 (Transport)
  • Manages end-to-end communication and data flow

Layer 4 - Application

  • Combines OSI layers 5, 6, & 7 (Session, Presentation, and Application)
  • Handles high-level protocols and user interfaces

Key points to remember:

  • The TCP/IP model is more compact than the OSI model
  • It merges multiple OSI layers into single layers in some cases
  • The "Internet" layer in TCP/IP is essentially a renamed "Network" layer from OSI
  • This model is more closely aligned with how networks actually operate in practice

Addressing in Networks

Addressing refers to process of identifying devices or endpoints within a network.

1. Physical address

  • Known as MAC address
  • Used in NIC, most LAN uses 6 bytes (48 bits), each byte containing two bits, separated by colon
  • Written as 12 hexadecimal digits
  • Example: 07:08:1B:2C:55:7D (6 byte, 2 bits each)
  • Included in Data Link layer

2. Logical address

  • A logical or IP address is used to identify a host or a network interface within a network and across networks
  • It's assigned by software (usually dynamically via DHCP or statically)
  • Logical addresses can change, unlike physical addresses
  • IPv4: A 32-bit address divided into four octets (e.g., 192.168.1.1)
  • IPv6: A 128-bit address

3. Port Address

  • 16 bit address represented by one decimal
  • Port addresses are used to identify specific processes or services on a host within a network
  • They are associated with the transport layer protocols, such as TCP and UDP, and help direct data to the correct application
  • Example: 753

Backbone Network

A backbone network is the central part of a network that interconnects various smaller networks, providing a path for the exchange of information between different LANs, WANs, or subnetworks. It's responsible for carrying the bulk of data traffic across large distances or within a complex network structure.

Key Points:

  • Scalability
  • Centralized Connectivity
  • High Capacity

Types of Networking Devices

a) Router

  • Device that connects different networks and routes data between them
  • Uses IP address to find the best path for the data

b) Hub

  • Connects multiple devices in a network and broadcasts the data to all
  • There is no data filtering, so it may lead to collisions

c) Switch

  • Connects devices and directs data to a specific destination within a network
  • Uses MAC address to reduce collisions

d) Repeater

  • Extends network range by amplifying signals
  • Regenerates weakened signal over long distances

e) Bridge

  • Connects and filters traffic between network segments
  • Reduces traffic by forwarding data only to the correct segment

Types of Transmission Media

a) Twisted Pair Cable

  • Transmits data via copper wires twisted together to reduce interference
  • Inexpensive and widely used for short to medium distances

Types:

  • Unshielded Twisted Pair (UTP): Has ability to block interference. Common in LANs (e.g., Ethernet cables)
  • Shielded Twisted Pair (STP): Uses extra shielding to reduce electromagnetic interference

b) Coaxial Cable

  • Transmits data through a single copper conductor surrounded by insulation and shielding
  • Provides better shielding than twisted pair cables
  • Commonly used in cable TV networks and older Ethernet networks

c) Fiber Optic Cable

  • Transmits data as light pulses through glass or plastic fibers
  • High-speed, long-distance transmission with minimal signal loss

Types:

  • Single-Mode Fiber (SMF): Used for long-distance transmission (e.g., telecom networks)
  • Multi-Mode Fiber (MMF): Used for shorter distances (e.g., within buildings)

d) Wireless

  • Electromagnetic waves that can be transmitted in all directions
  • 3kHz to 1kHz

e) Microwaves

  • Uses microwaves for sending and receiving signals
  • Cheaper

Switching

For large networks, or if very long distance transmission has to take place, it is difficult to do it without any external hardware devices. We need a dedicated path for the data to travel. Since there are many paths to take, we need to select a particular path. Selecting the path on which the data packets will be transmitted is called switching.

1. Circuit Switching

  • A dedicated communication path is established between two devices for the duration of the session
  • The entire bandwidth is reserved for the connection, ensuring consistent data transmission
  • Example: Traditional telephone networks
  • Three phases: Setup, data transfer and teardown phase

2. Packet Switching

  • Data is broken into smaller packets, which are sent independently across the network
  • Packets may take different paths and are reassembled at the destination
  • Efficient use of network resources, as no dedicated path is required
  • Example: The Internet

3. Message Switching

  • Entire messages are sent from one device to another, stored temporarily at intermediate nodes, and then forwarded
  • No dedicated path; messages are sent when a path is available
  • Can lead to delays due to the store-and-forward nature
  • Example: Older telegraph networks

DNS (Domain Name System)

On the Internet, computers identify each other using unique numbers called IP addresses. An IP address (Internet Protocol address) is a unique identifier assigned to each device on a network. Since computers don't understand human language, you might wonder how websites load when you type something into a web browser, like www.youtube.com. This is where DNS comes into play.

If two people speak different languages, they need a translator for effective communication. Similarly, on the Internet, while computers understand IP addresses and numeric values, we are generally more familiar with English and alphabets. DNS acts as a translator between humans and computers.

DNS maps domain names to their IP addresses. For example, DNS maps www.google.com to its IP address, such as 108.177.122.139. So when a user wants to browse and look up Google, instead of remembering the IP address, we can simply use the domain name.

When we type google.com into the web browser, DNS translates it into the web browser's language, which is an IP address, and provides it to the web browser. The web browser then understands that we want to access google.com, so it contacts the Google server and loads google.com on the computer.

Now that we know what DNS is, to understand how DNS works internally, we need to know about DNS servers. Servers are specialized computers or software systems that provide services, resources, or data to other computers or clients over a network. Servers are computers storing HTML files, images, sounds, videos, and other file types. Servers that work together to provide the IP address of the requested website to the web browser are called DNS servers.

Working of DNS

DNS Working in Short:

  1. User Request: You type a domain name (e.g., www.example.com) into your browser
  2. DNS Query: The browser checks its cache; if not found, it sends a query to a DNS resolver
  3. Resolver Process:
    • The resolver queries the root DNS server, which directs it to the TLD server (e.g., .com)
    • The TLD server directs the query to the authoritative DNS server for the domain
  4. IP Address Return: The authoritative DNS server provides the IP address for the domain
  5. Connection: The browser uses the IP address to connect to the website's server
  6. Caching: The IP address is cached for faster access in the future

Top comments (0)