This article explains packet reorder behavior between multiple flows. MX series routers guaranteed packets order in each single flow. However they do not guarantee packets order between multiple flows.
A flow is determined by 5-tuple, which is src/dest IP addresses, IP protocol number, and src/dest ports.* Packets which have the same 5-tuple components will be classified as a the same flow. Packets with different parameters for the tuples in concern are classified as a different flow.
Test packets include sequence number in their first byte data field by Tester.
Topology
UDP, 10G rate, L3 64byte, 10 packets ------------------------------------> Capture point +--------+ +--------+ |+--------+ | Tester | xe-0/0/0| DUT |xe-0/0/1 v| Tester | | |-------------| |-------------| | | |.2 .1| |.1 .2| | +--------+ +--------+ +--------+ 10.0.0.0/24 20.0.0.0/24
DUT : MX480 Junos: 15.1R1 FPC : MPC4E
Single flow pattern
Traffic Src IP address : 10.0.0.2 Dest IP address : 20.0.0.2 IP protocol number: 17(UDP) Src port : 63 Dest port : 63
Test result
Packets reordering did not happen.
Multiple flows (10 flows) pattern
Traffic Src IP address : 10.0.0.2 Dest IP address : 20.0.0.2 IP protocol number: 17(UDP) Src port : 63 Dest port : 50001-50010
Multiple flows (2 flows) pattern
Traffic Src IP address : 10.0.0.2 Dest IP address : 20.0.0.2 IP protocol number: 17(UDP) Src port : 63 Dest port : 50001-50002
In this pattern, each flows packets were sent out alternately by Tester.
* Pure IP packets which do not have src/dest ports should determine a flow without src/dest ports. There is a logic flaw in MX routers where packets with random data on the same off-set field on src/dest ports will be handled as different flows. This behavior has reported in some Junos releases and it was resolved by PR1177418 - The OOS (Out-Of-Sequence) issue might be observed for non-tcp/non-udp packets with IP encapsulation
This is behavior is by design and is part of the specification.