After VLAN is divided on a vswitch, computers in the VLAN cannot communicate with each other. Layer-3 devices are required for Inter-VLAN communication. We can use a router to implement this function. If you use a router, the single-arm routing mode is usually used. In practice, most of the routes between VLANs are implemented through layer-3 switches. layer-3 switches can be regarded as routers and switches. However, because of the special technology, their data processing capabilities are much larger than those of routers. There are two main solutions for inter-VLAN routing: single-arm routing and layer-3 switching.
Physical interface and sub-interface
Routing Between Traditional VLANs using physical interfaces has certain limitations. As the number of VLANs in the network increases, the Physical Mode of configuring a router interface for each VLAN will be limited by the physical hardware of the router. The number of physical interfaces that a router uses to connect to different VLANs is limited. Therefore, sub-interfaces are the best choice.
Differences between physical interfaces and word interfaces:
Single-arm Routing
Computers in different VLANs must use vrouters for communication, even if they are on the same vswitch. Each VLAN can have an Ethernet port connected to a router. In this way, if you want to implement communication between N VLANs, the router requires N Ethernet interfaces and also occupies N Ethernet interfaces on the switch. Single-arm routing provides a solution. The vro only needs an Ethernet interface to connect to the vswitch. This interface of the vswitch is set to the Trunk interface. Create multiple sub-interfaces and different VLAN connections on the vro. The sub-interfaces are logical interfaces on the physical interfaces of the vro. 11-1: When the switch receives the data frame sent by the computer in VLAN1, it sends data to the router from its Trunk interface. Because the link is a Trunk link, the frame carries the VLAN1 label, after the frame is transmitted to the vro2, if the data is to be forwarded to VLAN2, The vro1 removes the VLAN1 label of the data frame, encapsulates the VLAN2 label, and sends it to the Trunk interface on the vswitch through the Trunk link; after receiving the frame, the switch removes the VLAN2 tag and sends it to the computer on vlan2. this enables communication between VLANs.
Disadvantages of single-arm routing:
The communication between VLANs must be completed by routers.
As the data volume increases, the channel between the vro and vswitch will become the bottleneck of the entire network:
Single-arm route diagram
Commands used in single-arm routing configuration:
Create Sub-interface
Interface F0/0.1
Specifies the traffic and encapsulation type of the VLAN that the sub-interface carries, And the VLAN is a native vlan.
Encapture dot1q 1 native