Introduction to VLAN Port Configuration
- product_switch, tech_vlan_tagging, task_reference, model_vigorswitch_p2261, tech_vlan
This document is going to introduce what the VLAN Port Configuration, such as ingress rule, egress rule, port type, frame type, and PVID, will do on the incoming and outgoing frames based on VigorSwitch P2261.

When the frame enters the switch
1. Check if the frame is tagged
Frame Type setting determines whether the traffic should be accepted or discarded according to whether it is tagged or not.
- All: accept both tagged and untagged frames
- Tagged: only accept tagged frames, discard the untagged frames.
- Untagged: only accept untagged frames, discard the tagged frames.
2. Check the TPID of the frame
Port Type setting determines whether the switch should accept or discard a frame according to the Tag Protocol Identifier (TPID) of it. Below are the options of Port Type.
- Unaware: Accept frames with any TPID.
- C-port: Discard frames with TPID is 0x88a8, accept TPID 0x8100 (which is the protocol which Vigor Router uses) and others.
- S-port: Discard frames with TPID 0x8100 (which is the protocol which Vigor Router uses), accept the others.
- S-custom-port: Accept frame with TPID 0x8100 or 0x88a8, discard the others.
3. Check the VID of the frame
Ingress Filtering setting determines whether this frame should be accepted or discarded according to the VLAN Identifier (VID).
- Disable: Accept frames with any VID.
- Enable: Accept the frame if its VID is one of the VLAN that this port belongs. Discard the frame if the port is not a member of the VLAN with which this frame is associated.
Before forwarding the frame to other ports
Before the switch sends out the frame, Port Type setting determines whether to add a tag to the frame or not.
- Unaware: any frames will be added a tag (VID= PVID) and then forwarded.
- C-port: If the frame's TPID is 0x8100 (which is Vigor Router uses), it will be forwarded without adding a tag. If the frame is untagged or with TPID other than 0x88a8, the switch will a tag (VID= PVID) to it and then forwarded.
- S-port: Discard frames with TPID 0x8100 (which is the protocol which Vigor Router uses), and forward the others without adding a tag.
- S-custom-port: If the frame's TPID is 0x8100 (which is Vigor Router uses), it will be forwarded without adding a tag. If the frame is untagged, the switch will add a tag to it (VID= PVID) and then forward it.
Before the frame leaves the switch
Egress Rule determines whether the tag should be removed or not before the frame leaves the port. There are three options for Egress Rule:
- Hybrid: remove the tag if the frame's VID is the same as PVID, keep the tag if it's not.
- Trunk: keep all the tags.
- Access: Remove all the tags.
- Details
Copy configurations from one Switch to the other by Vigor3900's Switch Management
- vlan, DrayOS 4, imported, central_management, switch_management, vigor3900, vigor2960, config_copy
What can we do if we want to apply similar VLAN settings to multiple switches on the network? In the past, we may backup config file from one switch then restore to the other switch for meeting the goal, but this way won't work when the switch models are not the same. Now the Central Switch Management function provides another way to achieve the purpose, and it can work among different switch models. This document demonstrates how to copy configurations from one switch to the other switch by Central Switch Management function on Vigor2960 and Vigor3900.
1. Before we started, we need to configure one switch by Central Switch Management and make it connected to the local network. See Deploying VLANs by SWM and VigorSwitch for instructions.
2. Connect a new switch to the local network.
3. Go to Switch Management >> Profile page, click Add New when seeing the new switch for putting it into Profile List.
4. Select the new switch and click Edit to modify the switch settings.
- Select Enable for Enable Copy Configuration function
- Select the switch that already has the VLAN configurations for Copy Configuration From
- Click Send to Device.
5. Vigor Router will take some time to configure the VLAN setting from the original switch to the new switch.
6. Vigor will respond Post Config Success message.
7. We may log in to the new Switch's WUI or use a laptop to connect different switch ports to verify if the configuration is correct.
- Details
How to use MAC VLAN on VigorSwitch?
- product_router, task_configuration, product_switch, tech_vlan_tagging, tech_vlan
VigorSwitch support the MAC VLAN feature. The MAC VLAN allows you to assign a VLAN ID to a host with specific MAC address(es). VigorSwitch allows you to configure multiple groups with configured MAC address and mask to be active on ports and to be bound with a VLAN ID. This article demonstrates how to use MAC VLAN on VigorSwitch.
Supposed we have an R&D team and a sales team in the company. The R&D team is assigned to LAN2, and the sales team is assigned to LAN3. We want to let their devices get the IP address from their network when connecting to a switch port. The network topology is shown below:

