Computer Science Unleashed, Chapter 1: Connections
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:
- Connect computers to form networks,
- Integrate networks using the Internet Protocol,
-
Identify recipients via their Internet addresses,
- Determine routes across the Internet,
- Transmit data between applications.
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.
1.1 Network Links
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.
Shared Links and Their Challenges
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.
MAC Addresses and Their Implications
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.
Frames and Error Detection
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.
1.2 The Internet Layer
The internet layer (or network layer) handles communication between indirectly connected computers. Routers, with multiple network interfaces, relay messages between networks.
Local and Wide Area 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.
Interconnection: Transit and Peering
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.
Routing and Location Addressing
Routers forward messages across networks. Unlike physical addresses, which are location-agnostic, the Internet Protocol uses hierarchical addresses to guide message routing.
Internet Protocol (IP)
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.
1.3 IP Addressing
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 and RIRs
IANA delegates IP address allocation to five RIRs, each responsible for a geographic region. Organizations request prefixes from their regional RIR.
Internet Service Providers (ISPs)
ISPs provide Internet access to individuals and organizations, allocating IP addresses and managing connectivity.
1.4 IP Routing
Routers use tables to determine the next hop for each IP packet. The IP address hierarchy simplifies routing decisions.
Internet Exchange Points (IXPs)
IXPs facilitate efficient peering between networks.
Internet Backbone and Tier-1 Networks
Tier-1 networks form the Internet's backbone, interconnecting regional ISPs.
Dynamic Routing
Dynamic routers exchange routing information, adapting to link changes and ensuring optimal routes.
Routing Loops and Hop Limit
Routing loops are prevented using the hop limit field in IP packets.
Diagnostics and ICMP
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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The other day, I spotted this particularly lovely bit from Corey Ginnivan’s website where a collection of cards stack on top of one another as you scroll.

I see Google Fonts rolled out a new design (Tweet). Compared to the last big redesign, this feels much more iterative. I can barely tell the difference

Have you ever needed a countdown timer on a project? For something like that, it might be natural to reach for a plugin, but it’s actually a lot more

Everything you ever wanted to know about data attributes in HTML, CSS, and JavaScript.

Questions about purple slash areas in Flex layouts When using Flex layouts, you may encounter some confusing phenomena, such as in the developer tools (d...

When the number of elements is not fixed, how to select the first child element of the specified class name through CSS. When processing HTML structure, you often encounter different elements...

At the start of a new project, Sass compilation happens in the blink of an eye. This feels great, especially when it’s paired with Browsersync, which reloads

How to implement Windows-like in front-end development...
