The Link-Layer Protocols
Learn about the link-layer protocols.
We'll cover the following...
As was mentioned earlier, Ethernet and Wi-fi are the protocols that are widely used to connect devices in wired or wireless settings. Hence, we will provide a quick overview of their basic workings here.
Ethernet
Ethernet went through various phases and evolved over time. This meant that changes were made in the specifications, both at the hardware level and on the associated protocols.
Initially, Ethernet aimed to connect multiple computers over a shared coaxial cable, which would act as a broadcast-transmission medium. This topology is also known as a bus topology, as shown in the following illustration.
This meant that any data transmitted by a node would be received by all of the other nodes connected to that particular cable.
The network interface card was responsible for reading the metadata of each packet and passing the packets only to the processor they were addressed. In order to carry out this process, each network interface card owns one or multiple unique addresses, which are known as MAC (media access control) addresses. These are 48-bit numbers, which are allocated by the IEEE association.
Every Ethernet frame contains a source and a destination MAC address with the latter being used by a network interface card to identify the frames destined to it. There are also some special addresses which allow us to send a frame to multiple network interface cards at a given time. One such example is the broadcast address, which is only composed of bits set to one (also represented as FF:FF:FF:FF:FF:FF) and is accepted by all the nodes. The frame also contains other fields, as shown in the illustration below.
-
The preamble is a static value, which is used to synchronize the clocks of the sender and the receiver so that the subsequent data is translated in the right way by the recipient.
-
The EtherType field contains an identifier, which indicates the network-layer protocol the data should be passed to.
-
The payload field carries the data of the network-layer protocol
-
The CRC is used to detect bit errors.
Since the medium is shared, if two stations attempt to transmit at the same time, a collision may occur, which can lead to corruption of the ...