In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Data Link layer Foundation
I. introduction of the data link layer
1. Location of the data link layer
Between the physical layer and the network layer
2. Functions of the data link layer
(1) Establishment, maintenance and dismantling of data links
(2) frame packaging, frame transmission, frame synchronization
(3) error recovery of frame
(4) flow control
II. Ethernet
1. What is Ethernet
The MAC address (hardware address or physical address) is 48 bits long and the IP address is 32 bits
The MAC address is globally unique (the first 24 digits are the vendor identification, and the last 24 digits are the supplier's unique number for the network card) there is no need to configure
Binding the MAC address can change the MAC address, but it doesn't make much sense, usually it doesn't change.
One hexadecimal = four binary
Broadcast MAC address 48 1s or FF-FF-FF-FF-FF-FF
PDU protocol data unit
2. Ethernet frame format 1 byte B = 8 bits b
3. Ethernet naming method
Broadband can transmit a variety of data
Baseband can only transmit one kind of data.
TX T twisted pair X shielded (UTP) or unshielded (STP)
FX F fiber
Third, the sublayer of the data link layer (understand)
1. Media access Control (MAC) sublayer
-encapsulate the data handed over by the upper layer into a frame for transmission (the opposite process is performed during reception, and the frame is dismantled)
-implement and maintain media access control protocols
-bit error detection
-addressing of MAC frames, that is, which station (origin server) sends the MAC frame and which station or stations (destination station) it is received by.
2. Logical Link Control (LLC) sublayer
-establish and release logical connections at the data link layer
-provide an interface with the upper layer
-number the frame
Local area network 1KM wide area network scope is larger
IV. Ethernet switch
1. What is a switch?
Switch: the switch is the main equipment connected to the local area network.
Function: the ① switch can intelligently forward data according to the destination address in the Ethernet frame, so the switch works at the data link layer.
The ② switch divides the collision domain to realize full-duplex communication.
2. Huawei exchange product system
(1) Huawei S2700 Series switch
Layer 2 100 megabit access Ethernet switch launched by Huawei
(2) Huawei S5700 Series switches (6700 Universe 7700Unix 9700)
Standard Gigabit Ethernet switches provide flexible full Gigabit access and 10 Gigabit uplink ports
(3) Huawei S12700 Series Agile switch
-A keen switch designed and developed by Huawei to the core of the next generation campus network
(4) CE12800 data Center switch Series switch (CE5800/6800/7800/8800)
-Huawei's new generation of high-performance core switches for data centers and high-end campus networks
3. The working principle of the switch
(1) the forwarding principle of the switch
① initial state
② MAC address learning
Form the MAC address table by learning the source MAC address of the data frame, and then find the MAC address of the destination address
③ broadcasts unknown data frames
If there is a MAC of the destination address in the MAC address table, the switch sends the information along the corresponding address in the MAC address table.
Go out; if there is no corresponding destination MAC address in the MAC address table, the switch will call the
All other ports broadcast the data frame
④ recipient responds
The non-destination device in the receiver ignores it, and the device at the destination address responds to the broadcast (broadcast).
Unicast Communication realized by ⑤ switch
The switch receives a response from the destination address, learns again, writes the MAC address of the destination address into its own MAC address table, and sends the corresponding data of the source address to the destination address in unicast form through the path specified in the MAC address table.
⑥ update
-the aging time of the switch MAC address table is 300s.
-if it is found that the inbound MAC address of a frame is different from all ports of the source MAC address in the MAC address table, the switch will
The MAC address is relearned to the new port.
(2) check the MAC address
Display mac-address
In the MAC address table, the same interface can correspond to multiple MAC addresses, and one MAC address cannot correspond to multiple interfaces
IV. Conflict domain and broadcast domain
1. Simplex, half-duplex and full-duplex
(1) Simplex has only one channel, and the transmission direction can only be one-way, such as pager.
(2) half-duplex has only one channel and can only be transmitted in one way at the same time, such as walkie-talkies.
(3) full-duplex dual-channel with bi-directional data transmission, such as telephone
2. Conflict and conflict domain
(1) if there are too many conflicts, the transmission efficiency will be reduced. In order to improve the transmission efficiency, the collision domain must be divided.
(2) Segmentation of conflict domain
(3) switch backplane fabric structure
When each port of the switch accesses another port, there will be a proprietary line without conflict.
The switch defaults to full-duplex without CSMA/CD. Only half-duplex uses CSMA/CD.
Fifth, broadcast domain
1. A broadcast domain is a collection of nodes that receive the same broadcast message.
2. The switch divides the collision domain, but not the broadcast domain, that is, all the ports of the switch belong to the same broadcast domain.
VI. Internal switching mode of the switch
1. Store and forward
-it is the most widely used way in the field of computer network.
-error detection of packets entering the switch
-support the conversion between ports with different speeds
-slow exchange and long delay in data processing
2. Express forwarding
-very small latency, very fast switching
-unable to provide error detection capability
-because there is no cache, input / output ports with different rates cannot be connected directly, and it is easy to lose packets.
3. Sectional filtering
-check whether the length of the packet is 64 bytes, less than 64 bytes are discarded directly, and more than 64 bytes are sent directly.
-No data verification is provided
Its data processing speed is faster than the store-and-forward mode, but slower than the straight-through mode.
VII. basic configuration of the switch
1. View the MAC address table
[Hawei] display mac-address
2. Check the switch address
Display bridge mac-address
3. LLDP Protocol Link layer Discovery Protocol is used to view the device information of neighbors
[Huawei] lldp enable turns on link layer discovery protocol
All the information about display lldp neighbor neighbors
Display lldp neighbor brief brief Information
4. View the information of a designated port in a neighbor
Display lldp neighbor interface Ethernet 0/0/X
VIII. Working mode configuration of the interface
1. Configure duplex mode in non-self-negotiation mode
[Huawei-GigabitEthernet0/0/1] undo negotiation auto
[Huawei-GigabitEthernet0/0/1] duplex + mode (half or Full)
2. Configure the rate in non-self-negotiation mode
[Huawei-GigabitEthernet0/0/1] undo negotiation auto
[Huawei-GigabitEthernet0/0/1] speed + numbers (10,100,1000, etc.)
9. Configuration management IP address
System-view
[Huawei] interface vlan1
[Huawei-vlanif1] ip address + IP address
[Huawei-vlanif1] shutdown API is disabled [Huawei-vlanif1] undo shutdown API is enabled
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.