Computer Network

Bilalazwar
16 min readJul 2, 2024

--

Full form of COMPUTER: Common Operating Machine Purposely Used for Technological and Educational Research.

What is Internet?

It’s a global network of interconnected computer Networks. This network allows all devices connected to share and receive information's among the networks.

Internet Formation

History of Internet

1960S began internet’s development which was during the cold war between USA & Soviet Union when government researchers were trying to share information with the military. During that period Soviet Union launched the world's first satellite which helped their scientists to gather information's from the space.

The US Department of Defense Created ARPA (Advanced Research Projects Agency) to conduct research and keep the country number one. SO ARPA research agency had many departments and building and wanted to communicate which made it difficult for them, So to solve this issue they created ARPANET(Advanced Research Projects Agency Network) which connected to few researchers across universities. This allowed researchers to share data and resources more efficiently.

MOTIVE OF ARAPANET : ARPANET’s primary purpose wasn’t solely for military information sharing. It aimed to create a communication network that could survive even if parts were destroyed, potentially due to war.

A crucial turning point came with the invention of TCP/IP (Transmission Control Protocol/Internet Protocol). This communication protocol standardized how data travels across networks. This vastly helped in the future growth of interconnection of various networks.

By 1980s many networks started adapting TCP/IP, the foundation for a global Internet was established. ARPANET was the seed that eventually became part of the larger internet, that formed through the interconnection of these independent networks.

WWW

It’s a system of interconnected hypertext documents called web pages. These pages contain links (hyperlinks) that, when clicked, take you to other related pages.

Tim Berners-Lee is credited with inventing the World Wide Web in 1989.

WWW is like a giant network of interconnected web pages. When clicked, take you to other related pages.

Web browser is a tool that helps you navigate and access the information within the WWW.

Before finding WWW in 1970s

  • Users had to interact with the internet though commands like typing code.
  • User needed to know the exact information location when searching for resources.
  • Limited access: separate login procedures for each network
  • web pages were only text based

After finding WWW in 1989

  • Hyperlinks were introduced where users could jump to another related web page.
  • Web pages could include images and even videos, making it easier to understand.
  • URL was introduced to standardize addressing system for web pages, making easier to find specific information.
  • WWW introduced a common language (TCP/IP) and protocols for how information is formatted and transmitted.

ISP

Stands for Internet Service Providers. These are the companies that gives us access to the internet.

Why do we pay for internet connections?

ISPs have to build and maintain the infrastructure that allows us to connect to the internet, which includes things like cables, towers, and data centers. They also have to pay for the bandwidth, which is the amount of data that can be transmitted over their network at a time. Think of it like paying a toll to use a highway.

https://www.submarinecablemap.com/

Tier 1, tier 2 and tier 3 of ISP or internet service providers

Tier 1

  • They are on the top of the hierarchy of ISP’s. They are massive and high-speed backbones that connects directly between other countries using Fiber Optic cables under the oceans. Between same Tier 1, they exchange internet traffic directly with each other at no cost, in a mutually beneficial agreement.

Tier 2

  • Tier 2 ISPs are service providers who connect between Tier 1 and Tier 3 Internet service providers.
  • They are regional or country based.
  • These ISPs do not cover the entire globe but still they need to reach a bigger network to allow a signal to reach to any place on Earth. Tier 2 ISPs buy services from Tier 1 ISPs which own intercontinental cables.

Tier 3

  • Tier 3 ISPs are closest to end users and help them to connect to the Internet and charge them for their services. These ISPs work on purchasing models and they pay a cost to Tier 2 ISPs based on traffic generation.
  • Many smaller local internet service providers (ISPs) operating in specific towns or cities. These providers would rely solely on purchasing transit from Tier 1 or Tier 2 ISPs to offer internet access to their customers.

DNS

Domain Name System. It translates human-readable website addresses (like google.com) into machine-readable IP addresses (like 142.250.184.196). This is because computers communicate using IP addresses, but remembering long strings of numbers for every website you visit would be impossible!

We cannot buy a domain, we can only rent that domain.

Without storing every domain related data into one database it divide into these 3.

Root servers do store the IP addresses of the authoritative DNS servers for each Top-Level Domain (TLD). This Root server is managed by ICANN

  • When we visit a website for the first time it will store the IP address in our computer. So when we type a website it will always check in the cache first in our computer.
  • Then if not there it will check the Local DNS Server which is the ISP stores all the websites we visited ip address there. Even we go through incognito.
  • If not able to find in the local DNS server also then it will check in ROOT SERVER. and gives the TLD server address( like if the website is .com .lk it will give that servers address)
  • IF not there also the it will check in Top Level Domain Server.

