Single-arm routing, three-layer switching technology, link aggregation
One, single arm routing
1.1 One-arm routing to achieve communication between different VLANs
Sub-interface: The physical interface of the router can be divided into multiple logical interfaces, and each sub-interface corresponds to a gateway of a vlan network segment
1.2 Single-arm routing configuration
(1) Configure the link type of the switch
(2) Configure the encapsulation structure of vlan label
(3) Configure the sub-interface label address
1.3 Link type
The port connecting the switch to the host is an access link
The port connecting the switch to the router is a trunk link
1.4 Principle
The router re-encapsulates the MAC address and converts the VLAN tag
1.5 Instructions for single-arm routing
[R1]interface g0/0/0.10 ####Enter the sub-interface view, it is recommended that the sub-interface name is consistent with the vlanID
[Huawei-GigabitEthernet0/0/0.10]dot1q termination vid 10 ####Configure the encapsulation structure of the vlan label (dot1q is the IEEE802.1q protocol, and the sub-interface belongs to vlan10)
[Huawei-GigabitEthernet0/0/0.10]ip address 192.168.10.1 24
[Huawei-GigabitEthernet0/0/0.10]arp broadcast enable ####Enable the downward arp broadcast request function
[R1]interfaceg0/0/0.20
[Huawei-GigabitEthernet0/0/0.20]dot1q termination vid 20
[Huawei-GigabitEthernet0/0/0.20]ip address 192.168.20.1 24
[Huawei-GigabitEthernet0/0/0.20]arp broadcast enable
[R1]int g0/0/0
[Huawei-GIgabitEthernet0/0/0]undo shutdown
[R1]dis ip interface brief
1.6 cases
Switch SW1
[Huawei]vlan batch 10 20
[Huawei]int e0/0/1
[Huawei-Ethernet0/0/1]port link-type access
[Huawei-Ethernet0/0/1]port default vlan 10
[Huawei-Ethernet0/0/1]undo shutdown
[Huawei-Ethernet0/0/2]int e0/0/2
[Huawei-Ethernet0/0/2]port link-type access
[Huawei-Ethernet0/0/2]port default vlan 20
[Huawei-Ethernet0/0/2]undo shutdown
[Huawei-GigabitEthernet0/0/1]int g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type trunk
[Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[Huawei-GigabitEthernet0/0/1]uno shutdown
Router AR1
[Huawei]vlan batch 10 20
[Huawei]int g0/0/0.10
[Huawei-GigabitEthernet0/0/0.10]dot1q termination vid 10
[Huawei-GigabitEthernet0/0/0.10]ip address 192.168.10.1 24
[Huawei-GigabitEthernet0/0/0.10]arp broadcast enable
[Huawei-GigabitEthernet0/0/0.10]undo shutdown
[Huawei-GigabitEthernet0/0/0.10]int g0/0/0.20
[Huawei-GigabitEthernet0/0/0.20]dot1q termination vid 20
[Huawei-GigabitEthernet0/0/0.20]ip address 192.168.20.1 24
[Huawei-GigabitEthernet0/0/0.20]arp broadcast enable
[Huawei-GigabitEthernet0/0/0.20]undo shutdown
Layer 2 and Layer 3 switching technology
2.1 Overview of Layer 3 Switching Technology
Use three-layer switching technology to achieve inter-vlan communication
Layer 3 switching = Layer 2 switching + Layer 3 forwarding
变
成
2.2 Traditional MLS
Re-encapsulate the second layer during the three-layer forwarding process
1、
On the three-layer switch, the third-layer engine processes the first packet of the data flow
To replace the Ethernet frame header and CRC
变 成
2、
The exchange ASIC learns the Layer 2 rewrite information from the Layer 3 engine and creates an MLS entry in the hardware
Responsible for rewriting and forwarding subsequent data packets in the data stream. The
principle of routing and multiple forwarding once:
After the first data packet is forwarded, an MLS entry is created in the hardware for subsequent data packets to be re-encapsulated by hardware And fast forwarding. Layer 2 data frames will be re-encapsulated into the frame format of the next network segment that needs to be forwarded.
2.3 CEF-based MLS
CEF is a model based on topology forwarding
Forwarding Information Base (FIB)
Adjacency table
(1) Host A sends unicast packets to B
(2) The switch looks up the adjacency table
Among the multiple data packets in this flow, only the first data packet is processed by the three-layer engine of the three-layer switch. The processing method is software, which is the same as the router. The three-layer engine obtains the new layer 2 encapsulation information. After that, route this packet.
MLS based on CEF (a model based on topology forwarding), the key is two forwarding information tables, forwarding information base (FIB) and routing
The Layer 3 switch has the routing function, so two VLANs can access each other. Each VLAN virtual interface is the gateway of the network segment.
2.4 Three-layer exchange technology commands
##### The VLAN interface configured on the Layer 3 switch is a virtual interface
[Huawei]interface Vlanif 10
[Huawei-Vlanif10] if address 192.168.10.1 24
[Huawei-Vlanif10]display ip interface brief #####Port is automatically activated
2.5 examples
< Huawei >sys
[Huawei]VLAN batch 10 20 30
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type access
[Huawei-GigabitEthernet0/0/1]port default vlan 10
[Huawei-GigabitEthernet0/0/1]undo shutdown
[Huawei-GigabitEthernet0/0/1]int g0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type access
[Huawei-GigabitEthernet0/0/2]port default vlan 20
[Huawei-GigabitEthernet0/0/2]undo shutdown
[Huawei-GigabitEthernet0/0/2]int g0/0/3
[Huawei-GigabitEthernet0/0/3]port link-type access
[Huawei-GigabitEthernet0/0/3]port default vlan 30
[Huawei-GigabitEthernet0/0/3]undo shutdown
[Huawei-GigabitEthernet0/0/3]quit
[Huawei]interface vlanif 10
[Huawei-Vlanif10]ip address 10.0.0.1 24
[Huawei-Vlanif10]int vlanif 20
[Huawei-Vlanif20]ip address 20.0.0.1 24
[Huawei-Vlanif20]int vlanif 30
[Huawei-Vlanif30]ip address 30.0.0.1 24
[Huawei-Vlanif30]dis ip interface brief