Partial preview of the text
Download Networking Fundamental and more Study notes Computer science in PDF only on Docsity!
Introduction to Networking * 1. What is Networking? Networking is the practice of connecting computers, servers, and other devices to share data and resources such as files, internet, printers, etc. + 2. Types of Networks e LAN (Local Area Network): A small network within a home, office, or building. WAN (Wide Area Network): A large network spread over a wide geographical area like the Internet. MAN (Metropolitan Area Network): A network that spans a city or large campus. . Essential Network Devices Router: Connects different networks and routes data between them. Switch: Connects devices in a LAN and forwards data based on MAC addresses. Modem: Converts digital data to analog (and vice versa) for internet connectivity. Access Point (AP): Enables wireless devices to connect to a wired network. Hub (outdated): Broadcasts data to all connected devices regardless of destination. Here are the most important cables used in networking, categorized based on their use and technology: 4 1. Ethernet Cables (Twisted Pair) Used for connecting devices in LAN (Local Area Network) > Types: e Cat5 (Category 5): © Speed: Up to 100 Mbps (Fast Ethernet) o Max Length: 100 meters o Mostly outdated Cat5e (Enhanced): e o Speed: Up to 1 Gbps o Reduced crosstalk and better performance than Cat5 o Still widely used e Caté6: o Speed: Up to 10 Gbps (at shorter distances) o Better shielding and performance © Common in modern setups Cat6a: © Speed: 10 Gbps o Shielded, supports higher bandwidth and longer distances than Cat6 Cat7 / Cats: o For high-performance data centers o Supports 10-40 Gbps speeds o Expensive and less common in homes/offices 4 5. Crossover Cable (Legacy use) e Used to directly connect two computers or two switches without a router e Now mostly replaced by Auto-MDIX in modern switches (auto detect) * Tip: Always choose the cable based on speed requirements, distance, and interference. For typical home or office LANs, Cat6 or Cat6a is a future-proof choice. + 4. OSI Model The OSI model (Open Systems Interconnection) is a 7-layer framework that standardizes how different networking systems communicate with each other. Even though it's not directly used in real-world internet communications (unlike the TCP/IP model), it's extremely important for understanding networking concepts, troubleshooting, and design. ® 1. Physical Layer (Layer 1) This is the lowest layer of the OSI model. What it does: e Deals with the physical medium (cables, connectors, electrical signals). e Transfers raw bits (0s and 1s) over the network. Examples: e Ethernet cables, fiber optics, hubs, network cards e Voltages, pins, and cable types *) Think: “How do bits physically move from one place to another?” ® 2. Data Link Layer (Layer 2) What it does: e Creates frames from raw bits. e Adds MAC addresses to identify source and destination within a local network. e Handles error detection, collision detection, and flow control. Divided into two sublayers: e MAC (Media Access Control): Controls how devices access the medium. @ LLC (Logical Link Control): Manages frame synchronization and error control. Devices that work here: Switches, Bridges “2 Think: “How does my PC talk to another PC on the same LAN?” ® 3. Network Layer (Layer 3) What it does: e Manages routing and IP addressing. e Determines the best path for data to travel across networks. Key Functions: ® 6. Presentation Layer (Layer 6) What it does: e Translates data formats so both the sender and receiver understand it. e Handles encryption, decryption, compression, and data encoding. Examples: e Encoding formats like JPEG, MP4, PDF e Encryption: SSL, TLS ®) Think: “How do we turn raw data into readable, secure content?” ® 7. Application Layer (Layer 7) What it does: Closest to the user. e Provides network services to applications (like browsers, email clients, FTP tools). e This is where users interact with the network. Examples of protocols: @ HTTP/HTTPS (web), SMTP/IMAP (email), FTP (file transfers), DNS * Think: “How do | use the network to browse, email, or download?” & Summary (Layer Mnemonic) From bottom to top: Please Do Not Throw Sausage Pizza Away = Physical, Data Link, Network, Transport, Session, Presentation, Application The OSI model is a conceptual tool, but it's incredibly useful for: “4 Troubleshooting network issues , Understanding where things go wrong ¥4 Explaining how data travels from one app to another across networks * 4.1 TCP/IP Model The TCP/IP model (Transmission Control Protocol/Internet Protocol) is a 4-layer architecture that defines how data is sent and received across networks like the internet. It's more practical and widely used than the OSI model. Every device communicating over the internet uses this model. + 1. Application Layer This is the topmost layer of the TCP/IP model. What it does: e Provides services directly to users or applications (e.g., web browsers, email apps). e \t handles everything the user sees and interacts with. Common Protocols: What it does: e Determines the best path for data to travel. e Assigns and manages IP addresses. e Ensures data packets reach the correct destination, even if they cross multiple networks. Main Protocols: e IP (Internet Protocol): Assigns and handles IP addresses. e ICMP: Used for error reporting and diagnostics (used by ping). e ARP: Maps IP addresses to MAC addresses within local networks. This is the equivalent of the Network Layer in the OSI model. + 4. Network Access Layer (Also called the Link Layer or Host-to-Network Layer) This is the bottom layer and closest to the physical hardware. What it does: Controls how data is physically sent over cables or wireless. e Defines how devices access the medium (Ethernet, Wi-Fi). e Adds MAC addresses to frames and handles framing, addressing, and error detection at the hardware level. Components include: Ethernet, Wi-Fi standards Network Interface Cards (NICs) MAC addressing Switches and hubs e@eee This layer combines the Physical and Data Link layers of the OSI model. = Summary The TCP/IP model consists of: 1. Application Layer — User interaction and services 2. Transport Layer — Reliable or fast data delivery 3. Internet Layer — Routing and IP addressing 4. Network Access Layer — Physical delivery of data Each layer builds upon the one below it to ensure successful and accurate data communication across networks.. + 5. IP Addressing e IPv4 Example: 192.168.1.1 (32-bit address) e IPv6 Example: 2001 :db8: :1 (128-bit address) e Private IP Ranges: 9 192.168.080.080 to 192.168.255.255 o T0.8.0.8 to 10'.255.255.255 o 172 .16..8..8 to 172.31 .259.255 * 6. Subnetting (Basics) Subnetting is the process of dividing a large network into smaller, manageable sub-networks. Example: @ Network: 192.168.1.8/24 gives 256 IPs e Subnet: 192.168.1.8/25 gives 128 IPs ¢ 10. Basic Troubleshooting Tools * 11. Basic Network Security Ping: Check if a device is reachable. Traceroute: See the path data takes to reach a destination. ipconfig (Windows) / ifconfig (Linux): View IP configuration. nslookup: Test DNS resolution. Use firewalls to block unauthorized access. Keep operating systems and firmware updated. Implement VLANs to segment sensitive devices. Use strong Wi-Fi encryption (WPA2/WPA3). Disable unused ports and services. @ |mportant Networking Commands These commands help test, troubleshoot, and diagnose network issues: | Windows/Linux Commands: e ping [IP/hostname] > Tests connectivity to another host >» Example: ping google.com e tracert /traceroute >» Traces the path packets take to reach the destination » Windows: tracert 8.8.8.8 > Linux: traceroute 8.8.8.8 e ipconfig/ifconfig/ip a » Displays IP address and network info > Windows: ipconfig > Linux: ip aorifconfig e nslookup [domain] > Queries DNS to find IP of a domain > Example: nslookup facebook .com e netstat > Shows active connections and listening ports >» Example: netstat -an e@ arp -a > Displays ARP cache (IP-to-MAC address mappings)