Networking All-in-One For Dummies. Doug Lowe

Чтение книги онлайн.

Читать онлайн книгу Networking All-in-One For Dummies - Doug Lowe страница 30

Networking All-in-One For Dummies - Doug Lowe

Скачать книгу

to get their clocks synchronized properly so they can accurately read the rest of the packet. It’s the rest of the packet that is technically called the frame. In other words, a packet consists of a preamble followed by a frame. Because the preamble is of concern only to the electronic engineers that design network interfaces, most non-engineers use the terms packet and frame interchangeably.

       Preamble: The preamble consists of 56 bits of alternating ones and zeros and is used to synchronize the precise timing required to read packet data.

       Start-of-frame marker: A start-of-frame marker is a single byte that indicates that the frame is about to begin.

       Destination MAC address (six bytes).

       Sender MAC address (six bytes).

       Tag: The tag, which is used to support virtual local area networks (VLANs), is optional. A VLAN lets you divide two or more distinct LANs on a shared physical infrastructure (for example, cables and switches). (For more information about VLANs, see Chapter 3 of this minibook, as well as Book 3, Chapter 1.)

       Ethertype (two bytes): This field indicates the specific protocol that is contained in the payload.

       Payload: The payload contains the actual data being sent by the packet. The payload can be anywhere from 46 to 1,500 bytes. If the information that needs to be sent is longer than 1,500 bytes, the information must be broken into two or more packets, sent separately, and then reassembled when the packets reach their destination. (The tasks of breaking up and reassembling the data are handled by protocols at higher layers in the OSI framework; Ethernet itself has no understanding of what is in the packets it sends.)

       Frame check sequence (four bytes): The frame check sequence (FCS) is used to ensure that the frame data was sent correctly. Basically, the interface that sends the packet uses an algorithm to calculate a four-byte number based on the contents of the frame and saves this number in the FCS field. When the packet is received, the receiving interface repeats the calculation, and then makes sure that the number recorded in the FCS portion of the packet matches the number it calculated. If the numbers disagree, the packet got garbled in transmission and is discarded.

      Note that the details of an Ethernet packet are not really of much concern when you design and implement a network. Here are the main points to remember:

       Ethernet packets contain the MAC addresses of the sender and the receiver.

       The payload of an Ethernet packet is almost always a packet created by another higher-level protocol such as IP.

       Ethernet packets can contain a tag field used to implement VLANs, which provide an important means of organizing a large network into smaller parts that can be more easily managed.

      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.

      Not all packets on an Ethernet network are intended for a single destination. Instead, some packets, called broadcast packets, are intended to be received by every device on the network. To send a broadcast packet, the sending interface sets the destination MAC address to FF-FF-FF-FF-FF-FF — that is, all ones. Then, all interfaces that receive the packet inspect the destination, see that the packet is a broadcast, and pass the packet up to the next higher protocol.

      One of the most common users of broadcast packets is Dynamic Host Configuration Protocol (DHCP), which allows computers that join a network to be assigned an IP address. When a network interface is first connected to a network, it sends out a broadcast message requesting the address of the network’s DHCP server. Every device on the network sees this packet. But only the DHCP service will respond.

      As you see in the next chapter, broadcast packets can sometimes cause a serious problem on your network. All networks should be planned in a way that minimizes problems caused by broadcast packets.

      As I mention in Chapter 1 of this minibook, a wireless network is a network in which radio signals are used to connect devices to the network rather than physical cables. You learn much more about wireless networks in Book 2, Chapter 1, as well as Book 4, Chapter

Скачать книгу