When a sampling interface is configured in default LSYS, sflow records are sent to the collector successfully. However, when it is configured in non default LSYS, no sflow records are sent to the collector. This is an expected behavior as per the software design. Sflow is not supported in LSYS. It is supported only in default LSYS.
Flow collector |.112 | | 172.27.116.0/24 | MX |.162
[LSYS1]ge-1/0/0 ------- ge-1/0/9[default LSYS]ge-1/1/0 -------- ge-1/1/9[LSYS2]
.1 .2 .1 .2 <-----192.168.10.0/24-----> <-----192.168.20.0/24----->
set logical-systems LSYS1 interfaces ge-1/0/0 unit 0 family inet address 192.168.10.1/24 set logical-systems LSYS1 routing-options static route 192.168.20.0/24 next-hop 192.168.10.2 set logical-systems LSYS2 interfaces ge-1/1/9 unit 0 family inet address 192.168.20.2/24 set logical-systems LSYS2 routing-options static route 192.168.10.0/24 next-hop 192.168.20.1 set interfaces ge-1/0/9 unit 0 family inet address 192.168.10.2/24 set interfaces ge-1/1/0 unit 0 family inet address 192.168.20.1/24 set protocols sflow sample-rate ingress 100 set protocols sflow sample-rate egress 100 set protocols sflow source-ip 172.27.116.162 set protocols sflow collector 172.27.116.112 set protocols sflow interfaces ge-1/0/9.0
User@MX> ping 192.168.20.2 logical-system LSYS1 rapid count 999999 PING 192.168.20.2 (192.168.20.2): 56 data bytes
User@MX> show interfaces ge-1/0/9 media Physical interface: ge-1/0/9, Enabled, Physical link is Up Interface index: 160, SNMP ifIndex: 575 Link-level type: Ethernet, MTU: 1514, MRU: 1522, LAN-PHY mode, Speed: 1000mbps, BPDU Error: None, Loop Detect PDU Error: None, Ethernet-Switching Error: None, MAC-REWRITE Error: None, Loopback: Disabled, Source filtering: Disabled, Flow control: Enabled, Auto-negotiation: Enabled, Remote fault: Online Pad to minimum frame size: Disabled Device flags : Present Running Interface flags: SNMP-Traps Internal: 0x4000 Link flags : None CoS queues : 8 supported, 8 maximum usable queues Schedulers : 0 Current address: 2c:21:72:b8:0a:9e, Hardware address: 2c:21:72:b8:0a:9e Last flapped : 2019-10-08 15:32:46 JST (00:24:17 ago) Input rate : 497952 bps (741 pps) Output rate : 497952 bps (741 pps)
No. Time Source Destination Protocol Length Info 122 3.144343 172.27.116.162 172.27.116.112 sFlow 912 V5, agent 172.27.116.162, sub-agent ID 1, seq 1204, 5 samples Frame 122: 912 bytes on wire (7296 bits), 912 bytes captured (7296 bits) Juniper Ethernet Ethernet II, Src: TeknorMi_64:68:57 (00:a0:a5:64:68:57), Dst: TeknorMi_8d:b7:8e (00:a0:a5:8d:b7:8e) Internet Protocol Version 4, Src: 172.27.116.162, Dst: 172.27.116.112 User Datagram Protocol, Src Port: 64674, Dst Port: 6343 InMon sFlow Datagram version: 5 Agent address type: IPv4 (1) Agent address: 172.27.116.162 Sub-agent ID: 1 Sequence number: 1204 SysUptime: 7 days, 15 hours, 50 minutes, 30 seconds (661830s) NumSamples: 5 Flow sample, seq 5887 0000 0000 0000 0000 0000 .... .... .... = Enterprise: standard sFlow (0) .... .... .... .... .... 0000 0000 0001 = sFlow sample type: Flow sample (1) Sample length (byte): 156 Sequence number: 5887 0000 0000 .... .... .... .... .... .... = Source ID class: 0 .... .... 0000 0000 0000 0010 0011 1111 = Index: 575 Sampling rate: 1 out of 100 packets Sample pool: 588800 total packets Dropped packets: 0 Input interface (ifIndex): 576 Output interface: 0x0000023f Flow record: 1 Raw packet header 0000 0000 0000 0000 0000 .... .... .... = Enterprise: standard sFlow (0) Format: Raw packet header (1) Flow data length (byte): 116 Header protocol: Ethernet (1) Frame Length: 102 Payload removed: 4 Original packet length: 98 Header of sampled packet: 2c2172b80a952c2172b80a9e0800450000543dc800004001… Ethernet II, Src: JuniperN_b8:0a:9e (2c:21:72:b8:0a:9e), Dst: JuniperN_b8:0a:95 (2c:21:72:b8:0a:95) Internet Protocol Version 4, Src: 192.168.20.2, Dst: 192.168.10.1 Internet Control Message Protocol
[edit] User@MX# show |compare [edit protocols sflow] + interfaces ge-1/0/0.0; - interfaces ge-1/0/9.0; + interfaces ge-1/1/9.0; [edit] User@MX# commit commit complete User@MX> show configuration protocols sflow { sample-rate { ingress 100; egress 100; } source-ip 172.27.116.162; collector 172.27.116.112; interfaces ge-1/0/0.0; interfaces ge-1/1/9.0; } User@MX> show interfaces ge-1/0/0 media Physical interface: ge-1/0/0, Enabled, Physical link is Up Interface index: 151, SNMP ifIndex: 564 Link-level type: Ethernet, MTU: 1514, MRU: 1522, LAN-PHY mode, Speed: 1000mbps, BPDU Error: None, Loop Detect PDU Error: None, Ethernet-Switching Error: None, MAC-REWRITE Error: None, Loopback: Disabled, Source filtering: Disabled, Flow control: Enabled, Auto-negotiation: Enabled, Remote fault: Online Pad to minimum frame size: Disabled Device flags : Present Running Interface flags: SNMP-Traps Internal: 0x4000 Link flags : None CoS queues : 8 supported, 8 maximum usable queues Schedulers : 0 Current address: 2c:21:72:b8:0a:95, Hardware address: 2c:21:72:b8:0a:95 Last flapped : 2019-10-08 15:32:46 JST (00:19:38 ago) Input rate : 372944 bps (554 pps) Output rate : 519792 bps (663 pps) User@MX> show interfaces ge-1/1/9 media Physical interface: ge-1/1/9, Enabled, Physical link is Up Interface index: 170, SNMP ifIndex: 585 Link-level type: Ethernet, MTU: 1514, MRU: 1522, LAN-PHY mode, Speed: 1000mbps, BPDU Error: None, Loop Detect PDU Error: None, Ethernet-Switching Error: None, MAC-REWRITE Error: None, Loopback: Disabled, Source filtering: Disabled, Flow control: Enabled, Auto-negotiation: Enabled, Remote fault: Online Pad to minimum frame size: Disabled Device flags : Present Running Interface flags: SNMP-Traps Internal: 0x4000 Link flags : None CoS queues : 8 supported, 8 maximum usable queues Schedulers : 0 Current address: 2c:21:72:b8:0b:43, Hardware address: 2c:21:72:b8:0b:43 Last flapped : 2019-10-08 15:32:46 JST (00:19:44 ago) Input rate : 672328 bps (1000 pps) Output rate : 476280 bps (607 pps)
No sflow record is captured on the flow collector.
Sflow is not supported in LSYS. It is supported only in default LSYS.
The sampling interfaces must be configured under default LSYS.