Radv
此内容尚不支持你的语言。
This chapter provides examples on how to use Netconf to manage Router Advertisements (RADV) on AsterNOS devices.
Create Global RADV
Section titled “Create Global RADV”Request example to create global RADV via edit-config.
<config><top> <global-router-advertisement operation="create"> <enabled>true</enabled> <unicast-only-flag>true</unicast-only-flag> <managed-flag>true</managed-flag> <other-config-flag>true</other-config-flag> <link-mtu>1500</link-mtu> <on-link-flag>true</on-link-flag> <autonomous-flag>false</autonomous-flag> <rdnsses> <rdnss>2001:db8::1</rdnss> </rdnsses> <routes> <route>2001:db8:1234::/48</route> <preferred>high</preferred> </routes> </global-router-advertisement></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:a6c887fb-108c-4ea1-930a-0148684bbd72"> <ok/></rpc-reply>Get Global RADV Status
Section titled “Get Global RADV Status”Request example to get global RADV status via get-config with subtree filter.
<filter type="subtree"> <top> <global-router-advertisement> </global-router-advertisement> </top></filter>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:8d70f415-e472-4bf8-94b5-6e86e358b6a9"> <data> <top> <global-router-advertisement xmlns="http://asterfusion.com/ns/yang/asternos-radv"> <enabled>true</enabled> <unicast-only-flag>true</unicast-only-flag> <managed-flag>true</managed-flag> <other-config-flag>true</other-config-flag> <link-mtu>1500</link-mtu> <on-link-flag>true</on-link-flag> <autonomous-flag>false</autonomous-flag> <rdnsses> <rdnss>2001:db8::1</rdnss> </rdnsses> <routes> <route>2001:db8:1234::/48</route> <preferred>high</preferred> </routes> </global-router-advertisement> </top> </data></rpc-reply>Modify RADV Global Attributes
Section titled “Modify RADV Global Attributes”Request example to modify global RADV attributes via edit-config with merge operation.
<config><top> <global-router-advertisement operation="merge"> <unicast-only-flag>false</unicast-only-flag> <managed-flag>false</managed-flag> <other-config-flag>false</other-config-flag> <link-mtu>6000</link-mtu> <on-link-flag>false</on-link-flag> </global-router-advertisement></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:13cbb602-0c94-487a-9dbf-a1762db39e87"> <ok/></rpc-reply>Create RADV And Set Attributes for Vlanif
Section titled “Create RADV And Set Attributes for Vlanif”Request example to create RADV and set attributes for Vlanif via edit-config.
<config><top> <vlans> <vlan operation="create"> <vlanid>100</vlanid> </vlan> </vlans> <interfaces> <interface operation="merge"> <name>Vlan100</name> <interface-mode>routed</interface-mode> <ipv6> <router-advertisement operation="create"> <managed-flag>true</managed-flag> <other-config-flag>true</other-config-flag> <on-link-flag>true</on-link-flag> <autonomous-flag>true</autonomous-flag> <rdnsses> <rdnss>2222:db8::1</rdnss> </rdnsses> <routes> <route>3333:db8:1234::/48</route> <preferred>high</preferred> </routes> <prefixes> <prefix>3000::/64</prefix> </prefixes> </router-advertisement> </ipv6> </interface> </interfaces></top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:c8890522-c2e0-4015-b4dc-3ec9b73ef6d0"> <ok/></rpc-reply>Get RADV Status for Vlanif
Section titled “Get RADV Status for Vlanif”Request example to get RADV status for Vlanif via get-config with subtree filter.
<filter type="subtree"> <top> <interfaces> <interface> <name>Vlan100</name> <ipv6> <router-advertisement> </router-advertisement> </ipv6> </interface> </interfaces> </top></filter>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:3e03658a-5c91-4399-aeeb-774b03bdd382"> <data> <top> <interfaces xmlns="http://asterfusion.com/ns/yang/asternos-interfaces"> <interface> <name>Vlan100</name> <ipv6 xmlns="http://asterfusion.com/ns/yang/asternos-ip"> <router-advertisement> <managed-flag>true</managed-flag> <other-config-flag>true</other-config-flag> <on-link-flag>true</on-link-flag> <autonomous-flag>true</autonomous-flag> <prefixes> <prefix>3000::/64</prefix> </prefixes> <rdnsses> <rdnss>2222:db8::1</rdnss> </rdnsses> <routes> <route>3333:db8:1234::/48</route> <preferred>high</preferred> </routes> </router-advertisement> </ipv6> </interface> </interfaces> </top> </data></rpc-reply>Delete RADV for Vlanif
Section titled “Delete RADV for Vlanif”Request example to delete RADV for Vlanif via edit-config.
<config><top> <interfaces> <interface> <name>Vlan100</name> <ipv6> <router-advertisement operation="delete"> </router-advertisement> </ipv6> </interface> </interfaces></top></config><rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:ea5228f8-11c9-485d-9186-879540f93faf"> <ok/></rpc-reply>Show RADV Status
Section titled “Show RADV Status”Request example to show RADV status via rpc show-radv-summary.
<show-radv-summary/>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:42cbaa54-adf3-4f7d-95d9-14f33f953afc"> <data xmlns="http://asterfusion.com/ns/yang/asternos-radv"> Enabled: true Global unicast only: false +-------------+----------+----------------+--------------------+-----------+-----------------+------------+-------------+-------------------------+ | Interface | Prefix | Managed_Flag | Otherconfig_Flag | OffLink | No-autonomous | Link_MTU | RDNSS | Route | Preference | +=============+==========+================+====================+===========+=================+============+=============+=========================+ | global | | off | off | on | on | 6000 | 2001:db8::1 | 2001:db8:1234::/48|high | +-------------+----------+----------------+--------------------+-----------+-----------------+------------+-------------+-------------------------+ </data></rpc-reply>