Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dhcpv6 per interface counter support #43

Merged
merged 4 commits into from
Sep 14, 2023

Conversation

jcaiMR
Copy link
Contributor

@jcaiMR jcaiMR commented Sep 2, 2023

Why I did it

Per-interface counter support for dhcp packets in dhcpv6relay.

Work item tracking
  • Microsoft ADO (17271822):

How I did it

Modify "DHCPv6_COUNTER_TABLE|" in Redis STATE_DB.

How to verify it

Maunally test and run test_dhcpv6_relay.py

Test log



1 Solicit + 1 Request 
Ethernet4 -> Vlan1000 (4 DHCPv6 servers) -> Portchannel101/104 -> Ethernet112/ Ethernet124

admin@str2-sn3800-azd:~$ sudo sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|Ethernet4'
{'RX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"0","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"1","Solicit":"1","Unknown":"0"}', 'TX': '{"Advertise":"1","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"0","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}'}
admin@str2-sn3800-azd:~$ sudo sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|Vlan1000'
{'RX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"0","Relay-Reply":"1","Release":"0","Renew":"0","Reply":"0","Request":"1","Solicit":"1","Unknown":"0"}', 'TX': '{"Advertise":"1","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"8","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}'}
admin@str2-sn3800-azd:~$ sudo sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|PortChannel101'
{'RX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"0","Relay-Reply":"1","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}', 'TX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"4","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}'}
admin@str2-sn3800-azd:~$ sudo sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|PortChannel104'
{'RX': "{'Unknown':'0','Solicit':'0','Advertise':'0','Request':'0','Confirm':'0','Renew':'0','Rebind':'0','Reply':'0','Release':'0','Decline':'0','Reconfigure':'0','Information-Request':'0','Relay-Forward':'0','Relay-Reply':'0','Malformed':'0'}", 'TX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"4","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}'}
admin@str2-sn3800-azd:~$ sudo sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|Ethernet112'
{'RX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"0","Relay-Reply":"1","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}', 'TX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"4","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}'}
admin@str2-sn3800-azd:~$ sudo sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|Ethernet124'
{'RX': "{'Unknown':'0','Solicit':'0','Advertise':'0','Request':'0','Confirm':'0','Renew':'0','Rebind':'0','Reply':'0','Release':'0','Decline':'0','Reconfigure':'0','Information-Request':'0','Relay-Forward':'0','Relay-Reply':'0','Malformed':'0'}", 'TX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"4","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}'}


Relay-Reply (Advertise) From server
Ethernet112 -> PortChannel101 -> Vlan1000 -> Ethernet4

admin@str2-sn3800-azd:~$ sudo sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|Ethernet112'
{'RX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"0","Relay-Reply":"1","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}', 'TX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"2","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}'}
admin@str2-sn3800-azd:~$ sudo sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|PortChannel101'
{'RX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"0","Relay-Reply":"1","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}', 'TX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"2","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}'}
admin@str2-sn3800-azd:~$ sudo sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|Vlan1000'
{'RX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"0","Relay-Reply":"1","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"1","Unknown":"0"}', 'TX': '{"Advertise":"1","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"4","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}'}
admin@str2-sn3800-azd:~$ sudo sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|Ethernet4'
{'RX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"0","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"1","Unknown":"0"}', 'TX': '{"Advertise":"1","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"0","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}'}


1 Relay-Forward from Client
Ethernet4 -> Vlan1000 (4 DHCPv6 servers) -> Portchannel101/104 -> Ethernet112/ Ethernet124

sudo sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|Ethernet4'
{'RX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"1","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"1","Solicit":"1","Unknown":"0"}', 'TX': '{"Advertise":"1","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"0","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}'}
admin@str2-sn3800-azd:~$ sudo sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|Vlan1000'
{'RX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"1","Relay-Reply":"1","Release":"0","Renew":"0","Reply":"0","Request":"1","Solicit":"1","Unknown":"0"}', 'TX': '{"Advertise":"1","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"12","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}'}
admin@str2-sn3800-azd:~$ sudo sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|PortChannel101'
{'RX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"0","Relay-Reply":"1","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}', 'TX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"6","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}'}
admin@str2-sn3800-azd:~$ sudo sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|PortChannel104'
{'RX': "{'Unknown':'0','Solicit':'0','Advertise':'0','Request':'0','Confirm':'0','Renew':'0','Rebind':'0','Reply':'0','Release':'0','Decline':'0','Reconfigure':'0','Information-Request':'0','Relay-Forward':'0','Relay-Reply':'0','Malformed':'0'}", 'TX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"6","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}'}
admin@str2-sn3800-azd:~$ sudo sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|Ethernet112'
{'RX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"0","Relay-Reply":"1","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}', 'TX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"6","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}'}
admin@str2-sn3800-azd:~$ sudo sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|Ethernet124'
{'RX': "{'Unknown':'0','Solicit':'0','Advertise':'0','Request':'0','Confirm':'0','Renew':'0','Rebind':'0','Reply':'0','Release':'0','Decline':'0','Reconfigure':'0','Information-Request':'0','Relay-Forward':'0','Relay-Reply':'0','Malformed':'0'}", 'TX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"6","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}'}

