跳转到内容
Ask AI

NDP-Netconf

此内容尚不支持你的语言。

YANG Pathget/get-configedit-configrpc
/interfaces/{name}/nd-dynamic-learningYmerge, replace, create, delete—
/nd-mac-checkYmerge, replace, create, delete—
/ndp-globalYmerge, replace, create, delete—
/show-interface-nd-proxy——Y

This chapter provides examples on how to use Netconf to manage IPv6 Neighbor Discovery Protocol (NDP) on AsterNOS devices.

ND log can only record NDP message information under VLAN interface.

Request example to enable NDP log via edit-config.

<config><top>
<ndp-global operation="create">
<log-enable>True</log-enable>
</ndp-global>
</top></config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4830d8ba-0f03-484a-acc1-e4e63b704e24">
<ok/>
</rpc-reply>

Request example to disable NDP log via edit-config.

<config><top>
<ndp-global operation="merge">
<log-enable>False</log-enable>
</ndp-global>
</top></config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4830d8ba-0f03-484a-acc1-e4e63b704e24">
<ok/>
</rpc-reply>

Request example to get global NDP configuration via get-config.

<filter type="subtree">
<top>
<ndp-global/>
</top>
</filter>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:b04f002d-3312-45ca-8bf4-aadc641b1ec0">
<data>
<top>
<ndp-global xmlns="http://asterfusion.com/ns/yang/asternos-ndp">
<log-enable>false</log-enable>
</ndp-global>
</top>
</data>
</rpc-reply>

Request example to create static neighbors via edit-config

<config><top>
<interfaces>
<interface>
<name>Ethernet1</name>
<ipv6>
<address operation="create">
<ip-prefix>2011::1/20</ip-prefix>
</address>
<address operation="create">
<ip-prefix>3011::1/20</ip-prefix>
</address>
<neighbor operation="create">
<ip>2011::2</ip>
<mac-address>00:0e:c6:56:9d:35</mac-address>
</neighbor>
<neighbor operation="create">
<ip>3011::2</ip>
<mac-address>00:0e:c6:56:9d:35</mac-address>
</neighbor>
</ipv6>
</interface>
</interfaces>
</top></config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:3fe6ef49-3c2e-47a1-adb6-b85a7949bb65">
<ok/>
</rpc-reply>

Delete Single Static Neighbor for Interface

Section titled “Delete Single Static Neighbor for Interface”

Request example to delete a static neighbor via edit-config.

<config><top>
<interfaces>
<interface>
<name>Ethernet1</name>
<ipv6>
<neighbor operation="delete">
<ip>2011::2</ip>
</neighbor>
</ipv6>
</interface>
</interfaces>
</top></config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:1fa807c1-aea2-4134-b3e3-ab5d0a99cee3">
<ok/>
</rpc-reply>

Request example to get all static neighbors for an interface via get-config.

<filter type="subtree">
<top>
<interfaces>
<interface>
<name>Ethernet1</name>
<ipv6>
<neighbor>
</neighbor>
</ipv6>
</interface>
</interfaces>
</top>
</filter>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:46012eb4-60b5-4d26-a103-d45624533bfe">
<data>
<top>
<interfaces xmlns="http://asterfusion.com/ns/yang/asternos-interfaces">
<interface>
<name>Ethernet1</name>
<ipv6 xmlns="http://asterfusion.com/ns/yang/asternos-ip">
<neighbor>
<ip>3011::2</ip>
<mac-address>00:0e:c6:56:9d:35</mac-address>
</neighbor>
</ipv6>
</interface>
</interfaces>
</top>
</data>
</rpc-reply>

Request example to show IPv6 neighbors for an interface via rpc show-ipv6-neighbor-summary.

<show-ipv6-neighbor-summary>
<interface>Ethernet1</interface>
</show-ipv6-neighbor-summary>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:521e2a57-e729-4525-a3e2-ee1674535650">
<data xmlns="http://asterfusion.com/ns/yang/asternos-ip">
Address MacAddress Iface Vlan Status
--------- ----------------- ---------- ------ ---------
2011::2 00:0e:c6:56:9d:35 Ethernet1 - PERMANENT
3011::2 00:0e:c6:56:9d:35 Ethernet1 - PERMANENT
Total number of entries 2
</data>
</rpc-reply>

Request example to show a given IPv6 neighbor via rpc show-ipv6-neighbor-summary.

