Got it

Understanding of VLAN - Example for Implementing Inter-VLAN Communication Using VLANIF Interfaces

Latest reply: Jul 1, 2021 15:27:39 501 24 17 0 2

OBJECTIVE


The purpose of this post is to present an introduction to Example for Implementing Inter-VLAN Communication Using VLANIF Interfaces.


Networking Requirements


Users in an enterprise use different services and locate at different network segments. Users who use the same service belong to different VLANs and they want to communicate with each other.


As shown in Figure 1, User 1 and User 2 use the same service but belong to different VLANs and locate at different network segments. User 1 wants to communicate with User 2.


01

Figure 1 - Networking diagram for implementing inter-VLAN communication using VLANIF interfaces


Configuration Roadmap


The configuration roadmap is as follows:


1. Create VLANs on the switches for different users.


2. Add interfaces to VLANs so that packets of the VLANs can pass through the interfaces.


3. Create VLANIF interfaces and configure IP addresses for the VLANIF interfaces to implement Layer 3 communication.


i_f42.gifTo implement communication between VLANs, hosts in each VLAN must use the IP address of the corresponding VLANIF interface as the gateway address.


Procedure


1. Create VLANs.


# Create VLANs.

<Huawei> system-view
[Huawei]
vlan batch 10 20


# Add interfaces to VLANs.

[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] port link-type access
[HUAWEI-GigabitEthernet0/0/1] port default vlan 10
[HUAWEI-GigabitEthernet0/0/1] quit
[HUAWEI] interface gigabitethernet 0/0/2
[HUAWEI-GigabitEthernet0/0/2] port link-type access
[HUAWEI-GigabitEthernet0/0/2] port default vlan 20
[HUAWEI-GigabitEthernet0/0/2] quit


# Assign IP addresses to the VLANIF interfaces.

[HUAWEI] interface vlanif 10
[HUAWEI-Vlanif10] ip address 10.10.10.2 24
[HUAWEI-Vlanif10] quit
[HUAWEI] interface vlanif 20
[HUAWEI-Vlanif20] ip address 20.20.20.2 24
[HUAWEI-Vlanif20] quit


2. Verify the configuration.


Configure the IP address 10.10.10.3/24 on user 1's host, configure the VLANIF 10 interface IP address 10.10.10.2/24 as the gateway address.


Configure the IP address 20.20.20.3/24 on user 1's host, configure the VLANIF 10 interface IP address 20.20.20.2/24 as the gateway address.


After the preceding configurations are complete, User 1 in VLAN 10 and User 2 in VLAN 20 can communicate.


Configuration Files


  • Configuration file of the Switch

#
sysname HUAWEI
#
vlan batch 10 20
#
interface Vlanif10
ip address 10.10.10.2 255.255.255.0
#
interface Vlanif20
ip address 20.20.20.2 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 20
#
return



--- End

Very important one
View more
  • x
  • convention:

Ayeshaali
Ayeshaali Created Jun 20, 2021 17:10:09 (0) (0)
 
Thank you for this excellent article
View more
  • x
  • convention:

Ayeshaali
Ayeshaali Created Jun 20, 2021 17:10:00 (0) (0)
 
Faridrami
Faridrami Reply Ayeshaali  Created Jun 21, 2021 16:52:20 (0) (0)
 
Thanks for sharing
View more
  • x
  • convention:

shakeela
shakeela Created Jun 20, 2021 17:13:49 (0) (0)
 
Understanding of VLAN - Example for Implementing Inter-VLAN Communication Using VLANIF Interfaces-3982617-1
View more
  • x
  • convention:

EL.BODO
EL.BODO Created Jun 20, 2021 18:43:36 (0) (0)
 
Thanks for sharing
View more
  • x
  • convention:

Well explained
View more
  • x
  • convention:

EL.BODO
EL.BODO Created Jun 20, 2021 18:44:31 (0) (0)
 
well detailed
View more
  • x
  • convention:

well done
View more
  • x
  • convention:

Understanding of VLAN - Example for Implementing Inter-VLAN Communication Using VLANIF Interfaces-3982719-1
View more
  • x
  • convention:

12
Back to list

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.