Clarify router and switch roles in internet guide#44442
Clarify router and switch roles in internet guide#44442KirtiRamchandani wants to merge 2 commits into
Conversation
Explain that switches forward within local networks while routers connect separate networks using different addressing layers.
|
Preview URLs (1 page) (comment last updated: 2026-06-15 10:37:52) |
|
Thanks — preview URLs look good; no rendering issues spotted on my side. |
chrisdavidmills
left a comment
There was a problem hiding this comment.
@KirtiRamchandani just one comment on this one; thanks.
|
|
||
| In reality, this leads to many engineering problems. The more switches a packet has to go through, the longer it takes to reach its destination. And you can't have just a tree of switches, because then a single switch failure may disconnect a large portion of devices. To solve this problem, we keep each local network as small as possible, and we connect these local networks using a separate device called a _router_. A router is a computer that knows how to forward messages between networks. The router is like a post office: when a packet arrives, it reads the recipient address and forwards the packet to the right recipient directly, without going through layers of relays. | ||
|
|
||
| Switches and routers do different jobs rather than one replacing the other. On a local network, a switch forwards frames to the correct device using link-layer addresses (MAC addresses). A router connects separate networks and forwards packets between them using network-layer addresses (IP addresses). That is why large internetworks use routers to link many smaller switched local networks instead of trying to scale a single flat switched network indefinitely. |
There was a problem hiding this comment.
This text sounds reasonable, but it still doesn't explain why the IP address and packet system is needed rather than just scaling flat switched networks. It just states what data transmission system the two different device types use.
Also, I wouldn't use the term "internetworks"; from searching, I can see that it is a real term, but I've never heard it before, in 25 years of documenting web technologies. I'd expand it to "interconnected networks" instead.
|
Thanks @chrisdavidmills, that makes sense. My paragraph said switches use MAC addresses and routers use IP addresses, but it did not explain why that helps when you stop scaling one big flat switched network. I will rewrite it to spell out why many small local networks joined by routers works better, and I will swap "internetworks" for "interconnected networks." I might also add a short nod to the IP section below so it does not feel like jargon dropped in early. Pushing an update soon. |
Rewrite the switch versus router paragraph to explain why many small local networks joined by routers works better than one growing flat switched network, use interconnected networks wording, and link forward to the IP address section.
Summary
Clarifies that switches and routers serve different roles when building large networks. Switches forward within local networks using link-layer addresses, while routers connect separate networks using IP addresses.
Testing
prettier --check files/en-us/learn_web_development/howto/web_mechanics/how_does_the_internet_work/index.mdmarkdownlint-cli2 files/en-us/learn_web_development/howto/web_mechanics/how_does_the_internet_work/index.mdgit diff --checkFixes #44413