Unit 5 - Notes
CSE111
Unit 5: Computer Network and Communication
1. Introduction to Computer Networks
A Computer Network is a set of computers connected together for the purpose of sharing resources. The most common resource shared today is a connection to the Internet. Other shared resources can include a printer or a file server.
Key Components of Data Communication
- Sender: The device that initiates the data transmission.
- Receiver: The device intended to receive the data.
- Message: The information (data) to be communicated (text, audio, video).
- Transmission Medium: The physical path by which a message travels (cables, radio waves).
- Protocol: A set of rules that govern data communications (e.g., TCP/IP).
Types of Computer Networks
Networks are categorized based on the geographical area they cover:
- PAN (Personal Area Network):
- Range: Very short (usually within a single room or personal workspace).
- Usage: Connecting personal devices like smartphones, laptops, and wearables.
- Example: Bluetooth connection between headphones and a phone.
- LAN (Local Area Network):
- Range: Limited to a specific location, such as a home, office, or building.
- Usage: High data transfer rates; owned and managed by a single person or organization.
- Example: An Ethernet or Wi-Fi network within a university lab.
- MAN (Metropolitan Area Network):
- Range: Covers a larger geographic area, such as a city or a large campus.
- Usage: Interconnects several LANs.
- Example: Cable television network or city-wide free Wi-Fi.
- WAN (Wide Area Network):
- Range: Spans a large physical distance, such as a country, continent, or the globe.
- Usage: Connects smaller networks (LANs and MANs).
- Example: The Internet is the largest WAN.
2. Network Topologies
Network Topology refers to the physical or logical layout of the network—how the nodes (computers) and links (cables) are arranged.
A. Bus Topology
- Structure: All devices are connected to a single central cable (backbone).
- Terminators: Required at both ends of the cable to absorb signals and prevent reflection.
- Pros: Easy to install; requires less cable.
- Cons: If the main cable fails, the entire network shuts down; difficult to troubleshoot.
B. Star Topology
- Structure: All devices connect individually to a central device (Hub or Switch).
- Pros: Easy to add/remove devices; if one cable fails, only that device is affected; centralized management.
- Cons: Requires more cabling than Bus; if the central hub fails, the network fails.
- Note: This is the most common topology used in modern LANs.
C. Ring Topology
- Structure: Devices are connected in a closed loop. Data travels in one direction (unidirectional).
- Mechanism: Uses "Token Passing" to prevent collisions.
- Pros: No data collisions; performs better than Bus under heavy load.
- Cons: A break in the cable or a failure of one node can take down the whole network.
D. Mesh Topology
- Structure: Every device is connected to every other device (Full Mesh) or many devices (Partial Mesh).
- Pros: High redundancy (if one link fails, data takes another path); secure.
- Cons: Very expensive due to cabling costs; complex installation.
E. Tree Topology
- Structure: A variation of Star topology; has a root node and all other nodes are connected in a hierarchy (Parent-Child).
- Usage: Widely used in WANs.
3. Network Communication Devices
Hardware devices used to connect computers, printers, and other electronic devices to a network.
A. Hub
- Layer: Physical Layer (OSI Layer 1).
- Function: Connects multiple Ethernet devices. It is a "dumb" device.
- Operation: When it receives a data packet, it broadcasts it to all connected ports regardless of the destination.
- Drawback: High traffic collisions; security risks (everyone sees the data).
B. Switch
- Layer: Data Link Layer (OSI Layer 2).
- Function: Connects devices within a network intelligently.
- Operation: Uses MAC addresses to learn which device is connected to which port. It sends data only to the intended recipient (Unicast).
- Advantage: Reduces traffic congestion; more secure than a hub.
C. Router
- Layer: Network Layer (OSI Layer 3).
- Function: Connects different networks together (e.g., connects a Home LAN to the ISP's WAN).
- Operation: Uses IP addresses to determine the best path for data to travel. It maintains a "Routing Table."
D. Modem (Modulator-Demodulator)
- Function: Converts digital signals from a computer into analog signals (for transmission over phone/cable lines) and vice versa.
- Usage: Essential for connecting a LAN to the Internet via an ISP.
E. Access Point (AP)
- Function: Creates a Wireless Local Area Network (WLAN).
- Usage: Connects to a wired router/switch via an Ethernet cable and projects a Wi-Fi signal to a designated area.
4. Client-Server Model
A distributed application structure that partitions tasks or workloads between the providers of a resource or service, called servers, and service requesters, called clients.
- The Client:
- Usually a standard PC, laptop, or smartphone.
- Initiates requests for services (e.g., "Open www.google.com").
- Waits for a response.
- The Server:
- A powerful computer running specific software (OS).
- Listens for requests from clients.
- Processes the request and returns the data (Response).
- Advantages: Centralized control; easier to back up data; scalable.
- Disadvantages: Single point of failure (if the server goes down); expensive hardware/software.
5. Basic Security Threats
Network security involves protecting data from unauthorized access, misuse, or theft. The core goals are the CIA Triad:
- Confidentiality: Keeping data private.
- Integrity: Ensuring data is not altered.
- Availability: Ensuring data is accessible when needed.
Common Threat Vectors:
- Social Engineering: Manipulating people into divulging confidential info.
- DDoS (Distributed Denial of Service): Flooding a network to make it unavailable.
- Man-in-the-Middle (MitM): Intercepting communication between two parties.
6. Malware and its Types
Malware (Malicious Software) is any software intentionally designed to cause damage to a computer, server, client, or computer network.
A. Virus
- Characteristics: Requires a host program to attach itself to (e.g., an .exe file or a Word doc).
- Propagation: Spreads only when the user executes the infected file.
- Damage: Corrupts files, deletes data, or crashes systems.
B. Worm
- Characteristics: Standalone software; does not need a host program.
- Propagation: Self-replicating. It spreads automatically across networks by exploiting vulnerabilities.
- Damage: Consumes bandwidth, slows down networks, and installs backdoors.
C. Trojan Horse
- Characteristics: Disguises itself as legitimate software (e.g., a fake game or antivirus).
- Propagation: Relies on the user to download and install it. Does not self-replicate.
- Damage: Creates "backdoors" for hackers to access the system remotely.
D. Spyware
- Characteristics: Software that runs in the background without user knowledge.
- Function: Gathers information about a person or organization.
- Example: Keyloggers record every keystroke (passwords, credit card numbers).
E. Ransomware
- Characteristics: A type of crypto-malware.
- Function: Encrypts the user's files or locks the system screen.
- Goal: Demands payment (Ransom), usually in cryptocurrency, to provide the decryption key.
- Example: WannaCry.
7. Phishing
A cybercrime in which a target is contacted by email, telephone, or text message by someone posing as a legitimate institution.
- Mechanism: The attacker lures individuals into providing sensitive data (PII, banking/credit card details, passwords).
- Common Signs: Urgency ("Act now!"), poor grammar, mismatched URLs, requests for money.
- Types:
- Spear Phishing: Targeted at a specific individual.
- Whaling: Targeted at high-profile executives (CEOs).
- Vishing: Voice phishing (phone calls).
8. Password Cracking
The process of recovering passwords from data that has been stored in or transmitted by a computer system.
- Brute Force Attack:
- Trying every possible combination of characters until the correct one is found.
- Guaranteed to work eventually but takes a massive amount of time and computing power.
- Dictionary Attack:
- Using a pre-arranged list of words (a dictionary) and common passwords (like "123456" or "password").
- Rainbow Table Attack:
- Using a pre-computed table for reversing cryptographic hash functions (comparing hash values rather than guessing plain text).
9. Multi-Factor Authentication (MFA)
A security system that requires more than one method of authentication from independent categories of credentials to verify the user's identity.
The Three Factors of Authentication:
- Something you know: Password, PIN, answer to a security question.
- Something you have: Smartphone (SMS code), hardware token, smart card.
- Something you are: Biometrics (Fingerprint, Face ID, Retina scan).
- Significance: If a password is stolen, the attacker still cannot access the account without the second factor.
10. User Account Types and Privileges
Operating systems manage security by assigning different levels of access to different users. This follows the Principle of Least Privilege.
A. Administrator (Root/Superuser)
- Privileges: Highest level of control.
- Capabilities: Can install/uninstall software, modify system settings, access all files, create/delete other user accounts.
- Risk: Should not be used for daily web browsing; if compromised, the attacker owns the system.
B. Standard User
- Privileges: Restricted access.
- Capabilities: Can run applications, change personal settings (wallpaper, mouse speed), and save files in their own user folder.
- Restrictions: Cannot install new software or modify critical system files.
- Usage: Recommended for daily tasks.
C. Guest Account
- Privileges: Most restricted.
- Capabilities: Temporary access for someone who doesn't have an account.
- Restrictions: Cannot install software, change settings, or create a password. Files created are usually deleted upon logout.
11. Firewall Basics
A network security device (hardware) or software that monitors and filters incoming and outgoing network traffic based on an organization's previously established security policies.
- Function: Acts as a barrier/gatekeeper between a trusted internal network (Home/Office) and an untrusted external network (The Internet).
- How it works:
- Packet Filtering: Inspects the "header" of data packets (Source IP, Destination IP, Protocol, Port Number).
- Rules: Based on rules (Allow or Deny).
- Example Rule: "Block all incoming traffic on Port 23 (Telnet)."
- Types:
- Host-based: Software installed on a single computer (e.g., Windows Defender Firewall).
- Network-based: Hardware device protecting an entire LAN (often integrated into routers).