obonaventure / cnp3

Computer Networking : Principles, Protocols and Practice (first and second edition, third edition is being written on https://github.com/cnp3/ebook)
https://www.computer-networking.info
508 stars 91 forks source link

Improvement suggestion for Ethernet #167

Closed GregoryVds closed 4 years ago

GregoryVds commented 9 years ago

Hello,

In section "3.16. Datalink layer technologies", the book introduces the classic ethernet protocol with hubs. Then the section "Ethernet Switches" explains that we can improve the performance of Ethernet LANs by using switches. The book says that from a performance perspective, it is more interesting to have devices that operate in the datalink layer and can analyse the destination address of each frame to forward them selectively.

At first, I didn't get why it was an improvement for the performance to use switches. Indeed, the books never really explains the underlying reasons for this performance gain.

After doing some research, I understand that a hub doesn't increase the network capacity since it is simply repeating the signal and collisions are possible across the entire longer network. With switches however, each port of the switch is now in its own collision domain since it repeats messages selectively. If multiple frame are sent to the same output port, the switch will buffer them before outputting them one at a time, thus avoiding collision. If the cable between the switch and the computer is full-duplex, it is not possible to have collisions and we don't need CSMA/CD anymore. So switches greatly improve the throughput of the network compared to hubs by avoiding collisions and allowing multiple frames to be sent simultaneously by different senders.

I believe this could be a useful addition to the book. To add a paragraph explaining the reasons behind the performance gain of switches compared to hubs.

Gregory