Computer Network Exam Review - Chapter 3 3.3

3.3 Data link layer using broadcast channels

3.3.1 Data link layer of LAN

The main features of LAN:

1. The network is owned by one unit;

2. The geographical scope and number of sites are limited.

LAN has the following main advantages:

1. With broadcast function, the entire network can be easily accessed from one site.

2. It facilitates the expansion and gradual evolution of the system, and the location of each device can be flexibly adjusted and changed. ,

3. Improve the reliability, availability and survivability of the system.

1) Two main standards of Ethernet:

DIX Ethernet V2: The world's first LAN product (Ethernet) protocol. IEEE 802.3: The first IEEE Ethernet standard. Hardware implementations of both standards can interoperate on the same LAN. There is only a small difference between these two standards, so many people often refer to 802.3 LAN as "Ethernet" for short.

The LAN data link layer is divided into 2 sub-layers: LLC layer and MAC layer. The LLC layer is above the MAC layer.

Logical Link Control LLC (Logical Link Control) sublayer: independent of transmission media. Media Access Control MAC (Medium Access Control) sublayer: related to transmission media.

2) Adapter:

The adapter is an interface board inserted into the host box. This interface board is also called a network interface card, INC, or network card.

Important features: Perform serial/parallel conversion. Cache the data. Install device drivers in your computer's operating system. Implement the Ethernet protocol.

3.3.2 CSMA/CD protocol

The earliest Ethernet: connected many computers to a bus. Bus features: easy to implement broadcast communication, simple and reliable. To achieve one-to-one communication, the hardware address of the receiving station is written into the destination address field in the frame header. This data frame can only be received if the destination address in the data frame is consistent with the adapter hardware address.

 Disadvantages of the bus: When multiple stations transmit at the same time, transmission collisions or conflicts will occur, resulting in transmission failure.

Two important measures taken by Ethernet:

1) Adopt a more flexible connectionless working method. Data can be sent directly without establishing a connection first. The data frames sent are not numbered and the other party is not required to send back confirmation. Providing Unreliable Delivery Delivery on a best effort basis. Whether an error frame needs to be retransmitted is decided by the higher layer.

2) The data sent uses Manchester encoding.

Three key points of the CSMA/CD agreement:

CSMA/CD: Carrier Sense Multipoint Access/Collision Detection.

Multi-point access: This indicates that this is a bus network. Many computers are connected to a bus using multipoint access.

Carrier monitoring: This is actually monitoring before sending. Each station must constantly detect the channel, both before and while it wants to send data.

Collision detection: The adapter sends data while detecting changes in signal voltage on the channel. When the voltage swing value exceeds a certain threshold value, it is considered that at least two stations on the bus are sending data at the same time, indicating that a collision (or conflict) has occurred.

Why do collision detection? Because signal propagation delay affects carrier monitoring

It can be seen that within a short period of time after each station sends its data, there is a possibility of collision.

A needs 2 times the one-way propagation delay to detect a conflict with B's transmission. This is the worst case scenario!

The end-to-end round-trip delay of Ethernet is 2t, which is called the contention period, or collision window. Specific contention period time = 51.2 μs. Only when no collision is detected after the contention period can we be sure that this transmission will not cause a collision.

How is this random practice judged when retransmission is required after a collision?

Determined using truncated binary exponential backoff. After the station that collides stops sending data, it must back off for a random time before sending data.

1.Basic backoff time = 2t, which is 51.2 μs

2. Randomly pick out a number from the integer set [0, 1, …, (2k - 1)], recorded as r. The delay required for retransmission = r ⅹ basic backoff time.

3. Parameter k = Min [number of retransmissions, 10]

4. When the retransmission fails 16 times, the frame will be discarded and reported to the higher level.

If conflicts occur multiple times in a row, it indicates that there may be more stations competing for the channel. The above-mentioned backoff algorithm can make the average time that retransmissions need to be postponed increase with the number of retransmissions (called dynamic backoff), thus reducing the probability of collision and conducive to the stability of the entire system.

10 Mbit/s Ethernet contention period length

For 10 Mbit/s Ethernet, 512 bits, or 64 bytes , can be sent within the contention period of 51.2 μs .

This means: When Ethernet sends data, if there is no conflict in the first 64 bytes, then there will be no conflict in the subsequent data . Ethernet stipulates that the shortest effective frame length is 64 bytes . Any frame less than 64 bytes in length is an invalid frame aborted due to a collision and should be discarded immediately.

The maximum end-to-end one-way delay of Ethernet must be less than half of the contention period (i.e. 25.6 μs), which is equivalent to the maximum end-to-end length of Ethernet being approximately 5 km.

3.3.3 Star topology using hubs

Traditional Ethernet transmission media: thick coaxial cable -> thin coaxial cable -> twisted pair.

Traditional Ethernet uses coaxial cables and adopts a bus topology. Ethernet using twisted pairs uses a star topology. A very high reliability device called a hub is added to the center of the star. The distance between each station and the hub shall not exceed 100 m. In 1990, IEEE developed the standard 802.3i for star Ethernet 10BASE-T using twisted pairs. 10BASE-T refers to 10 representing the rate of 10Mbit/s, BASE indicating that the signal connected to the line is a baseband signal, and T representing twisted pair.

Some features of the hub: Use electronics to simulate the working of actual cables, so the entire system still operates like a traditional Ethernet network. Ethernet using a hub is still a bus network logically, but it is physically a star structure. Each workstation still uses the CSMA/CD protocol and shares a logical bus. Much like a multi-interface forwarder, it works at the physical layer. A specialized chip is used to perform adaptive crosstalk echo cancellation, reducing near-end crosstalk.

3.3.5 MAC layer of Ethernet

Hardware address is also called physical address, or MAC address. The IEEE 802 standard specifies a 48-bit global address (referred to as address) for LAN, which refers to the address solidified in the ROM of the adapter in each computer on the LAN.

The IEEE registration authority RA is responsible for allocating the first 3 bytes (ie, the upper 24 bits) to manufacturers, which is called the Organization Unique Identifier OUI. The last 3 bytes (lower 24 bits) assigned by the manufacturer are called extended identifiers. It must be ensured that the adapters produced do not have duplicate addresses. The address is fixed in the adapter's ROM.

MAC frame format:

Generally the format of Ethernet V2

8 bytes are inserted at the front of the frame by hardware. The first field has a total of 7 bytes and is the preamble, which is used to quickly achieve bit synchronization of the MAC frame. The second field of 1 byte is the frame start delimiter, indicating that the following information is the MAC frame. In order to achieve bit synchronization, 8 more bytes than the MAC frame are actually transmitted on the transmission medium.

Invalid MAC frame:

The length of the data field is inconsistent with the value of the length field;

The length of the frame is not an integer number of bytes;

Use the received frame check sequence FCS to detect errors;

The length of the data field is not between 46 ~ 1500 bytes.

The valid MAC frame length is between 64 ~ 1518 bytes.

Invalid MAC frames detected are simply discarded. Ethernet is not responsible for retransmitting dropped frames.

 When the "Length/Type" field value is greater than 0x0600, it represents "Type"; when it is less than 0x0600, it represents "Length". When the "Length/Type" field value is less than 0x0600, the data field shall be loaded into the LLC frame of the Logical Link Control LLC sublayer. In the 802.3 standard document, the MAC frame format includes an 8-byte preamble and frame start delimiter.

Guess you like

Origin blog.csdn.net/m0_53345417/article/details/130214429