Networking: Basics
Overview​
- Networking
- OSI Model
- Overview
- DNS
The internet connects various computing devices globally. When accessing a website from a smartphone or laptop, the connection typically goes through a cellular tower, a router, and then to Internet Service Providers (ISPs). Packets are forwarded through local ISPs to the network hosting the website. Within the company network, packets pass through a link-layer switch to reach the appropriate server.
Routers and link-layer switches are both packet switches responsible for forwarding packets. Routers are primarily used in the network core to connect multiple networks, while link-layer switches are utilized in access networks to connect multiple devices within a single network.
Computer Networking: Top-Down Approach
Domain Name System (DNS) is a decentralized naming system for computers, services, or any resource connected to the Internet or a private network. It translates human-readable domain names (like example.com) into IP addresses (like 192.0.2.1), which computers use to identify each other on the network.
DNS Server Types​
- Authoritative: Stores DNS records for a domain and provides answers to DNS queries about that domain
- Recursive (Resolver): Receives DNS queries from clients and fetches the corresponding DNS records by querying other DNS servers
- Root: First step in resolving a DNS query. It points to the authoritative servers for top-level domains (TLDs) like
.com
,.org
DNS Record Types​
- A (Address) Record: Maps a domain name to an IPv4 address
- AAAA (IPv6 Address) Record: Maps a domain name to an IPv6 address
- CNAME (Canonical Name) Record: Alias of one domain to another (
www.example.com
toexample.com
) - MX (Mail Exchange) Record: Specifies the mail server responsible for receiving email on behalf of the domain
- TXT (Text) Record: Used to associate arbitrary text with a domain. Often used for SPF (Sender Policy Framework) and DKIM (DomainKeys Identified Mail) records
- NS (Name Server) Record: Specifies the authoritative name servers for the domain
- SOA (Start of Authority) Record: Contains administrative information about the domain name, such as the primary name server and the email of the domain administrator
DNS Resolution for Web Browsing​
Process of DNS Resolving IP​
CDN Process​
OSI (Open Systems Interconnection) model is a conceptual framework used to understand and standardize the functions of a telecommunication or computing system.
OSI Model Layer | Visualization | Description | Protocols | Data Format | TCP/IP Model |
---|---|---|---|---|---|
Application Layer | Closest to end users; where most applications reside. Requests data from backend servers without needing to understand data transmission specifics | DNS, HTTP, SMTP, FTP | Sending Data | Application Layer | |
Presentation Layer | Handles data encoding, encryption, and compression for the application layer and prepares data for transmission, such as HTTPS using TLS for secure communications | TLS, SSL | |||
Session Layer | Manages opening and closing of communications between devices and sets checkpoints for large data to avoid full retransmission from the beginning | Sockets | |||
Transport Layer | Manages end-to-end communication between devices. Breaks data into segments at sender's side and reassembles at receiver's side. Implements flow control to prevent congestion | TCP, UDP | Sending Segments, Datagrams | Transport Layer | |
Network Layer (IP logical addressing) | Facilitates data transfer between different networks. Divides segments or datagrams into smaller packets. Finds optimal route to destination using IP addresses (routing) | IP, ICMP, IGMP, IPsec | Sending Packets | Internet Layer | |
Data Link Layer (MAC physical addressing) | Allows data transfer between devices on the same network. Breaks packets into frames confined to local area network | Ethernet, WiFi | Sending Frames | Network Address Layer | |
Physical Layer (cables) | Sends bitstreams over cables and switches. Closely associated with physical connection between devices | Fiber | Sending Bits |
Transfer Process
Linux Kernel