When configuring sflow, there's no source-address option. Possible options:
[email protected]# set system flow-accounting sflow Possible completions: agent-address sFlow agent IPv4 address sampling-rate sFlow sampling-rate +> server Server to export sFlow [REQUIRED]
When configuring agent-address with ip 203.0.113.100 (assigned to dummy interface) and sflow server 192.0.2.200, reachable through interface eth3 which has IP 198.51.100.1, I can see traffic on remote router as next:
12:06:09.531886 IP 198.51.100.1.47322 > 192.0.2.200.6343: sFlowv5, IPv4 agent 203.0.113.100, agent-id 0, length 48 12:06:09.531886 IP 198.51.100.1.47322 > 192.0.2.200.6343: sFlowv5, IPv4 agent 203.0.113.100, agent-id 0, length 48
This is correct and working as expected.
New request: be able to set source address in sflow. For example:
set system flow-accounting sflow source-address x.x.x.x
So, for example assigning source ip address 203.0.113.100 (in this particular case, source-ip == agent-address), on remote router connection will look like:
12:06:09.531886 IP 203.0.113.100.47322 > 192.0.2.200.6343: sFlowv5, IPv4 agent 203.0.113.100, agent-id 0, length 48 12:06:09.531886 IP 203.0.113.100.47322 > 192.0.2.200.6343: sFlowv5, IPv4 agent 203.0.113.100, agent-id 0, length 48