1 Relay-Reply (Relay-Reply) from Server : Second level relay agent case
Ethernet112 -> PortChannel101 -> Vlan1000 -> Ethernet4

admin@str2-sn3800-azd:~$ sudo sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|Ethernet112'
{'RX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"0","Relay-Reply":"2","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}', 'TX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"6","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}'}
admin@str2-sn3800-azd:~$ sudo sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|Ethernet124'
{'RX': "{'Unknown':'0','Solicit':'0','Advertise':'0','Request':'0','Confirm':'0','Renew':'0','Rebind':'0','Reply':'0','Release':'0','Decline':'0','Reconfigure':'0','Information-Request':'0','Relay-Forward':'0','Relay-Reply':'0','Malformed':'0'}", 'TX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"6","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}'}
admin@str2-sn3800-azd:~$ sudo sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|PortChannel101'
{'RX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"0","Relay-Reply":"2","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}', 'TX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"6","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}'}
admin@str2-sn3800-azd:~$ sudo sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|Vlan1000'
{'RX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"1","Relay-Reply":"2","Release":"0","Renew":"0","Reply":"0","Request":"1","Solicit":"1","Unknown":"0"}', 'TX': '{"Advertise":"1","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"12","Relay-Reply":"1","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}'}
admin@str2-sn3800-azd:~$ sudo sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|Ethernet4'
{'RX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"1","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"1","Solicit":"1","Unknown":"0"}', 'TX': '{"Advertise":"1","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"0","Relay-Reply":"1","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}'}


Dual Tor case

Solicit from Client to 4 DHCPv6 servers
Ethernet0 -> Vlan1000 (relay to 4 servers)-> PortChannel101-104 -> Ethernet48/52/56/60/64/68/72/76

