MS-MIC[MPC] JflowV9 records report incorrect 'DstAS/SrcAS' if sampled interfaces are located in logical system. This is a product limitation. Jflow is not supported under logical-system.
LS:Flow collector |ge-1/1/9 | |ge-1/0/9 1.1.12.0/24 +-- MX ---+-------+ 1.1.13.0/24 .1 .2| | .1 .2 LS:Test-1 ge-1/1/0 ----ebgp---- ge-1/1/0+ Global +ge-1/1/2 ----ebgp---- ge-1/1/3 LS:Test-2 AS=100 vid=1 | AS=65000 | vid=1 AS=200 lo0.1=1.1.1.1/32 | lo0.0=6.6.6.6/32| lo0.2=2.2.2.2/32 | | 2.2.12.0/24 | | 2.2.13.0/24 .1 .2| | .1 .2 LS:Test-3 ge-1/0/0 ----ebgp---- ge-1/0/1+ LSYS +ge-1/0/2 ----ebgp---- ge-1/0/3 LS:Test-4 AS=300 vid=2 | AS=65000 | vid=2 AS=400 lo0.3=3.3.3.3/32 | lo0.5=5.5.5.5/32| lo0.4=4.4.4.4/32 +-----------------+
set logical-systems LSYS interfaces ge-1/0/1 unit 2 vlan-id 2 set logical-systems LSYS interfaces ge-1/0/1 unit 2 family inet filter input LSYS-Sample-Filter set logical-systems LSYS interfaces ge-1/0/1 unit 2 family inet address 2.2.12.2/24 set logical-systems LSYS interfaces ge-1/0/2 unit 2 vlan-id 2 set logical-systems LSYS interfaces ge-1/0/2 unit 2 family inet filter input LSYS-Sample-Filter set logical-systems LSYS interfaces ge-1/0/2 unit 2 family inet address 2.2.13.1/24 set logical-systems LSYS interfaces lo0 unit 5 family inet address 5.5.5.5/32 set logical-systems LSYS protocols bgp group AS300 type external set logical-systems LSYS protocols bgp group AS300 peer-as 300 set logical-systems LSYS protocols bgp group AS300 neighbor 2.2.12.1 set logical-systems LSYS protocols bgp group AS400 type external set logical-systems LSYS protocols bgp group AS400 peer-as 400 set logical-systems LSYS protocols bgp group AS400 neighbor 2.2.13.2 set logical-systems LSYS routing-options autonomous-system 65000 set logical-systems LSYS forwarding-options sampling family inet output flow-server 192.168.0.2 port 2055 set logical-systems LSYS forwarding-options sampling family inet output flow-server 192.168.0.2 version9 template LSYS-Sample-v4 set logical-systems LSYS firewall family inet filter LSYS-Sample-Filter term 1 then sample set logical-systems LSYS firewall family inet filter LSYS-Sample-Filter term 1 then accept set logical-systems LSYS services flow-monitoring version9 template LSYS-Sample-v4 flow-active-timeout 60 set logical-systems LSYS services flow-monitoring version9 template LSYS-Sample-v4 flow-inactive-timeout 60 set logical-systems LSYS services flow-monitoring version9 template LSYS-Sample-v4 option-refresh-rate packets 10000 set logical-systems LSYS services flow-monitoring version9 template LSYS-Sample-v4 option-refresh-rate seconds 30 set logical-systems LSYS services flow-monitoring version9 template LSYS-Sample-v4 ipv4-template set services flow-monitoring version9 template Sample-v4 flow-active-timeout 60 set services flow-monitoring version9 template Sample-v4 flow-inactive-timeout 60 set services flow-monitoring version9 template Sample-v4 option-refresh-rate packets 10000 set services flow-monitoring version9 template Sample-v4 option-refresh-rate seconds 30 set services flow-monitoring version9 template Sample-v4 ipv4-template set services service-set SS-Sample-v4 jflow-rules sampling set services service-set SS-Sample-v4 sampling-service service-interface ms-1/2/0.0 set interfaces ge-1/0/0 vlan-tagging set interfaces ge-1/0/1 vlan-tagging set interfaces ge-1/0/2 vlan-tagging set interfaces ge-1/0/3 vlan-tagging set interfaces ge-1/0/9 unit 0 family inet address 192.168.0.1/24 set interfaces ge-1/1/0 vlan-tagging set interfaces ge-1/1/1 vlan-tagging set interfaces ge-1/1/1 unit 1 vlan-id 1 set interfaces ge-1/1/1 unit 1 family inet sampling input set interfaces ge-1/1/1 unit 1 family inet address 1.1.12.2/24 set interfaces ge-1/1/2 vlan-tagging set interfaces ge-1/1/2 unit 1 vlan-id 1 set interfaces ge-1/1/2 unit 1 family inet sampling input set interfaces ge-1/1/2 unit 1 family inet address 1.1.13.1/24 set interfaces ge-1/1/3 vlan-tagging set interfaces ms-1/2/0 unit 0 family inet set interfaces lo0 unit 0 family inet address 6.6.6.6/32 set forwarding-options sampling input rate 8192 set forwarding-options sampling input run-length 0 set forwarding-options sampling family inet output flow-server 192.168.0.2 port 2055 set forwarding-options sampling family inet output flow-server 192.168.0.2 version9 template Sample-v4 set forwarding-options sampling family inet output interface ms-1/2/0.0 source-address 10.10.10.10 set routing-options autonomous-system 65000 set protocols bgp group AS100 type external set protocols bgp group AS100 peer-as 100 set protocols bgp group AS100 neighbor 1.1.12.1 set protocols bgp group AS200 type external set protocols bgp group AS200 peer-as 200 set protocols bgp group AS200 neighbor 1.1.13.2
MX Hardware:
FPC 1 REV 31 750-031088 CADR7041 MPC Type 2 3D Q CPU REV 09 711-030884 CADH2545 MPC PMB 2G MIC 0 REV 30 750-028392 CADP0919 3D 20x 1GE(LAN) SFP PIC 0 BUILTIN BUILTIN 10x 1GE(LAN) SFP Xcvr 0 REV 01 740-011613 PFM1B7Q SFP-SX Xcvr 1 REV 01 740-011782 PB81NCH SFP-SX Xcvr 2 REV 01 740-011782 PB821JX SFP-SX Xcvr 3 REV 01 740-007326 P5G00MJ SFP-SX Xcvr 9 REV 01 740-031851 PPH13N0 SFP-SX PIC 1 BUILTIN BUILTIN 10x 1GE(LAN) SFP Xcvr 0 REV 01 740-011613 PE72D5L SFP-SX Xcvr 1 REV 01 740-011782 P9B0QJK SFP-SX Xcvr 2 REV 01 740-011782 PB81W7M SFP-SX Xcvr 3 REV 02 740-011613 AM1221SXPM6 SFP-SX Xcvr 9 REV 01 740-011782 P6Q2GG1 SFP-SX MIC 1 REV 17 750-043688 CABS8816 MS-MIC-16G PIC 2 BUILTIN BUILTIN MS-MIC-16G QXM 0 REV 07 711-028408 CADJ4177 MPC QXM QXM 1 REV 07 711-028408 CADJ4204 MPC QXM Fan Tray 0 REV 01 710-030216 YY2516 Enhanced Fan Tray
If ICMP is sent from 1.1.1.1 to 2.2.2.2 via the Global instance of the DUT, flow records with correct SrcAS=100 and DstAS=200 are exported.
--- JUNOS 19.4R1.9 Kernel 32-bit JNPR-11.0-20191115.14c2ad5_buil User@MX> ping 2.2.2.2 source 1.1.1.1 logical-system Test-1 rapid count 999999 PING 2.2.2.2 (2.2.2.2): 56 data bytes
Flow record:
Cisco NetFlow/IPFIX Version: 9 Count: 1 SysUptime: 1265.024000000 seconds Timestamp: Mar 9, 2020 16:18:45.000000000 Tokyo Standard Time FlowSequence: 185 SourceId: 6 FlowSet 1 [id=256] (1 flows) FlowSet Id: (Data) (256) FlowSet Length: 72 [Template Frame: 3] Flow 1 SrcAddr: 1.1.1.1 DstAddr: 2.2.2.2 IP ToS: 0x00 Protocol: ICMP (1) SrcPort: 0 DstPort: 0 ICMP Type: 0x0800 InputInt: 620 SrcAS: 100 <-- correct DstAS: 200 <-- correct BGPNextHop: 1.1.13.2 OutputInt: 622 Octets: 672 Packets: 8 [Duration: 59.297000000 seconds (switched)] NextHop: 1.1.13.2 SrcMask: 32 DstMask: 32 TCP Flags: 0x00 IPVersion: 4
If ICMP is sent from 3.3.3.3 to 4.4.4.4 via the LSYS of the DUT, flow records with incorrect SrcAS=100 and DstAS=200 are exported. They should be SrcAS=300 and DstAS=400.
User@MX> ping 4.4.4.4 source 3.3.3.3 logical-system Test-3 rapid count 999999 PING 4.4.4.4 (4.4.4.4): 56 data bytes
Cisco NetFlow/IPFIX Version: 9 Count: 1 SysUptime: 283.960000000 seconds Timestamp: Mar 9, 2020 16:02:24.000000000 Tokyo Standard Time FlowSequence: 29 SourceId: 6 FlowSet 1 [id=256] (1 flows) FlowSet Id: (Data) (256) FlowSet Length: 72 [Template Frame: 2] Flow 1 SrcAddr: 3.3.3.3 DstAddr: 4.4.4.4 IP ToS: 0x00 Protocol: ICMP (1) SrcPort: 0 DstPort: 0 ICMP Type: 0x0800 InputInt: 614 SrcAS: 100 <-- incorrect DstAS: 200 <-- incorrect BGPNextHop: 2.2.13.2 OutputInt: 616 Octets: 1092 Packets: 13 [Duration: 58.332000000 seconds (switched)] NextHop: 2.2.13.2 SrcMask: 32 DstMask: 32 TCP Flags: 0x00 IPVersion: 4
From Junos 11.4, interfaces on which sampling enabled can be part of logical systems. However, if sampled interface is part of LSYS, exported flow records may not report correct SRC_MASK/DST_MASK/SRC_AS/DST_AS/GW_ADDR/OIF information.
This is a product limitation. In a MS-MIC based scenario, the incorrect SrcAS/DstAS is reported when the sampled interface is part of LSYS.
Jflow is not supported under LSYS. The sampling interfaces should be present under global (default) logical system.