* 3-bit field <= VPT(VLAN Priority Tags)
* Static VLANs = port-based VLANs
Classification:
CoS Value(0~7)
used to classify the packets by mapping packets to one of the output "queues".
Queue
Queue (1~4)
Packets arriving untagged are assigned a default VPT that is set on a per port basis
When no rules are defined, the traffic containing the predefined packet field (CoS or DSCP) is mapped according to the relevant trust modes table.
Priority
(lowest)
PCP Priority Acronym Traffic types
1 0 (lowest) BK Background
0 1 BE Best Effort
2 2 EE Excellent Effort
3 3 CA Critical Applications
4 4 VI Video, < 100 ms latency and jitter
5 5 VO Voice, < 10 ms latency and jitter
6 6 IC Internetwork Control
7 7 (highest) NC Network Control
(highest)
Class - Queue mapping
class Queue
0,3 2 # 因為 PCP 的 1 才是要高低 Priority
1,2 1
4,5 3
6,7 4
Dell 2824 Setting
CoS Mode(E/D)
Trust Mode (802.1P/DSCP)
Determines which "packet fields" to use for classifying packets entering the device.
When no rules are defined, the traffic containing the predefined packet field (CoS or DSCP) is
mapped according to the relevant trust modes table.
Traffic not containing a predefined packet field is mapped to "best effort".
CoS (802.1P) — The output queue assignment is determined by the IEEE802.1p VLAN priority tag (VPT) or
by the default VPT assigned to a port.
QoS Queue Settings(Scheduling):
Strict Priority - Ensures that time-sensitive applications are always forwarded through an expedited path.
Weighted Round Robin — Ensures that a single application does not dominate the device forwarding capacity.
T (Trunk)
The interface is a member of a VLAN. All packets forwarded by the interface are tagged. (The packets contain VLAN information)
| Host | ---- |SW port| -- forwarded packets --> |SW port| ---- |Host|
U
The interface is a VLAN member. Packets forwarded by the interface are untagged.
F
The interface is denied membership to a VLAN.
Blank
The interface is not a VLAN member.
Example of the VLAN port table.
Ports: 1 2 3 4 5 6 7 8 VLAN 1: U B B B B B B B VLAN 2: T U U U U B B B VLAN 3: T B B B B U U U
在 VLAN 2 時, Port 2 無 tag 的 package 入, Port 1 出的 packet 係有 tag 的. Port 1 有 TAG 的 package 入, Port 2 出係無 tag 的
Frame Type - Packet type accepted on the port. Possible values are:
– Admit Tag Only — Only tagged packets are accepted on the port.
– Admit All - Both tagged and untagged packets are accepted on the port.
Ingress filtering - discards packets that are destined to VLANs of which the specific is not a member.
Linux set vlan tagged
lsmod | grep 8021q
modprobe 8021q
入改 /etc/modules
8021q
# Create eth0.X
# X: VLAN ID
vconfig add eth0 X
vconfig add eth1.2
Added VLAN with VID == 2 to IF -:eth1:-
ifconfig eth1.2 up
# re-mapped the default priority 0 to egress priority 7
vconfig set_egress_map eth0.X 0 7
cat /proc/net/vlan/eth1.2
eth1.2 VID: 2 REORDER_HDR: 1 dev->priv_flags: 1 total frames received 0 total bytes received 0 Broadcast/Multicast Rcvd 0 total frames transmitted 60 total bytes transmitted 4310 Device: eth1 INGRESS priority mappings: 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0 EGRESS priority mappings:
就算 "ifconfig eth1.2 down" 後, 這 file 仍會存在並且更新數據 !
# The default skb-priority is 0
set_egress_map [vlan-name] [skb_priority] [vlan_qos]
set_ingress_map [vlan-name] [skb_priority] [vlan_qos]
Remove a vlan
- rem # Removes
i.e. vconfig rem eth1.2
# 檔案 /proc/net/vlan/eth1.2 會消失了
Usage:
/etc/network/interfaces
ifconfig eth0.222 up
ifconfig eth0.222 10.10.10.1 netmask 255.255.255.0
相當於
auto eth0.222
iface eth0.222 inet static
address 10.10.10.1
netmask 255.255.255.0
vlan-raw-device eth0
Window
Control Panel > Network and Internet > Network and Sharing Center > Change Adapter settings.
NIC > Properties > Advanced > Priority and VLAN Enabled