<show-ipv6-neighbor-summary>
<ip>2011::2</ip>
</show-ipv6-neighbor-summary>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:8ba70bcb-fa84-4551-8e87-3b3e976e7036">
<data xmlns="http://asterfusion.com/ns/yang/asternos-ip">
Address MacAddress Iface Vlan Status
--------- ----------------- ---------- ------ ---------
2011::2 00:0e:c6:56:9d:35 Ethernet1 - PERMANENT
Total number of entries 1
</data>
</rpc-reply>

Request example to show all IPv6 neighbors via rpc show-ipv6-neighbor-summary.

<show-ipv6-neighbor-summary/>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:369a89e8-a76d-42a4-8f45-f4293b5544ea">
<data xmlns="http://asterfusion.com/ns/yang/asternos-ip">
Address MacAddress Iface Vlan Status
------------------------- ----------------- ---------- ------ ---------
2011::2 00:0e:c6:56:9d:35 Ethernet1 - PERMANENT
3011::2 00:0e:c6:56:9d:35 Ethernet1 - PERMANENT
fe80::62eb:5aff:fe01:1003 60:eb:5a:01:10:03 eth0 - STALE
Total number of entries 3
</data>
</rpc-reply>

Nd Proxy is only supported on VLAN interfaces.

Request example to enable nd proxy for vlan in interface via edit-config.

<config><top>
<interfaces>
<interface>
<name>Vlan100</name>
<nd-dynamic-learning operation="merge">
<nd-mode>anycast_gw</nd-mode>
</nd-dynamic-learning>
</interface>
</interfaces>
</top></config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:dedc5a0a-14f2-438c-b078-85fc3aefd6b1">
<ok/>
</rpc-reply>

Request example to disable nd proxy for vlan in interface via edit-config.

<config><top>
<interfaces>
<interface>
<name>Vlan100</name>
<nd-dynamic-learning operation="merge">
<nd-mode>disable</nd-mode>
</nd-dynamic-learning>
</interface>
</interfaces>
</top></config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:dedc5a0a-14f2-438c-b078-85fc3aefd6b1">
<ok/>
</rpc-reply>

Request example to get nd proxy for vlan in interface via get-config.

<filter type="subtree">
<top>
<interfaces>
<interface>
<name>Vlan100</name>
<nd-dynamic-learning/>
</interface>
</interfaces>
</top>
</filter>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:f73a6362-c017-416b-84eb-91a22f9bac05">
<data>
<top>
<interfaces xmlns="http://asterfusion.com/ns/yang/asternos-interfaces">
<interface>
<name>Vlan100</name>
<nd-dynamic-learning xmlns="http://asterfusion.com/ns/yang/asternos-ndp">
<nd-mode>disable</nd-mode>
</nd-dynamic-learning>
</interface>
</interfaces>
</top>
</data>
</rpc-reply>

Request example to show nd proxy for all vlans interfaces via rpc show-interface-nd-proxy.

<show-interface-nd-proxy/>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:d57a06d8-eec6-41cb-87a6-a905ae6d1790">
<data xmlns="http://asterfusion.com/ns/yang/asternos-ndp">
<interface>
<name>Vlan100</name>
<mode>disable</mode>
</interface>
</data>
</rpc-reply>

Tree Diagram

module: asternos-ndp
augment /if:interfaces/if:interface:
+--rw nd-dynamic-learning

Tree Diagram

module: asternos-ndp
+--rw nd-mac-check
+--rw enabled? boolean
augment /if:interfaces/if:interface:
+--rw nd-dynamic-learning

Table of Properties

NameRequiredType/RangeDescription
nd-mac-checkMPath-only node, has no configurable value.
IPv6 ND MAC check configuration.
enabledO”true"
"false”
enable ND MAC check.

Tree Diagram

module: asternos-ndp
+--rw ndp-global
+--rw log-enable? boolean
augment /if:interfaces/if:interface:
+--rw nd-dynamic-learning

Table of Properties

NameRequiredType/RangeDescription
ndp-globalMPath-only node, has no configurable value.
log-enableO”true"
"false”
Indicates if the ND log is enabled

Tree Diagram

module: asternos-ndp
augment /if:interfaces/if:interface:
+--rw nd-dynamic-learning
rpcs:
+---x show-interface-nd-proxy
+--ro output
+--ro data
+--ro interface* []
+--ro name? union
+--ro mode? enumeration

Table of Properties

NameRequiredType/RangeDescription
show-interface-nd-proxyO
dataMPath-only node, has no configurable value.
A table that shows nd-proxy status of all Interface
interfaceMPath-only node, has no configurable value.
nameOunionThe name of the interface.
modeO”disable"
"default"
"anycast_gw”
ND proxy mode.
Default value: disable