RTL8309SB
Datasheet
Single-chip 9-port 10/100Mbps Switch Controller
76
Track ID: JATR-1076-21 Rev. 1.4
8.3.2.
802.1Q Tagged-VID based VLAN
802.1Q tagged-VID based VLAN mapping uses a 12-bit explicit identifier in the VLAN tag to associate received packets with
a VLAN. Nine groups of VLAN membership registers, VLAN ID [A] membership [8:0] ~ VLAN ID [I] membership [8:0],
consist of ports that are in the same VLAN corresponding to the registers defined in VLAN ID [A] [11:0] ~ VLAN ID [I]
[11:0]. If the VID of a VLAN-tagged frame does not hit the VLAN ID [A] [11:0] ~ VLAN ID [I] [11:0], then the RTL8309SB
performs port-based VLAN mapping to the member set indexed by the Port n VLAN index [3:0]. Otherwise, the RTL8309SB
compares the explicit identifier in the VLAN tag with the nine VLAN registers to determine the VLAN association of this
frame, then forwards it to the member set of this VLAN. Two VIDs are reserved for special purposes. One of them is all ones
and is currently unused. The other is all zeros and indicates a priority tag, which is treated as an untagged frame.
When 802.1Q tag aware VLAN is enabled, the RTL8309SB performs 802.1Q tag-based VLAN mapping for tagged frames,
but performs port-based VLAN mapping for untagged frames. If 802.1Q tag-aware VLAN is disabled, the RTL8309SB
performs only port-based VLAN mapping both for non-tagged and tagged frames. Figure 6 illustrates the processing flow
when 802.1Q tag aware VLAN is disabled.
P0VLANIndex=0000
VIDI=12'h7ff
VIDH=12'h6ff
VIDG=12'h5ff
MemberA 1 0 0 0 0 0 0 0 1
MemberH 1 1 0 0 0 0 0 0 0
MemberG 1 0 1 0 0 0 0 0 0
MemberF 1 0 0 1 0 0 0 0 0
MemberE 1 0 0 0 1 0 0 0 0
MemberD 1 0 0 0 0 1 0 0 0
MemberC 1 0 0 0 0 0 1 0 0
MemberB 1 0 0 0 0 0 0 1 0
RTL8309SB
MemberI
1 1 1 1 1 1 1 1 1
Tagged
VIDF=12'h4ff
VIDE=12'h3ff
VIDD=12'h2ff
VIDC=12'h1ff
VIDB=12'h0ff
VIDA=12'h001
Search
VID table
P0
P1
P2
P3
P4
P5
P6
P7
P8
Un-tagged
------
802.1Q Tag
------
DA
SA
Length/Type
Length/Type
SA
DA
------
802.1Q Tag
------
DA
SA
Length/Type
Length/Type
SA
DA
Figure 6. Tagged and Untagged Packet Forwarding When 802.1Q Tag Aware VLAN is Disabled
Two VLAN ingress filtering functions are supported by the RTL8309SB in registers. One is the ‘a(chǎn)dmit VLAN tagged frame’
function, which provides the ability to receive VLAN-tagged frames only. Untagged or priority tagged (VID=0) frames will be
dropped. The other is the ‘ingress member set filtering’, which will drop frames if the receive port is not in the member set.
There are also two optional egress filtering functions supported by the RTL8309SB through strapping. One is ‘Leaky VLAN’,
which enables inter-VLAN unicast packet forwarding. That is, if the layer 2 look-up table search has a hit, then the unicast
packet will be forwarded to the egress port, ignoring the egress rule. The other is ‘ARP VLAN’, which broadcasts ARP packets
to all other ports, ignoring the egress rule.