Networks

- Hierarchical organization by proximity:
- SAN (System Area Network): cluster or machine room
- LAN (Local Area Network): building or campus
- WAN (Wide Area Network): country or world
- Internet: interconnected set of networks
- Global IP Internet is the most famous example
Network Hardware
- Hosts contain network adapter to interface with network
- LANs connected by routers to form internets
- Encapsulation: messages packaged into frames as they move through protocol stack
Global IP Internet
- Based on TCP/IP protocol family
- IP (Internet Protocol): host-to-host packet delivery
- TCP (Transmission Control Protocol): process-to-process reliable byte streams
- Accessed via sockets interface
IP Addresses
- 32-bit (IPv4) or 128-bit (IPv6) identifiers for hosts
- IPv4:
struct in_addr { uint32_t s_addr; }
- Dotted decimal notation:
0x8002C2F2 = 128.2.194.242
Domain Name System (DNS)
- Worldwide distributed database mapping between IP addresses and domain names
- Multiple domain names can map to same IP address
localhost always maps to loopback address 127.0.0.1
nslookup: find DNS mappings
Connections
- Point-to-point: connects pair of processes
- Full-duplex: bi-directional data flow
- Reliable: bytes received in order sent
Socket