DHCP‑Snooping
9 min
\<font color="#1d50a2">asternos dhcp snooping\</font> this chapter provides examples on how to use netconf to manage dhcp snooping configurations on asternos devices \<font color="#1d50a2">get current dhcp snooping configurations\</font> request example to get all dhcp snooping configurations via get config with subtree filter \<filter type="subtree"> \<top> \<dhcp snooping/> \</top> \</filter> response example \<data xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0"> \<top> \<dhcp snooping xmlns="http //asterfusion com/ns/yang/asternos dhcp snooping"> \<global> \<dhcp4 enabled>true\</dhcp4 enabled> \<dhcp6 enabled>true\</dhcp6 enabled> \<autosave>false\</autosave> \</global> \<interfaces> \<interface> \<name>ethernet1\</name> \<enabled>true\</enabled> \<trusted>true\</trusted> \</interface> \<interface> \<name>vlan100\</name> \<enabled>true\</enabled> \<trusted>true\</trusted> \</interface> \</interfaces> \</dhcp snooping> \</top> \</data> \<font color="#1d50a2">set dhcp snooping configurations\</font> request example to set dhcp snooping configuration via edit config \<config> \<top> \<dhcp snooping> \<global operation="merge"> \<dhcp4 enabled>true\</dhcp4 enabled> \<dhcp6 enabled>true\</dhcp6 enabled> \<autosave>false\</autosave> \</global> \<interfaces> \<interface> \<name>ethernet1\</name> \<enabled>true\</enabled> \<trusted>true\</trusted> \</interface> \<interface> \<name>vlan100\</name> \<enabled>true\</enabled> \<trusted>true\</trusted> \</interface> \</interfaces> \</dhcp snooping> \</top> \</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 06239f01 5869 41af 84dd 0e4f1e1e774d"> \<ok/> \</rpc reply> \<font color="#1d50a2">delete dhcp snooping configuration\</font> request example to delete dhcp snooping configurations of interface via edit config \<config> \<top> \<dhcp snooping> \<interfaces> \<interface operation="delete"> \<name>vlan100\</name> \</interface> \</interfaces> \</dhcp snooping> \</top> \</config> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 6845257e fb87 4b08 80c5 2a8b1b1dc264"> \<ok/> \</rpc reply> \<font color="#1d50a2">show snooping table\</font> note snooping table include dhcp snooping and nd snooping request example to show dhcp snooping table via rpc show snooping table \<show snooping table/> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid 79163e9c c7a9 44b7 936f 56dab72436c2"> \<data xmlns="http //asterfusion com/ns/yang/asternos dhcp snooping"/> \<entries> \<vlan>vlan100\</vlan> \<smac>0c 13\ d3 82 00 03\</smac> \<sip>10 8 8 100\</sip> \<lease time>300\</lease time> \<interface>ethernet3\</interface> \<timestamp>318657056529\</timestamp> \<switch id>10 1 0 1\</switch id> \<flag>local\</flag> \</entries> \<entries> \<vlan>vlan100\</vlan> \<smac>0c 13\ d3 82 52 03\</smac> \<sip>2001 db8 101\</sip> \<lease time>300\</lease time> \<interface>ethernet3\</interface> \<timestamp>41857052629\</timestamp> \<switch id>10 1 0 1\</switch id> \<flag>local\</flag> \</entries> \</data> \</rpc reply> \<font color="#1d50a2">show snooping count\</font> note snooping count include dhcp snooping and nd snooping request example to show dhcp snooping table via rpc show snooping count \<show snooping count/> response example \<rpc reply xmlns="urn\ ietf\ params\ xml\ ns\ netconf\ base 1 0" message id="urn\ uuid\ ba1ff87c 59dd 4a3f a7eb 193373a293a7"> \<data xmlns="http //asterfusion com/ns/yang/asternos dhcp snooping"/> \<total v4 count>1\</total v4 count> \<total v6 count>1\</total v6 count> \<local v4 count>1\</local v4 count> \<local v6 count>1\</local v6 count> \<remote v4 count>0\</remote v4 count> \<remote v6 count>0\</remote v6 count> \</data> \</rpc reply>
