|
33 | 33 | * [BGP config commands](#bgp-config-commands)
|
34 | 34 | * [DHCP Relay](#dhcp-relay)
|
35 | 35 | * [DHCP Relay config commands](#dhcp-relay-config-commands)
|
| 36 | +* [Drop Counters](#drop-counters) |
| 37 | + * [Drop Counter show commands](#drop-counters-show-commands) |
| 38 | + * [Drop Counter config commands](#drop-counters-config-commands) |
| 39 | + * [Drop Counter clear commands](#drop-counters-clear-commands) |
36 | 40 | * [ECN](#ecn)
|
37 | 41 | * [ECN show commands](#ecn-show-commands)
|
38 | 42 | * [ECN config commands](#ecn-config-commands)
|
@@ -1739,6 +1743,191 @@ This command is used to delete a configured DHCP Relay Destination IP address fr
|
1739 | 1743 | Go Back To [Beginning of the document](#) or [Beginning of this section](#dhcp-relay)
|
1740 | 1744 |
|
1741 | 1745 |
|
| 1746 | +# Drop Counters |
| 1747 | +
|
| 1748 | +This section explains all the Configurable Drop Counters show commands and configuration options that are supported in SONiC. |
| 1749 | +
|
| 1750 | +### Drop Counters show commands |
| 1751 | +
|
| 1752 | +**show dropcounters capabilities** |
| 1753 | +
|
| 1754 | +This command is used to show the drop counter capabilities that are available on this device. It displays the total number of drop counters that can be configured on this device as well as the drop reasons that can be configured for the counters. |
| 1755 | +
|
| 1756 | +- Usage: |
| 1757 | + ``` |
| 1758 | + show dropcounters capabilities |
| 1759 | + ``` |
| 1760 | +
|
| 1761 | +- Examples: |
| 1762 | + ``` |
| 1763 | + admin@sonic:~$ show dropcounters capabilities |
| 1764 | + Counter Type Total |
| 1765 | + -------------------- ------- |
| 1766 | + PORT_INGRESS_DROPS 3 |
| 1767 | + SWITCH_EGRESS_DROPS 2 |
| 1768 | + |
| 1769 | + PORT_INGRESS_DROPS: |
| 1770 | + L2_ANY |
| 1771 | + SMAC_MULTICAST |
| 1772 | + SMAC_EQUALS_DMAC |
| 1773 | + INGRESS_VLAN_FILTER |
| 1774 | + EXCEEDS_L2_MTU |
| 1775 | + SIP_CLASS_E |
| 1776 | + SIP_LINK_LOCAL |
| 1777 | + DIP_LINK_LOCAL |
| 1778 | + UNRESOLVED_NEXT_HOP |
| 1779 | + DECAP_ERROR |
| 1780 | + |
| 1781 | + SWITCH_EGRESS_DROPS: |
| 1782 | + L2_ANY |
| 1783 | + L3_ANY |
| 1784 | + A_CUSTOM_REASON |
| 1785 | + ``` |
| 1786 | +
|
| 1787 | +**show dropcounters configuration** |
| 1788 | +
|
| 1789 | +This command is used to show the current running configuration of the drop counters on this device. |
| 1790 | +
|
| 1791 | +- Usage: |
| 1792 | + ``` |
| 1793 | + show dropcounters configuration [-g <group name>] |
| 1794 | + ``` |
| 1795 | +
|
| 1796 | +- Examples: |
| 1797 | + ``` |
| 1798 | + admin@sonic:~$ show dropcounters configuration |
| 1799 | + Counter Alias Group Type Reasons Description |
| 1800 | + -------- -------- ----- ------------------ ------------------- -------------- |
| 1801 | + DEBUG_0 RX_LEGIT LEGIT PORT_INGRESS_DROPS SMAC_EQUALS_DMAC Legitimate port-level RX pipeline drops |
| 1802 | + INGRESS_VLAN_FILTER |
| 1803 | + DEBUG_1 TX_LEGIT None SWITCH_EGRESS_DROPS EGRESS_VLAN_FILTER Legitimate switch-level TX pipeline drops |
| 1804 | + |
| 1805 | + admin@sonic:~$ show dropcounters configuration -g LEGIT |
| 1806 | + Counter Alias Group Type Reasons Description |
| 1807 | + -------- -------- ----- ------------------ ------------------- -------------- |
| 1808 | + DEBUG_0 RX_LEGIT LEGIT PORT_INGRESS_DROPS SMAC_EQUALS_DMAC Legitimate port-level RX pipeline drops |
| 1809 | + INGRESS_VLAN_FILTER |
| 1810 | + ``` |
| 1811 | +
|
| 1812 | +**show dropcounters counts** |
| 1813 | +
|
| 1814 | +This command is used to show the current statistics for the configured drop counters. Standard drop counters are displayed as well for convenience. |
| 1815 | +
|
| 1816 | +Because clear (see below) is handled on a per-user basis different users may see different drop counts. |
| 1817 | +
|
| 1818 | +- Usage: |
| 1819 | + ``` |
| 1820 | + show dropcounters counts [-g <group name>] [-t <counter type>] |
| 1821 | + ``` |
| 1822 | +
|
| 1823 | +- Example: |
| 1824 | + ``` |
| 1825 | + admin@sonic:~$ show dropcounters counts |
| 1826 | + IFACE STATE RX_ERR RX_DROPS TX_ERR TX_DROPS RX_LEGIT |
| 1827 | + --------- ------- -------- ---------- -------- ---------- --------- |
| 1828 | + Ethernet0 U 10 100 0 0 20 |
| 1829 | + Ethernet4 U 0 1000 0 0 100 |
| 1830 | + Ethernet8 U 100 10 0 0 0 |
| 1831 | + |
| 1832 | + DEVICE TX_LEGIT |
| 1833 | + ------ -------- |
| 1834 | + sonic 1000 |
| 1835 | + |
| 1836 | + admin@sonic:~$ show dropcounters counts -g LEGIT |
| 1837 | + IFACE STATE RX_ERR RX_DROPS TX_ERR TX_DROPS RX_LEGIT |
| 1838 | + --------- ------- -------- ---------- -------- ---------- --------- |
| 1839 | + Ethernet0 U 10 100 0 0 20 |
| 1840 | + Ethernet4 U 0 1000 0 0 100 |
| 1841 | + Ethernet8 U 100 10 0 0 0 |
| 1842 | + |
| 1843 | + admin@sonic:~$ show dropcounters counts -t SWITCH_EGRESS_DROPS |
| 1844 | + DEVICE TX_LEGIT |
| 1845 | + ------ -------- |
| 1846 | + sonic 1000 |
| 1847 | + ``` |
| 1848 | +
|
| 1849 | +### Drop Counters config commands |
| 1850 | +
|
| 1851 | +**config dropcounters install** |
| 1852 | +
|
| 1853 | +This command is used to initialize a new drop counter. The user must specify a name, type, and initial list of drop reasons. |
| 1854 | +
|
| 1855 | +This command will fail if the given name is already in use, if the type of counter is not supported, or if any of the specified drop reasons are not supported. It will also fail if all avaialble counters are already in use on the device. |
| 1856 | +
|
| 1857 | +- Usage: |
| 1858 | + ``` |
| 1859 | + admin@sonic:~$ sudo config dropcounters install <counter name> <counter type> <reasons list> [-d <description>] [-g <group>] [-a <alias>] |
| 1860 | + ``` |
| 1861 | +
|
| 1862 | +- Example: |
| 1863 | + ``` |
| 1864 | + admin@sonic:~$ sudo config dropcounters install DEBUG_2 PORT_INGRESS_DROPS [EXCEEDS_L2_MTU,DECAP_ERROR] -d "More port ingress drops" -g BAD -a BAD_DROPS |
| 1865 | + ``` |
| 1866 | +
|
| 1867 | +**config dropcounters add_reasons** |
| 1868 | +
|
| 1869 | +This command is used to add drop reasons to an already initialized counter. |
| 1870 | +
|
| 1871 | +This command will fail if any of the specified drop reasons are not supported. |
| 1872 | +
|
| 1873 | +- Usage: |
| 1874 | + ``` |
| 1875 | + admin@sonic:~$ sudo config dropcounters add_reasons <counter name> <reasons list> |
| 1876 | + ``` |
| 1877 | +
|
| 1878 | +- Example: |
| 1879 | + ``` |
| 1880 | + admin@sonic:~$ sudo config dropcounters add_reasons DEBUG_2 [SIP_CLASS_E] |
| 1881 | + ``` |
| 1882 | +
|
| 1883 | +**config dropcounters remove_reasons** |
| 1884 | +
|
| 1885 | +This command is used to remove drop reasons from an already initialized counter. |
| 1886 | +
|
| 1887 | +- Usage: |
| 1888 | + ``` |
| 1889 | + admin@sonic:~$ sudo config dropcounters remove_reasons <counter name> <reasons list> |
| 1890 | + ``` |
| 1891 | +
|
| 1892 | +- Example: |
| 1893 | + ``` |
| 1894 | + admin@sonic:~$ sudo config dropcounters remove_reasons DEBUG_2 [SIP_CLASS_E] |
| 1895 | + ``` |
| 1896 | +
|
| 1897 | +**config dropcounters delete** |
| 1898 | +
|
| 1899 | +This command is used to delete a drop counter. |
| 1900 | +
|
| 1901 | +- Usage: |
| 1902 | + ``` |
| 1903 | + admin@sonic:~$ sudo config dropcounters delete <counter name> |
| 1904 | + ``` |
| 1905 | +
|
| 1906 | +- Example: |
| 1907 | + ``` |
| 1908 | + admin@sonic:~$ sudo config dropcounters delete DEBUG_2 |
| 1909 | + ``` |
| 1910 | +
|
| 1911 | +### Drop Counters clear commands |
| 1912 | +
|
| 1913 | +**sonic-clear dropcounters** |
| 1914 | +
|
| 1915 | +This comnmand is used to clear drop counters. This is done on a per-user basis. |
| 1916 | +
|
| 1917 | +- Usage: |
| 1918 | + ``` |
| 1919 | + admin@sonic:~$ sonic-clear dropcounters |
| 1920 | + ``` |
| 1921 | +
|
| 1922 | +- Example: |
| 1923 | + ``` |
| 1924 | + admin@sonic:~$ sonic-clear dropcounters |
| 1925 | + Cleared drop counters |
| 1926 | + ``` |
| 1927 | +
|
| 1928 | +Go Back To [Beginning of the document](#) or [Beginning of this section](#drop-counters) |
| 1929 | +
|
| 1930 | +
|
1742 | 1931 | ## ECN
|
1743 | 1932 |
|
1744 | 1933 | This section explains all the Explicit Congestion Notification (ECN) show commands and ECN configuation options that are supported in SONiC.
|
|
0 commit comments