Root Server Technical Operations Association (root-servers.org)
Internet Corporation for Assigned Names and Numbers (ICANN)

DNS resolvers are typically managed by the ISP or by large companies that provide public DNS resolution services.

  • No Cache Match: Browser cache and local DNS server don’t have the IP address.
  • Local DNS Takes Charge: Your ISP’s local DNS server starts the resolution process.
  • Iterative Resolution (Likely): Local DNS server asks other DNS servers for help, eventually reaching a resolver.
  • Resolver Points to TLD Server: Resolver might know the TLD server responsible for “.com” domains.
  • TLD Server Provides Direction: The “.com” server identifies the authoritative DNS server for new-website.com.
  • Local Server Contacts Authoritative DNS for new-website.com: Local DNS server queries the authoritative server for new-website.com.
  • IP Address Retrieved: Authoritative server for new-website.com provides the actual IP address.
  • Local Server Caches and Responds: Local DNS server caches the IP and relays it to your computer.
  • Your Computer Connects: With the IP address, your computer connects to the website.

IP Address — internet protocol

ISP are the ones who assigns us the IP addresses.

THERE are 2 versions of IP addresses.

  • IPv4
    — 32 bits length.
    — 4.3 Billion unique IP address
  • IPv6
    — 128bits length.
    —3403 Trillion unique IP address

PUBLIC Ip Adress — Unique across the entire internet.
PRIVATE Ip Address — Unique within the network only.

Every time we connect our mobile to the Internet a new PUBLIC IP address is assigned whatever that are free.

Then For router the ISP assigns a Public Ip address. Then the router assigns for each connected device a dynamic Private IP Address.

Firewall

Have software and hardware firewall.

A firewall is a network security system that monitors and controls incoming and outgoing traffic based on predetermined security rules. It acts as a barrier between a trusted network, like your home network, and an untrusted network, typically the internet.

OSI and TCP/IP MODEL

These both are used to describes how data travels across a network. It’s not a physical implementation, but rather a way of understanding the different stages involved in network communication. OSI and TCP/IP are the most famous models.

Why Should you study these?
These offers a structured way to understand the complex world of network communication. By understanding its layers and functionalities, you can gain valuable insight into how data gets from your device to others across the vast network of the internet.

OSI Model :

Open Systems Interconnection model.

OSI Model Explained | OSI Animation | Open System Interconnection Model | OSI 7 layers | TechTerms (youtube.com)

OSI Model Explained | OSI Animation | Open System Interconnection Model | OSI 7 layers | TechTerms — YouTube

Main Goal: To understand how networking works by dividing communication into seven logical layers.

Developed by: International Organization for Standardization (ISO) in the 1980s.

Why it was introduced:

  • Standardization: To create a common reference model for network communication. This would ensure different vendors’ equipment could communicate seamlessly across networks.
  • Troubleshooting: To provide a structured approach to network troubleshooting. By isolating issues to specific layers, problems could be identified and resolved more efficiently.
  • Education: To offer a foundational framework for understanding network communication for developers, network professionals, and anyone interested in networking concepts.

Layers :

  • Application: Used by network applications like Google chrome, Skype, Outlook. Uses HTTP, HTTPs protocols to do web surfing. There are many other protocols used by the application layer.
  • Presentation: The presentation layer is also called the Translation layer. The data from the application layer is extracted here and manipulated as per the required format to transmit over the network.

Functions of the Presentation Layer are Translation: For example, ASCII to EBCDIC, Encryption/ Decryption, Compression: Reduces the number of bits that need to be transmitted on the network.

  • Session : This layer is responsible for the establishment of connection, maintenance of sessions, and authentication, and also ensures security. It allows two systems to start communication with each other in half-duplex or full-duplex.
  • Transport : responsible for the end-to-end delivery of the complete message. The transport layer also provides the acknowledgment of the successful data transmission and re-transmits the data if an error is found.
    Here data sent from the session layer is broken down into small units called segments. Port number helps to direct to the right application, Sequence Number helps to reassemble segments into correct order to form correct message at the receiver.
    Flow control ensures data isn’t being sent too quick and too slow.
    Error Control helps when data doesnt help the destination transport layers uses automatic repeat request to retransmit the lost or corrupted data.
    Transport layer does two types of service : Connection oriented and connectionless transmission(UDP protocol).
  • Network : Transport layer passes data segments to network layer
    Network layer works for the transmission of the received data segments from one computer to another computer located in different networks.
    Data units in the network is called data packets.
    Logical addressing is done in this layer where senders & receivers Ip address is assigned to each segment to form a data packet
    Responsible for routing data packets across different networks.
    It determines the most efficient path to send data and manages network addresses (like IP addresses).
  • Data Link : This layer receives data-packets from network layer. Data packets includes sender & receivers Ip addresses.
    The main function of Data Link layer is to ensures data arrives at the right destination error-free, paving the way for smooth communication between network devices on the same physical link (like a cable or wireless connection).
    Physical address is done at this layer to form a Frame by adding Mac address of sender and receiver to each data packet.
  • Physical : Physical Layer is indeed responsible for converting digital data (binary format, 1s and 0s) into a physical form suitable for transmission over the chosen network medium.
    Like electrical signals for copper cable, light signal for optical fiber and radio signal in case of air.

