< Home

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.

As shown in Figure 1, user 1 and user 2 using the same service belong to different VLANs and different network segments. User 1 and user 2 can communicate through a VLANIF interface.
Figure 1 Configuring VLANIF interfaces to implement inter-VLAN communication

Configuration Roadmap

The following configurations are performed on SwitchA. The configuration roadmap is as follows:

  1. Select the routing mode.
  2. Configure the port connected to terminals on internal network.
  3. Configure the port connected to the switch on external network.

Procedure

  1. Choose Configuration > Quick Config. Select Routing for Step 1: Select a mode to open the quick switching mode configuration page, as shown in Figure 2.

    Figure 2 Configuring quick routing mode

  2. Click Add below Step 2: Configure the port connected to internal network devices, as shown in Figure 3.

    Figure 3 Configuring the port connected to internal network devices

    Set all configuration items as follows. Then click to finish the configuration. Figure 4 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.
    Figure 4 Configuration result for the port connected to internal network devices

  3. 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 5.

    • 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
    Figure 5 Configuring the port connected to the switch on external network

  4. Click Apply. In the dialog box that is displayed, click OK to finish configuration.

    If router A is connected to public networks, you need to configure a NAT policy on router A to implement translation between public and private IP addresses.

    You also need to configure a subinterface for the inbound interface of router A to remove tags from VLAN packets.

Result

Choose Configuration > Basic Services > VLAN to check the VLAN information, as shown in Figure 6.

Figure 6 Checking VLAN information

  • Click 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 7, Figure 8, and Figure 9.

    Figure 7 Checking the interfaces in VLAN 2

    Figure 8 Checking the interfaces in VLAN 3

    Figure 9 Checking the interfaces in VLAN 4

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >