Читать книгу Networking All-in-One For Dummies - Lowe Doug, Doug Lowe - Страница 44

Contemplating Collisions

Оглавление

One of the basic principles of Ethernet is that multiple devices can be connected to media (that is, cables), and that all devices connected to this media can and should examine every packet that is sent on the media. In other words, Ethernet uses shared media.

Every packet contains the MAC address of the intended recipient. So, when an interface detects an incoming packet, it inspects the recipient MAC address and compares it with its own MAC address. If the addresses match, the interface passes the packet up to the next higher protocol on the protocol stack (typically, the IP protocol). If the addresses don’t match, the interface assumes that the packet doesn’t belong to the interface, so the interface simply ignores the packet.

The use of hubs on an Ethernet propagates the shared cable through the network. That’s because a hub simply amplifies any packet that arrives on any of its ports and then forwards the amplified packet to all the other ports in the hub. So, if you use a 12-port hub to connect 12 computers together, all 12 of the computers will see all the packets generated by any of the other computers. And if two or more of the computers try to transmit a packet at the same time, the packets will collide.

Ethernet has been very successful — in fact, it has become one of the most widely used networking protocols of all time. However, Ethernet’s shared media approach has a basic problem: It doesn’t scale well. When two or more interfaces are shared on a single cable, there is always the possibility that two or more interfaces will try to send information at the same time. This is called a collision. The result of a collision between two packets is that both packets will be destroyed in the process and will need to be sent again.

In a small network with just a few computers, collisions happen now and again but aren’t a big deal. However, in a large network with dozens or hundreds of devices, collisions can become a constant annoyance. In fact, collisions can become such a problem that the network slows to a halt and no one is able to get anything done at all.

As a result, it’s important to design a network in a way that reduces the possibility of collisions becoming a problem. Fortunately, that’s easy to do with modern network equipment: All you have to do is use switches instead of hubs. Switches all but eliminate the problem of collisions by forwarding network packets only to the cable segments that the destination devices are connected to rather than forwarding them throughout the entire network.

You learn more about how this works and why it’s so important in Chapter 3 of this minibook.

Networking All-in-One For Dummies

Подняться наверх