TCP/IP

TCP/IP became the practical set of protocols used on the ARPANET and continues to be the foundation of internet communication today.

Main Goal: To create a set of protocols for practical network communication during the ARPANET era.

Developed By : US Department of Defense (DoD) in the 1960s for the ARPANET (ancestor of the internet).

The TCP/IP model, short for Transmission Control Protocol/Internet Protocol, is a four-layer model that forms the foundation of internet communication. It’s a set of protocols that define how data is packaged, transmitted, and delivered across networks. Unlike the OSI model, which is a conceptual framework, TCP/IP is a functional model used in actual network communication. Here’s a breakdown of each layer and its role:

Application : The application layer is used by user applications that pass messages from one computer to another in a network.
For example Google Chrome, Outlook and so on uses application protocols to perform their activities. For example, web browsers use HTTP or HTTPS to do web surfing.

Transport : Receives messages form the application layer. Once the message reaches the transport layer, one of the transport layer protocols, TCP or UDP, is selected.
TCP supports segmentation. So, if the message is large, TCP divides it into smaller pieces and adds a header to form a TCP segment.
UDP doesn't support segmentation, So the applications using UDP should send messages short enough to fit into one UDP datagram.

Network : The transport layer passes TCP segments or UDP datagram to the Network Layer. The network layer adds logical addresses or IP to the TCP segments or UDP datagram to form a IP Packet. Then use routers to send IP packets to other networks. Main functions of this layer are Logical Addressing and path determination.

Data Link : adds a header and a trailer to the IP packet received from the network layer. The header contains the MAC addresses of the sender and receiver. The trailer contains 4 bytes of error checking data used to detect errors in the received Ethernet frame.

Physical Layer : converts binary data received from data link layer to signals to transmit.

NIC

Network Interface Card. It is a hardware component present in our computer used to connect and share data among computers.

NIC is a must for a device that want to connect to the internet.

Has wired and wireless NIC.

NIC Card

Networking Devices

  1. Repeater
    This acts like a signal boosting device. Where it receives a weak network signal, boost it, and transmits it further.

2. Hub
This device is used to connect multiple devices on a network.
This broadcasts data to all connected devices.

3. Switch
This also is used to connect multiple devices on a network.
This sends data only to the intended recipient device.

4. Bridge
It is used to connects similar networks.

5. Router
Its a device that establishes LAN network by connecting devices & facilitates data sharing between the connected devices

and also sharing and receiving on the internet. For the router to connect to the internet the device should have a ISP.

6. Gateway
It is used to connects to another network. For instance, your home router might act as a gateway to the wider internet.
Its a device that works like a
interpreter for your network, allowing communication between different networks that speak different languages (protocols). It translates data so devices on separate networks can understand each other.

7. Modem
Modems actually convert the signal from analog to digital, not the other way around.
It translates the signal from your Dialog mobile network (4G) into a digital format that your devices can understand. This allows you to access the internet through your mobile provider’s cellular network.

Protocols

  • It is a set of rules or standards that define how devices communicate with each other.
  • It establishes a common language for data exchange, ensuring that devices from different manufacturers or running different software can understand each other.

Protocols govern various aspects of communication, including:

  • Data format: How data is structured (e.g., text, binary) and packaged for transmission.
  • Error handling: Procedures for detecting and correcting errors that might occur during data transmission.
  • Synchronization: Techniques for ensuring devices stay in step during data exchange, preventing data loss or corruption.
  • Security: Mechanisms for protecting data from unauthorized access or modification.

Here are some common protocols in brief:

  • Internet: TCP/IP (data transfer on the internet), HTTP (web browsing), HTTPS (secure web browsing)
  • Communication: FTP (file transfer), SMTP (email), SSH (secure remote access)
  • Networking: Ethernet (wired network), WiFi (wireless network), Bluetooth (short-range wireless)

Cookies

Cookies are small pieces of data that websites store on your device (computer, phone, tablet) when you visit them. They act like a little note reminding the website about you and your preferences.

Examples of Cookies:

  • A social media site remembering you’re logged in.
  • An e-commerce site remembering items in your shopping cart.
  • A news website tailoring content based on your location or reading history.

