Huawei switching network basics, basic configuration, STP/RSTP

1. Fundamentals of Switching Networks

      Common Ethernet devices include HUBs, switches, etc. The switch works at the data link layer, which effectively isolates the collision domain of the Ethernet and greatly improves the performance of the Ethernet.

1. Common small switching network: SWA is a switch.

      

2. Switch forwarding behavior: flooding, forwarding, and discarding

Flooding: Send the data flow received by an interface from all interfaces except this interface.

          Situations that cause flooding: ①Broadcast/multicast packets ②Unknown unicast frames

Forwarding: forwarding according to the MAC address table

Discard: ① in and out from the same interface (in from a certain interface, out from the current interface) ② damaged packets

      

3. Introduction to the principle of switch packet transmission

3.1 Switch initial state: switch MAC address table is empty

      

3.2 Learning MAC address

      When host A sends data: the switch will record the source MAC address and corresponding port of the received data frame to the MAC address list

3.3 Forwarding data frames

       When the destination MAC address of the data frame is not in the MAC address table, or the destination MAC address is the broadcast address, the switch will flood the frame 

      

3.4 Host reply

       When other hosts receive the packet flood request, they will respond with the MAC address and port to the switch.

       The switch unicast forwards the reply information of the destination host to the source host according to the MAC address list after the response.

3.5 When the relevant MAC address and interface already exist in the Mac address table, the data packet will not be flooded when it is sent again.

Second, the basic configuration of the switch

1. Full-duplex and half-duplex mode: If both machines are in Auto mode, they will be reduced to half-duplex after negotiation!

     So when configuring, turn off the auto-negotiation mode, that is, the command undo negotiation auto

     Adjust to full duplex mode command: duples full

   (Gigabit optical interface: only supports full-duplex, not half-duplex) (Ethernet RJ45 interface supports: full-duplex, half-duplex)

2. Adjust the transmission rate: command speed 100 to be adjusted to 100 megabytes, speed 1000 to be adjusted to 1000 megabytes

      

3. Configuration verification: display interface g0/0/1

      

3. STP (Spanning Tree Protocol) Principle

      To improve network reliability, redundant links are often used in switched networks. However, redundant links will bring loop risks to the switching network, and lead to problems such as broadcast storms and instability of the MAC address table, which will affect the communication quality of users. The STP protocol can avoid problems caused by loops on the premise of improving network reliability.

1. Problems caused by the loop:

     ① Broadcast storm: Hosts in the network are subject to repeated data frames. Bandwidth can be severely affected.

     ②The MAC address table flaps: The correspondence between the MAC address and the port is constantly changing. It will cause data transmission delay.

2. STP function: Eliminate loops by blocking ports, and can achieve the purpose of link backup. (commonly known as: hot standby)

2.1 Cold standby: As shown in the figure, the dotted line represents the connection. Only when there is a problem with A in B--A--C, the dotted line connection will be changed to a solid line connection.

      

2.2 STP operation (the steps are as follows)

 

      

2.2.1 Election root bridge:

      After each switch starts STP, it will consider itself as the root bridge and send out BPDUs to announce.

      Each switch analyzes the packets and selects the root bridge according to the bridge ID. The smaller bridge ID will become the root bridge (the priority of the bridge is compared first, and the one with the lower priority is called the root bridge. If the priorities are equal, then Compare the MAC addresses, the one with the lower MAC address is called the root bridge).

      

2.2.2 Election root port

      When a non-root switch elects a root port, it is based on the root path cost, peer BID, peer PID, and local PID of the port.

      

2.2.3 Election Designated Port

      When a non-root switch elects a designated port, it depends on the root path cost, BID, and PID.

      Ports that are not elected as root ports are reserved ports and will be blocked.

      

3. Port state transition

      Disabled —— Listening (15秒)—— Learning (15秒)—— Forwarding     (30秒)

4. Introduction to BPDU

     In the STP comparison, the following four parameters are compared:

     Root ID: root bridge ID RPC: road cost to root bridge 

     Bridge ID: The sender's bridge ID Port ID: The sender's port ID

      

Fourth, STP configuration

1. Enter STP mode: there are three modes, generally the default is mstp

      

2. Configure the switch priority (the value is in the range of 0--65535, the smaller the value, the higher the priority) - when the mode is stp

      Command stp priority value

      

3. Configure the path cost - when the mode is stp

  (The value of 802.1D is 0--65535; the value of 802.1T is 200000000; the length of Huawei is 200,000)

     Command stp cost value 

      

4. Validation results (confirm before saving)

      

      

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325327574&siteId=291194637