This excerpt from Wladston Ferreira Filho's Computer Science Unleashed delves into the foundational technologies powering the World Wide Web. While often taken for granted, these technologies are both crucial and surprisingly accessible. Discover the ingenious engineering that transforms simple computer connections into a global, near-instant, and virtually free communication network.
The digital revolution, fueled by the Internet, has fostered unprecedented global connectivity, impacting economies and politics profoundly. However, most users remain unaware of its inner workings. This chapter empowers you to join the ranks of those who understand and utilize these technologies, teaching you to:
Pre-Internet communication relied on direct physical links. The 1950s saw individual telephones connected directly to central stations, requiring operators to manually connect calls. Long-distance calls involved complex chains of physical connections.
The Internet revolutionized this. Instead of direct physical links, information is relayed step-by-step through interconnected devices to its destination. This eliminates the need for operators and central coordination, allowing many simultaneous connections to share the same wire, resulting in instant, affordable, and accessible global communication.
Modern networking, however, is far more complex than early telephony, employing layered protocols. Let's explore these layers, starting with the most fundamental.
A direct computer-to-computer connection uses a transmission medium: a physical channel (copper wire, fiber optic cable, or airwaves). Each computer possesses a network interface to send and receive signals. Cell phones, for instance, use radio chips and antennas.
These interfaces operate according to rules defined by the link layer. A dedicated link between two computers uses the Point-to-Point-Protocol (PPP), ensuring identification and accurate data exchange.
However, shared media are common.
Office networks often connect computers to a central hub, where signals from one computer are received by all. Home Wi-Fi operates similarly. This shared access presents two key challenges:
COLLISIONS – Simultaneous transmissions lead to interference and data corruption (collisions). This is analogous to a group conversation where voices overlap, making comprehension difficult. Collision avoidance techniques involve transmitting only when the medium is clear and re-attempting transmission after a random delay if a collision occurs. However, high transmission attempts can lead to link saturation, rendering communication ineffective.
PHYSICAL ADDRESSING – In a shared medium, how does a computer identify intended recipients? Each network interface has a unique physical address or hardware address. Transmissions include both sender and recipient addresses, allowing computers to filter irrelevant messages. These unique identifiers are called MAC addresses.
Every network interface (Wi-Fi, Bluetooth, Ethernet) possesses a unique MAC address, assigned during manufacturing. The IEEE coordinates MAC address allocation to prevent duplication. MAC addresses are hexadecimal numbers, with the first half identifying the manufacturer (e.g., Apple). A broadcast address (FF:FF:FF:FF:FF:FF) targets all computers on the network.
The ability to monitor all transmissions (promiscuous mode) allows discovery of hidden networks and potentially interception of data. This highlights the importance of encryption. MAC spoofing, where a malicious actor uses another's MAC address, is a security concern.
Large messages are divided into smaller frames for efficient transmission. WiFi frames typically have a maximum size of 2,346 bytes, while wired networks often use 1,526 bytes. The FCS (Frame Check Sequence) ensures data integrity by comparing calculated and received checksums. A type field indicates how the payload should be interpreted.
The internet layer (or network layer) handles communication between indirectly connected computers. Routers, with multiple network interfaces, relay messages between networks.
Routers enable communication between computers on different networks. Closely located networks interconnected via routers form a Local Area Network (LAN). Connecting distant LANs creates a Wide Area Network (WAN). The Internet is the world's largest WAN.
Internet connectivity can be obtained through transit, a paid service where messages pass through a third-party network. Alternatively, peering allows free message exchange between organizations, often reducing costs.
Routers forward messages across networks. Unlike physical addresses, which are location-agnostic, the Internet Protocol uses hierarchical addresses to guide message routing.
The Internet Protocol (IP) governs message forwarding. An IP packet contains sender and recipient location addresses and the data. Routers forward IP packets based on destination addresses.
IP addresses are 128-bit numbers, typically written in hexadecimal. The routing prefix identifies the organization, followed by the subnet and the interface ID. The IANA (Internet Assigned Numbers Authority) and RIRs (Regional Internet Registries) manage IP address allocation.
IANA delegates IP address allocation to five RIRs, each responsible for a geographic region. Organizations request prefixes from their regional RIR.
ISPs provide Internet access to individuals and organizations, allocating IP addresses and managing connectivity.
Routers use tables to determine the next hop for each IP packet. The IP address hierarchy simplifies routing decisions.
IXPs facilitate efficient peering between networks.
Tier-1 networks form the Internet's backbone, interconnecting regional ISPs.
Dynamic routers exchange routing information, adapting to link changes and ensuring optimal routes.
Routing loops are prevented using the hop limit field in IP packets.
The ICMP (Internet Control Message Protocol) handles error reporting and network diagnostics. Common ICMP messages include time exceeded
, destination unreachable
, packet too big
, and parameter problem
. ICMP also supports informational messages like echo request
and echo reply
used by ping
and traceroute
.
The transport layer, including TCP and UDP, enables applications to utilize IP packets for data exchange. For a deeper dive into these protocols and other web technologies (email, the Web, DNS), explore Computer Science Unleashed. The book also covers data analysis, machine learning, cryptography, and regular expressions.
The above is the detailed content of Computer Science Unleashed, Chapter 1: Connections. For more information, please follow other related articles on the PHP Chinese website!