What if No Cookies?

  • You might experience a less personalized browsing experience.
  • You may need to log in more frequently on websites.
  • Targeting ads might be less relevant since websites can’t track your browsing behavior.

Types of Cookies:

  1. Session Cookies: Temporary cookies that disappear when you close your browser. (e.g., keeping you logged in while browsing a site)
  2. Persistent Cookies: Remain on your device for a set period (days, weeks, or even years) until they expire or you manually delete them. (e.g., remembering your site preferences)
  3. First-Party Cookies: Set by the website you’re visiting directly.
  4. Third-Party Cookies: Placed by a different domain than the website you’re visiting. These are often used for tracking and advertising purposes.

When was internet Found?

  • The internet’s roots go back to the 1960s with ARPANET, but 1983 is often called its “birthday” due to the adoption of TCP/IP.

World’s first Web site

https://info.cern.ch/hypertext/WWW/TheProject.html

What was the main reason ARPA built ARPANET?

  • ARPA funded research at various universities and institutions. The challenge was that researchers were geographically separated and had difficulty sharing data and collaborating efficiently due to the limitations of existing communication methods.

What is TCP/IP?

  • TCP/IP stands for Transmission Control Protocol/Internet Protocol. It’s a set of rules that define how data is formatted, transmitted, and received over networks like the internet.

Before & After TCP/IP

  • Different networks used their own communication protocols, like different languages.
  • Computers on these networks couldn’t understand each other, making it impossible to share information or communicate.
  • TCP/IP standardized the way data is communicated across networks. It’s like a common language that all computers can understand.
  • With TCP/IP, data is broken down into packets, sent over the network, and then reassembled at the receiving computer.
  • TCP/IP ensures reliable data transmission by checking for errors and guaranteeing delivery.

Difference between Internet & WWW

  • Internet: Big web of connected devices, like a highway system for information.
  • WWW: A giant collection of information pages on the internet, like stores in a mall you can access with a web browser (your car).

The internet is bigger and came first. The WWW is a way to access information on the internet.

Difference between URI and URL

  • URI (Uniform Resource Identifier)
    — A general identifier for any resource. It can be a name, number, or local path, not necessarily specifying location. (e.g., ISBN number for a book)
  • URL (Uniform Resource Locator)
    — A specific type of URI that provides the address (location) for accessing a resource on the internet.
    https://www.google.com (URL for the Google homepage)

Worlds first Search engine?

  • Archie. Created in 1990.

Difference between Web Browser and Search Engine

  • Web Browser : We Enter the (URL) and it displays the website.
  • Search Engine : Helps us find information using Keywords and suggests us websites.

Difference between Moderm, Router & Wi-Fi ?

  • Modem: Your Dialog 4G router receives the cellular signal from the Dialog network (your ISP). It translates this signal into a digital format that your devices can understand.
  • Router: The same router then takes this converted digital signal and directs it to your devices. It can do this in two ways:

Wired Connection: You can connect devices directly to the router using an ethernet cable for a stable and faster connection.
Wireless Connection (Wi-Fi): The router also has a built-in Wi-Fi transmitter that creates a wireless network. Your devices (laptops, phones, tablets) can connect to this Wi-Fi network to access the internet.

  • Wifi explained in the above sentence.

TCP vs UDP?

TCP (Reliable Delivery Service):

  • Strengths: Guaranteed in-order delivery, error checking, congestion control.
  • Weaknesses: Slower due to extra checks.
  • Use cases: File transfers, web browsing, email, secure communication (HTTPS, SSH).

UDP (Fast Mail Service):

  • Strengths: Faster, connectionless operation.
  • Weaknesses: No guaranteed order or delivery, error prone.
  • Use cases: Live streaming, online gaming, VoIP calls.

Difference between Data segments & Data packets

Data Segments

  • Created by the Transport Layer protocol.
  • Represents a portion of the original application data (e.g., a file, email message).
  • Includes header information (source and destination port numbers, sequence number for in-order delivery)

Data Packets

  • Created by the Network Layer protocol.
  • Fixed size (e.g., 1500 bytes).
  • Includes header information for routing (source and destination IP addresses) on top of the data segment or other data.
  • Carries the data segment (or other data types) along with additional routing information.

Difference between TCP & IP?

  • TCP — Ensures reliable data delivery. It acts like a careful delivery person who.
  • IP — Handles addressing and routing data packets. It acts like the post office that

how device find which app requested for the message?

  • IP — says which device we are working with.
  • Port tells which application we are working with.
  • Ephemeral PortA temporary port dynamically assigned for outgoing client communication. Since it allows multiple applications (like Chrome with different tabs/windows) to communicate with servers simultaneously without conflicts. and find who made request.

--

--