Sie sind auf Seite 1von 22

HUAWEI NetEngine40E Universal Service Router

Feature Description - QoS 5 Overall QoS Process

5 Overall QoS Process

Concept of Upstream and Downstream Traffic


Traffic that a router forwards is classified into upstream and downstream traffic. Traffic sent
to the switched network is called upstream traffic and traffic forwarded from the switched
network is called downstream traffic, as shown in Figure 5-1.

Figure 5-1 Upstream and downstream traffic

User side Network side


Switched
Upstream on Upstream on the
network
the user side network side

Line card Line card

Downstream on Downstream on the


the user side network side

Issue 02 (2018-06-20) Huawei Proprietary and Confidential 23


Copyright © Huawei Technologies Co., Ltd.
HUAWEI NetEngine40E Universal Service Router
Feature Description - QoS 5 Overall QoS Process

Board Architecture on the Forwarding Plane


Subcard switched
Motherboard
network

Upstream Upstream Upstream Upstream


PIC PFE TM FIC

Downstream
Downstream Downstream Downstream
PIC
PFE TM FIC
eTM

Abbreviations:
PIC: Physical Interface Controller Upstream
PFE: Packet Forward Engine
Downstream
TM: Traffic Manager
FIC: Fabric Interface Controller
eTM: Extra Traffic Manager

Packet Forwarding Process


Figure 5-2 shows how an Ethernet packet is forwarded when the PIC is not equipped with an
eTM subcard.

Figure 5-2 Packet forwarding process when the PIC is not equipped with an eTM subcard

