Networking Basics
Networking Basics
I. Networking Basics
What is Networking?
II. IP Addressing
What is an IP Address?
An IP address is a unique identifier for a device on a network, like a postal address for your
home. It ensures that data sent over a network reaches the correct destination.
Types of IP Addresses:
1. IPv4: A 32-bit address, e.g., 192.168.1.1. It’s simple but limited in number.
2. IPv6: A 128-bit address, e.g., 2001:0db8:85a3::7334. Supports a massive number of
devices and includes built-in security features.
TCP ensures reliable delivery of data by establishing a connection before data is sent. It’s like
sending a package with a tracking number.
UDP is faster but less reliable than TCP. It doesn’t confirm whether data is received, making it
ideal for real-time applications.
1. IP (Internet Protocol)
Purpose: Routes data packets between devices.
Example: IPv4, IPv6 addresses.
Cybersecurity Concern: IP spoofing attacks.
2. ICMP (Internet Control Message Protocol)
Purpose: Sends error and diagnostic messages.
Example: Ping command.
Cybersecurity Concern: Exploited in DDoS attacks.
NAT allows multiple devices on a private network to share a single public IP address for
internet access.
Example: Your home Wi-Fi router uses NAT to let your laptop, phone, and TV connect to
the internet using one public IP.
Cybersecurity Relevance: NAT hides internal IP addresses, adding a layer of security.
1. Router
2. Switch
3. Firewall
Purpose: Provides wireless connectivity to devices like laptops, phones, and tablets.
Security Concern: Weak passwords or insecure configurations can allow unauthorized
access to the network. Using WPA3 encryption is recommended for stronger security.
Purpose:
IDS: Monitors network traffic for suspicious activity and sends alerts when malicious
patterns are detected.
IPS: Acts as a proactive version of IDS, actively blocking malicious activity based on
real-time detection.
Security Role: Both systems enhance network security by detecting and preventing
attacks like malware, unauthorized access attempts, and traffic anomalies.
1. Use Encryption:
Ensure sensitive data is encrypted in transit (e.g., HTTPS, IPsec, VPNs) to prevent
eavesdropping or interception by attackers.
2. Apply Strong Authentication:
Use multi-factor authentication (MFA) for accessing critical systems and networks to
enhance security.
3. Monitor Network Traffic:
Continuously monitor network traffic using tools like Wireshark or network monitoring
systems (NMS) to detect anomalies or suspicious activity.
4. Segment Networks:
Implement Virtual Local Area Networks (VLANs) or subnets to isolate sensitive systems
and limit the impact of an attack.
5. Regularly Patch Devices and Software:
Apply security patches and updates to network devices, servers, and applications to fix
vulnerabilities before they can be exploited by attackers.
6. Use Firewalls and IDS/IPS:
Deploy firewalls to filter traffic and IDS/IPS to detect and prevent malicious activities.
Ensure that these systems are regularly updated and properly configured.
7. Implement Access Control:
Limit user access to only the systems and data they need to do their job. Apply the
principle of least privilege and use role-based access control (RBAC) wherever possible.
8. Backup Critical Data:
Regularly back up important data and store it securely to avoid data loss in case of an
attack, like ransomware.
9. Educate Users:
Provide regular cybersecurity training to employees or network users about the risks of
phishing, social engineering, and other threats.
10. Secure Wireless Networks:
Use strong encryption (e.g., WPA3) for Wi-Fi networks and avoid default credentials to
secure wireless communication from unauthorized access.
1. What is the OSI Model, and can you explain each layer in detail?
Explanation: IPv4 has 32-bit addresses, which provides about 4.3 billion unique
addresses. IPv6, on the other hand, has 128-bit addresses, providing an almost infinite
number of addresses (340 undecillion). IPv6 is designed to address the exhaustion of
IPv4 addresses.
Real-time Scenario: As the number of devices connected to the internet increases (think
IoT devices, smartphones), IPv4 addresses are being exhausted. This is where IPv6 comes
in, allowing devices like smart refrigerators, wearables, and sensors to get unique IP
addresses.
3. What is the function of a router and how does it differ from a switch?
Explanation: A router connects multiple networks and routes data between them using IP
addresses, while a switch connects devices within the same network and uses MAC
addresses to forward data.
Real-time Scenario: In a small office, the router connects the local network to the
internet. A switch within the office allows employees’ computers to communicate with
each other. The router ensures data sent from the internet reaches the appropriate
computer.
4. Can you explain what NAT (Network Address Translation) is and how it
works?
Explanation: NAT allows multiple devices on a local network to share a single public IP
address when accessing the internet. It translates private IP addresses into public ones
and vice versa.
Real-time Scenario: In a home network, all devices (laptops, phones, etc.) use a single
public IP provided by the ISP. The router uses NAT to distinguish between devices,
ensuring requests go to the correct device. Without NAT, every device would need a
unique public IP.
Explanation: DNS (Domain Name System) converts human-readable domain names (like
www.google.com) into IP addresses. It works like a phonebook for the internet.
Real-time Scenario: When you type a website name into your browser, your device
contacts a DNS server to resolve the domain into an IP address, and then it connects to
the website. Without DNS, you’d need to remember the IP addresses of every website.
6. What is ARP and how does ARP spoofing work?
Explanation: A VLAN (Virtual Local Area Network) divides a physical network into multiple
logical networks. It isolates traffic, improving performance and security.
Real-time Scenario: In an organization, the finance department can be placed on its own
VLAN to restrict access to sensitive financial data from other departments like marketing,
enhancing security.
10. Can you explain the difference between HTTP and HTTPS?
Explanation: HTTP is an unencrypted protocol for transferring data, while HTTPS (HTTP
Secure) uses SSL/TLS encryption to secure communication, ensuring data integrity and
confidentiality.
Real-time Scenario: When you log into your online banking account, HTTPS encrypts the
communication, protecting sensitive information like passwords and bank details from
being intercepted.
Explanation: A firewall filters incoming and outgoing traffic based on security rules,
blocking unauthorized access and potential threats.
Real-time Scenario: In a corporate network, the firewall prevents external attackers from
accessing internal systems. It also blocks access to untrusted websites or ports that are
known to be associated with malware.
Explanation: An IDS (Intrusion Detection System) monitors network traffic for suspicious
activity and alerts administrators. An IPS (Intrusion Prevention System) goes a step
further by actively blocking malicious activity.
Real-time Scenario: An IDS might alert a network admin if it detects unusual traffic
patterns, such as a potential DDoS attack. An IPS would automatically block the
malicious IP address to prevent further damage.
14. What are some common port numbers and their associated protocols?
Explanation:
Port 80: HTTP (Web traffic)
Port 443: HTTPS (Encrypted web traffic)
Port 21: FTP (File Transfer Protocol)
Port 22: SSH (Secure Shell)
Port 25: SMTP (Email)
Real-time Scenario: A network administrator may monitor port 22 to ensure there’s no
unauthorized SSH access to secure servers. Similarly, if users are having trouble
accessing a website, checking port 80 and 443 might help diagnose the issue.
Explanation: A proxy server acts as an intermediary between a client and the internet,
often used for security, caching, and content filtering.
Real-time Scenario: A company might use a proxy server to control and monitor
employees' internet access, ensuring they are not visiting inappropriate websites or using
excessive bandwidth.
18. What are the types of network attacks and how can they be prevented?