admin@str2-7260cx3-acs-12:~$ sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|Ethernet0'
{'TX': "{'Unknown':'0','Solicit':'0','Advertise':'0','Request':'0','Confirm':'0','Renew':'0','Rebind':'0','Reply':'0','Release':'0','Decline':'0','Reconfigure':'0','Information-Request':'0','Relay-Forward':'0','Relay-Reply':'0','Malformed':'0'}", 'RX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"0","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"1","Unknown":"0"}'}
admin@str2-7260cx3-acs-12:~$ sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|Vlan1000'
{'TX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"4","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}', 'RX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"0","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"1","Unknown":"0"}'}
admin@str2-7260cx3-acs-12:~$ sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|PortChannel101'
{'TX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"1","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}', 'RX': "{'Unknown':'0','Solicit':'0','Advertise':'0','Request':'0','Confirm':'0','Renew':'0','Rebind':'0','Reply':'0','Release':'0','Decline':'0','Reconfigure':'0','Information-Request':'0','Relay-Forward':'0','Relay-Reply':'0','Malformed':'0'}"}
admin@str2-7260cx3-acs-12:~$ sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|PortChannel102'
{'TX': "{'Unknown':'0','Solicit':'0','Advertise':'0','Request':'0','Confirm':'0','Renew':'0','Rebind':'0','Reply':'0','Release':'0','Decline':'0','Reconfigure':'0','Information-Request':'0','Relay-Forward':'0','Relay-Reply':'0','Malformed':'0'}", 'RX': "{'Unknown':'0','Solicit':'0','Advertise':'0','Request':'0','Confirm':'0','Renew':'0','Rebind':'0','Reply':'0','Release':'0','Decline':'0','Reconfigure':'0','Information-Request':'0','Relay-Forward':'0','Relay-Reply':'0','Malformed':'0'}"}
admin@str2-7260cx3-acs-12:~$ sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|PortChannel103'
{'TX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"1","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}', 'RX': "{'Unknown':'0','Solicit':'0','Advertise':'0','Request':'0','Confirm':'0','Renew':'0','Rebind':'0','Reply':'0','Release':'0','Decline':'0','Reconfigure':'0','Information-Request':'0','Relay-Forward':'0','Relay-Reply':'0','Malformed':'0'}"}
admin@str2-7260cx3-acs-12:~$ sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|PortChannel104'
{'TX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"2","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}', 'RX': "{'Unknown':'0','Solicit':'0','Advertise':'0','Request':'0','Confirm':'0','Renew':'0','Rebind':'0','Reply':'0','Release':'0','Decline':'0','Reconfigure':'0','Information-Request':'0','Relay-Forward':'0','Relay-Reply':'0','Malformed':'0'}"}
admin@str2-7260cx3-acs-12:~$ sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|Ethernet48'
{'TX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"1","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}', 'RX': "{'Unknown':'0','Solicit':'0','Advertise':'0','Request':'0','Confirm':'0','Renew':'0','Rebind':'0','Reply':'0','Release':'0','Decline':'0','Reconfigure':'0','Information-Request':'0','Relay-Forward':'0','Relay-Reply':'0','Malformed':'0'}"}
admin@str2-7260cx3-acs-12:~$ 
admin@str2-7260cx3-acs-12:~$ sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|Ethernet52'
{'TX': "{'Unknown':'0','Solicit':'0','Advertise':'0','Request':'0','Confirm':'0','Renew':'0','Rebind':'0','Reply':'0','Release':'0','Decline':'0','Reconfigure':'0','Information-Request':'0','Relay-Forward':'0','Relay-Reply':'0','Malformed':'0'}", 'RX': "{'Unknown':'0','Solicit':'0','Advertise':'0','Request':'0','Confirm':'0','Renew':'0','Rebind':'0','Reply':'0','Release':'0','Decline':'0','Reconfigure':'0','Information-Request':'0','Relay-Forward':'0','Relay-Reply':'0','Malformed':'0'}"}
admin@str2-7260cx3-acs-12:~$ 
admin@str2-7260cx3-acs-12:~$ sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|Ethernet64'
{'TX': "{'Unknown':'0','Solicit':'0','Advertise':'0','Request':'0','Confirm':'0','Renew':'0','Rebind':'0','Reply':'0','Release':'0','Decline':'0','Reconfigure':'0','Information-Request':'0','Relay-Forward':'0','Relay-Reply':'0','Malformed':'0'}", 'RX': "{'Unknown':'0','Solicit':'0','Advertise':'0','Request':'0','Confirm':'0','Renew':'0','Rebind':'0','Reply':'0','Release':'0','Decline':'0','Reconfigure':'0','Information-Request':'0','Relay-Forward':'0','Relay-Reply':'0','Malformed':'0'}"}
admin@str2-7260cx3-acs-12:~$ 
admin@str2-7260cx3-acs-12:~$ 
admin@str2-7260cx3-acs-12:~$ sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|Ethernet68'
{'TX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"1","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}', 'RX': "{'Unknown':'0','Solicit':'0','Advertise':'0','Request':'0','Confirm':'0','Renew':'0','Rebind':'0','Reply':'0','Release':'0','Decline':'0','Reconfigure':'0','Information-Request':'0','Relay-Forward':'0','Relay-Reply':'0','Malformed':'0'}"}
admin@str2-7260cx3-acs-12:~$ 
admin@str2-7260cx3-acs-12:~$ sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|Ethernet72'
{'TX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"1","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}', 'RX': "{'Unknown':'0','Solicit':'0','Advertise':'0','Request':'0','Confirm':'0','Renew':'0','Rebind':'0','Reply':'0','Release':'0','Decline':'0','Reconfigure':'0','Information-Request':'0','Relay-Forward':'0','Relay-Reply':'0','Malformed':'0'}"}
admin@str2-7260cx3-acs-12:~$ 
admin@str2-7260cx3-acs-12:~$ sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|Ethernet76'
{'TX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"1","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}', 'RX': "{'Unknown':'0','Solicit':'0','Advertise':'0','Request':'0','Confirm':'0','Renew':'0','Rebind':'0','Reply':'0','Release':'0','Decline':'0','Reconfigure':'0','Information-Request':'0','Relay-Forward':'0','Relay-Reply':'0','Malformed':'0'}"}
admin@str2-7260cx3-acs-12:~$

    Ethernet48      57,58,59,60     100G   9100     rs  Ethernet13/1  PortChannel101      up       up  QSFP28 or later         off
    Ethernet52      53,54,55,56     100G   9100     rs  Ethernet14/1  PortChannel101      up       up  QSFP28 or later         off
    Ethernet56  117,118,119,120     100G   9100     rs  Ethernet15/1  PortChannel102      up       up  QSFP28 or later         off
    Ethernet60  121,122,123,124     100G   9100     rs  Ethernet16/1  PortChannel102      up       up  QSFP28 or later         off
    Ethernet64  141,142,143,144     100G   9100     rs  Ethernet17/1  PortChannel103      up       up  QSFP28 or later         off
    Ethernet68  133,134,135,136     100G   9100     rs  Ethernet18/1  PortChannel103      up       up  QSFP28 or later         off
    Ethernet72  197,198,199,200     100G   9100     rs  Ethernet19/1  PortChannel104      up       up  QSFP28 or later         off
