Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to understand the data link layer of the server

Shulou Source: shulou.com Published: 2022-06-01 10:50:59 09月23日 Update

This article introduces the relevant knowledge of "how to understand the data link layer of the server". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

The MAC address is encoded by 6 bytes, so it is 48 binary bits, so it can represent the 48th power of 2, which is 281474976710656, which is a large number. Anyway, the MAC address is inexhaustible for the time being, and it must guarantee that each MAC address is unique.

4a:00:04:08:29:10

The MAC address is encoded by 6 bytes (48 binary bits). In such an MAC address, every two characters separated by colons are hexadecimal characters, 16 = 2 to the fourth power, so the two hexadecimal characters are 2 to the eighth power, exactly 1 byte (Byte).

There is a special address where each binary bit is 1. This MAC address is called broadcast address (Broadcast Address).

Ff:ff:ff:ff:ff:ff

The broadcast address can represent any network card, so the information sent to the broadcast address is sent to all network cards in the network.

Data frame (Data Frame)

Frame is the information unit transmitted in the second layer of OSI, which can be regarded as the packet of data.

The third floor

DST address

SRC address

Message to be sent

CRC

(recipient MAC)

(sender MAC)

Protocol used

Frame header

The format of the header is fixed, so we can define its size:

The MAC addresses of the receiver and the sender occupy 6 bytes respectively

Layer 3 protocols are encoded with 2 bytes

CRC is encoded in 4 bytes.

6 x 2 + 2 + 4 = 18. Therefore, the frame header of Ethernet has 18 bytes.

Cyclic redundancy check (Cyclic Redundancy Check) Ethernet protocol switch (switch) content addressable register table (CAM)

CAM is the abbreviation of Content Addressable Memory. Content means "content", addressable means "addressable", and memory means "memory", so CAM means "content addressable memory" or "content addressable memory". Therefore, the term for the CAM table is "content addressable register table".

Update of CAM table

The CAM table of the switch is constructed dynamically, that is, the switch constantly "learns" with the flow of frames: which machine is connected to which port.

Survival time of CAM table

TTL is an acronym for Time To Live, meaning "time to live". Therefore, TTL represents a period of time.

The main principle of TTL (time to Live) is to make the data valid for a period of time, once beyond that time, the data becomes invalid.

This is the end of the content of "how to understand the data link layer of the server". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Address content byte data time coding binary message character meaning broadcast server link service two switch representative memory hexadecimal that is Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno MySQL Shulou Tech Info Microsoft Xiaomi