What a network is: hosts, LANs, WANs & topologies
Describe the parts of a network and how LANs, WANs and the internet relate.
By Invicly Tech, , in Computer Networking. About 11 minutes to read.
In short
A network is a set of devices, called hosts, connected by links so they can exchange data. Switches connect hosts inside a local area network, and routers connect networks to each other, forming wide area networks and ultimately the internet. Bandwidth, latency and throughput describe how well a network performs.
Think of it like this: Switches are the streets inside a town; routers are the motorway junctions between towns.
Explained simply
A network is simply two or more devices joined together so they can share data. Each device that sends or receives data is called a host: your laptop, your phone, a printer or a server in a data centre. The path between two devices is a link, which can be a cable, a fibre or a radio signal like Wi-Fi.
Inside a home or office, hosts plug into a switch (or connect to a Wi-Fi access point). The switch passes data between local devices. That local group is a LAN, a local area network. To reach anything outside, such as a website, traffic goes to a router, which connects your LAN to other networks.
When networks in different cities or countries are joined, we call it a WAN, a wide area network. The internet is a huge collection of networks run by thousands of companies and internet service providers (ISPs), all agreeing to pass traffic for each other.
Three numbers describe how good a network feels. Bandwidth is how much data a link could carry per second, like the width of a pipe. Latency is how long one piece of data takes to arrive, like the length of the pipe. Throughput is what you really get, which is almost always less than the bandwidth.
Press Play on a diagram to walk through it one step at a time.
- 1Internet
Thousands of networks run by ISPs and companies.
- 2WAN link
ISP connection from your site to the wider world.
- 3Router
Moves packets between networks.
- 4Switch / access point
Connects local hosts in the LAN.
- 5Hosts
Laptops, phones, servers, printers.
- PAN
- Personal area network
- Bluetooth headset and phone
- LAN
- One home, office or floor
- Ethernet and Wi-Fi
- MAN / campus
- Several buildings in one city
- Often fibre between buildings
- WAN
- Sites in different cities
- Leased lines, MPLS, SD-WAN, VPNs
- Internet
- Network of networks
- ISPs joined by BGP
In depth
Hosts, links, switches and routers: who does what
Every network is built from the same few parts. Hosts are the endpoints that create and use data. Links carry bits between two points. A switch joins hosts inside one LAN and forwards data using hardware addresses called MAC addresses. A router joins different networks and forwards data using IP addresses, choosing the next step towards the destination.
Your home router is really several devices in one box: a router, a small switch with four ports, a Wi-Fi access point, a firewall and often a DHCP server that hands out addresses. In an office these are usually separate boxes, which makes them easier to scale and to troubleshoot. Knowing which job each part does tells you where to look when something breaks.
- Switch: forwards inside a LAN, uses MAC addresses
- Router: forwards between networks, uses IP addresses
- Access point: bridges Wi-Fi clients onto the wired LAN
- Home router: router, switch, Wi-Fi, firewall and DHCP in one
Topologies: star, mesh and bus
Topology means the shape of the connections. Old Ethernet used a bus: every host tapped into one shared coaxial cable, so a single break took everyone down and only one host could talk at a time. Modern LANs use a star: every host has its own cable to a central switch. One bad cable affects one host, and the switch lets many pairs talk at once.
A full mesh connects every device to every other device. It is very resilient but expensive: n devices need n(n-1)/2 links, so 10 sites need 45 links. Real WANs and data centres use a partial mesh, adding just enough extra links that no single failure cuts anyone off.
- One shared cable
- Only one sender at a time
- One break stops everyone
- Mostly historic
- Each host cabled to a switch
- Many conversations at once
- One bad cable hits one host
- Standard for LANs
- Many paths between nodes
- Survives link failures
- Full mesh needs n(n-1)/2 links
- Used for WAN and core links
Where latency really comes from
Latency is the sum of four delays. Propagation delay is the time the signal takes to travel; light in fibre covers about 200 km per millisecond, so London to New York (about 5,600 km) costs roughly 28 ms one way before anything else. Transmission (or serialization) delay is the time to push all the bits onto the wire: a 1500-byte packet takes 12 microseconds at 1 Gbps but 1.2 ms at 10 Mbps. Processing delay is the time a device spends reading headers. Queuing delay is the time a packet waits in a buffer behind other packets.
On a quiet network, propagation dominates and you cannot beat physics. On a busy network, queuing grows fast, which is why a congested home link can push ping times from 20 ms to 300 ms.
- Step 1Processing
Device reads headers and picks a port
- Step 2Queuing
Packet waits behind others in a buffer
- Step 3Transmission
Bits are pushed onto the link
- Step 4Propagation
Signal travels about 200 km per ms in fibre
Bandwidth, throughput and the bandwidth-delay product
Bandwidth is the raw line rate, such as 1 Gbps. Throughput is the useful data rate you measure, and it is always lower: headers take space, other users share the link, and protocols like TCP need time to speed up. On a 1 Gbps Ethernet link a single TCP transfer tops out around 940 Mbps of real data because of header overhead.
Latency and bandwidth also interact. The bandwidth-delay product says how much data must be in flight to keep a link full: bandwidth multiplied by round-trip time. A 100 Mbps path with 50 ms RTT needs 100,000,000 x 0.05 = 5,000,000 bits, about 625 KB, in flight. If the sender or receiver allows less than that, throughput falls no matter how fast the link is.
- Units: network speeds use bits (Mbps), file sizes use bytes (MB)
- 8 bits = 1 byte, so 100 Mbps is at most 12.5 MB/s
- Bandwidth-delay product = bandwidth x RTT
- Measure real throughput with iperf3
Learn it in 4 short steps
About 30m each. Track them with a timer in your plan.
- 1Name hosts, links, switches and routers~30m
- 2Compare LAN, WAN and internet~30m
- 3Compare star, mesh and bus topologies~30m
- 4Explain bandwidth, latency and throughput~30m
Key points
- A LAN covers one site; a WAN connects sites over long distances.
- Star topology, with every host on a central switch, dominates modern LANs.
- Bandwidth is capacity; throughput is what you actually achieve.
- Latency is delay; it matters more than bandwidth for interactive apps.
Key terms
Tap a card to flip it. 0/5 known
Examples
ip addr show # your host's interfaces and addresses
ip route show # default gateway = your router
ping -c 4 1.1.1.1 # latency to a server on the internetWhy the 1 GB download takes longer than you expected
Your plan says 100 Mbps and you download a 1 GB file. Step 1: convert units. 1 GB is about 8,000 megabits. Step 2: divide by the speed: 8,000 / 100 = 80 seconds in a perfect world. Step 3: remove overhead. Headers use about 5 percent, so real TCP data runs near 94 Mbps, giving about 85 seconds. Step 4: share the link. If someone else is streaming 25 Mbps of video, you get roughly 70 Mbps, and the download takes around 115 seconds. Step 5: measure instead of guessing, using iperf3 against a server you control.
# on the server
iperf3 -s
# on the client: 10-second test, then the reverse direction
iperf3 -c 203.0.113.10 -t 10
iperf3 -c 203.0.113.10 -t 10 -RTelling high latency from low bandwidth
Users say a cloud app feels slow. Step 1: ping the server. An average of 180 ms means every request and reply costs at least 180 ms, so a page that needs 10 sequential requests waits almost 2 seconds even on a fast link. Step 2: run a throughput test. If iperf3 shows 300 Mbps, bandwidth is not the problem. Step 3: conclude the issue is latency, which you fix by moving the server closer (another region or a CDN) or by making fewer round trips, not by buying a bigger line.
ping -c 10 app.example.com # look at avg and mdev
mtr -rwc 50 app.example.com # where along the path delay appearsQuick reference
- Switch = inside a LAN (MAC addresses); router = between networks (IP addresses)
- Star topology: every host on its own switch port; the LAN standard
- Full mesh of n nodes needs n(n-1)/2 links
- Light in fibre: about 200 km per ms, so 1,000 km adds about 5 ms one way
- 100 Mbps = 12.5 MB/s at most; divide bits by 8 to get bytes
- Bandwidth-delay product = bandwidth x RTT = data needed in flight
- ip route shows your default gateway; ping shows round-trip latency
Quick quiz
Pick an answer to see if you're right and why.
Practice exercises
Try each one yourself first. Use the hint if you get stuck, then compare with the solution.
- Exercise 1easy
Find your own IP address, your default gateway and your round-trip time to 1.1.1.1.
- Exercise 2medium
A 500 MB backup must cross a 20 Mbps WAN link. Estimate the minimum time, then a realistic time with 5 percent overhead and the link 50 percent busy with other traffic.
- Exercise 3hard
A TCP receiver allows at most 64 KB in flight. What is the best possible throughput across a path with 80 ms RTT? How big must the window be to fill a 200 Mbps link on that path?
Check yourself
Answer in your head, reveal, then be honest with yourself.
Feel confident about this topic?
Frequently asked questions
- Is Wi-Fi the same as the internet?
- No. Wi-Fi is just the radio link between your device and your access point inside your LAN. The internet is reached through your router and your ISP, so Wi-Fi can work perfectly while the internet is down.
- What is a good latency?
- Inside a LAN, under 1 ms. Within one country, usually 5 to 30 ms. Across an ocean, 70 to 150 ms. For gaming and video calls, under about 50 ms feels smooth.
- Why is my download speed in MB/s much lower than my plan in Mbps?
- Plans are sold in megabits per second, while downloads are shown in megabytes per second. Divide by 8: a 100 Mbps plan gives at most about 12 MB/s.
- What is the difference between a modem and a router?
- A modem converts your ISP's signal (cable, DSL or fibre) into Ethernet. A router then connects your LAN to that link and forwards traffic between them. Many ISP boxes combine both.