[Edgecore SONiC] SFLOW (sampled flow) Follow
Reference model:
- Switch model name:
- AS7726-32X
- AS7326-56X
- AS7816-64X
- AS5835-54X(T)
- AS4630-54PE
- AS9716-32D
- AS8000(Minipack)
- Wedge100BF-32X
- Edgecore SONiC version:
- Edgecore-SONiC_20201123_130028_ec202006_74
- Edgecore-SONiC_20201229_070315_ec202006_101
- Edgecore-SONiC_20201229_070315_ec202006_bfn_65(Wedge100BF-32X)
Restriction:
- sFlow is disabled by default.
- It only supports two sFlow collectors.
- The sFlow flow sampling is not taken effect unless you set the COPP rule correctly.
Topology:
Procedure :
Step 1: Make sure the COPP rule is correct in the SWSS container.
Access the SWSS container.
admin@sonic:~$ docker exec -it swss bash
root@sonic:/#
Checking the copp.json.j2, this file is at /usr/share/sonic/templates.
[
… omitted
{
"COPP_TABLE:trap.group.sflow": {
"trap_ids": "sample_packet",
"trap_action":"trap",
"trap_priority":"1",
"queue": "2",
"meter_type":"packets",
"mode":"sr_tcm",
"cir":"1000",
"cbs":"1000",
"red_action":"drop",
"genetlink_name":"psample",
"genetlink_mcgrp_name":"packets"
},
"OP": "SET"
}
]
Caution: If you modify the copp.json.j2, please reboot the switch to activate it.
Step 2: Configure the IP address on the Ethernet0 ( refer to this article)
Step 3: Enable the sFlow.
admin@sonic:~$ sudo config sflow enable
Step 4: Add the sFlow collector.
admin@sonic:~$ sudo config sflow collector add test 192.168.2.2
Step 5: check sFlow.
admin@sonic:~$ show sflow
sFlow Global Information:
sFlow Admin State: up
sFlow Polling Interval: default
sFlow AgentID: default
1 Collectors configured:
Name: test IP addr: 192.168.2.2UDP port: 6343
admin@sonic:~$ show sflow interface
sFlow interface configurations
+-------------+---------------+-----------------+
| Interface | Admin State | Sampling Rate |
+=============+===============+=================+
| Ethernet0 | up | 2500 |
+-------------+---------------+-----------------+
| Ethernet1 | up | 2500 |
+-------------+---------------+-----------------+
| Ethernet2 | up | 2500 |
+-------------+---------------+-----------------+
| Ethernet3 | up | 2500 |
+-------------+---------------+-----------------+
...
omitted
...
+-------------+---------------+-----------------+
| Ethernet72 | up | 10000 |
+-------------+---------------+-----------------+
| Ethernet76 | up | 10000 |
+-------------+---------------+-----------------+
Comments
0 comments
Please sign in to leave a comment.