Example for Configuring VLANIF Interfaces to Implement Inter-VLAN Communication
Networking Requirements
User hosts of an enterprise use the same services, and are located on different network segments. These user hosts belong to different VLANs and need to communicate with each other.
Configuration Roadmap
The following configurations are performed on SwitchA. The configuration roadmap is as follows:
- Select the routing mode.
- Configure the port connected to terminals on internal network.
- Configure the port connected to the switch on external network.
Procedure
- Choose Routing for Step 1: Select a mode to open the quick switching mode configuration page, as shown in Figure 9-23. . Select
- Click Add below Step 2: Configure the port connected to internal network devices, as shown in Figure 9-24.
Set all configuration items as follows. Then click
to finish the configuration. Figure 9-25 displays the configuration result.
Configure GE0/0/2:
- Interface Name: GigabitEthernet0/0/2
- Port Status: ON
- Allowed VLAN: 2
- VLAN Gateway Address: 192.168.20.1/255.255.255.0
- Device Type: PC
- Address Allocation to Terminals: Click Configuration to choose static allocation.
Configure GE0/0/3:
- Interface Name: GigabitEthernet0/0/3
- Port Status: ON
- Allowed VLAN: 3
- VLAN Gateway Address: 192.168.30.1/255.255.255.0
- Device Type: PC
- Address Allocation to Terminals: Click Configuration to choose static allocation.
- Choose GE0/0/4 below Step 3: Configure the port connected to the switch on external network. Set all configuration items, as shown in Figure 9-26.
- Port Status: ON
- Link aggregation: OFF
- Allowed VLAN: 4
- Connected IP address/mask: 192.168.40.1/255.255.255.0
- Next hop: 192.168.40.4
- Click Apply. In the dialog box that is displayed, click OK to finish configuration.
If switch A is connected to public networks, you need to configure a NAT policy on switch A to implement translation between public and private IP addresses.
Result
Choose Figure 9-27.
to check the VLAN information, as shown inClick View Interface next to VLAN ID 2, 3 and 4 to view the interfaces added to each VLAN and their status, as shown in Figure 9-28, Figure 9-29, and Figure 9-30.