Hi Modus,
Since we cannot configure an interface-range under sflow, there is no other option but to configure each interface individually. We can only use apply-groups to add the same sample-rate to all interfaces.
Please refer this documentation for the apply-groups usage: https://www.juniper.net/documentation/en_US/junos/topics/topic-map/configuration-groups-usage.html
root@Juniper# show groups sflo | display set
set groups test protocols sflow interfaces <*> sample-rate ingress 4096
set groups test protocols sflow interfaces <*> sample-rate egress 4096
{master:0}[edit]
root@Juniper# show protocols sflow | display set
set protocols sflow agent-id 1.1.1.1
set protocols sflow sample-rate ingress 4096
set protocols sflow source-ip 1.1.1.1
set protocols sflow collector 2.2.2.2 udp-port 6343
set protocols sflow collector 3.3.3.3 udp-port 6343
set protocols sflow interfaces xe-0/0/0.0 apply-groups test
set protocols sflow interfaces xe-0/0/1.0 apply-groups test
{master:0}[edit]
root@Juniper# show protocols sflow | display inheritance
agent-id 1.1.1.1;
sample-rate ingress 4096;
source-ip 1.1.1.1;
collector 2.2.2.2 {
udp-port 6343;
}
collector 3.3.3.3 {
udp-port 6343;
}
interfaces xe-0/0/0.0 {
##
## 'sample-rate' was inherited from group 'test'
##
sample-rate {
##
## '4096' was inherited from group 'test'
##
ingress 4096;
##
## '4096' was inherited from group 'test'
##
egress 4096;
}
}
interfaces xe-0/0/1.0 {
##
## 'sample-rate' was inherited from group 'test'
##
sample-rate {
##
## '4096' was inherited from group 'test'
##
ingress 4096;
##
## '4096' was inherited from group 'test'
##
egress 4096;
}
}
{master:0}[edit]
root@Juniper# show protocols sflow | display inheritance | display set
set protocols sflow agent-id 1.1.1.1
set protocols sflow sample-rate ingress 4096
set protocols sflow source-ip 1.1.1.1
set protocols sflow collector 2.2.2.2 udp-port 6343
set protocols sflow collector 3.3.3.3 udp-port 6343
set protocols sflow interfaces xe-0/0/0.0 sample-rate ingress 4096
set protocols sflow interfaces xe-0/0/0.0 sample-rate egress 4096
set protocols sflow interfaces xe-0/0/1.0 sample-rate ingress 4096
set protocols sflow interfaces xe-0/0/1.0 sample-rate egress 4096
In this example, we have a config group for applying sample-rate to interfaces and we apply this to protocols sflow interfaces<interface-name> and the sample rate gets inherited from the group "test".
Hope this helps.
Regards,
-r.
--------------------------------------------------
If this solves your problem, please mark this post as "Accepted Solution."
Kudos are always appreciated :).