Got it

VLAN Assignment [All About Switches 14] Highlighted

Latest reply: Aug 11, 2018 22:16:43 9925 5 1 0 1

Hi there, everyone!


This post describes VLAN Assignment. Please check out the information displayed below.


558908dedc711.gifVLAN assignment modes:

?  Port-based VLAN assignment: VLAN IDs are assigned based on switch ports. The configuration is simple, and this mode applies to various scenarios.

?  MAC address-based VLAN assignment: VLAN IDs are assigned based on source MAC addresses of packets. This mode applies to scenarios where users' positions change frequently.

?  IP subnet-based VLAN assignment: VLAN IDs are assigned based on source IP addresses of packets. This mode applies to scenarios where hosts on the same network segment are managed uniformly.

?  Protocol-based VLAN assignment: VLAN IDs are assigned based on protocol types of packets. This mode applies to scenarios where hosts with the same applications or services are managed uniformly.

?  Policy-based VLAN assignment: VLAN IDs are assigned based on policies such as source MAC addresses, source IP addresses, and port number of packets. This mode applies to scenarios demanding high security.

558908dedc711.gifAmong the preceding VLAN assignment modes, port-based VLAN assignment is often used and its configuration is the most simplest. How do we configure and use this mode?

Before configure port-based VLAN assignment, let's review common link types of ports.

Access port: connects a switch to a PC.

Trunk port: connects switches.

Hybrid port: connects a switch to a PC or connects switches. The hybrid port is often used when a switch connects to a PC through a hub or switches are connected through a hub.

Let's move to port-based VLAN assignment configuration.

558908dedc711.gifScenario 1: Two PCs connect to a switch. How the hosts are isolated using port-based VLAN assignment?

558908df03a42.png

?  Check whether the two PCs on the same network segment can be pinged successfully when the two PCs directly connect to the switch and no VLAN is assigned. 558908df21768.png

The ping operation is successful. Why?

By default, ports on a Huawei switch join VLAN 1. As long as the two PCs connected to the switch belong to the same network segment, the two PCs can communicate.

?  How are PCs isolated using VLAN assignment? Add ports to different VLANs. For example, GE0/0/1 and GE0/0/2 as access ports join VLAN 10 and VLAN 20 respectively.

558908df47e99.png

?  The two PCs in different VLANs cannot communicate with each other.

558908df64fec.png

558908dedc711.gifScenario 2: Four PCs connect to switches. How do we implement isolation and interworking of the PCs using port-based VLAN assignment?

By default, the four PCs belong to the same network segment and can be pinged mutually. Assume that PC1 and PC2 belong to the same department, and PC3 and PC4 belong to the same department. How do we implement interworking of the same department and between departments using port-based VLAN assignment?

558908df9b379.png

?  PC1 and PC2 of the same department are added to VLAN 100. GE0/0/1 ports on Switch 1 and Switch 2 join VLAN 100 as access ports.

558908dfbdbab.png

558908dfd8579.png

?  PC3 and PC4 of the same department are added to VLAN 200.

558908e00205e.png

558908e0274a7.png

?  GE0/0/3 ports on Switch 1 and Switch 2 join VLAN 200 as trunk ports.

558908e042da3.png

558908e05d773.png

?  PC1 and PC2 in the same department can communicate, and PC3 and PC4 in different departments cannot communicate.

 

558908e0759cb.png

558908e09d8a2.png

 

558908dedc711.gifIn the preceding two scenarios, fewer VLANs and ports are configured. In practice, many VLANs and ports need to be configured. Which measure can be taken to complete the configuration rapidly? I will describe how to perform the configuration in a batch and rapidly restore the default VLAN configuration of ports?

1. Create VLANs in a batch.

< Huawei > system-view

[Huawei]vlan batch 2 to 100

2. Add ports to VLANs in a batch.

[Huawei] port-group group-member GigabitEthernet 0/0/10 to

GigabitEthernet 0/0/20

[Huawei-port-group]port link-type access

[Huawei-port-group]port default vlan 100

3. Rapidly restore the default VLAN configuration of ports.

What is the default VLAN configuration? All ports on Huawei switches join only VLAN 1 by default.

How is the default configuration of three ports rapidly restored?

?  Access port: Run the undo port default vlan command.

?  Trunk and hybrid ports:

Restore the default PVID, delete all VLANs from ports, and add ports to VLAN 1.


trunk

hybrid

undo port trunk pvid vlan
     undo port trunk allow-pass vlan all
     port trunk allow-pass vlan 1

undo port hybrid pvid vlan
     undo port hybrid vlan all
     port hybrid untagged vlan 1


 

This issue describes VLAN assignment. For more information about VLAN technology, see the next issue.

To be continued...

558908dedc711.gif


Issue

Name

Description

First issue

[All About Switches - Beginner] 

VLAN Basics

This issue describes the definition and purpose of VLAN technology and modes in which interfaces are added to VLANs.

Second issue

[All About Switches - Beginner] 

VLAN Assignment

This issue describes VLAN assignment modes and applicable scenarios, and mainly describes the configuration and scenario of interface-based assignment.

Third issue

[All About Switches - Beginner]

VLAN Communication

This issue describes main technologies and applicable scenarios of inter-VLAN communication, including the VLANIF interface, sub-interface, and super-VLAN. This issue also describes common VLANIF interface configuration.

Fourth issue

[All About Switches - Beginner] VLAN Isolation

This issue describes main technologies and applicable scenarios of VLAN isolation, such as MUX VLAN and ACL.


★★★Summary★★★ All About Huawei Switch Features and Configurations

This article contains more resources

You need to log in to download or view. No account? Register

x

The post is synchronized to: All About Switch (feature)

  • x
  • convention:

user_230335
Created Aug 10, 2015 09:23:43

good,studying
View more
  • x
  • convention:

user_2790689
Created Jun 25, 2015 04:25:12

Thank you.
View more
  • x
  • convention:

yaba_mobhe
Created Sep 7, 2016 08:05:09

THANK YOU

View more
  • x
  • convention:

Achenat
Created Mar 7, 2017 16:31:35

This is outstanding and am loving it!!! great work guys....:D:D
View more
  • x
  • convention:

waseemengineer
Created Aug 11, 2018 22:16:43

*** offf Huawei switch configuration waste nothing make possible
View more
  • x
  • convention:

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 " Privacy."

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.