CPU
ls
a Packet Packet
n
g
is
l Upstream board
a
ci lsl
trc t Upstream PFE Upstream TM Upstream e
cSwitched
e e e
l rn m (NP/ASIC) t t
e
FIC roNetwork
/e
l e a
h
e
kc kc ci
k a C
I t rf a M
in
l ict P E e y d
e s y a
P
g g P
l p n ca n tri n s e b w in in n
a m o rf ci io a o o t o
l s s o
ti
ics O a t i ) cif io
o b d t n F s s
e
rt
g
n t uf a rp g
e e
l f n
i f ta g
le
b R
yl e ) l)
e
c e a
t
y i in dra ic p ra ic n a A p s U a o c n
s f p t if i r o e
h s
p s d ot is rd d
t
C
p
a st P n p r
P e n mA s a a F ss r
a
n
o
( t e C io
t e
p m
g
U cr u B la w r mM la R o k p u Q
oP b c o c w
r A n c
a O e O ra
f( o p ( u F
in F C q V
ls
a
n
ig
s
l Downstream board
a
ci
rt Downst lsl
c CP Downstream Downstream e
le c
e t
e
Car PFE t TM t ream o
l/ n e e e
kc FIC
r
k a
cit r m e
(NP/ASIC) kc ic
in e a c a a M
l
l p th fr no a
fr / n g w P n
r it o P
Downstream n d n S o n in lo
a O E g e
t e icf tio ra ) ic
g ff tio L s F
g
n t
s
n
o
o
ti
ics n l P e la ti s e i ti a
PIC i n
i u R fa a n
i a a y a e )l u s a a izt
y s
s d d A rt cfii w k p tr ci
fi M a
-l
u
s m c a e s
e
ci
tl cil
h e n o C
A ss a
c p
aF s in k p r ro n
io
u
q c u p
e
k
P c u m
B a s a
t n
il a
c fo p t o
r M u c
o o l B mM a
l b n p a
r
P b
t c ( c n i Q p d
P
u O e C (O
o

Issue 02 (2018-06-20) Huawei Proprietary and Confidential 24


Copyright © Huawei Technologies Co., Ltd.
HUAWEI NetEngine40E Universal Service Router
Feature Description - QoS 5 Overall QoS Process

l Packet forwarding process for upstream traffic


a. Optical/electrical signals of a physical link are encapsulated as an Ethernet packet
to be sent to the upstream PFE, which can be a network processor (NP) or an
application-specific integrated circuit (ASIC).
b. The inbound interface processing module on the upstream PFE parses the link layer
protocol and identifies the packet type.
c. The traffic classification module on the upstream PFE implements BA and MF
traffic classification in sequence based on the configuration on the inbound
interface.
d. The upstream PFE searches the forwarding table for an outbound interface and next
hop based on packet information (such as MAC address, destination IP address, and
MPLS label). The upstream PFE drops the packets with the forwarding behavior
drop, and CAR is not implemented for these packets.
e. The upstream PFE implements rate limit for upstream traffic based on the CAR
configuration on the inbound interface or in the MF traffic classification profile.
NOTE

CAR does not apply to CPU packets to prevent packet loss in the case of traffic congestion.
For packets to be sent to the CPU, the upstream PFE independently implements CP-CAR.
f. The upstream PFE sends packets to the upstream TM.
g. The upstream TM processes flow queues (optional) based on the user-queue
configuration on the inbound interface or in the MF classification profile, and then
implements VOQ processing. After that, the upstream TM sends packets to the
upstream Flexible Interface Card (FIC).
h. The upstream FIC fragments packets and encapsulates them into micro cells before
sending them to the switched network.
NOTE

Similar to an ATM module, the switched network forwards packets based on a fixed cell
length. Therefore, packets are fragmented before being sent to the switched network.
l Packet forwarding process for downstream traffic
Micro cells are sent from the switched network to the downstream TM.
a. The downstream FIC encapsulates the micro cells into packets again.
b. The downstream TM duplicates multicast packets.
c. The downstream TM processes flow queues based on the user-queue configuration
on the outbound interface (including the VLANIF interface) if needed, and
processes class queues (CQs) before sending them to the downstream PFE.
d. The downstream PFE searches the forwarding table for packet encapsulation
information. For example, for an IPv4, the PFE searches the forwarding table based
on the next hop. For an MPLS packet, the PFE searches the MPLS forwarding
table.
e. The downstream PFE implements MF classification based on the outbound
interface configuration and then BA traffic classification (only mapping from the
service class and drop precedence to the external priority).
f. The downstream PFE implements rate limit for downstream traffic based on the
CAR configuration on the outbound interface or in the MF traffic classification
profile.
g. For packets to be sent to the CPU, the downstream PFE implements CP-CAR
before sending them to the CPU. For packets not to be sent to the CPU, the

Issue 02 (2018-06-20) Huawei Proprietary and Confidential 25


Copyright © Huawei Technologies Co., Ltd.
HUAWEI NetEngine40E Universal Service Router
Feature Description - QoS 5 Overall QoS Process

downstream PFE sends them to the outbound interface processing module for an
additional Layer 2 header (Layer 2 header and MPLS header are added for an
MPLS packet). After that, these packets are sent to the PIC.
h. The PIC converts packets to optical/electrical signals and sends them to the physical
link.
Figure 5-3 shows how a packet is forwarded when the PIC is equipped with an eTM subcard.
The operation for the upstream traffic is the same as that when the PIC is not equipped with
an eTM subcard. The difference in operations for downstream traffic lies in that the
downstream flow queues are processed in the eTM subcard when the PIC is equipped with an
eTM subcard and the downstream flow queues are processed on the downstream TM when
the PIC is not equipped with an eTM subcard. In addition, five-level scheduling (FQ -> SQ ->
GQ -> VI -> port) is implemented for downstream flow queues when the PIC is equipped
with an eTM subcard, whereas three-level scheduling + two-level scheduling are implemented
for downstream flow queues when the PIC is not equipped with an eTM subcard.

Figure 5-3 Packet forwarding process when the PIC is equipped with an eTM subcard

CPU
l
a Packet Packet
n
g
is
l
a
Upstream board switched
ci e lsl network
trc m Upstream PFE Upstream Upstrea e
c
e a
rf (NP/ASIC) FIC
l t
m FIC ro
/e
l e t t
e
ci
k a n
r d e kc M
in
l ict e e g e s y kc g g n
n c in ) e w in n a o
l p re
t th o fa n p s n s
a o o
t
b
t a lo s i
s P ti
a O s C
mI E g r c
le iff tio p e ic io
ff ta b e d n P F s s ta
ics p a P n
is te
n ua a a tii
a g
l
b R ly
p
e
s
) )l e
c e
c n
y U i d rt c
fii m ro rt cfii in a
t A p
U a ro o e
s i s P n r
h e d o s rd rp F s d
r n C
( a t C io
p p m
P c n
u mA B s
a a f Ma
s a o t
o
e
k t e g
o
r o l w l R c p u Q a
b c r o c rw A n a e O r
P
in
o
f( o C p (O u V F
F q

l
a
n
ig
s
l Downstream board
a
ci
rt e e lsl
c m ETM m CP Car Downstream Downstr Downstr e
le a
rf subcard a
rf c
PFE (NP/ASIC) eam TM eam FIC
/e
l t t t ro
a IC e
n e
n t
e
e
kc
ci
k ict P r r - k M
in
l p e e e
c k c a
l m
a th h
t no a n
c
la M n i/l n a P n
a O e E e g Eg rf o ) o
it o P
n ts n o
ics rt u n e c
i i d s ti
s
e
u
is
in
t
in
le
u A ff ta ra g
ns
i
F S
ifi tr L re la it
a a tio a
z
y s s a c
d C R tr ifi w Py u c a it
h n q e s d r pc a a s m til c i
w w c e n o s o p tio ffic M a
l p r u lp e
P o lo o
r c
o
u m As
Ba F a
( m in a
c
o
f Mu
k
c
D F p r o lc n ta n in d a
P b
t b e P
u O
o

QoS Implementation During Packet Forwarding


As shown in Figure 5-4, the QoS implementation during packet forwarding is as follows:

Issue 02 (2018-06-20) Huawei Proprietary and Confidential 26


Copyright © Huawei Technologies Co., Ltd.
HUAWEI NetEngine40E Universal Service Router
Feature Description - QoS 5 Overall QoS Process

Figure 5-4 QoS implementation during packet forwarding


switched
network
Upstream Upstream MF
BA traffic traffic Upstream Upstream
classification classification CAR scheduling

Internal priority:
Service class & Color

Enhanced Downstream Downstream Downstream


scheduling PHB CAR Downstream scheduling
on MF traffic
downstream classification
eTM
Packet direction

Modified traffic markers

Use traffic markers

l On the upstream PFE:


a. The upstream PFE initializes the internal priority of packets (service class as BE
and color as green).
b. The upstream PFE implements BA traffic classification based on the inbound
interface configuration. BA traffic classification requires the upstream PFE to
obtain the priority field value (802.1p, DSCP,ATM CLP or MPLS EXP) for traffic
classification and modify the internal priority of packets (service class and color).
c. The upstream PFE implements MF traffic classification based on the inbound
interface configuration. MF traffic classification modifies the upstream PFE to
obtain multiple field information for traffic classification. After that, the upstream
PFE implements related behaviors ( such as filter, re-mark, or redirect). If the
behavior is re-mark, the upstream PFE modifies the internal priority of packets
(service class and color).
d. The upstream PFE searches the routing table for an outbound interface of a packet
based on its destination IP address.
e. The upstream PFE implements CAR for packets based on the inbound interface
configuration or MF traffic classification profile. If both interface-based CAR and
MF traffic classification-based CAR are configured, MF traffic classification-based
CAR takes effect. In a CAR operation, a pass, drop, or pass+re-mark behavior can
be performed for incoming traffic. If the behavior is pass+re-mark, the upstream
PFE modifies the internal priority of packets (service class and color).
f. Then, packets are sent to the upstream TM.
l On the upstream TM:
a. The upstream TM processes flow queues based on the inbound interface
configuration or MF traffic classification configuration. If both interface-based
user-queue and MF traffic classification-based user-queue are configured, MF
traffic classification-based user-queue takes effect. Packets are put into different

Issue 02 (2018-06-20) Huawei Proprietary and Confidential 27


Copyright © Huawei Technologies Co., Ltd.
HUAWEI NetEngine40E Universal Service Router
Feature Description - QoS 5 Overall QoS Process

flow queues based on the service class, and WRED drop policy is implemented for
flow queues based on the color if needed.
b. The upstream TM processes VOQs. VOQs are classified based on the destination
board. The information about the destination board is obtained based on the
outbound interface of packets. Then, packets are put into different VOQs based on
the service class.
c. After being scheduled in VOQs, packets are sent to the switched network and then
forwarded to the destination board on which the outbound interface is located.
d. Then, packets are sent to the downstream TM.
l On the downstream TM
a. (This step is skipped when the downstream PIC is equipped with an eTM subcard)
The downstream TM processes flow queues based on the user-queue configuration
on the outbound interface. Packets are put into different flow queues based on the
service class, and WRED drop policy is implemented for flow queues based on the
color if needed.
b. (This step is skipped when the downstream PIC is equipped with an eTM subcard)
The downstream TM processes port queues (CQs). Packets are put into different
CQs based on the service class, and WRED drop policy is implemented for CQs
based on the color if WRED is configured.
c. Then, packets are sent to the downstream PFE.
l On the downstream PFE:
a. The downstream PFE implements MF traffic classification based on the outbound
interface configuration. MF traffic classification requires the downstream PFE to
obtain multiple field information for traffic classification. Behaviors, such as filter
and re-mark, are performed based on traffic classification results. If the behavior is
re-mark, the downstream PFE modifies the internal priority of packets (service class
and color).
b. The downstream PFE implements CAR for packets based on the outbound interface
configuration or MF traffic classification configuration. If both interface-based
CAR and MF traffic classification-based CAR are configured, MF traffic
classification-based CAR takes effect. In a CAR operation, a pass, drop, or pass+re-
mark behavior can be performed for incoming traffic. If the behavior is pass+re-
mark, the downstream PFE modifies the internal priority of packets (service class
and color).
c. The priorities of outgoing packets are set for newly added packet headers and are
modified for existing packet headers, based on the service class and color.
d. Then, packets are sent to the downstream PIC.
n When the PIC is not equipped with an eTM subcard, the PIC adds the link-
layer CRC to the packets before sending them to the physical link.
n When the PIC is equipped with an eTM subcard, the PIC adds the link-layer
CRC to the packets and performs a round of flow queue scheduling before
sending the packets to the physical link. Downstream flow queues are
processed based on the user-queue configuration on the outbound interface.
Packets are put into different FQs based on the service class, and WRED drop
policy is implemented for FQs based on the color if WRED is configured.
When the PIC is equipped with an eTM subcard, downstream packets are not
scheduled on the downstream TM.

Issue 02 (2018-06-20) Huawei Proprietary and Confidential 28


Copyright © Huawei Technologies Co., Ltd.
HUAWEI NetEngine40E Universal Service Router
Feature Description - QoS 5 Overall QoS Process

Packet Field Changes During Packet Forwarding


After CAR and traffic shaping are performed for packets, the bandwidth calculation is closely
related to the packet length. Therefore, the packet field changes during packet forwarding
require attention.
For example, packet field changes in some common scenarios are described in the following
part.

Figure 5-5 Incoming packet in sub-interface accessing L3VPN networking


IFG(12+7+1)

L2 Header(14) NPtoTM(4)

VLAN Tag(4) L2 Header(14)


Frame
IP Header(20) VLAN Tag(4)
Header(14) switched
network
Data(46~1500) IP Header(20) IP Header(20)

CRC(4) Data(46~1500) Data(46~1500)


Upstream Upstream Upstream
PIC PFE TM

Downstream Downstream Downstream


PIC PFE TM
IFG(12+7+1) eTM Header(4) TMtoNP(2)

L2 Header(14) L2 Header(14) Frame


Header(14)
MPLS Label(4) MPLS Label(4)

MPLS Label(4) MPLS Label(4) IP Header(20)

IP Header(20) IP Header(20) Data(46~1500)

Data(46~1500) Data(46~1500)
This field exists only when the downstream
CRC(4)
PIC is equipped with an eTM.

Issue 02 (2018-06-20) Huawei Proprietary and Confidential 29


Copyright © Huawei Technologies Co., Ltd.
HUAWEI NetEngine40E Universal Service Router
Feature Description - QoS 5 Overall QoS Process

NOTE

l CAR calculates the bandwidth of packets based on the entire packet. For example, CAR counts the
length of the frame header and CRC field but not the preamble, inter frame gap, or SFD of an
Ethernet frame in the bandwidth. The following figure illustrates a complete Ethernet frame (bytes).

Minimum 12 7 1 6 6 2 46 to 1500 4

Destination Source Length/ Data


Inter frame gap Preamble SFD CRC
MAC MAC type payload

The bandwidth covers the CRC field but not the IFG field.
l The upstream PFE adds a Frame Header, which is removed by the downstream PFE. The Frame
header is used to transfer information between chips. NPtoTM and TMtoNP fields are used to
transfer information between the NP and TM.
l When the PIC is not equipped with an eTM subcard, the length of a packet scheduled on the
downstream TM is different from that of the packet sent to the link. To perform traffic shaping
accurately, you must run the network-header-length command to compensate the packet with a
specific length.
On the downstream interface on the network side:
l when the downstream TM implements traffic shaping for packets, the TNtoNP and Frame Header
field values of the packets are not calculated. Therefore, the packet scheduled on the downstream
TM does not contain the IFG, L2 Header (14 bytes), two MPLS Labels, or CRC fields, compared
with the packet sent to the link. A +26-byte compensation (including the L2 header, two MPLS
labels, and CRC field, but not including the IFG field) or a +46-byte compensation (including the
IFG field) can be performed for the packet.
l When the PIC is equipped with an eTM subcard, no packet length compensation is required.

Figure 5-6 Outgoing packet in sub-interface accessing L3VPN networking


IFG(12+7+1)

L2 Header(14)

MPLS Label(4) L2 Header(14) NPtoTM(4)

MPLS Label(4) MPLS Label(4)


Frame
MPLS Label(4) Header(14) switched
IP Header(20)
network
Data(46~1500) IP Header(20) IP Header(20)

CRC(4) Data(46~1500) Data(46~1500)


Upstream Upstream Upstream
PIC PFE TM

Downstream Downstream Downstream


PIC PFE TM
IFG(12+7+1) eTM Header(4) TMtoNP(2)

L2 Header(14) L2 Header(14) Frame


Header(14)
VLAN Tag(4) VLAN Tag(4)

IP Header(20) IP Header(20) IP Header(20)

Data(46~1500) Data(46~1500) Data(46~1500)

CRC(4)
This filed exists only when the
downstream PIC is equipped with an eTM.

Issue 02 (2018-06-20) Huawei Proprietary and Confidential 30


Copyright © Huawei Technologies Co., Ltd.
HUAWEI NetEngine40E Universal Service Router
Feature Description - QoS 5 Overall QoS Process

NOTE

On the downstream interface on the user side:


when the downstream TM implements traffic shaping for packets, the TNtoNP and Frame Header field
values of the packets are not calculated. Therefore, the packet scheduled on the downstream TM does
not contain the IFG, L2 Header (14 bytes), VLAN tag, or CRC fields, compared with the packet sent to
the link. A +22-byte compensation (including the L2 header, VLAN tag, and CRC field, but not
including the IFG field) or a +42-byte compensation (including the IFG field) can be performed for the
packet.
For more details, see Incoming packet in sub-interface accessing L3VPN networking.

Figure 5-7 Incoming packet in sub-interface accessing VPLS networking


IFG(12+7+1) NPtoTM(4)
L2 Header(14)
Frame
VLAN Tag(4) L2 Header(14) Header(14)
IP Header(20) VLAN Tag(4) L2 Header(14)
switched
Data(46~1500) IP Header(20) IP Header(20)
network
CRC(4) Data(46~1500) Data(46~1500)
Upstream Upstream
Upstream
PIC TM
PFE

Downstream Downstrea Downstream


PIC m PFE TM
IFG(12+7+1) eTM Header(4) TMtoNP(2)
L2 Header(14) L2 Header(14)
Frame
MPLS Label(4) MPLS Label(4) Header(14)
MPLS Label(4) MPLS Label(4) L2 Header(14)
L2 Header(14) L2 Header(14) IP Header(20)
Data(46~1500)
IP Header(20) IP Header(20) Data(46~1500)
Data(46~1500)
CRC(4) Data(46~1500)
CRC(4)
This field exists only when the downstream
PIC is equipped with an eTM.

NOTE

On the downstream interface on the network side:


l when the downstream TM implements traffic shaping for packets, the TNtoNP and Frame Header
field values of the packets are not calculated. Therefore, the packet scheduled on the downstream
TM does not contain the IFG, L2 Header (14 bytes), two MPLS Labels, or CRC fields, compared
with the packet sent to the link. A +26-byte compensation (including the L2 header, two MPLS
labels, and CRC field, but not including the IFG field) or a +46-byte compensation (including the
IFG field) can be performed for the packet.
For more details, see Incoming packet in sub-interface accessing L3VPN networking.

Issue 02 (2018-06-20) Huawei Proprietary and Confidential 31


Copyright © Huawei Technologies Co., Ltd.
HUAWEI NetEngine40E Universal Service Router
Feature Description - QoS 5 Overall QoS Process

Figure 5-8 Outgoing packet in sub-interface accessing VPLS networking


IFG(12+7+1)
L2 Header(14)
MPLS Label(4) L2 Header(14) NPtoTM(4)

MPLS Label(4) MPLS Label(4)


Frame
MPLS Label(4) Header(14)
L2 Header(14)
Data(46~1500)
IP Header(20) L2 Header(14) L2 Header(14) switched
Data(46~1500)
CRC(4) IP Header(20) IP Header(20) network
CRC(4) Data(46~1500) Data(46~1500)
Upstream Upstream Upstream
PIC PFE TM

Downstrea Downstrea Downstream


m PIC m PFE TM
eTM Header(4) TMtoNP(2)
IFG(12+7+1)
L2 Header(14) L2 Header(14) Frame
Header(14)
VLAN Tag(4) VLAN Tag(4)
L2 Header(14)
IP Header(20) IP Header(20)
IP Header(20)
Data(46~1500) Data(46~1500)
Data(46~1500)
CRC(4)

This field exists only when the downstream


PIC is equipped with an eTM.

NOTE

On the downstream interface on the network side:


when the downstream TM implements traffic shaping for packets, the TNtoNP and Frame Header field
values of the packets are not calculated. Therefore, the packet scheduled on the downstream TM does
not contain the IFG, VLAN tag, or CRC fields, compared with the packet sent to the link. A +8-byte
compensation (including the VLAN tag (4 bytes) and CRC (4 bytes) field, but not including the IFG
field) or a +28-byte compensation (including the IFG field) can be performed for the packet.
For more details, see Incoming packet in sub-interface accessing L3VPN networking.

Issue 02 (2018-06-20) Huawei Proprietary and Confidential 32


Copyright © Huawei Technologies Co., Ltd.
HUAWEI NetEngine40E Universal Service Router
Feature Description - QoS 5 Overall QoS Process

Figure 5-9 Packet in Layer 2 Ethernet forwarding scenarios


NPtoTM(4)
IFG(12+7+1)
Frame
L2 Header(14) Header(14)
L2 Header(14)
VLAN Tag(4)
L2 Header(14)
VLAN Tag(4)
Data(46~1500)
IP Header(20)
VLAN Tag(4)
switched
Data(46~1500)
CRC(4) IP Header(20) network
IP Header(20)
CRC(4) Data(46~1500)
Data(46~1500)
Upstream Upstream Upstream
PIC PFE TM

Downstream Downstream Downstream


PIC PFE TM
IFG(12+7+1) eTM Header(4) TMtoNP(2)

L2 Header(14) L2 Header(14) Frame


Header(14)
VLAN Tag(4) VLAN Tag(4)

IP Header(20) IP Header(20) L2 Header(14)

Data(46~1500) Data(46~1500) VLAN Tag(4)

CRC(4) IP Header(20)

Data(46~1500)
This field exists only when the downstream
PIC is equipped with an eTM.

NOTE

In Layer Ethernet forwarding scenarios, a data frame can be a VLAN-tagged, QinQ-tagged, or untagged
frame. Use a VLAN-tagged frame as an example. In Layer 2 forwarding, both the Layer 2 Ethernet
frame header and the VLAN tag of a packet are forwarded to the downstream TM, and only the CRC
field is removed.when the downstream TM implements traffic shaping for packets, the TNtoNP and
Frame Header field values of the packets are not calculated. Therefore, the packet scheduled on the
downstream TM does not contain the CRC field, compared with the packet sent to the link. A +4-byte
compensation (not including the IFG field) or a +24-byte compensation (including the IFG field) can be
performed for the packet.
For more details, see Incoming packet in sub-interface accessing L3VPN networking.

Issue 02 (2018-06-20) Huawei Proprietary and Confidential 33


Copyright © Huawei Technologies Co., Ltd.
HUAWEI NetEngine40E Universal Service Router
Feature Description - QoS 5 Overall QoS Process

Figure 5-10 IP-to-802.1Q packet conversion on the outbound interface in IP forwarding


scenarios

IFG(12+7+1) NPtoTM(4)

L2 Header(14) Frame
Header(14)
L2 Header(14)
Data(46~1500)
IP Header(20) switched
Data(46~1500)
CRC(4) IP Header(20) IP Header(20) network
CRC(4) Data(46~1500) Data(46~1500)

Upstream Upstream Upstream


PIC PFE TM

Downstream Downstream
PFE Downstream
PIC TM
IFG(12+7+1) eTM Header(4) TMtoNP(2)

L2 Header(14) L2 Header(14) Frame


Header(14)
VLAN Tag(4) VLAN Tag(4)

IP Header(20) IP Header(20) IP Header(20)

Data(46~1500) Data(46~1500) Data(46~1500)

CRC(4)

This field exists only when the downstream


PIC is equipped with an eTM.

NOTE

On the downstream interface on the user side:


when the downstream TM implements traffic shaping for packets, the TNtoNP and Frame Header field
values of the packets are not calculated. Therefore, the packet scheduled on the downstream TM does
not contain the IFG, L2 Header, VLAN tag, or CRC fields, compared with the packet sent to the link. A
+22-byte compensation (including the L2 header, VLAN tag, and CRC field, but not including the IFG
field) or a +42-byte compensation (including the IFG field) can be performed for the packet.
For more details, see Incoming packet in sub-interface accessing L3VPN networking.

Issue 02 (2018-06-20) Huawei Proprietary and Confidential 34


Copyright © Huawei Technologies Co., Ltd.
HUAWEI NetEngine40E Universal Service Router
Feature Description - QoS 5 Overall QoS Process

Figure 5-11 IP-to-QinQ packet conversion on the outbound interface in IP forwarding


scenarios
IFG(12+7+1) NPtoTM(4)

L2 Header(14)
Frame
Data(46~1500)
IP Header(20) Header(14)
L2 Header(14) switched
Data(46~1500)
CRC(4) IP Header(20) IP Header(20) network
CRC(4) Data(46~1500) Data(46~1500)

Upstream Upstream Upstream


PIC PFE TM

Downstream
Downstream Downstream
PIC
PFE TM
IFG(12+7+1) eTM Header(4) TMtoNP(2)

L2 Header(14) L2 Header(14) Frame


Header(14)
VLAN Tag(4) VLAN Tag(4)

VLAN Tag(4) VLAN Tag(4) IP Header(20)

IP Header(20) IP Header(20) Data(46~1500)

Data(46~1500) Data(46~1500)
This field exists only when the downstream
CRC(4) PIC is equipped with an eTM.

NOTE

On the downstream interface on the user side:


when the downstream TM implements traffic shaping for packets, the TNtoNP and Frame Header field
values of the packets are not calculated. Therefore, the packet scheduled on the downstream TM does
not contain the IFG, L2 Header, two VLAN tags, or CRC fields, compared with the packet sent to the
link. A +26-byte compensation (including the L2 header, two VLAN tags, and CRC field, but not
including the IFG field) or a +46-byte compensation (including the IFG field) can be performed for the
packet.
For more details, see Incoming packet in sub-interface accessing L3VPN networking.

Issue 02 (2018-06-20) Huawei Proprietary and Confidential 35


Copyright © Huawei Technologies Co., Ltd.
HUAWEI NetEngine40E Universal Service Router
Feature Description - QoS 5 Overall QoS Process

Figure 5-12 Outgoing IP packet on the POS interface in IP forwarding scenarios


NPtoTM(4)

Frame
PPP Header(8) PPP Header(8)
Header(14) switched
Data(46~1500)
IP Header(20) IP Header(20) IP Header(20)
network

Data(46~1500)
CRC(4) Data(46~1500) Data(46~1500)

Upstream Upstream Upstream


PIC PFE TM

Downstream Downstream Downstream


PIC PFE TM
PPP Header(8)
eTM Header(4) TMtoNP(2)
Data(46~1500)
IP Header(20)
PPP Header(8) Frame
Data(46~1500)
CRC(4) Header(14)
IP Header(20)

Data(46~1500) IP Header(20)

Data(46~1500)

This field exists only when the downstream


PIC is equipped with an eTM.

NOTE

On the downstream interface:


l when the downstream TM implements traffic shaping for packets, the TNtoNP and Frame Header
field values of the packets are not calculated. Therefore, the packet scheduled on the downstream
TM does not contain the PPP header, compared with the packet sent to the link. A +8-byte
compensation can be performed for the packet.
l When the PIC is equipped with an eTM subcard, no packet length compensation is required.

Issue 02 (2018-06-20) Huawei Proprietary and Confidential 36


Copyright © Huawei Technologies Co., Ltd.
HUAWEI NetEngine40E Universal Service Router
Feature Description - QoS 5 Overall QoS Process

Figure 5-13 Outgoing L3VPN packet on the user side of the PE in QinQ interface accessing
L3VPN networking
IFG(12+7+1)

L2 Header(14)

MPLS Label(4) L2 Header(14) NPtoTM(4)

MPLS Label(4) MPLS Label(4)


Frame
Header(14)
Data(46~1500)
IP Header(20) MPLS Label(4) switched
Data(46~1500)
CRC(4) IP Header(20) IP Header(20) network

CRC(4) Data(46~1500) Data(46~1500)

Upstream Upstream Upstream


PIC PFE TM

Downstream Downstream Downstream


PIC PFE TM

IFG(12+7+1) eTM Header(4) TMtoNP(2)

L2 Header(14) L2 Header(14) Frame


Header(14)
VLAN Tag(4) VLAN Tag(4)

VLAN Tag(4) VLAN Tag(4) IP Header(20)

IP Header(20) IP Header(20) Data(46~1500)

Data(46~1500) Data(46~1500)
This field exists only when the downstream
CRC(4)
PIC is equipped with an eTM.

NOTE

On the downstream interface on the user side:


when the downstream TM implements traffic shaping for packets, the TNtoNP and Frame Header field
values of the packets are not calculated. Therefore, the packet scheduled on the downstream TM does
not contain the IFG, L2 Header (14 bytes), two VLAN tags, or CRC fields, compared with the packet
sent to the link. A +26-byte compensation (including the L2 header, two VLAN tags, and CRC field, but
not including the IFG field) or a +46-byte compensation (including the IFG field) can be performed for
the packet.
For the , the packet scheduled on the downstream TM does not contain a Frame Header. Therefore, a
+26-byte compensation (not including the 20-byte IFG field) or a +46-byte compensation (including the
IFG field) can be performed for the packet.

Issue 02 (2018-06-20) Huawei Proprietary and Confidential 37


Copyright © Huawei Technologies Co., Ltd.
HUAWEI NetEngine40E Universal Service Router
Feature Description - QoS 5 Overall QoS Process

Figure 5-14 Outgoing L3VPN packet on the user side of the PE in POS interface accessing
L3VPN networking
PPP Header(8) PPP Header(8) NPtoTM(4)

MPLS Label(4) MPLS Label(4)


Frame
Header(14)
MPLS Label(4) MPLS Label(4) switched
Data(46~1500)
IP Header(20) IP Header(20) IP Header(20) network
Data(46~1500)
CRC(4) Data(46~1500) Data(46~1500)

Upstream Upstream Upstream


PIC PFE TM

Downstream Downstream Downstream


PIC PFE TM
PPP Header(8) eTM Header(4) TMtoNP(2)

Data(46~1500)
IP Header(20) PPP Header(8) Frame
Header(14)
Data(46~1500)
CRC(4) IP Header(20)

Data(46~1500) IP Header(20)

Data(46~1500)

This field exists only when the


downstream PIC is equipped with an eTM.

NOTE

On the downstream interface on the user side:


l when the downstream TM implements traffic shaping for packets, the TNtoNP and Frame Header
field values of the packets are not calculated. Therefore, the packet scheduled on the downstream
TM does not contain the PPP header (8 bytes), compared with the packet sent to the link. A +8-byte
compensation can be performed for the packet.
l When the PIC is equipped with an eTM subcard, no packet length compensation is required.

Issue 02 (2018-06-20) Huawei Proprietary and Confidential 38


Copyright © Huawei Technologies Co., Ltd.
HUAWEI NetEngine40E Universal Service Router
Feature Description - QoS 5 Overall QoS Process

Figure 5-15 Outgoing packet in VLAN mapping scenarios


NPtoTM(4)
IFG(12+7+1)
Frame
L2 Header(14) Header(14)
L2 Header(14)
VLAN Tag(4)
L2 Header(14)
VLAN Tag(4)
Data(46~1500)
IP Header(20)
VLAN Tag(4)
switched
Data(46~1500)
CRC(4) IP Header(20) network
IP Header(20)
CRC(4) Data(46~1500)
Data(46~1500)
Upstream Upstream Upstream
PIC PFE TM

Downstream Downstream Downstream


PIC PFE TM
IFG(12+7+1) eTM Header(4) TMtoNP(2)

L2 Header(14) L2 Header(14) Frame


Header(14)
VLAN Tag(4) VLAN Tag(4)

IP Header(20) IP Header(20) L2 Header(14)

Data(46~1500) Data(46~1500) VLAN Tag(4)

CRC(4) IP Header(20)

Data(46~1500)
This field exists only when the downstream
PIC is equipped with an eTM.

NOTE

In VLAN mapping scenarios, both the Layer 2 Ethernet frame header and the VLAN tag of a packet are
forwarded to the downstream TM, and only the CRC field is removed. The VLAN tag value is replaced
with a new VLAN tag value.
when the downstream TM implements traffic shaping for packets, the TNtoNP and Frame Header field
values of the packets are not calculated. Therefore, the packet scheduled on the downstream TM does
not contain the CRC field, compared with the packet sent to the link. A +4-byte compensation (not
including the IFG field) or a +24-byte compensation (including the IFG field) can be performed for the
packet.
For more details, see Incoming packet in sub-interface accessing L3VPN networking.

Issue 02 (2018-06-20) Huawei Proprietary and Confidential 39


Copyright © Huawei Technologies Co., Ltd.
HUAWEI NetEngine40E Universal Service Router
Feature Description - QoS 5 Overall QoS Process

Figure 5-16 Outgoing packet in POS interface accessing VLL heterogeneous interworking
scenarios
IFG(12+7+1)

L2 Header(14)

MPLS Label(4) L2 Header(14)

MPLS Label(4) MPLS Label(4) NPtoTM(4)

L2 Header(14) MPLS Label(4)


Frame
Data(46~1500)
IP Header(20) L2 Header(14)
Header(14) switched
Data(46~1500)
CRC(4) IP Header(20) IP Header(20)
network

CRC(4) Data(46~1500) Data(46~1500)

Upstream Upstream Upstream


PIC PFE TM

Downstream Downstream Downstream


PIC PFE TM
PPP Header(8) eTM Header(4) TMtoNP(2)

Data(46~1500)
IP Header(20) PPP Header(8) Frame
Header(14)
Data(46~1500)
CRC(4) IP Header(20)

Data(46~1500) IP Header(20)

Data(46~1500)

This field exists only when the downstream


PIC is equipped with an eTM.

NOTE

In VLL heterogeneous interworking scenarios, both the L2 header and MPLS label of a packets are
removed on the upstream TM.
l when the downstream TM implements traffic shaping for packets, the TNtoNP and Frame Header
field values of the packets are not calculated. Therefore, the packet scheduled on the downstream
TM does not contain the PPP header, compared with the packet sent to the link. A +8-byte
compensation can be performed for the packet.
l When the PIC is equipped with an eTM subcard, no packet length compensation is required.

Issue 02 (2018-06-20) Huawei Proprietary and Confidential 40


Copyright © Huawei Technologies Co., Ltd.
HUAWEI NetEngine40E Universal Service Router
Feature Description - QoS 5 Overall QoS Process

Figure 5-17 Outgoing packet in POS interface accessing VLL homogeneous interworking
scenarios
IFG(12+7+1)

L2 Header(14)

MPLS Label(4) L2 Header(14)

MPLS Label(4) MPLS Label(4) NPtoTM(4)

PPP Header(8) MPLS Label(4)


Frame
Header(14)
Data(46~1500)
IP Header(20) PPP Header(8) switched
Data(46~1500)
CRC(4) IP Header(20) IP Header(20) network
CRC(4) Data(46~1500) Data(46~1500)

Upstream Upstream Upstream


PIC PFE TM

Downstream Downstream Downstream


PIC PFE TM
PPP Header(8) eTM Header(4) TMtoNP(2)

Data(46~1500)
IP Header(20) PPP Header(8) Frame
Header(14)
Data(46~1500)
CRC(4) IP Header(20)

Data(46~1500) IP Header(20)

Data(46~1500)

This field exists only when the


downstream PIC is equipped with an eTM.

NOTE

In VLL heterogeneous interworking scenarios, both the L2 header and MPLS label of a packets are
removed on the upstream TM.
when the downstream TM implements traffic shaping for packets, the TNtoNP and Frame Header field
values of the packets are not calculated. Therefore, the packet scheduled on the downstream TM does
not contain the PPP header, compared with the packet sent to the link. A +8-byte compensation can be
performed for the packet.

Supplement to Packet Length Compensation


The network-header-length command used to configure packet length compensation is
configured in the service template. Certain service templates have been predefined on
NE40Es. Using these service templates, you do not need to calculate the length required in a
compensation
To manually configure the compensation length, you can run the display interface command
to view statistics on the outbound interface and calculate the length of the packet sent to the
link (L1), and run the display port-queue command to view statistics about the queues and
calculate the length of the packet scheduled on the downstream TM (L2). The compensation
length is obtained in this formula: Length compensation = L1 - L2.For example:
<HUAWEI> display interface gigabitethernet 1/0/0
……
Statistics last cleared:2017-06-08 11:25:55
Last 300 seconds input rate: 13848728 bits/sec, 10856 packets/sec
Last 300 seconds output rate: 13183454 bits/sec, 9111 packets/sec
Input peak rate 14347000 bits/sec, Record time: 2017-06-08 11:27:31
Output peak rate 13271131 bits/sec, Record time: 2017-06-08 11:30:05
Input: 1304984264 bytes, 9341140 packets
Output: 1256201849 bytes, 7740964 packets
……

Issue 02 (2018-06-20) Huawei Proprietary and Confidential 41


Copyright © Huawei Technologies Co., Ltd.
HUAWEI NetEngine40E Universal Service Router
Feature Description - QoS 5 Overall QoS Process

<HUAWEI> display port-queue statistics gigabitethernet 1/0/0 outbound


GigabitEthernet1/0/0 outbound traffic
statistics:
[be]
Current usage percentage of queue: 0
Total pass:
411,963 packets, 335,927,398 bytes
……
[af1]
Current usage percentage of queue: 0
Total pass:
172,616 packets, 141,875,765 bytes
……
[af2]
Current usage percentage of queue: 0
Total pass:
54,516 packets, 45,592,293 bytes
……
[af3]
Current usage percentage of queue: 0
Total pass:
53,650 packets, 44,916,566 bytes
……
[af4]
Current usage percentage of queue: 0
Total pass:
53,650 packets, 44,915,912 bytes
……
[ef]
Current usage percentage of queue: 0
Total pass:
54,516 packets, 45,598,519 bytes
……
[cs6]
Current usage percentage of queue: 0
Total pass:
63,288 packets, 47,061,713 bytes
……
[cs7]
Current usage percentage of queue: 0
Total pass:
6,895,327 packets, 551,385,377 bytes
……

In the preceding information, L1 = 1256201849 bytes/7740964 packets= 162bytes/packet.


L2= sum of forwarded bytes in eight queues/sum of forwarded packets in eight queues =
1257273543bytes/7759526packet=162bytes/packet.
Therefore, the compensation value can be calculated using the formula of compensation value
= L1–L2 = 0.

Template Name Conversion Type

bridge-outbound Bridge packet conversion in the outbound direction of the tunnel To


be specific, this profile applies to the scenario where traffic shaping
is implemented on the outbound interface in Layer 2 Ethernet
forwarding scenarios.For details about the scenarios and
compensation values, see Packet in Layer 2 Ethernet forwarding
scenarios.

Issue 02 (2018-06-20) Huawei Proprietary and Confidential 42


Copyright © Huawei Technologies Co., Ltd.
HUAWEI NetEngine40E Universal Service Router
Feature Description - QoS 5 Overall QoS Process

Template Name Conversion Type

ip-outbound IP packet conversion or IP-to-802.1Q packet conversion on the


outbound interface. To be specific, this profile applies to the
scenario where traffic shaping is implemented on an 802.1Q
outbound interface of an egress PE in IP forwarding or
L3VPN/GRE scenarios.For details about the scenarios and
compensation values, see IP-to-802.1Q packet conversion on the
outbound interface in IP forwarding scenarios.

ip-outbound1 IP-to-QinQ packet conversion on the outbound interface. To be


specific, this profile applies to the scenario where traffic shaping is
implemented on a QinQ outbound interface of an egress PE in IP
forwarding or L3VPN/GRE scenarios.For details about the
scenarios and compensation values, see IP-to-QinQ packet
conversion on the outbound interface in IP forwarding
scenarios.

ip-outbound2 IP packet conversion on the outbound POS interface. To be specific,


this profile applies to the scenario where traffic shaping is
implemented on a POS outbound interface of an egress PE in IP
forwarding or L3VPN/GRE scenarios.For details about the
scenarios and compensation values, see Outgoing IP packet on the
POS interface in IP forwarding scenarios.

l3vpn-outbound2 L3VPN packet conversion on the outbound POS interface. To be


specific, this profile applies to the scenario where traffic shaping is
implemented on a POS outbound interface of an egress PE in
L3VPN scenarios.For details about the scenarios and compensation
values, see Outgoing L3VPN packet on the user side of the PE in
POS interface accessing L3VPN networking.

pbt-outbound PBT packet conversion on the outbound interface. This profile is


reserved for future use.

vlan-mapping- VLAN mapping packet conversion on the outbound interface. To be


outbound specific, this profile applies to the scenario where traffic shaping is
implemented for outgoing packets in VLAN mapping scenarios.For
details about the scenarios and compensation values, see Outgoing
packet in VLAN mapping scenarios.

vll-outbound VLL packet conversion on heterogeneous medium on the outbound


POS interface or VLL-to-QinQ packet conversion in the outbound
direction of the tunnel. To be specific, this profile applies to the
scenario where traffic shaping is implemented on a POS outbound
interface on the AC side of the egress PE in VLL heterogeneous
interworking scenarios, or the scenario where traffic shaping is
implemented on a QinQ outbound interface on the AC side of the
egress PE in common VLL scenarios.For details about the scenarios
and compensation values, see Outgoing packet in POS interface
accessing VLL heterogeneous interworking scenarios.

Issue 02 (2018-06-20) Huawei Proprietary and Confidential 43


Copyright © Huawei Technologies Co., Ltd.
HUAWEI NetEngine40E Universal Service Router
Feature Description - QoS 5 Overall QoS Process

Template Name Conversion Type

vll-outbound1 VLL packet conversion on homogeneous medium on the outbound


POS interface or VLL-to-Dot1Q packet conversion in the outbound
direction of the tunnel. To be specific, this profile applies to the
scenario where traffic shaping is implemented on a POS outbound
interface on the AC side of the egress PE in VLL homogeneous
interworking scenarios, or the scenario where traffic shaping is
implemented on an 802.1Q outbound interface on the AC side of the
egress PE in common VLL scenarios.For details about the scenarios
and compensation values, see Outgoing packet in POS interface
accessing VLL homogeneous interworking scenarios.

vpls-outbound VPLS-to-802.1Q packet conversion in the outbound direction of the


tunnel. To be specific, this profile applies to the scenario where
traffic shaping is implemented on an 802.1Q outbound interface on
the AC side of the egress PE in VPLS scenarios.For details about
the scenarios and compensation values, see Outgoing packet in
sub-interface accessing VPLS networking.

vpls-outbound1 VPLS-to-QinQ packet conversion in the outbound direction of the


tunnel. To be specific, this profile applies to the scenario where
traffic shaping is implemented on a QinQ outbound interface on the
AC side of the egress PE in VPLS scenarios.For details about the
scenarios and compensation values, see Outgoing packet in sub-
interface accessing VPLS networking.

Issue 02 (2018-06-20) Huawei Proprietary and Confidential 44


Copyright © Huawei Technologies Co., Ltd.