# Day 1: Network Devices and Fundamentals

# Networking Fundamentals

## Core Concepts

### What is a Network?

A network is a digital telecommunications system that allows nodes (devices) to share resources and communicate with each other.

### Device Roles

Client

- A device that accesses services or resources provided by another device
- Initiates requests to servers

Server

- A device that provides services, functions, or resources to client devices
- Responds to client requests

Note: Devices are not inherently "client" or "server"—the same device can fulfill either role depending on the context. Example: In a peer-to-peer (P2P) network, all devices act as both clients and servers.

---

## Network Devices by Function

### Switches (OSI Layer 2)

Purpose: Connect devices within a single LAN

Key Characteristics:

- Multiple network ports/interfaces for connecting end hosts
- Operate at Layer 2 (Data Link Layer) of the OSI model
- Enable device-to-device communication on the same local network
- Forward frames based on MAC addresses

What they do NOT do:

- Provide connectivity between different LANs
- Route traffic over the Internet
- Connect networks to the wider world

---

### Routers (OSI Layer 3)

Purpose: Connect multiple networks and route traffic between them

Key Characteristics:

- Fewer network interfaces than switches
- Operate at Layer 3 (Network Layer) of the OSI model
- Forward packets between LANs using IP addresses
- Enable communication across the Internet
- Can connect local networks to ISP networks

---

### Firewalls (OSI Layers 3–7)

Purpose: Control and monitor network traffic to enforce security policies

Key Characteristics:

- Specialty network security devices that filter traffic entering and exiting a network
- Operate at multiple OSI layers depending on filtering sophistication
- Monitor and enforce rules based on traffic patterns, protocols, and applications

Types:

Network-based Firewalls

- Dedicated hardware devices placed at network perimeter (inside or outside)
- Protect entire networks
- Examples: Cisco ASA, Palo Alto Networks, Fortinet FortiGate

Host-based Firewalls

- Software applications running on individual machines
- Protect only that specific device (e.g., Windows Defender Firewall, macOS firewall)
- Examples: Personal computers, servers

Next-Generation Firewalls (NGFW)

- Enhanced firewalls with advanced filtering capabilities
- Include features like:
- Application-layer awareness
- Intrusion prevention
- Deep packet inspection
- User/identity-based policies


---

## Summary Table

<div align="left" dir="ltr" id="bkmrk-device-osi-layer-pri"><table><colgroup><col width="68"></col><col width="87"></col><col width="199"></col><col width="167"></col></colgroup><tbody><tr><td>Device

</td><td>OSI Layer

</td><td>Primary Function

</td><td>Scope

</td></tr><tr><td>Switch

</td><td>Layer 2

</td><td>Connect hosts on same LAN

</td><td>Single LAN

</td></tr><tr><td>Router

</td><td>Layer 3

</td><td>Connect different networks

</td><td>Multiple LANs/Internet

</td></tr><tr><td>Firewall

</td><td>Layers 3–7

</td><td>Control traffic via rules

</td><td>Network or host level

</td></tr></tbody></table>

</div>#   
  
  