Professional Documents
Culture Documents
Table of Contents
1
2
3
4
Table of Contents................................................................................................................................... 1
Overview ............................................................................................................................................... 2
Basic Hardware Architecture................................................................................................................. 2
ONU Queue Configuration.................................................................................................................... 3
4.1
Set ONU Queue Configuration Host Interface Message ............................................................. 4
4.2
Example: Default ONU Configuration........................................................................................ 6
5
Downstream Broadcast Traffic .............................................................................................................. 6
6
Traffic Filtering and Classification........................................................................................................ 8
6.1
Rules Defined .............................................................................................................................. 9
6.2
The Rule Search Process ........................................................................................................... 10
6.3
Use of Precedence to Create Unambiguous Rule Sets .............................................................. 11
6.4
System Rules and Precedence ................................................................................................... 12
6.5
Viewing Default Rules via the ONU CLI.................................................................................. 13
6.6
Rule Tables................................................................................................................................ 14
6.7
Lookup Engine Field Definition................................................................................................ 15
6.7.1
Layer Select Values .............................................................................................................. 16
6.7.2
Preamble/Layer 2 Header ..................................................................................................... 16
6.7.3
Layer 2 Type field ................................................................................................................ 18
6.7.4
Layer 2 VLAN tag............................................................................................................. 20
6.7.5
Layer 3 IPv4 ...................................................................................................................... 20
6.7.6
Layer 4 XXX/IPv4............................................................................................................. 21
6.7.7
Layer 3 IPv6 ...................................................................................................................... 21
7
Field Code Examples........................................................................................................................... 21
7.1
Viewing and Editing Field Code Values via the ONU CLI....................................................... 23
8
Tips for Designing Rules ..................................................................................................................... 24
8.1
Default Rules............................................................................................................................. 24
8.2
Conditions Involving Logical OR ............................................................................................. 25
8.3
Special Considerations when Working with TK3711 Rules ..................................................... 26
8.3.1
Example 1: Logical AND ..................................................................................................... 26
8.3.2
Example 2: Logical OR ........................................................................................................ 27
8.4
Identical Downstream Flows..................................................................................................... 27
8.5
One FIFO Fed by Multiple UNI Ports....................................................................................... 27
8.6
Two downstream FIFOs receiving frames from the same link.................................................. 28
9
Teknovus FIFO Labeling Convention Review .................................................................................... 28
9.1
Upstream ................................................................................................................................... 28
9.2
Downstream .............................................................................................................................. 29
10 Example Configurations ...................................................................................................................... 29
10.1
Teknovus Default ...................................................................................................................... 29
10.1.1 Sample Classification Scheme.............................................................................................. 30
10.2
One UNI, Two Links................................................................................................................. 30
10.2.1 Sample Classification Scheme.............................................................................................. 31
10.3
One UNI, One Link, Four FIFOs .............................................................................................. 32
10.3.1 Sample Classification Scheme.............................................................................................. 32
10.4
Two FIFOs per UNI .................................................................................................................. 33
10.4.1 Sample Classification Scheme.............................................................................................. 33
10.5
One UNI, Two Links, Two FIFOs per Link.............................................................................. 34
10.5.1 Sample Classification Scheme.............................................................................................. 34
10.6
Asymmetrical Configuration ..................................................................................................... 35
10.6.1 Sample Classification Scheme.............................................................................................. 35
11 IGMP Snooping Parameters ................................................................................................................ 36
1
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
11.1
L3-to-L2 Binding used by Snooping Function (as per RFC 1112) ........................................... 36
11.2
IP Multicast Addresses Always Forwarded............................................................................... 37
12 Q and A................................................................................................................................................ 38
Overview
The Teknovus EPON System allows for host interface configuration of ONU traffic filtering, traffic
classification, and queue configuration. These commands allow the host interface to configure an ONU for
new services in the field. Both TK3701 and TK3711 provide similar functionality with different resources
available. This technical note describes the resources available to control the user data flow and the
method for configuring different system solutions.
Classification is the process of deciding which frames are forwarded to particular queues and passed
through the ONU. Filtering is the process of deciding which frames should be dropped, and not passed
through the ONU. An ONU has a queue configuration, which describes the number and sizes of queues in
use, as well as their connectivity to user ports and EPON logical links. An ONU also has a classification
scheme, which is a set of rules describing how traffic is forwarded to priority queues in either direction, and
possibly a set of filtering rules to control access to the PON.
Port 1
CPU
Port 2
System
User 0
EPON 0
UNI 1
User 1
Link 0
Hi
Link 1
System
User 0
UNI 2
User 1
Each link is scheduled
independently by the OLT.
A Host provisioned
classification scheme is used
to differentiate services
based on one or more fields
in the frame.
TK3711
Low
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
EPON 0
Hi
EPON 0
Link 0
Multicast/Unicast 0
Unicast 1
Link 1
New multicast links are
assigned dynamically by the
OLT when a link is
provisioned in a Shared
VLAN.
UNI 1
Unicast 2
Multicast 0
Low
Multicast 1
Multicast/Unicast 0
Unicast 1
CPU
UNI 2
Unicast 2
TK3711
The Set Onu Queue Configuration host interface command configures the ONUs queue sizes, logical link
count, and connectivity of the queues. A single host interface command defines the queue configurations
for the entire physical ONU. The Get Onu Queue Configuration command can be used to query the active
configuration.
3
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
These commands allow for the configuration of user queues only. ONU firmware requires some resources
for system operation. The table below lists the resources available for configuration on the Teknovus ONU
chips:
Queue Space Allocation and Limits
Attribute
Virtual EPON MACs (LLIDs)
Upstream Queues
Total Upstream Buffer Space
System Upstream Buffer Space
User Data Upstream Buffer Space
Queue Size Units
Total Queues
Reserved Queues
User Data Queues
Downstream Queues
Total Downstream Buffer Space
System Downstream Buffer Space
User Data Downstream Buffer Space
Queue Size Units
Flooding Queue Space
Total Queues
Reserved Queues
User Data Queues
TK3701
3
TK3711
6
64K Bytes
4K Bytes
60K Bytes
1K Bytes
8
1***
7
1024K Bytes**
16K Bytes
960K Bytes
4K Bytes
16
8
8
64K Bytes
4K Bytes
60K Bytes
1K Bytes
Unused Space
Must be >= 2
8
2***
6
128K Bytes
6K Bytes
122K Bytes
1K Bytes
Unused Space
Must be >= 4
16
4
12
** Assuming 256Kx32 external SRAM; 512K byte with 128Kx32 external SRAM.
*** Enabling some firmware features may consume additional resources. For example, IGMP Snooping
requires one queue per port upstream, and one queue downstream if either or both UNI ports are enabled.
A TK3701 with IGMP Snooping enabled on both ports would have 5 queues remaining for the user in each
direction. The ONU Get Information message reports the resources available for user data configuration.
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
1
1
Link 0 Configuration
M0, the number of upstream
queues for Link 0
Queue 0 Size
Units
Min
Max
TK3701
TK3711
1
1
3
6
TK3701 1KB
TK3711 4KB
2
1
60
240
1
1
6
12
2
2
60
122
1
2
2
1
58
120
1
Queue M - 1 Size
1
Link 1 Configuration
1
Link N 1 Configuration
Downstream Configuration
1
P, the number of Ports to configure.
Port 0 Configuration (i.e. Ethernet port 1)
1
J, the number of
TK3701
downstream queues for Port TK3711
0
1
Queue 0 Size
TK3701 1KB
TK3711 1KB
1
Queue J - 1 Size
Port 1 Configuration
Port P 1 Configuration
Multicast Queue Configuration
1
R, the number of Multicast Queues
1
1
Queue 0 Size
TK3701 1KB
TK3711 1KB
Default
Queue sizes are listed in highest priority to lowest priority order. Queue sizes are given in queue
increments, which vary in size based on the device and direction. For example, the upstream queue
increment on the TK3711 is 4 Kbytes, while the upstream queue increment on the TK3701 is 1 Kbytes.
Note that queue size of zero need not (and cannot) be specified. Queue numbers are relative to their
destination, and are numbered 0..N-1, where 0 is the highest priority queue of the N queues connected to
that destination.
Upstream, queues are associated with their destination Logical Link. Each link must have at least one
queue in the upstream direction.
Downstream, queues are associated with their destination port. A port may have zero queues if it is unused.
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
Value
12:34:56:78:9A:BC
2
1
30
1
30
2
1
22
1
22
1
16
Note: The ONU must be reset after applying the new queue configuration.
There are several types of multicast traffic, including broadcast traffic, on a typical network. Not all the
multicast frames have the same purpose. Frames may contain a broadcast or multicast Ethernet address,
which typically means they should be broadcast to all ports on a LAN. The bridge learning process
requires flooding frames with unicast addresses to all ports when the address has not been learned. There is
also IP multicast traffic, which uses a specific range of Ethernet multicast addresses, and involves special
handling controlled via snooping the IGMP control protocol. Each of these traffic types is handled
independently. When analyzing broadcast or multicast traffic, it is important to keep in mind exactly
what sort of traffic is being handled and the requirements for that particular type of traffic.
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
The purpose of VLAN tags is to divide a single physical network into several Virtual LANs, or VLANs.
The VLAN ID (VID) in the VLAN tag identifies the virtual network to which the frame belongs. Frames
without VLAN tags can be considered to belong to the virtual network with a null VID.
IEEE 802.3ah defines a special broadcast LLID, value 0x7FFF, which by definition is received by all
ONUs on the PON. Not all ONUs may belong to the same virtual network. A VLAN may consist of only
a few subscribers on the PON. It is desirable to limit broadcast traffic on the VLAN to only those
subscribers that receive it. Teknovus firmware accommodates this requirement by using an additional
LLID for broadcast traffic on each VLAN. The Simple Bridge that is, the network without VLAN tags
uses the the standard broadcast LLID for its broadcast channel. Each Shared VLAN uses its own LLID
to carry traffic that should be flooded within the VLAN. This LLID is a broadcast LLID for that VLAN,
though it has a different LLID value than 0x7FFF. Frames on the broadcast channel for a particular VLAN
are flooded out all ports on the ONU that belong to that VLAN. (Note that not all UNI ports on an ONU
necessarily belong to a given VLAN. The connection is a function of the classification rules on the ONU.)
IP multicast, most importantly digital video in common carrier applications, is another category of
multicast traffic. Video delivery is typically considered a separate service offering from Internet access,
VPNs, or other subscriber services, and so it deserves separate handling.. Teknovus firmware places IP
multicast traffic on the standard broadcast LLID to ensure it is available to all ONUs regardless of VLAN
mode. ONUs forward IP multicast groups based on the results of snooping the IGMP protocol. IP
multicast traffic is forwarded to those ports on an ONU which have Joined that group by using IGMP. An
IP multicast frame might be forwarded only to one port, or it might be flooded to all ports on the ONU if all
ports have joined that particular group.
The TK3701 and TK3711 hardware deals with flooding frames in slightly different fashion. The TK3701
is capable of copying frames from a single downstream queue to multiple UNI ports. Traffic that must be
sent out all UNI ports is placed into a flooding queue, which then transmits to all ports. Traffic that only
needs to reach a single UNI port does not use a flooding queue, even if the Ethernet address is a broadcast
type. Shared VLANs or Dedicated VLANs, or IP multicast, might only need to reach a single port, and
thus would not use the flooding queue.
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
The TK3711 improves on this architecture by adding the ability to copy downstream frames into multiple
queues. Instead of using a queue that connects to both ports, the TK3711 copies a flooded frame into two
queues, each of which connects to a different port. No flooding queue is needed.
The Host Interface message Set ONU Downstream Broadcast Queue allows the Host processor to control
which of several downstream queues on each port is used for flooding traffic from the VLAN broadcast
LLID. When firmware decides that traffic must be forwarded to a single UNI port, the queue set with this
command is used. When firmware decides that traffic must be forwarded to all UNI ports, the TK3701
firmware places traffic into the allocated flooding queue, while the TK3711 uses the broadcast queue
defined for each port by this command, copying the frame to both queues in the DLU.
The Host Interface also provides a field in the Set ONU IGMP Snooping Parameters message for
selecting the IP multicast forwarding queue. This value is used in a similar fashion to that for the broadcast
channel for the ONU VLANs. However, it is used in the forwarding rules for IP multicast. Thus,
downstream video traffic can be directed to a different queue than regular broadcast traffic if desired.
The queue(s) selected for broadcast and IP multicast may be the same as those used for unicast data, or they
may be queues dedicated to only to this type of traffic, as the Host chooses.
Each Ethernet port on the ONU is associated with a particular lookup engine (LUE). The role of the LUE is
to filter unwanted frames from the data stream, as well as classify desirable traffic into particular priority
queues based on specific attributes of incoming frames.
The LUE associated with an ONU UNI port is referred to as an ELU (Ethernet Lookup Engine). The LUE
associated with the EPON port is known as the DLU (Downstream Lookup Engine). Gigabit ONUs also
feature a GLU (Gigabit Lookup engine) associated with the GbE UNI port.
The operation LUEs can be configured remotely by the Host Interface. This is accomplished by
provisioning rules. The ONU has two different types of lookup engine rules. Classification rules are used
8
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
to forward a class of frames to a particular queue. Filtering rules apply to an entire port and are used to
block particular frames.
Description
Never match
Equal to
Not equal to
Less than or equal to
Greater than or equal to
Match when field exists in the frame
Match when field does not exist in the frame
Always match
Each rule also has a result. The result is the action to be taken on the frame if the rule matches the frame.
Results in filtering rules contain an action to discard a frame. Results in classification rules contain an
action to forward the frame, and also the queue to which the frame should be forwarded. The TK3711 (and
OLT chips) supports additional actions, such as inserting or deleting a VLAN tag.
Each rule has a precedence value. All rules in the lookup engine are matched against every frame in an
unspecified order. So, it is possible to have more than one rule that matches a single frame. These rules
may have different results. The precedence value is used to resolve cases where more than one rule
matches a frame. The result of the rule with the lowest precedence value is used.
Conflicting rules at the same precedence level should not be created. The result in such a case will be the
result of one or the other rule, but which result is chosen will be indeterminate and could even vary from
frame to frame.
The rest of this document uses a pseudocode representation of a rule as shown below.
5: if (EtherType == 0800) then queue = link 0 queue 0;
The leading integer denotes the precedence of the rule (discussed below). Clauses are reprented by the
conditions in parentheses. The result of the rule follows then then keyword.
9
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
Every rule in the LUE table is evaluated for every frame. Thus, the condition if (Ethertype == 8808) OR
(Ethertype == 8809) can be represented as two rules, each with one clause, rather than one rule with two
clauses combined with OR.
5: if (Ethertype == 8808) then discard;
5: if (Ethertype == 8809) then discard;
That is, the result of the rule with the highest precedence is applied to the frame.
The TK3711 uses a slightly modified method of combining results of the rule search:
Tk3711RuleSearch: (frame, ruleSet)
result.queue = queue 0
result.action = forward # hardware default action is changed by a precedence 7 system rule
result.precedence = LowestPrecedence # numerically smaller values have higher precedence
for each rule in ruleSet
if (rule matches frame)
if (rule.precedence == result.precedence )
result.queue |= rule.queue
result.action |= rule.action # Filtering rules return Discard
else if (rule.precedence < result.precedence)
result.queue = rule.queue
result.action = rule.action # Filtering rules return Discard
result.precedence = rule.precedence
ApplyResult (frame, result)
10
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
In other words, results for rules at the same precedence level in the TK3711 are bitwise ORed together.
This effect can sometimes be useful when building up a queue destination using several rules. However, it
is also possible to misplace a frame into a system FIFO using this feature.
For this reason system vendors SHOULD take care to ensure that a particular frame is only classified into a
single TK3701 FIFO. In the case of the TK3711 the rules MUST be provisioned such that, for any
particular frame, only one FIFO is ever used for classification. Otherwise the result of the bitwise OR
operation could place an arbitrary frame into a System FIFO.
Note: Filtering and classification rules may be changed dynamically by the Host software without
requiring the ONU to be reset. Only changing the queue configuration requires that the ONU be reset.
Frames
Forwarded
to Q[A]
Frames
Frames
Forwarded
to Q[A]
BAD Forwarded
to Q[B]
Frames
Forwarded
to Q[B]
OK
Figure 3: Invalid and Valid Classification Schemes
If the rules that forward to QA can match the same frame as the rules that forward to QB, the result is
ambiguous. Consider an attempt to forward all IP traffic into a low priority queue, except for that traffic
from one privileged station with MAC address 00-0d-b6-12-34-56.
11
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
12
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
Precedence
0
1
2
3
4
5
6
7
System Rules
Capture frames to ONU
Discard frames for other
ONUs
IP multicast forwarding
IP multicast discard
Bridge learning discard
Broadcast forwarding
Notes
Default discard.
In order to provide customers with maximum flexibility, firmware allows use of any precedence level on a
rule. However, care must be taken not to interfere with the operation of system rules by applying user rules
that conflict with system rules. For example, a discard all frames rule at precedence 0 could prevent the
ONU from properly responding to frames addressed to it, or even from registering with the OLT. This
may, in fact, be the effect desired, but it could also be an error. Most user rules should be restricted to
precedence 4 through 6. Precedence 2 is the level used by the rules created by bridge learning to discard
user frames, and is a good general value for filter rules.
13
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
To view the first 3 upstream filter rules for UNI Port 1 enter:
The TK3711 provides two commands for this purpose /elu/rule and /glu/rule. The syntax of these
commands is identical to that used to view the downstream filter rules. /elu/rule displays the rules for the
GbE port, and /elu/rule is used to display the rules for the 10/100 port. The meaning of the Field index
values is discussed in the section Lookup Engine Field Definition.
Attribute
TK3701
Downstream
Total Clauses
Dynamic learning
Reserved for firmware
Available for users
Max Clause Per Rule
Precedence Levels
64
0
16
48
8
8
Upstream
(per port)
128
64
16
48
8
8
TK3711
Downstream
128
0
32
96
2
8
Upstream
(per port)
128
64
16
48
8
8
Filtering rules and classification rules share the same user rule space. If enabled, IGMP forwarding rules
will also share this space, requiring one rule clause per group forwarded.
14
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
Bits
48
48
2
3
32
32
4
5
6
32
32
32
7
8
9
10
11
32
16
16
16
16
TK3701
Downstream
L2 Dest Addr
Upstream
L2 Dest
Addr
L2 Source
Addr
User
L2
Length/Type
VLAN ID
User
IPv4
Protocol
User
L2 Source
Addr
Link index
L2
Length/Type
VLAN ID
User
IPv4 Protocol
User
TK3711
Downstream
L2 Dest
Addr
L2 Source
Addr
Link index
L2
Length/Type
VLAN ID
User
IPv4
Protocol
User
User
User
User
User
Upstream
L2 Dest
Addr
L2 Source
Addr
User
L2
Length/Type
VLAN ID
User
IPv4
Protocol
User
User
User
User
User
TK3713
Downstream
L2 Dest
Addr
L2 Source
Addr
Link index
L2
Length/Type
VLAN ID
User
IPv4
Protocol
User
User
User
User
User
Upstream
L2 Dest
Addr
L2 Source
Addr
User
L2
Length/Type
VLAN ID
User
IPv4
Protocol
User
User
User
User
User
The Get/Set ONU Field Selector host interface messages allows the host processor to query host interface
configurations and set values for the user configured fields.
A field may be any string of bits in a frame, starting at an offset from the beginning of a particular L2/3/4
header, up to 32 bits wide for fields 0..7. Fields 8..11 in the TK3711 can be up to 16 bits wide. A field in
a frame is defined by a field descriptor code which packs the protocol layer, offset into that layer, least
significant bit of the field, and the field bit width into a single, compact, 16-bit value.
Bits
15:11
10:6
5:3
2:0
Value
Bit Width (0..31 represents 1..32
Bit offset (LSB)
Dword offset (Dword = 32 bits)
Layer Select
Note that the bit width is one less than the actual width of the field. Since a field cannot be of width zero,
this convention allows encoding widths up to 32 bits in only five bits.
15
0
15
14
13
12
Width (5 bits)
1
1
1
7
11
10
9
8
7
Bit offset (5 bits)
0
0
0
8
5
4
3
Dword (3 bits)
0
0
0
0
0
7/1/2005
Teknovus Confidential - View Under NDA Only
2
1
0
Layer (3 bits)
0
1
0
2
TN303_SW_OnuDataPath
Technical Note
A dword is a 32-bit word. The 3-bit dword offset ranges from 0 to 7, and so a field can reside anywhere
in the first 32 bytes of a particular protocol layer. On the TK3713, the dword offset is a 4 bit field, and so
the lookup engine can reach up to 64 bytes into a particular protocol layer.
16
15
14
13
Width (5 bits)
1
1
1
F
0
0
12
11
10
9
8
Bit offset (5 bits)
0
0
0
0
7
0
5
4
3
Dword (4 bits)
0
0
0
0
0
2
1
0
Layer (3 bits)
0
1
0
2
Layer
Disabled Field Select
Preamble/Layer 2 - Header
Layer 2 - Type field 1
Layer 2 - VLAN tag 2
Reserved
Layer 3 IPv4 Header
Layer 4 XXX/IPv4 Header
Layer 3 IPv6 Header
Reserved
The last EtherType field in the frame will be the one that is selected by the LUE.
Based on the Layer Select, all necessary fields are validated by the LUE. For instance, if Layer
Select 3 is specified, the frame will not match unless the EtherType field == 0x8100 (the VLAN
EtherType), and so on. All necessary validation up to the beginning of the layer is performed by
the ONU. Therefore, the host software should not provision redundant rules to validate the frame.
Note: Layer selects in the TK3701Y do not qualify the EtherType field for layers greater than 2.
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
value, the field will store a not present value. All comparisons to a field with a not present value will
fail comparison except a check for not present.
3 3 2 2 2 2 2 2
1 0 9 8 7 6 5 4
Reserved (Unknown)
Reserved (Always 0)
L2 DA [31:0]
L2 SA [47:16]
L2 SA[15:0]
DSAP [7:0]
OUI [15:0]
2 2 2 2 1 1
3 2 1 0 9 8
LLID Value
1 1
7 6
1 1
5 4
1 1
3 2
1 1
1 0
9 8
7 6
5 4
3 2
1 0
LLID Index
L2 DA [47:32]
SSAP [7:0]
OUI [23:16]
The following table shows a frame without the SNAP encapsulation. Although the L2 type field is present
in both of these tables, it is at different dword offsets. The different dword offsets make it impossible to
gather the type field of the packet using this layer select into a single field. The type should be parsed
using the L2 type field since this field will exist when the value is an EtherType, not a length field.
3 3 2 2 2 2 2 2
1 0 9 8 7 6 5 4
Reserved (Unknown)
Reserved (Always 0)
L2 DA [31:0]
L2 SA [47:16]
L2 SA[15:0]
17
2 2 2 2 1 1
3 2 1 0 9 8
LLID Value
1 1
7 6
1 1
5 4
1 1
3 2
1 1
1 0
9 8
7 6
5 4
3 2
1 0
LLID Index
L2 DA [47:32]
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
EPON MAC
0xCD9E
Physical LLID
Link Index
0x5AC2
0x2452
0xCD9E
Ethernet Frame
LUE
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
3 3 2 2 2 2 2 2 2 2
1 0 9 8 7 6 5 4 3 2
Reserved (Unknown value)
19
2 2
1 0
1 1
9 8
1 1
7 6
1 1 1 1 1 1 9 8
5 4 3 2 1 0
Layer 2 Type [15:0]
7/1/2005
Teknovus Confidential - View Under NDA Only
7 6
5 4
3 2
1 0
TN303_SW_OnuDataPath
Technical Note
2 2 2 2 2 2
7 6 5 4 3 2
VID [11:0]
2 2
1 0
1 1
9 8
1 1
7 6
1 1 1 1 1 1 9 8 7 6
5 4 3 2 1 0
Layer 2 Type/Len [15:0]
VID [11:0]
VID [11:0]
5 4
3 2
1 0
20
2 2 2 2 1 1
3 2 1 0 9 8
Type of Service
Protocol
1 1
7 6
1 1 1 1 1 1 9 8 7 6
5 4 3 2 1 0
Length of datagram
Flags
Fragment Offset
Header Checksum
7/1/2005
Teknovus Confidential - View Under NDA Only
5 4
3 2
1 0
TN303_SW_OnuDataPath
Technical Note
2 2
3 2
2 2
1 0
1 1
9 8
1 1
7 6
1 1 1 1 1 1 9 8
5 4 3 2 1 0
Destination Port [15:0]
Checksum [15:0]
7 6
5 4
3 2
1 0
2 2
1 0
1 1 1 1 1 1 1 1 1 1
9 8 7 6 5 4 3 2 1 0
Flow Label
Next Header
9 8
7 6
5 4
3 2
1 0
Hop Limit
Example: EtherType
The EtherType is found in the Layer 2 Type layer select (2). It is in the first dword, which is to say offset
0. The field is 16 bits wide, starting at bit 0.
15
0
14
13
12
11
Width (16 1 = 15)
1
1
1
1
7
10
8
7
Bit offset (0)
0
0
0
0
8
4
3
Dword (0)
0
0
0
0
0
1
0
Layer (2)
0
1
0
2
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
The VID would be found in the Layer 2 VLAN Tag layer select (3). The VID is in dword 0, 12 bits wide,
starting at bit 16.
15
0
14
13
12
11
Width (12 1 = 11)
1
0
1
1
5
10
9
8
7
Bit offset (16)
0
0
0
4
3
Dword (0)
0
0
0
1
0
Layer (3)
0
1
1
3
14
13
12
Width (3 1 = 2)
0
0
1
1
11
10
9
8
7
Bit offset (16)
0
1
0
6
1
4
3
Dword (0)
0
0
0
1
0
Layer (6)
1
1
0
5
So, the field code for the IP Precedence field would be 1545 (hex).
Example: TCP IP Port Number
The layer select table shows that Number 6 is the L4 TCP/IP port.
15
0
14
13
12
Width (16-1=15)
1
1
1
7
11
10
9
8
7
Bit offset (21)
0
0
0
C
4
3
Dword (0)
0
0
0
0
0
1
0
Layer (5)
1
0
1
5
So, the field code for TCP/UDP port number 7C05 (hex).
The following table lists field codes for commonly used IPV6 classification fields:
IPV6 Field Code
9807
3D07
1F07
380F
3A0F
7C0F
F817
22
TN303_SW_OnuDataPath
Technical Note
F81F
F827
F82F
F837
F83F
7.1 Viewing and Editing Field Code Values via the ONU CLI
The ONU CLI provides the ability to view and modify field select values. Two commands are provided to
modify the default field select values /pers/upfield and /pers/dnfield. Entering either command with no
arguments will display the current default.
3711/pers/>dnfield
Field
0:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
Up
0000
0000
0000
7802
5c03
1545
3c15
1743
1647
3d07
0000
0000
Down
0000
0000
3809
7802
5c03
1545
3c15
1743
1647
3d07
0000
0000
The field select values at index [0, 2] upstream and index [0, 1] downstream are reserved by the OLT and
cannot be changed.
Reserved Index Definition
Index Meaning
0
Destination MAC Address
1
Source MAC Address
2
Link Index
Use the upfield command to modify the field select for UNI ports and use the dnfield command to modify
the field select for downstream ports. The command takes as its arguments the field select index of the field
to be modified followed by the new definition. e.g. /pers/upfield 10 0x1545 will modify field 10 to select
IPv4-ToS.
The ONU will display a human readable interpretation of the field select values with the field command.
For instance to display the value for field 9 upstream, enter:
3711>/elu/field 9
3d07 => L3 IPv6 DWord +0 Bits 27:20
23
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
25
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
26
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
Rule
If Exists (DA), Drop
if EtherType != 0x0800 (IPv4), Forward
if IPv4 Protocol != TCP, Forward
if TCP Port <= 19, Forward
if TCP Port >= 26, Forward
This example uses the user defined field 7 to extract the TCP port from the TCP header for use in the rule
comparison.
The result of this Logical OR rule setting is identical to the result of the Logical AND rule setting in
example 1. It is recommended to use this type of logic for TK3711 ONUs when complex rules are
required.
Port 1
System
EPON 0
User 0
UNI 1
Link 0
Link 1
System
User 0
TK3711
NG
UNI 2
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
The mechanism to resolve such a race condition would involve complex hardware, such as a second layer
of priority queues. A far les costly solution is to simply allocate each port its own priority queue.
This example illustrates a second problem. Link 1 is fed by 2 different ports. This is functionally
acceptable, but will cause certain link statistics to be calculated as the sum of both links.
8.6 Two downstream FIFOs receiving frames from the same link
Downstream Data Path
EPON 0
CPU
EPON 0
Link 0
Link 1
Multicast/Unicast 0
UNI 1
Multicast Unicast 1
Multicast 0
Multicast 1
TK3711
NG
UNI 2
Teknovus uses a hierarchal labeling convention to denote a particular ONU FIFO. The label contains all
information necessary to uniquely identify any FIFO known to the Element Management Layer.
Decomposed from left to right, each field specifies an entity encompassing the next field. The first field
identifies an ONU or Logical Link. The second field identifies a particular port associated with the
ONU/Link. The last field identifies a queue feeding into that port.
9.1 Upstream
Upstream labels take the form: (M + i).p.q, where:
1.
2.
3.
28
M + i, Specifies the link to which the frames shall be forwarded. M is the base MAC of the ONU,
i is the link index.
p specifies the egress ONU port used for classification. This is always the EPON port 0.
q specifies the ONU queue for classification, associated with the link from 1. Remember that
system queues are not visible to the Host. The Teknovus convention, is to number only the user
FIFOs, starting at 0. Where the 0th queue is the highest priority FIFO.
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
9.2 Downstream
Downstream labels take the form: M.p.q, where:
1.
2.
3.
M specifies the link to which the frames shall be forwarded. M is the base MAC of the ONU, i is
the link index.
p specifies the egress ONU port used for classification. Upstream this is always the EPON port 0.
q specifies the ONU queue for classification, associated with the port from 2. Remember that the
processor queues are not visible to the Host. The Teknovus convention, is to number only the user
FIFOs, starting at 0. Where the 0th queue is the highest priority FIFO
10 Example Configurations
10.1 Teknovus Default
Downstream Data Path
Port 1
CPU
Port 2
EPON 0
CPU
EPON 0
System
EPON 0
User 0
UNI 1
Link 0
Link 0
User 0 [Unicast]
Link 1
Flooding [Multicast]
UNI 1
Multicast 0
Link 1
System
User 0
User 0 [Unicast]
UNI 2
UNI 2
Flooding [Multicast]
TK3711
TK3711
29
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
Forward to FIFO
(M + 0).0.0
Received by UNI 2
Rule Level
If
5
Exists ( L2-DA )
Forward to FIFO
(M + 1).0.0
Received by EPON 0
Rule Level
If
5
Link Index == 0
5
Link Index == 1
Forward to FIFO
M.1.0
M.2.0
The Exists operator is used to test whether or not the provisioned field is present in the frame. For binary
operators, if the field does not exist the operator will always return false (the notable exception being
TK3701Y L3 EtherType.) However, it is sometimes useful to classify traffic based on the existence of a
field only. For instance Exists ( IPv4-SA ) could be used to classify all IPv4 traffic to a particular ONU
FIFO. By default the ONU drops all traffic with a filter rule of precedence 7. The Exists, clause is used
only to override the default classification rule. All traffic received by port 1 shall be forwarded to link 0
and all packets received by port 2 shall be classified to link 1.
Port 1
EPON 0
EPON 0
System
EPON 0
User 0
CPU
UNI 1
Link 0
Link 1
Link 0
Multicast/Unicast 0
UNI 1
Unicast 1
Multicast 0
Link 1
Multicast 1
System
User 0
TK3711
UNI 2
UNI 2
TK3711
30
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
Forward to FIFO
(M + 0).0.0
(M + 1).0.0
Received by EPON 0
Rule Level
If
5
Link Index == 0
5
Link Index == 1
Forward to FIFO
M.1.0
M.2.0
In this example if the IPv4 SA == 192.168.1.2, the traffic will be classified into link 1s first user FIFO (0),
else the traffic will be sent to link 2s first user FIFO (0). Notice that in this case Exists ( L2-DA ) == True,
even when IPv4 SA == 192.168.1.2. How is this conflicting classification resolved? Rules with a higher
precedence have a lower Rule Level. If two rules are both true the rule with the higher precedence is used.
31
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
Port 1
CPU
EPON 0
EPON 0
System
EPON 0
User 0
CPU
UNI 1
Link 0
User 1
UNI 1
User 2 [Unicast]
Multicast 0
Link 0
User 2
User 3 [Unicast]
User 3
UNI 2
TK3701
UNI 2
TK3701
Forward to FIFO
(M + 0).0.0
(M + 0).0.1
(M + 0).0.2
(M + 0).0.3
(M + 0).0.3
Forward to FIFO
M.1.0
M.1.1
M.1.2
M.1.3
M.1.3
7/1/2005
TN303_SW_OnuDataPath
Technical Note
Port 1
CPU
Port 2
EPON 0
CPU
EPON 0
System
User 0 [Multicast/Unicast]
EPON 0
User 0
UNI 1
Link 0
Link 1
User 1
Link 0
UNI 1
User 1 [Unicast]
Multicast 0
Link 1
Multicast 1
System
User 0 [Multicast/Unicast]
User 0
UNI 2
UNI 2
User 1 [Unicast]
User 1
TK3711
TK3711
Forward to FIFO
(M + 0).0.0
(M + 1).0.1
Received by UNI 2
Rule Level
If
4
CoS <= 3
5
CoS >= 4
Forward to FIFO
(M + 1).0.0
(M + 1).0.1
Received by EPON 0
Rule Level
If
Link Index == 0
4
ToS <= 3
5
Link Index == 0
Link Index == 1
4
CoS <= 3
5
Link Index == 1
Forward to FIFO
M.1.0
M.1.1
M.2.0
M.2.1
In this example the ToS field is used to prioritized traffic received on link 0, while the CoS field prioritizes
traffic received on link 1. The classification scheme is symmetrical; both upstream and downstream use the
same fields for the same links. Additional classification or filtering rules could be used to guarantee the
value of the VID used for link 1. Note that every downstream rule contains a clause to qualify the link. If
this clause is omitted many functions of the ONU such as performance metrics will not work as expected.
33
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
Port 1
EPON 0
EPON 0
System
CPU
EPON 0
User 0
UNI 1
Link 0
Link 1
User 1
Link 0
Multicast 0
Link 1
Multicast 1
UNI 1
User 2 [Multicast / Unicast]
User 3 [Unicast]
System
User 0
UNI 2
UNI 2
User 1
TK3711
TK3711
Figure 11: One UNI, Two Links, Two FIFOs per Link
Forward to FIFO
(M + 0).0.0
(M + 0).0.1
(M + 1).0.0
(M + 1).0.1
Forward to FIFO
M.1.0
M.1.1
M.1.2
M.1.2
The example above classifies traffic with IPv4-SA == 192.168.100.1 into the first link, and non-IP traffic
into the second link. For IP traffic, if any of the lower two ToS bits are set the first FIFO shall be used.
Otherwise traffic is classified into the second FIFO. Non-IP traffic is classified in the same way, except
that the CoS field will be used.
Note: For the TK3701Y rules involving a L3 or higher field select must contain a clause to specify that the
EtherType==0800
34
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
Upstream
Data Path
EPON 0
CPU
CPU
EPON 0
EPON 0
System
Link 0
User 0
EPON 0
Link 0
Link 1
Link 2
Link 1
UNI 1
System
User 0
Link 2
Link 3
Multicast 0
UNI 1
Multicast 1
System
Multicast 2
User 0
Link 3
UNI 2
Multicast 3
UNI 2
System
TK3711
User 0
TK3711
Forward to FIFO
(M + 0).0.0
(M + 1).0.0
(M + 2).0.0
(M + 3).0.0
(M + 3).0.0
Received by EPON 0
Rule Level
If
5
Link Index == 0
5
Link Index == 1
5
Link Index == 2
5
Link Index == 3
Forward to FIFO
M.1.0
M.1.1
M.1.2
M.1.3
In this example frames received upstream are classified by ToS, non-IP frames are classified into the FIFO
associated with Link 3. Downstream frames are classified by Logical Link only.
35
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
Block all
IP- Multicast
Allow 239.0.0.1
Allow 239.0.0.5
CPU
EPON 0
Link 0
User 1 [Unicast]
UNI 1
Multicast 0
User 2 [Uni./IP-Multicast]
User 3 [Unicast]
UNI 2
ONU
11.1 L3-to-L2 Binding used by Snooping Function (as per RFC 1112)
32 bits
239.252.0.1
Convert to
Binary
4 bits
28 bit group ID
1110
Step 1
Step 2
5 bits
23 bits
1111 1
23 bit group ID
01-00-5e-7C-0-01
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
because 5 of the significant bits of the original IP address are not used. The implication is that for any given
Ethernet address there are 32 unique IP addresses that could be specified.
37
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
12 Q and A
Q: Is there any correspondence between upstream and downstream queue configuration and/or
classification?
A: Every link allocated by the Host MUST have at least one associated FIFO in each direction. (The
resources for upstream and downstream FIFOs are totally separate.) To keeps performance metrics accurate
multiple links should not be classified into the same FIFO downstream.
Q: How does Teknovus high level Host Interface Queue Configuration map into the absolute hardware
indexes?
A: In the upstream direction the ONU will allocate the highest priority queue within each link for system
purposes. The queues with highest indices will also be allocated to system purposes, such as IGMP
snooping. On the TK3711 there are 16 queues, so indices 15 and 14 will be used for system purposes.
System queues are invisible to Host software.
Q: If IGMP snooping is disabled, can system FIFO 15 and/or 14 be used for user data traffic.
A: Yes, however Teknovus recommends that these FIFOs not be used for user data. Future functionality
that requires input from the UNI may be unavailable to hosts that have dedicated the system FIFOs to serve
user traffic.
Q: Wouldnt it be better to use the FIFO at physical index x, for a particular function, rather than the
physical index that Teknovus has chosen?
A: The physical FIFO IDs do not make any difference to the system performance. In future Teknovus
products FIFOs may need to be allocated in particular orderings to achieve prioritization. If physical IDs
were used, the host software would have to provision each flavor of ONU correctly. The Host Interface
layers logical queue labels allow the underlying hardware to change without the need to rewrite host
software.
Q: My service model associates multiple queues on the same link. It seems that flow statistics are
insufficient for debugging the configuration and performance profiling. Do you support ONU FIFO
statistics?
A: Yes, ONU FIFO statistics are supported.
Q: I am using a TK3711 with multiple FIFOs per Link. However, I observed no performance difference
between the multiple FIFO and single FIFO solution. Why is this?
A: In order to make a scheduling decision, the ONU scheduler must be able to examine two FIFOs
simultaneously. If the ONUs view of the data is limited to a single FIFO, a scheduling decision cannot be
made. Cut through design of the ONU means that, frames are typically transmitted as they are received.
Since the TK3711s ingress line rate is exactly matched to the egress, normally frames will never build up
in its priority FIFOs and the ONUs view of the data will be restricted to the single frame that is currently
passing through its buffers. Thus the TK3711 scheduler will have only a small effect as illustrated by the
figure below:
38
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
TK3701
4
3 2
UNI 1
5 1
Ingress Pattern
Egress Pattern
7 6 0
100 Mbps
1 Gbps
TK3711
UNI 1
Ingress Pattern
Egress Pattern
7
1 Gbps
Figure 15: Downstream Scheduling for GbE port typically has only small effect on output data
The figure above represents a snapshot of two identically configured ONUs after receiving the exact same
data pattern. One ONU is a TK3701 with an egress line rate of 100Mbps; the other ONU is a TK3711 with
egress line rate 1000Mbps. For each data path an input and output sequence of frames is displayed.
Numbers within each frame represent the order in which the frames were received (these numbers should
not be misconstrued as time stamps). Notice how the output pattern for the TK3711 appears unchanged
while the output pattern of the TK3701 is prioritized. Unscheduled frames have been omitted for emphasis.
Q: What will happen if downstream classification rules are not provisioned with the Link Index == N, link
qualification rule?
A: Flow statistics will not work correctly. Other ONU functionality may be degraded. Unqualified
downstream rules are NOT allowed.
Q: When will the ONU flooding queue be used?
A: When two links connected to different ports are configured in the same Shared VLAN or Simple
Bridged multicast group. In a future firmware release the TK3711 flooding queues may not be necessary.
39
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath
Technical Note
EPON 0
EPON 0
Link 0
CPU
EPON 0
User 0 [Unicast]
UNI 1
Link 1
Multicast 0
Link 0
User 0 [Unicast]
Link 1
Flooding [Multi./Broadcast]
UNI 1
Multicast 0
Flooding [Muti./Broadcast]
User 0 [Unicast]
UNI 2
User 0 [Unicast]
UNI 2
Flooding [Multi./Broadcast]
TK3701
TK3711
40
7/1/2005
Teknovus Confidential - View Under NDA Only
TN303_SW_OnuDataPath