MindMap Gallery LAN programming and development technical knowledge study notes
LAN programming and development technical knowledge study notes, in order to perform link backup and improve network reliability in Ethernet switching networks, redundant links are usually used. However, using redundant links will create loops on the switching network, causing broadcast storms and instability of the MAC address table.
Edited at 2022-11-17 09:43:23This is a mind map about bacteria, and its main contents include: overview, morphology, types, structure, reproduction, distribution, application, and expansion. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about plant asexual reproduction, and its main contents include: concept, spore reproduction, vegetative reproduction, tissue culture, and buds. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about the reproductive development of animals, and its main contents include: insects, frogs, birds, sexual reproduction, and asexual reproduction. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about bacteria, and its main contents include: overview, morphology, types, structure, reproduction, distribution, application, and expansion. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about plant asexual reproduction, and its main contents include: concept, spore reproduction, vegetative reproduction, tissue culture, and buds. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about the reproductive development of animals, and its main contents include: insects, frogs, birds, sexual reproduction, and asexual reproduction. The summary is comprehensive and meticulous, suitable as review materials.
LAN programming and development technical knowledge study notes
1. MAC address
1.1 MAC address
The definition and composition of mac address
Unicast mac
Broadcast mac
multicastmac
1.2 Forwarding behavior of switch
Forward
flooding
throw away
2. VLAN
2.1 vlan label
Traditional data frame format
Data frame format of vlan tag
4-byte vlan tag
TPID (Tag Protocol Identifier) 2 bytes
PRI (data frame priority) 3bit
CFI (standard format indicator bit) 1bit
vid (vlan id) 12bit
2.2 Link type of interface
Access
Trunk
Trunk
Hybrid
3. Inter-VLAN routing
3.1 One-arm routing
Explain from the implementation method, advantages and disadvantages
3.2 Vlan if
From the implementation
4. VLAN advanced features
4.1 muxvlan
4.1.1 Definition
Provides a mechanism for network resource control through VLAN.
4.1.2 Basic concepts
MUX VLAN is divided into primary VLAN and secondary VLAN, and secondary VLAN is divided into isolated secondary VLAN and interoperable secondary VLAN.
4.1.3 Permissions
4.1.3.1 Main vlan
Can communicate with all interfaces in the MUX VLAN
4.1.3.1 From vlan
Isolated slave VLAN
Interworking slave VLAN
It can communicate with the main vlan, and interfaces in the same group can also communicate with each other. But it cannot communicate with other group interfaces or isolated vlans.
4.2 Super vlan (aggregation vlan)
definition
VLAN aggregation refers to using multiple VLANs to isolate broadcast domains within a physical network. And aggregate these Sub-VLANs into a logical VLAN. These Sub-VLANs Use the same IP subnet and default gateway to save IP address resources.
4.3 Vlan mapping
definition
VLAN Mapping implements mutual mapping of different VLANs by modifying the VLAN Tag carried in packets.
Technical Description
After the Layer 2 packets with VLAN tags from the user network on one side enter the backbone network, the backbone network edge device VLAN (C-VLAN) is modified to a VLAN (S-VLAN) that can be identified and carried in the backbone network, and is transmitted to the other side. Then, the edge device changes the S-VLAN to C-VLAN. In this way, seamless layer 2 connection between two user networks can be achieved.
illustrate
The device supports VLAN Mapping based on VLAN ID and 802.1p priority. Only basic QinQ, flexible QinQ or VLAN Mapping can be configured on a sub-interface. One type and cannot be configured at the same time.
Based on Vlan ID
Based on 802.1 priority
4.4 QinQ
definition
This technology is a technology that expands the VLAN space. By adding an additional layer of 802.1Q Tags to the 802.1Q tagged messages, the function of expanding the VLAN space is achieved, and the private network VLAN can be transparently transmitted to the public network.
Method to realize
Basic QinQ
Flexible QinQ
5. Link aggregation
5.1 Definition
Ethernet link aggregation Eth-Trunk, referred to as link aggregation, increases link bandwidth by bundling multiple Ethernet physical links together into a logical link. At the same time, these bundled links can effectively improve link reliability through dynamic backup of each other.
5.2 Purpose
•Increase bandwidth The maximum bandwidth of a link aggregation interface can reach the sum of the bandwidths of all member interfaces. •Improve reliability When an active link fails, traffic can be switched to other available member links. This improves the reliability of the link aggregation interface. •Load sharing Within a link aggregation group, load sharing can be achieved on the active links of each member.
5.3 Link aggregation mode
In manual mode, link aggregation is established and member interfaces are added by manual configuration, and there is no link aggregation control. Participation in the protocol LACP. When a larger link bandwidth needs to be provided between two directly connected devices but the device does not When LACP protocol is supported, manual mode can be used. Manual mode can increase bandwidth, improve reliability and The purpose of load sharing.
Link Aggregation Control Protocol LACP (Link Aggregation Control Protocol), LACP mode The device automatically forms an aggregate link based on its own configuration and starts the aggregate link to send and receive data. After an aggregated link is formed, LACP is responsible for maintaining the link status and automatically adjusting or disbanding link aggregation when aggregation conditions change.
6. Port isolation
6.1 Definition
Port isolation can realize isolation between ports in the same VLAN, providing users with a safer and more flexible networking solution.
6.2 Port isolation method
6.2.1 Port isolation group
Scenes Multiple hosts connected to different interfaces of the same device. If a host has security risks, it will send a large number of messages to other hosts. Broadcast packets can be isolated by other hosts by configuring one-way isolation between interfaces. Interfaces in the same port isolation group are isolated from each other, but interfaces in different port isolation groups are not isolated from each other. Isolation between interfaces in different port isolation groups can be achieved by configuring unidirectional isolation between interfaces.
6.2.2 One-way port isolation
Scenes In order to achieve Layer 2 isolation between interfaces, you can add different interfaces to different VLANs, but this will waste limited VLAN resources. The port isolation feature can be used to isolate interfaces within the same VLAN. Users only need to add the interface to the isolation group to realize the isolation of Layer 2 data between interfaces in the isolation group. The port isolation function is It provides users with a safer and more flexible networking solution.
7. STP and RSTP
7.1 Broadcast storm and MAC address flapping
broadcast storm
MAC address flapping
7.2 STP
definition
In order to perform link backup and improve network reliability, redundant links are usually used in Ethernet switching networks. However, using redundant links will create loops on the switched network, causing broadcast storms and instability of the MAC address table. Wait for the malfunction to occur,
Purpose
Eliminate loops: Eliminate possible network communication loops in the network by blocking redundant links. Link backup: When the currently active path fails, redundant backup links are activated to restore network connectivity.
STP election mechanism (3 choices, type 1 blocking)
1. Root bridge election
2. Root (RP) port (Choose one on each non-root bridge)
Compare "RPC", peer BID, peer PID, and local PID in sequence.
Compared with the situation of local PID
3. Specify (DP) port (Choose one for each link between switches)
Compare in turn "the one with the smallest RPC", the one with the smallest bridge ID of the switch where the port is located, and the one with the smallest port ID.
4. BP port
Port role (3 types)
RP, DP, BP
port status (5 types)
Learning goal: To know the status and function of ports
Note: In Huawei's STP mode, there is no BP port. The blocked ports are the backup port AP and the backup port BP, which are the results of optimization. The standard STP blocked port is Block Port.
①Disabled, does not process BPDU, does not forward user traffic, and the port is down ②Blocking, processes BPDU, does not forward user traffic, and the port is blocked ③Litening, select root bridge, RP, DP, transition state ④Learning, builds a MAC table and does not forward user traffic. This state is to prevent temporary loops. ⑤Forwarding, forwarding user traffic and processing BPDU, only RP and DP do this.
message (2 kinds)
Configure BPDU
What is a configuration BPDU? and function
Three parameters that affect port status and port convergence
Hello Time
Forward Delay
Max Age
TCNBPDU
What is TCN BPDU? and function
STP failure
Root bridge failure
Fault process: The root bridge fails, and the downstream switch cannot receive the root bridge BPDU. The downstream switches wait for 20 seconds to send BPDU messages to each other to re-elect the root bridge. The failure time is 50s, and the forwarding delay is maxage 2 times.
Direct link failure
Failure process: When the switch RP port fails, its own AP needs to be turned on. The failure time is 30s, and the reduced masage time is
Indirect link failure
Fault process: When the RP of other switches fails, the AP of this switch needs to become DP, but this switch cannot detect the fault. The failure time is 2 times maxage and the forwarding delay = 50s Note: When Huawei equipment receives sub-optimal BPDU in stp state, it will immediately send the optimal BPDU without waiting for the maxage time.
Topology change mechanism
When the network topology changes, the downstream device continues to send TCN BPDUs. After the upstream device receives it, it tells the downstream device to stop sending TCN BPDU by configuring the TCA position of Flags in the BPDU to 1, and then copies a copy of the TCN BPDU and sends it to the root bridge. After receiving the TCN BPDU, the root bridge sends a TC BPDU, in which Flags TC is set to 1 in the configuration BPDU message. After receiving the TC BPDU, the switch changes the aging time of the MAC table to 15 seconds to achieve rapid refresh of the MAC table.
RSTP
The 802.1w standard defines the Rapid Spanning Tree Protocol (RSTP), which is based on the STP protocol and improves the original STP protocol to achieve rapid convergence.
Recognize the problems solved by STP and its shortcomings
In terms of port status and port role
Let’s talk about STP algorithm
In terms of configuration BPDU
RSTP’s optimization measures for STP (7 major optimizations)
Purpose: Improve network stability and rapid convergence
1. Optimization of port roles
4 port roles
From the perspective of configuring BPDU message sending
From the perspective of user traffic
2. Optimization of port status
5 types reduced to 3 types
3. Message
1 RST BPDU
<1>The result of the combination of the fourth and fifth digits: 00 indicates that the port status of the port sending bpdu is discarding. 01 indicates that the port status of the port sending bpdu is learning 11 indicates that the port status of the port sending bpdu is forwarding. <2>The result of the second and third place combination: 00 indicates that the port role is unknown 01 indicates that the port role is ap/bp 10 indicates that the port role is rp 11 indicates that the port role is dp
4. Processing of BPDU
Send configuration BPDU from: In STP mode, the root bridge sends configuration BPDU, and other bridges will trigger configuration BPDU. STP calculation is very slow. RSTP mode, non-root bridge sends configuration BPDU autonomously Shorter BPDU timeout: In RSTP, if 3 consecutive Hellos are not received from the configuration BPDU sent by the upstream device, the neighbor is considered invalid. STP, need to wait for Max age time Processing of secondary BPDUs: RSTP handles inferior BPDUs independently of timer expiration. Immediately reply to your own stored better BPDU
5. Rapid convergence mechanism
PA mechanism
edge port
Root port fast switching
6. Topology change mechanism
Criteria for judging topology changes
handling behavior
Enhanced features
7.Protective characteristics
BPDU protection
Protection against receiving BPDUs on edge ports
root protection
Enable root protection on designated ports
loop protection
If the RP and AP ports do not receive the RST BPDU from the upstream for a long time, they will send it to the network management Notification information, the blocked port remains blocked and does not forward packets, so it will not A loop forms in the network. After the root port or AP port receives the RST BPDU, the port returns to the Forarding state.
Prevent TC-BPDU attacks
Background
Technical principles
PA mechanism
In what scenarios is the PA mechanism not applicable?
8. MSTP