Router Setup:
- Go to LAN >> VLAN to set up the VLAN. In this example, the switch is connected to the router's port 4, so port 4 needs to accept LAN2's and LAN3's VLAN tag.
- Go to LAN >> General Setup to set up the network for each LAN interface.
Switch Setup:
- Go to Switch LAN>>VLAN Management>>Create Vlan to create VLANs for LAN2 and LAN3.
- Go to Switch LAN>>VLAN Management>>Interface Settings. Set up the ports devices would be connected.
- Select port 1~24.
- Select Hybrid mode.
- Enter 1 for PVID. Other devices which are not in the MAC VLAN group would be assigned to the LAN1 network.
- Select 2, 3 and default(1) for Untagged VLAN.
- Set up the port connected to the router. In this article, port 25~28 are for devices that support tagging. e.g. Router or AP.
- Select port 25~28.
- Select Hybrid mode.
- Enter 1 for PVID.
- Select 2 and 3 for Tagged VLAN.
- Select default(1) for Untagged VLAN.
- Go to Switch LAN >> VLAN Management >> MAC VLAN >> MAC Group. Add MAC addresses to a MAC VLAN group.
In this article, we define Group ID 2 for the devices of R&D team, and Group ID 3 for the devices of sales team. - Go to Group Binding tab. Bind the MAC VLAN group to the ports where the device is connected and give a VLAN ID.
Bind port 1~24 to Group ID 2 and belong to VLAN 2.
Bind port 1~24 to Group ID 3 and belong to VLAN 3. - We can see what VLAN is assigned to the device in Switch LAN >> MAC Address Table >> Dynamic Learned.
Note:
Mask 48 represents a single MAC address.
Mask 24 stands for OUI.
- Details
How to set up QoS and Voice-VLAN on Vigor Switch
- task_configuration, product_switch, tech_vlan, tech_voice_vlan, tech_qos
DrayTek VigorSwitch supports Quality of Service (QoS) function which prioritise traffic for various networking applications as well as bandwidth allocation to improve the quality of network services.
QoS (Quality of Service) ensures higher priority traffic without interference no matter how heavy the network loadings are. This article introduces each of the QoS features and how to apply them in real world scenarios. We use this topology as an example to illustrate how to configure QoS step by step
First, we have these VLAN settings for above topology
VigorSwitch BX2000, an IPPBX
Create three VLANs.
VLAN0 LAN1 management
VLAN1 LAN2 data VID:10
VLAN2 LAN3 voice-vlan VID:20
and port6 connects to VigorSwitch G2280x (referred as G2280x)
VigorSwitch G2280x VLAN port settings as below: (VLANs are created at Switch LAN >> VLAN Management >> Create VLAN page) GE10 Hybrid PVID:20 Untagged VLAN:20 (connect to phoneA without tag) GE23 Trunk PVID:1, Tagged VLAN:10,20 Untagged VLAN:1 (connect to G2100) GE24 Trunk PVID:1, Tagged VLAN:10,20 Untagged VLAN:1(connect to BX2000)
VigorSwitch G2100 VLAN port settings as below: (VLANs are created at Switch LAN >> VLAN Management >> Create VLAN page) GE6 Hybrid PVID:20 Untagged VLAN:20 (connect to phoneB which without tag) GE7 Hybrid PVID:20 (connect to phoneC with VLAN tag 20) GE8 Trunk PVID:1 Tagged VLAN:10,20 Untagged VLAN:1 (connect to G2280x port23)
Note: To create VLANs on VigorSwitch, please go to Switch LAN >> VLAN Management >> Create Vlan page, and add the VLAN ID and VLAN name(optional).
VigorSwitch G2100 QoS Configuration
Go to G2100 management web >> Switch LAN >> VLAN Management >> Voice VLAN >> Properties.
- Select Enable as Voice VLAN State
- Select Voice(20) as Voice VLAN ID. Voice(20) was created in VLAN Settings
- Select Enable as Remark CoS/802.1p
- Select 7 as Remark Value, which is the highest CoS level. Please keep in mind, we will explain it later
- Select desired Aging Time value.(1440 minutes by default)
Go to Switch LAN >> VLAN Management >> Voice VLAN >> Telephony OUI Setting
- Enter the first 6 characters of the MAC address(es) for the IP phone(s)
- Give it a description or comment and click Add
If the packets match the Telephony OUI table, it will be considered as voice-vlan packets.
Go to Switch LAN >> VLAN Management >> Voice VLAN >> Port Setting This page allows the user to configure on which port Voice-VLAN is enabled.
- Select the Ports which connect to the IP phone, today we select GE7
- Select Enable as State
- Select the CoS mode based on the environment request. In our example, we select All
- Click Apply
NOTE: You might be confused right now because we didn't select GE6 at Voice-VLAN Port setting. The reason is the IP phone connected to GE6 doesn't have a VLAN tag, so phoneB won't able to join Voice-VLAN. (Please check G2100 VLAN port setting at previous step) Some IP phones don't have a tag on themself, while others do. So as phoneB and phoneC are different examples.
After configuring GE7, let's start to configure GE6
Go to QoS >> General >> Properties >> QoS >> Global Setting
- Select Basic as Qos Mode
- Select CoS/802.1p as Ingress Trust Mode
Go to QoS >> General >> Properties >> QoS >> Trust Ports, all ports are already enabled by default.
Go to QoS >> General >> Port Settings
- Select GE6 as Ports
- Select 7 as Ingress Default CoS
- Select Enable as Remark CoS
- Select DSCP as Remark DSCP/IP Precedence
We have now completed Voice-VLAN setting and QoS Port Setting. Before testing, we have to check CoS Mapping. Please go to QoS >> General >> CoS Mapping Value 7 means Ingress CoS is 7 which mapping to Queue is 8. 8 is the highest level of Queue, traffic assigned to this queue is processed first. After the processing, the packets on Queue 8 are mapped to Egress CoS 7, which means the Egress packets send out via GE8 will have 7 as the CoS frame.
This was only one example of how to set up Voice-VLAN and QoS on VigorSwitch series. There are more for different scenarios:
1/ Switch LAN >> VLAN Management >> Voice VLAN >> Port Setting >> CoS mode Some packets already have remark CoS/802.1p which may not match to Remark Value we configured. There are two modes as CoS mode.
- All - Regardless of the Value of Cos frame on Ingress Voice-VLAN packets, the CoS Value is applied to the configured Remark Value on the Properties page
- Src(Source) - The original CoS Value of Ingress Voice-VLAN packets won't be changed by Remark Value. Vigor Switch will apply the original value.
2/ QoS >> General >> Port Settings If we select Disable as Remark CoS, the Egress CoS won't apply to Egress packets, the CoS Value will remain the same as its Ingress Value.
Testing
At last, you can check with below testing to see whether QoS is working or not:
- We set up two PCs as traffic generators separately on G2280x and G2100
- Configure the link speed to 100M and generate more than 100M traffic between two switches
- If Voice-VLAN QoS is working, phone calls will be clear with good audio quality, not jitter and interrupted.
- Details
Deploying VLANs by SWM and VigorSwitch (DrayOS4)
- DrayOS 4, imported, central_management, lan_configuration, vlan_setup, switch_profile, pvid, external_device_discovery, trunk_port
1. Go to LAN >> VLAN, enable VLAN and add the VLANs you need. Remember that the port to which the VigorSwitch is connecting should be the member of every VLAN (which is LAN P3 in this example).
2. Go to LAN >> General Setup to enable the LAN subnet in use.
3. Go to Central Management >> External Device, make sure “External Device Auto Discovery” is enabled. You should see the VigorSwitch connecting to the router shows "On Line".
4. Go to Central Management >> Switch >> Profile, you will see the VigorSwitch is in New Switch List, click Add New to put the switch into Profile List.
5. The router will create a switch profile for it. Click on Index number to edit the settings.
6. Go to the VLAN tab for the VLAN settings. On the top, it shows the Router's VLAN setting for your reference, the LAN Port that marked gray is the router's LAN port that connects to the switch.
7. And below shows the VLAN available based on the router's VLAN settings. In this example, the router's LAN port 3 is a member for VLAN0, VLAN1, VLAN2, and VLAN3; therefore, there are four VLANs available for the switch's VLAN setup. The port that connects to the router will be marked gray and automatically configured as a trunk port.
8. For the rest of the ports, select the VLAN to which they should belong. If a port belongs to more than one tagged VLANs, you should also define the PVID.
9. Click Send to Device to write the settings to the switch. It might take a few seconds.
10. After the setup, we can connect a computer to the switch on different ports and check which IP address it gets from the router. For example, if we connect to the switch's port number 8, we see the computer obtained the IP 192.168.2.10, which means this port belongs to the router's LAN2.
- Details
