Networking Fundamentals and Protocols Notes
Communication Fundamentals
- A network can be as complex as devices connected across the Internet, or as simple as two computers directly connected with a single cable, and anything in between.
- Networks vary in size, shape, and function. However, a wired or wireless physical connection alone is not enough to enable communication.
- For communication to occur, a device must know how to communicate; three essential elements are:
- Message, source, or sender: messages come from people or electronic devices that send to other individuals or devices.
- Destination, or receiver: the recipient that receives and interprets the message.
- Channel: the media that provides the pathway over which the message travels from source to destination.
- Communication begins with a message that must be sent from a source to a destination; sending is governed by rules called protocols.
- Protocols are specific to the type of communication method; rules for one medium (e.g., a telephone call) are not the same as those for another medium (e.g., sending a letter).
- Face-to-face communication example: prior to communicating, people must agree on how to communicate (language, message formatting) to ensure understanding; poor sentence structure can lead to misunderstanding.
- Protocols are the rules established to accomplish communication; in both human and computer communication, protocols govern delivery and understanding of the message.
- Protocol requirements include:
- An identified sender and receiver
- Common language and grammar
- Speed and timing of delivery
- Confirmation and acknowledgement requirements
- Computer and network protocols share these traits and also define the details of how the message is transmitted across a network.
- Protocol requirements in networks include:
- Message Encoding
- Message Formatting and Encapsulation
- Message Size
- Message Timing
- Message Delivery Options
Message Encoding and Decoding
- When a computer sends a message to another computer, it encodes the message into a language the receiving computer can understand:
- Convert the message into binary code (0s and 1s).
- Determine the appropriate communication protocol (e.g., internet, local network).
- Send the message through the chosen channel using the selected encoding method.
- Decoding on the receiving end involves:
- Converting the binary code back into its original form using the same encoding method.
- Interpreting data structures such as headers or metadata included in the message.
- Processing the message for its intended purpose (execute a command, display information, etc.).
- Message Formatting and Encapsulation:
- Message formatting defines the structure of the data, including message type, metadata/context information, and the data format.
- The structure varies by protocol (e.g., TCP/IP, HTTP) and can include headers, data fields, and control information.
- Encapsulation adds protocol data layers to the message as it traverses the network, ensuring reliable transmission and proper interpretation by the recipient.
- Example (TCP/IP): data is encapsulated within layers: application layer, transport layer, network layer, and data link layer; each layer adds information such as checksums, sequence numbers, and addressing.
- Why formatting and encapsulation matter: they enable reliable data exchange between devices and applications on a network through a standardized structure.
Message Size
- Message size refers to the amount of data transmitted from sender to receiver and can be measured in characters, bytes, or other units.
- Implications of message size:
- In limited bandwidth or network capacity situations, larger messages require more resources and can lead to slower transmission, higher latency, or performance issues.
- Larger messages may be more vulnerable to errors or data loss on unreliable or congested networks.
- Techniques to manage message size and transmission:
- Data compression
- Breaking messages into smaller packets
- More efficient encoding schemes
- Error correction and recovery mechanisms
- Importance: careful management of size and transmission improves efficiency and reliability of data exchange.
Message Timing
- Message timing refers to the temporal relationship between transmissions; rules of engagement define timing protocols.
- Key considerations for message timing:
- Access Method: determines when a sender may begin sending; collisions require back-off and retry (e.g., two devices talk simultaneously in a shared medium); similar concepts apply to network hosts needing an access method and collision handling.
- Flow Control: governs how much information can be sent and how fast it can be delivered; ensures sender does not overwhelm receiver.
- Response Timeout: if a question is asked and no response arrives within a reasonable time, the sender may retry or proceed with the conversation.
- Common message delivery options in network communication:
- Unicast: a message from one sender to one recipient (point-to-point).
- Multicast: a message from one sender to multiple recipients (one-to-many).
- Broadcast: a message from one sender to all devices on the network (all devices).
- Anycast: a message from one sender to the nearest or most appropriate recipient among a group of potential recipients (often used for load balancing or efficient routing).
- The choice of delivery option depends on network size/complexity, type of communication, and reliability/security requirements.
Network Protocols and Standards
- Protocols and standards are a strict set of rules that enable devices and applications to communicate across networks.
- Organizations and processes develop standards to ensure predictable protocol behavior and interoperability.
- Common standards and protocols cover a wide range of network technologies and applications, including:
- TCP/IP
- HTTP
- FTP
- SMTP
- Ethernet
- WiFi (IEEE 802.11)
- DNS
- Protocols and standards ensure that devices and applications can communicate effectively regardless of location or technology.
Protocol Suites and Industry Standards
- A protocol suite is a set of communication protocols that work together to provide comprehensive network services.
- A protocol suite typically includes multiple layers, each with its own protocols and functions, designed to enable device communication.
- The TCP/IP protocol suite is the most widely used, consisting of two main protocols: Transmission Control Protocol (TCP) and Internet Protocol (IP).
- TCP establishes reliable connections between devices.
- IP handles addressing and routing of data packets across networks.
- Other protocol suites, such as the OSI model, provide a conceptual framework (seven layers), and HTTP/HTTPS suites are used for web communication.
- Industry standards organizations include IEEE and ISO; these standards define technical specifications for networking hardware and software to ensure interoperability.
- Examples of standards and technologies include: IEEE 802.11 (Wi-Fi), IEEE 802.3 (Ethernet), and ISO/OSI.
- The TCP/IP protocol suite is foundational for internet communication and is complemented by a range of application-layer protocols (DNS, DHCP, SMTP, FTP, HTTP, etc.).
- SSL/TLS are SSL/TLS encryption protocols used to secure data transmitted over the Internet.
TCP/IP Protocols and Standards (Application Layer and Beyond)
- Application Layer protocols (examples):
- DNS: translates domain names to IP addresses (e.g., Facebook.com -> 157.240.31.35).
- BOOTP: enables diskless workstations to discover their IP address, BOOTP server address, and a boot file; superseded by DHCP.
- DHCP: dynamically assigns IP addresses to clients at startup (addresses can be reused).
- SMTP: enables clients to send email to a mail server.
- POP3: enables clients to retrieve email from a mail server (downloads to the desktop).
- IMAP: enables clients to access email stored on a mail server.
- FTP: a reliable, connection-oriented file delivery protocol enabling file access and transfer between hosts.
- TFTP: a simple, connectionless file transfer protocol with less overhead than FTP.
- HTTP: rules for exchanging text, images, sound, video, and multimedia over the World Wide Web.
- Transport Layer:
- UDP: enables a process on one host to send packets to a process on another host without guaranteed delivery (no reliable diagram transmission).
- TCP: enables reliable connections with acknowledged transmission and ensures reliability.
- Internet Layer:
- IP: handles addressing and routing of packets; packages messages into packets and supports end-to-end delivery.
- NAT: translates private IP addresses to globally unique public IP addresses.
- ICMP: provides feedback about errors in packet delivery.
- OSPF: Open Shortest Path First, a link-state routing protocol (hierarchical design based on areas; open standard interior routing protocol).
- EIGRP: Cisco-proprietary routing protocol using composite metrics (bandwidth, delay, load, reliability).
- Network Access Layer:
- ARP: resolves IP addresses to hardware (MAC) addresses.
- PPP: encapsulates packets for transmission over a serial link.
- Ethernet: defines wiring and signaling standards for the network access layer.
- Interface drivers: software that controls a network device interface.
Open Standards, Internet Standards, and Organizations
- Open standards: technical standards that are publicly available and usable freely.
- Principles include transparency, consensus-based decisions, royalty-free licensing, and vendor neutrality.
- Examples: TCP/IP, IEEE 802.11 (Wi-Fi).
- Internet standards: define protocols and technologies used for Internet communication; developed by groups such as IETF, W3C, and ISO.
- Core internet standards include TCP/IP, HTTP, DNS, SMTP, and SSL/TLS.
- IEEE: Institute of Electrical and Electronics Engineers
- The world's largest technical professional organization focusing on standards development (IEEE 802.x family, including 802.11, 802.3, 802.1Q, 802.1X, 802.15.4, 802.16).
- Major role in interoperability across devices and technologies.
- OSI model vs TCP/IP model:
- OSI Model: seven layers – Physical, Data Link, Network, Transport, Session, Presentation, Application.
- TCP/IP Model: four layers – Network Interface, Internet, Transport, Application.
- Both models provide frameworks for understanding network communications; OSI is more theoretical, TCP/IP is based on actual internet protocols.
Data Transfers in the Network
- Data transfer involves several steps: data generation, encapsulation, transmission, and de-encapsulation.
- Process:
- Data generation: data created by an application or device.
- Encapsulation: data is formatted into a Protocol Data Unit (PDU) with a header, payload, and sometimes a trailer; header contains source/destination addresses, protocol type, and metadata.
- Transmission: encapsulated data is sent over the network as packets/frames using protocols like TCP/IP, Ethernet, or Wi-Fi.
- De-encapsulation: at the destination, headers are removed to reveal the payload; the destination processes the data.
- Data transfer efficiency and reliability depend on network bandwidth, latency, and chosen protocols; routers, switches, and firewalls manage and direct traffic to optimize delivery and security.
Data Access and Security
- Data access refers to providing authorized users or devices with access to data stored on a network or remote system, while protecting data from unauthorized access.
- Access control mechanisms include:
- User authentication: verifying identity (e.g., username/password; biometrics; multi-factor authentication).
- Access permissions: assigning read/write/full access to users or groups.
- Encryption: converting data into an unreadable format using a key; only authorized users with the key can decrypt.
- Security measures commonly involve firewalls, ACLs, VPNs, and encryption to enforce policies and protect data.
Network Addresses and Addressing
- Network and data link layers carry addresses with different purposes:
- Network layer (IP) addresses are used to deliver IP packets from the source to the final destination on possibly different networks.
- Data link layer (MAC) addresses identify devices on the same network segment and are used to deliver frames between adjacent devices.
- The IP packet contains two IP addresses:
- Source IP address: the IP of the sending device (original source).
- Destination IP address: the final destination on the network.
- Data link layer addresses (MAC addresses) are unique identifiers assigned to NICs by the manufacturer; MAC addresses are 48-bit and typically shown in hexadecimal format.
- When a packet is transmitted, the data link layer header contains source and destination MAC addresses to ensure local delivery; if the destination MAC matches the receiver, the frame is processed; otherwise it is discarded.
Static vs Dynamic IP Addresses and DHCP
- Static IP address:
- Manually assigned by a network administrator and remains fixed unless changed manually.
- Useful for hosting services or remote access relying on a constant address.
- Dynamic IP address:
- Assigned by a DHCP server automatically; addresses can change on each connection or after a lease period.
- Common in home and small business networks to simplify management and reduce IP conflicts.
- Main trade-offs:
- Static: consistent addressing; less flexible and more management overhead in large networks.
- Dynamic: easier administration; reduces IP conflicts; may change across sessions.
Default Gateway (TCP/IP)
- The default gateway connects a local network to a wider network (e.g., the Internet).
- Functionality:
- The gateway routes traffic from the local network to its destination on another network.
- If the destination is on the local network, traffic is forwarded directly to the destination device.
- If the destination is on another network, traffic is forwarded to the next router or gateway along the path to the destination.
- Configuration:
- The default gateway IP address is configured on each device (computers, routers, switches) and is typically provided by the network administrator or ISP.
- Importance: without a default gateway, devices on a local network cannot reach resources outside that network.
Quick Reference: Key Numerical and Structural Details
- OSI model layers: 7 layers (Physical, Data Link, Network, Transport, Session, Presentation, Application).
- TCP/IP model layers: 4 layers (Network Interface, Internet, Transport, Application).
- MAC addresses: 48-bit addresses, typically displayed in hexadecimal.
- Common IEEE standards: IEEEext−802.3 (Ethernet), IEEEext−802.11 (Wi-Fi), IEEEext−802.1Q (VLANs), IEEEext−802.1X (Network Access Control), IEEEext−802.15.4 (Zigbee), IEEEext−802.16 (WiMAX).
- Core DNS mapping example: domain name to IP address like "google.com" to a numeric IP (e.g., 157.240.0.0 family).
- Protocols listed under TCP/IP application layer: DNS, BOOTP, DHCP, SMTP, POP3, IMAP, FTP, TFTP, HTTP.
- Internet standards organizations: IETF, W3C, ISO; open standards emphasize transparency, consensus, royalty-free licensing, and vendor neutrality.
- Security protocols: SSL/TLS for encryption of internet transmissions.