Hosts and addresses

What must be true for two computers to exchange data?

Clientyour laptop192.168.10.77Servera web server203.0.113.10The networklinks and devices in betweenrequest: send me the pagereply: the pageHostany device with an addressAddresssays where to deliver, and where to replyProtocolthe format and rules both ends followA network is devices that can address each other and agree on how to talk.Every device on a network is a host, and each has an address, so data can be delivered to it and a reply can find its wayback. The host that asks is the client; the one that answers is the server. The rules both follow are a protocol.The rest of this course is detail on three questions: how are the bits carried, how is the destination found, andhow is delivery made reliable?

A network joins hosts. Each has an address; a client asks, a server answers, and a protocol is the rules they share.

Network devices

What are the boxes between you and a website?

Your deviceInternetAccess pointjoins Wi-Fi devicesto the wired networklesson 13Switchconnects the devicesof one networklesson 4Routerconnects networks,picks the way outlesson 6Firewallallows or blockstraffic by ruleslesson 14At home, one box does all four jobs. In an office each is a separate device, and there are many of each.Four kinds of device sit between you and a website, and each does one job.A switch moves data between the devices of one network. A router moves data between networks, so it is everynetwork’s way out. An access point is the radio end of the wired network. A firewall decides which traffic may pass.Knowing which job is which tells you where to look when something fails; later lessons open each box in turn.

A switch connects devices in one network, a router connects networks, an access point adds Wi-Fi and a firewall filters traffic.

Network devices · Going deeper · 1 of 2

Which device works at which layer

LayerDevice that works hereIt readsIt decides7 Applicationproxy, web app firewallthe HTTP request itselfallow, block, cache or rewrite it4 Transportstateful firewall, layer 4 balancerports and connection statewhich flows are allowed, which server3 Networkrouter, layer 3 switchthe destination IP addresswhich next hop2 Data linkswitch, access point, bridgethe destination MAC addresswhich port1 Physicalhub, repeater, media converternothing: only voltage or lightnothing: it copies to every portA device is named by the highest layer it reads: a switch reads layer 2, a router layer 3.Units are named by layer too: bits on the wire, frames at layer 2, packets at layer 3, segments for TCP (datagramsfor UDP) at layer 4. When an engineer says “a layer 1 problem” they mean the cable, the optic or the port, and“layer 2” means VLANs, MAC tables and spanning tree. Modern devices often span several layers.

A hub works at layer 1, a switch at layer 2, a router at layer 3, a stateful firewall at layer 4 and a proxy at layer 7.

Network devices · Going deeper · 2 of 2

Switch ports split collisions; router ports split broadcasts

Hub1 collision domain1 broadcast domainSwitch4 collision domains1 broadcast domainRouter6 collision domains2 broadcast domainsEvery switch port is its own collision domain. Every router port is its own broadcast domain.A collision domain (each purple dot) is a stretch of wire where two senders can collide; a hub shares one among all.A broadcast domain is everyone an ARP request reaches; switches pass broadcasts on and routers stop them. VLANs,in lesson 11, split one switch into several broadcast domains without adding a router box.

Each switch port is a separate collision domain. Each router interface bounds a separate broadcast domain.

Traffic types

One sender, and four ways to choose who receives

Unicastone sender to one hostalmost all trafficBroadcastto every host on the linkARP, DHCP Discover; IPv4 onlyMulticastto hosts that joined a group224.0.0.0/4; OSPF, videoAnycastto the nearest of manyone address, many sites; DNS rootOne sender, four ways of choosing who receives: one, all, the members of a group, or the nearest.Broadcasts stop at a router, so the router marks the edge of a broadcast domain. IPv6 has no broadcast at all anduses multicast instead. Anycast gives the same address to servers in many places, and routing delivers each user tothe closest one: that is how the 13 DNS root server names are answered by more than 1,900 sites.

Unicast reaches one host, broadcast every host on the link, multicast a group, and anycast the nearest of many.

Lesson complete

You finished “What a network is”

Nicely done.

Open in a new tab