Detailed explanation of the principle of data link layer and switch (focus 2, necessary knowledge of network rookies)
one。 Data link layer function
The error reply of a frame is to check your data frame.
II. Mac address
Your MAC address has 48 binary digits
three。 Ethernet frame format, MAC address header data
Preamble: the port to accept and receive, the frame start delimiter: the computer recognizes the binary language through this start and end
Destination address: the MAC address of the host you sent to others, source address: the MAC address of your own host, data: your application layer data. Frame check sequence: verify that your data frame is complete.
four。 Introduction to the equipment of the switch
The second layer: the data link layer, the third layer: the network layer, these series look at the first letter, the bigger the better.
The second model: 24 ports, dual media: optical fiber, electrical signals can be, gigabit network speed.
five。 Principle of switch
First of all, our host A needs to transfer data to host B through the switch.
A new switch does not know anything. Host A needs to broadcast and transmit its own data frames to various ports, including your source MAC address and the MAC address of host B. at this time, the switch will learn to record the source address and port 1 of host An in the entry. Host B immediately responded by sending out its source address and host A's MAC address as soon as it saw that it was my MAC address. At this time, the switch began to learn again, recording the source MAC address and port of Host B in the entry. At this time, the two hosts transmitted data through the switch.
Why do we use the switch: one host to another can only transmit data with one host, and with the switch, multiple hosts can communicate with each other.