Network Notes PDF
Document Details
Uploaded by WarmheartedMoscovium5725
Tags
Summary
These notes provide information on networking concepts, including the OSI and TCP/IP models. They cover various layers, protocols, and addressing schemes. The document also touches upon cables and other relevant network components.
Full Transcript
OSI and TCP/IP Models Physical layer (1) - Deals with physical connections (e.g., cables, switches) and signal transmission ( electrical, optical, or radio waves) - Bits - Example Ethernet cables , fiber optics Data link layer (2) - Provides error- free data transfer between two de...
OSI and TCP/IP Models Physical layer (1) - Deals with physical connections (e.g., cables, switches) and signal transmission ( electrical, optical, or radio waves) - Bits - Example Ethernet cables , fiber optics Data link layer (2) - Provides error- free data transfer between two devices on the same network - Handles Frames MAC (media Access Control) addresses and frames - Example Switches, NIC (Network Interface Card) Network layer (3) - Handles routing, logical addressing (IP), and forwarding of packets between networks - Example Routers and IP (IPv4, IPV6) Transport layer (4) - Ensures reliable data delivery (e.g., TCP for guaranteed delivery, UDP for faster but unreliable transfer - Example TCP, UDP and port numbers Session layer (5) - Manages sessions, including initiation, maintenance, and termination of communication between devices - Example Authentication protocols Presentation Layer (6) - Translates data into a format the application can understand (e.g., encryption, compression) - Example SSL (Secure Sockets Layer ) encryption and TLS (Transport Layer Security) Application Layer (7) - Interfaces with user application for data transfer (e.g., HTTP, FTP, DNS) - Example Web browser , email clients **TCP/IP model** 1. Network Interface later - Combines OSI layer 1 and 2 (Physical and Data Link) - Handles MAC addressing, Physical Connections and framing of data 2. Internet Layer - Equivalent to OSI layer 3 (Network) - Responsible for IP addressing and packet routing 3. Transport layer - Matches OSI layer 4 (Transport) - Provides end to end Communication using TCP/UDP Protocols 4. Application Layer - Combines OSI layer 5,6,7 (Session, Presentation , Application - Handles user-facing applications and protocols like HTTP, FTP, and DNS OSI Model TCP/IP Model ------------------------------------- ------------------- Physical, Data Link Network Interface Network Internet Transport Transport Session, Presentation , Application Application Common Ports Numbers and their Application Port Number Protocol/service Description ------------- ------------------ ------------------------------------------------------------------------------- 80 HTTP Standard web browsing (Unencryted) 443 HTTPS Secure Web browsing using SSL/TLC Encrytion 25 SMTP Sending emails (Simple Mail Transfer Protocol) 20/21 FTP File Transfer Protocol **20 for** data transfer **, 21 f**or control commands 53 DNS Resolves domain name into IP addresses Devices and their Corresponding OSI/TCP layer **Device** **OSI Layer(s)** **TCP/IP Layer(s)** ------------------ ---------------------------------------------------------------- ----------------------------- **Switch** Layer 2 (Data Link, MAC-based), Layer 3 (for Layer 3 switches) Network Interface, Internet **Router** Layer 3 (Network, IP-based) Internet **Network Card** Layers 1 (Physical) and 2 (Data Link) Network Interface [IPv4 Address] Length: 32 bits divided into 4 octets (e.g. 192.168.1.1) Structure: Each octect is a decimal value between 0-225 seperated by periods Class A: Range 1.0.0.0-126.0.0.0 Default Subnet Mask 255.0.0.0 Class B: Range:128.0.0.0.0-191.255.0.0 Default Subnet mask 255.255.0.0 Class C Range: 192,0,0,0 -223.255.255.0 Default Subnet mask 255.255.255.0 **Loopback Address:** 127.0.0.1 (used for testing internal systems) [IPV6 Address ] Length: 128 bits, divided into 8 groups of 16-bit hexadecimal values 2001:0db8:85a3:0000:0000:8a2e:0370:7334 Structure: Each group is separated by colons. Leading zeros in groups can be omitted. Consecutive zeros can be abbreviated using :: (once per address Example: 2001:0db8::8a2e:0370:7334 Purpose: Provides a vastly larger address space and supports modern network requirements like auto- configuration **UTP (Ethernet) Cables and Cable Types** **Unshielded Twisted Pair (UTP) Cable:** - **Definition:** UTP is the most common medium used in Local Area Networks (LANs). It consists of pairs of twisted wires that reduce electromagnetic interference (EMI). - **Common Standards:** Cat 5e, Cat 6, Cat 6a. - **Advantages:** - Cost-effective. - Easy to install and maintain. - Compatible with Ethernet standards. **Cable Types:** 1. **Straight-Through Cable:** - **Purpose:** Connects different types of devices (e.g., computer to switch, switch to router). - - **Use Case:** Most common for LAN setups. 2. **Crossover Cable:** - **Purpose:** Connects similar devices (e.g., switch to switch, computer to computer). - - **Use Case:** Rarely used now due to auto-MDIX (automatic detection of cable type). **2) TCP Reliability in Data Transfers** **Transmission Control Protocol (TCP):** - **Reliability Features:** 1. **Error Detection:** Uses checksums to detect corruption in segments. 2. **Acknowledgements (ACKs):** Receiver sends ACKs to confirm receipt of data. 3. **Sequence Numbers:** Ensures data is delivered in the correct order. 4. **Retransmission:** If an ACK is not received, the sender retransmits the data. 5. **Flow Control:** Manages data transmission speed using the sliding window protocol to avoid congestion. Features of ARP, TCP, and UDP Protocol Purpose Features ---------- --------------------------------------------------------------------- --------------------------------------------------------- ARP Resolves IP addresses to Mac address in the same subnet Operates at OSI layer 2/3. Maintains ARP table TCP Provides reliable connection-oriented communication. Reliable ordered delivery. Flow control Retransmission UDP Provides fast connectionless communication for time sensitive data. Unreliable unordered delivery Lightweight. Low overhead **5) Wireless Networks: Infrastructure vs. Ad-Hoc** **Type** **Description** ------------------------- ---------------------------------------------------------------------------- **Infrastructure Mode** Devices communicate through a central Access Point (AP). **Ad-Hoc Mode** Devices communicate directly with each other without an AP (peer-to-peer). **Comparison:** - **Infrastructure Mode:** - Centralized control. - Supports larger networks. - Used in offices, homes. - **Ad-Hoc Mode:** - No central control. - Temporary or small networks. - Used in direct file sharing or gaming setups. **6) APIPA Addresses** **Automatic Private IP Addressing (APIPA):** - **Definition:** A fallback mechanism when a device cannot obtain an IP address from a DHCP server. - **Range:** 169.254.0.0 to 169.254.255.255. - **Purpose:** Allows limited local network communication without DHCP. - **Cause:** DHCP server is unavailable, or the device is misconfigured. **7) Purpose of a Firewall** **Firewall:** - **Definition:** A network security device or software designed to monitor and control incoming and outgoing network traffic. - **Purpose:** 1. **Traffic Filtering:** Blocks or allows traffic based on rules. 2. **Protecting Resources:** Prevents unauthorized access. 3. **Intrusion Prevention:** Identifies and blocks malicious activity. - **Types:** 1. **Packet Filtering Firewall:** Operates at Layer 3 (Network). 2. **Stateful Firewall:** Tracks sessions (Layer 4 - Transport). 3. **Next-Generation Firewall (NGFW):** Adds application-level filtering. **8) Protocols at Layers 3 and 4 of the OSI Model** **Layer** **Protocols** ------------- -------------------------------------------------------- **Layer 3** IP (IPv4, IPv6), ICMP, ARP, RARP. **Layer 4** TCP, UDP, SCTP (Stream Control Transmission Protocol).