Ethernet76  205,206,207,208     100G   9100     rs  Ethernet20/1  PortChannel104      up       up  QSFP28 or later         off


Relay-Reply (Advertise)
Ethernet48 -> PortChannel101 -> Loopback0 -> Vlan1000 -> Ethernet0

admin@str2-7260cx3-acs-12:~$ sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|Ethernet48'
{'TX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"1","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}', 'RX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"0","Relay-Reply":"1","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}'}
admin@str2-7260cx3-acs-12:~$ sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|PortChannel101'
{'TX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"1","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}', 'RX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"0","Relay-Reply":"1","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}'}
admin@str2-7260cx3-acs-12:~$ sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|Loopback0'
{'TX': "{'Unknown':'0','Solicit':'0','Advertise':'0','Request':'0','Confirm':'0','Renew':'0','Rebind':'0','Reply':'0','Release':'0','Decline':'0','Reconfigure':'0','Information-Request':'0','Relay-Forward':'0','Relay-Reply':'0','Malformed':'0'}", 'RX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"0","Relay-Reply":"1","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}'}
admin@str2-7260cx3-acs-12:~$ sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|Vlan1000'
{'TX': '{"Advertise":"1","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"4","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}', 'RX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"0","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"1","Unknown":"0"}'}
admin@str2-7260cx3-acs-12:~$ sonic-db-cli STATE_DB hgetall 'DHCPv6_COUNTER_TABLE|Ethernet0'
{'TX': '{"Advertise":"1","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"0","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"0","Unknown":"0"}', 'RX': '{"Advertise":"0","Confirm":"0","Decline":"0","Information-Request":"0","Malformed":"0","Rebind":"0","Reconfigure":"0","Relay-Forward":"0","Relay-Reply":"0","Release":"0","Renew":"0","Reply":"0","Request":"0","Solicit":"1","Unknown":"0"}'}


@jcaiMR jcaiMR force-pushed the dev/jcai_perif_counter branch from 5383cd0 to 2c7e420 Compare September 3, 2023 04:15
src/relay.cpp Dismissed Show dismissed Hide dismissed
@jcaiMR jcaiMR force-pushed the dev/jcai_perif_counter branch from 88a4763 to 6c2ac1e Compare September 4, 2023 08:25
@jcaiMR jcaiMR marked this pull request as ready for review September 4, 2023 13:05
@jcaiMR jcaiMR requested review from kellyyeh and yxieca September 4, 2023 13:05
@jcaiMR jcaiMR force-pushed the dev/jcai_perif_counter branch from 771427c to 19045b8 Compare September 5, 2023 16:42
@jcaiMR jcaiMR force-pushed the dev/jcai_perif_counter branch from 63571bc to 30e51c4 Compare September 6, 2023 03:33
src/relay.cpp Outdated Show resolved Hide resolved
@jcaiMR jcaiMR merged commit 2b33d76 into sonic-net:master Sep 14, 2023
7 checks passed
kellyyeh added a commit to kellyyeh/sonic-dhcp-relay that referenced this pull request Mar 6, 2024
kellyyeh added a commit that referenced this pull request Mar 6, 2024
* Revert "[counter] Clear counter table when init (#45)"

This reverts commit 5ae186f.

* Revert "dhcpv6 per interface counter support (#43)"

This reverts commit 2b33d76.

* Update buster to bullseye libyang deb
yaqiangz pushed a commit to yaqiangz/sonic-dhcp-relay that referenced this pull request May 31, 2024
* Revert "[counter] Clear counter table when init (sonic-net#45)"

This reverts commit 5ae186f.

* Revert "dhcpv6 per interface counter support (sonic-net#43)"

This reverts commit 2b33d76.

* Update buster to bullseye libyang deb
yxieca pushed a commit that referenced this pull request May 31, 2024
* Skip vlans with no dhcpv6 server configured (#46)

* Revert DHCPv6 Counter (#48)

* Revert "[counter] Clear counter table when init (#45)"

This reverts commit 5ae186f.

* Revert "dhcpv6 per interface counter support (#43)"

This reverts commit 2b33d76.

* Update buster to bullseye libyang deb

---------

Co-authored-by: kellyyeh <42761586+kellyyeh@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants