To achieve inter-VLAN communication, in addition to configuring the SVI interface on the switch, you can also implement VLAN data forwarding by configuring sub-interfaces under the physical interface of the router.
Configuration ideas:
1 The access switch configures the corresponding VLAN and sets the access PC port to access mode
2 Setting the physical interface of the router to which the switch is connected to the router
2.1 Open Interface (no shutdown)
2.2 New sub-Interface (interface g0/0.1)
2.3 Package DOT1Q Protocol and established vlan[(en dot1q 2) indicating the designation VLAN2]
2.4 Configure the address of the subinterface for the gateway address of the access switch VLAN
3 Configure the IP address of the Access PC and specify the gateway as the address of the router sub-interface
Network topology diagram
1. Create a new VLAN under the switch and add ports to the VLAN
2 Configuring the interface that the router connects to the switch
3 Configure the IP address of the PC and set the address of the gateway for the router sub-interface
4 Validation Tests
Learning Network 6--single-arm routing via Cisco emulator Cisco PACKET Tracer