ARP
This chapter provides examples on how to use Netconf to manage ARP configurations on AsterNOS devices.
Create ARP Global Configurations
Section titled “Create ARP Global Configurations”Request example to create ARP global configurations via edit-config.
<config><top> <arp-global operation="create"> <arp-dynamic-learning> <expire-time>1000</expire-time> </arp-dynamic-learning> <log-enable>True</log-enable> </arp-global></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:0f6026e2-0dc9-4c98-a169-3c4354f85976"> <ok/></rpc-reply>Modify ARP Global Configurations
Section titled “Modify ARP Global Configurations”Request example to modify ARP global configurations via edit-config.
<config><top> <arp-global operation="merge"> <arp-dynamic-learning> <expire-time>500</expire-time> </arp-dynamic-learning> <log-enable>False</log-enable> </arp-global></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:0f51d60f-6c64-4b0d-b6eb-2dc68b3ee2b1"> <ok/></rpc-reply>Delete ARP Global Configurations
Section titled “Delete ARP Global Configurations”Request example to delete ARP global configurations via edit-config.
<config><top> <arp-global operation="delete"/></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:5ab6f1f4-613e-4c38-8a8b-f6600ca31b5d"> <ok/></rpc-reply>Get ARP Global Configurations
Section titled “Get ARP Global Configurations”Request example to get ARP global configurations via get-config with subtree filter.
<filter type="subtree"> <top> <arp-global/> </top></filter>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:7f798925-a9b7-440a-80fc-990e5941d955"> <data> <top> <arp-global xmlns="http://asterfusion.com/ns/yang/asternos-arp"> <log-enable>false</log-enable> <arp-dynamic-learning> <expire-time>500</expire-time> </arp-dynamic-learning> </arp-global> </top> </data></rpc-reply>Create Static ARP for Interface
Section titled “Create Static ARP for Interface”Request example to create static ARP for interface via edit-config.
<config><top> <interfaces> <interface> <name>Ethernet1</name> <ipv4> <address operation="create"> <ip-prefix>20.1.1.1/20</ip-prefix> </address> <address operation="create"> <ip-prefix>30.1.1.1/20</ip-prefix> </address> <neighbor operation="create"> <ip>20.1.1.2</ip> <mac-address>00:0e:c6:56:9d:35</mac-address> </neighbor> <neighbor operation="create"> <ip>30.1.1.2</ip> <mac-address>00:0e:c6:56:9d:35</mac-address> </neighbor> </ipv4> </interface> </interfaces></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:61fd81c6-e86b-4c48-8ad2-22bd334c9cf1"> <ok/></rpc-reply>Delete Static ARP for Interface
Section titled “Delete Static ARP for Interface”Request example to delete static ARP for interface via edit-config.
<config><top> <interfaces> <interface> <name>Ethernet1</name> <ipv4> <neighbor operation="delete"> <ip>20.1.1.2</ip> </neighbor> </ipv4> </interface> </interfaces></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4caaeb3b-781c-4a05-a3f1-26c2cd2829ba"> <ok/></rpc-reply>Delete All ARP for Interface
Section titled “Delete All ARP for Interface”Request example to delete all ARP for interface via edit-config.
<config><top> <interfaces> <interface> <name>Ethernet1</name> <ipv4> <neighbor operation="delete"> </neighbor> </ipv4> </interface> </interfaces></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:7868a8f4-fa4d-4c6e-b66f-55996b2ad188"> <ok/></rpc-reply>Get All Static ARP for Interface
Section titled “Get All Static ARP for Interface”Request example to get all static ARP for interface via get-config with subtree filter.
<filter type="subtree"> <top> <interfaces> <interface> <name>Ethernet1</name> <ipv4> <neighbor> </neighbor> </ipv4> </interface> </interfaces> </top></filter>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:844d304d-90d3-47f8-adba-16f2741874f1"> <data> <top> <interfaces xmlns="http://asterfusion.com/ns/yang/asternos-interfaces"> <interface> <name>Ethernet1</name> <ipv4 xmlns="http://asterfusion.com/ns/yang/asternos-ip"> <neighbor> <ip>20.1.1.2</ip> <mac-address>00:0e:c6:56:9d:35</mac-address> </neighbor> <neighbor> <ip>30.1.1.2</ip> <mac-address>00:0e:c6:56:9d:35</mac-address> </neighbor> </ipv4> </interface> </interfaces> </top> </data></rpc-reply>Show All ARP
Section titled “Show All ARP”Request example to show all ARP via rpc show-ipv4-neighbor-summary
<show-ipv4-neighbor-summary/>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:93a9278f-91ac-4ef7-a2aa-a6dec1f58456"> <data xmlns="http://asterfusion.com/ns/yang/asternos-ip"> Address MacAddress Iface Vlan -------------- ----------------- ------- ------ 192.168.0.1 60:eb:5a:01:10:03 eth0 - 192.168.0.76 60:eb:5a:01:10:03 eth0 - 192.168.15.127 60:eb:5a:01:10:03 eth0 - Total number of entries 3 </data></rpc-reply>Enable ARP Proxy On Vlan Interface
Section titled “Enable ARP Proxy On Vlan Interface”Request example to enable ARP proxy on vlan interface via edit-config.
<config><top> <vlans> <vlan operation="create"> <vlanid>100</vlanid> </vlan> </vlans> <interfaces> <interface> <name>Vlan100</name> <arp-dynamic-learning> <mode>anycast_gw</mode> </arp-dynamic-learning> </interface> </interfaces></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:a5891471-02ee-4d3f-892c-ed515e3a7a53"> <ok/></rpc-reply>Disable ARP Proxy On Vlan Interface
Section titled “Disable ARP Proxy On Vlan Interface”Request example to disable ARP proxy on vlan interface via edit-config.
<config><top> <interfaces> <interface> <name>Vlan100</name> <arp-dynamic-learning> <mode>disable</mode> </arp-dynamic-learning> </interface> </interfaces></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:49687cc0-903d-4865-be5f-e709e1c9e981"> <ok/></rpc-reply>Get ARP Proxy On Vlan Interface
Section titled “Get ARP Proxy On Vlan Interface”Request example to get ARP proxy on vlan interface via get-config with subtree filter.
<filter type="subtree"> <top> <interfaces> <interface> <name>Vlan100</name> <arp-dynamic-learning> </arp-dynamic-learning> </interface> </interfaces> </top></filter>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:49687cc0-903d-4865-be5f-e709e1c9e981"> <data> <top> <interfaces xmlns="http://asterfusion.com/ns/yang/asternos-interfaces"> <interface> <name>Vlan100</name> <arp-dynamic-learning xmlns="http://asterfusion.com/ns/yang/asternos-arp"> <mode>anycast_gw</mode> </arp-dynamic-learning> </interface> </interfaces> </top> </data></rpc-reply>Show ARP Proxy Summary
Section titled “Show ARP Proxy Summary”Request example to show ARP proxy summary via rpc show-interface-arp-proxy.
<show-interface-arp-proxy/>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:c71e86a7-3247-4962-b746-f066cfe5cbc4"> <data xmlns="http://asterfusion.com/ns/yang/asternos-arp"> <interface> <name>Vlan100</name> <mode>anycast_gw</mode> </interface> </data></rpc-reply>