AsterNOS-MPLS-LDP-Netconf
此内容尚不支持你的语言。
AsterNOS-MPLS-LDP
Section titled “AsterNOS-MPLS-LDP”This chapter provides examples on how to use Netconf to manage MPLS LDP configurations on AsterNOS devices.
Create MPLS LDP Configuration
Section titled “Create MPLS LDP Configuration”Request example to create the entire MPLS LDP configuration via edit-config.
<config> <top> <mpls-ldp operation="create"> <global> <router-id>1.1.1.1</router-id> <ordered-control>false</ordered-control> <wait-for-sync>60</wait-for-sync> <dual-stack-prefer-ipv4>true</dual-stack-prefer-ipv4> <hello-interval>10</hello-interval> <hello-holdtime>30</hello-holdtime> <targeted-hello-interval>15</targeted-hello-interval> <targeted-hello-holdtime>45</targeted-hello-holdtime> <neighbors> <neighbor>2.2.2.2</neighbor> <password>secret</password> <ttl-security-disable>false</ttl-security-disable> <ttl-security-hops>2</ttl-security-hops> <session-interval>10</session-interval> <session-holdtime>30</session-holdtime> </neighbors> </global> <address-families> <address-family> <type>ipv4</type> <discovery> <hello-interval>8</hello-interval> <hello-holdtime>24</hello-holdtime> <targeted-hello-interval>12</targeted-hello-interval> <targeted-hello-holdtime>36</targeted-hello-holdtime> <targeted-hello-accept-filter>peer-filter-1</targeted-hello-accept-filter> <transport-address>192.168.1.1</transport-address> </discovery> <interfaces> <name>Ethernet1</name> <disable-establish-hello>false</disable-establish-hello> <hello-interval>7</hello-interval> <hello-holdtime>21</hello-holdtime> </interfaces> <neighbors> <neighbor>3.3.3.3</neighbor> <targeted>true</targeted> </neighbors> <label> <local-advertise-peer-filter>adv-peer-filter</local-advertise-peer-filter> <local-advertise-prefix-filter>adv-prefix-filter</local-advertise-prefix-filter> <local-advertise-explicit-null-enable>true</local-advertise-explicit-null-enable> <local-allocate-host-routes-only>true</local-allocate-host-routes-only> <remote-accept-peer-filter>rem-peer-filter</remote-accept-peer-filter> <remote-accept-prefix-filter>rem-prefix-filter</remote-accept-prefix-filter> </label> <ttl-security-disable>false</ttl-security-disable> <session-interval>15</session-interval> <session-holdtime>45</session-holdtime> </address-family> </address-families> </mpls-ldp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:00000000-0000-0000-0000-000000000000"> <ok/></rpc-reply>Merge MPLS LDP Configuration
Section titled “Merge MPLS LDP Configuration”Request example to merge (upsert) MPLS LDP configuration via edit-config.
<config> <top> <mpls-ldp operation="merge"> <global> <router-id>1.1.1.1</router-id> <ordered-control>false</ordered-control> <wait-for-sync>60</wait-for-sync> <dual-stack-prefer-ipv4>true</dual-stack-prefer-ipv4> <hello-interval>10</hello-interval> <hello-holdtime>30</hello-holdtime> <targeted-hello-interval>15</targeted-hello-interval> <targeted-hello-holdtime>45</targeted-hello-holdtime> <neighbors> <neighbor>2.2.2.2</neighbor> <password>secret</password> <ttl-security-disable>false</ttl-security-disable> <ttl-security-hops>2</ttl-security-hops> <session-interval>10</session-interval> <session-holdtime>30</session-holdtime> </neighbors> </global> <address-families> <address-family> <type>ipv4</type> <discovery> <hello-interval>8</hello-interval> <hello-holdtime>24</hello-holdtime> <targeted-hello-interval>12</targeted-hello-interval> <targeted-hello-holdtime>36</targeted-hello-holdtime> <targeted-hello-accept-filter>peer-filter-1</targeted-hello-accept-filter> <transport-address>192.168.1.1</transport-address> </discovery> <interfaces> <name>Ethernet1</name> <disable-establish-hello>false</disable-establish-hello> <hello-interval>7</hello-interval> <hello-holdtime>21</hello-holdtime> </interfaces> <neighbors> <neighbor>3.3.3.3</neighbor> <targeted>true</targeted> </neighbors> <label> <local-advertise-peer-filter>adv-peer-filter</local-advertise-peer-filter> <local-advertise-prefix-filter>adv-prefix-filter</local-advertise-prefix-filter> <local-advertise-explicit-null-enable>true</local-advertise-explicit-null-enable> <local-allocate-host-routes-only>true</local-allocate-host-routes-only> <remote-accept-peer-filter>rem-peer-filter</remote-accept-peer-filter> <remote-accept-prefix-filter>rem-prefix-filter</remote-accept-prefix-filter> </label> <ttl-security-disable>false</ttl-security-disable> <session-interval>15</session-interval> <session-holdtime>45</session-holdtime> </address-family> </address-families> </mpls-ldp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:00000000-0000-0000-0000-000000000001"> <ok/></rpc-reply>Delete MPLS LDP Configuration
Section titled “Delete MPLS LDP Configuration”Request example to delete the entire MPLS LDP configuration via edit-config.
<config> <top> <mpls-ldp operation="delete"/> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:00000000-0000-0000-0000-000000000002"> <ok/></rpc-reply>Create MPLS LDP Global Configuration
Section titled “Create MPLS LDP Global Configuration”Request example to create MPLS LDP global configuration via edit-config.
<config> <top> <mpls-ldp operation="create"> <global> <router-id>5.5.5.5</router-id> <dual-stack-prefer-ipv4>false</dual-stack-prefer-ipv4> <hello-interval>20</hello-interval> <hello-holdtime>60</hello-holdtime> <neighbors> <neighbor>6.6.6.6</neighbor> <password>newpass</password> </neighbors> </global> </mpls-ldp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:00000000-0000-0000-0000-000000000003"> <ok/></rpc-reply>Modify MPLS LDP Global Configuration
Section titled “Modify MPLS LDP Global Configuration”Request example to merge MPLS LDP global configuration via edit-config.
<config> <top> <mpls-ldp operation="merge"> <global> <router-id>20.20.20.20</router-id> <hello-interval>50</hello-interval> <ordered-control>true</ordered-control> </global> </mpls-ldp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:00000000-0000-0000-0000-000000000004"> <ok/></rpc-reply>Delete MPLS LDP Global Configuration
Section titled “Delete MPLS LDP Global Configuration”Request example to delete MPLS LDP global configuration via edit-config.
<config> <top> <mpls-ldp> <global operation="delete"/> </mpls-ldp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:00000000-0000-0000-0000-000000000005"> <ok/></rpc-reply>Create Global LDP Neighbor
Section titled “Create Global LDP Neighbor”Request example to create a global MPLS LDP neighbor via edit-config.
<config> <top> <mpls-ldp> <global> <neighbors operation="create"> <neighbor>10.10.10.10</neighbor> <password>testpass</password> <ttl-security-disable>false</ttl-security-disable> <ttl-security-hops>3</ttl-security-hops> <session-interval>20</session-interval> <session-holdtime>60</session-holdtime> </neighbors> </global> </mpls-ldp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:00000000-0000-0000-0000-000000000006"> <ok/></rpc-reply>Modify Global LDP Neighbor
Section titled “Modify Global LDP Neighbor”Request example to merge a global MPLS LDP neighbor via edit-config.
<config> <top> <mpls-ldp> <global> <neighbors operation="merge"> <neighbor>10.10.10.10</neighbor> <password>newpass</password> <session-interval>30</session-interval> </neighbors> </global> </mpls-ldp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:00000000-0000-0000-0000-000000000007"> <ok/></rpc-reply>Delete Global LDP Neighbor
Section titled “Delete Global LDP Neighbor”Request example to delete a global MPLS LDP neighbor via edit-config.
<config> <top> <mpls-ldp> <global> <neighbors operation="delete"> <neighbor>10.10.10.10</neighbor> </neighbors> </global> </mpls-ldp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:00000000-0000-0000-0000-000000000008"> <ok/></rpc-reply>Create Address Family
Section titled “Create Address Family”Request example to create an MPLS LDP address family via edit-config.
<config> <top> <mpls-ldp> <address-families operation="create"> <address-family> <type>ipv4</type> </address-family> </address-families> </mpls-ldp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:00000000-0000-0000-0000-000000000009"> <ok/></rpc-reply>Delete Address Family
Section titled “Delete Address Family”Request example to delete an MPLS LDP address family via edit-config.
<config> <top> <mpls-ldp> <address-families> <address-family operation="delete"> <type>ipv6</type> </address-family> </address-families> </mpls-ldp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:00000000-0000-0000-0000-000000000010"> <ok/></rpc-reply>Create MPLS LDP Interface
Section titled “Create MPLS LDP Interface”Request example to create an interface-specific LDP configuration via edit-config.
<config> <top> <mpls-ldp> <address-families> <address-family> <type>ipv4</type> <interfaces operation="create"> <name>Ethernet2</name> <hello-interval>6</hello-interval> <hello-holdtime>18</hello-holdtime> </interfaces> </address-family> </address-families> </mpls-ldp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:00000000-0000-0000-0000-000000000011"> <ok/></rpc-reply>Modify MPLS LDP Interface
Section titled “Modify MPLS LDP Interface”Request example to merge interface-specific configuration via edit-config.
<config> <top> <mpls-ldp> <address-families> <address-family> <type>ipv4</type> <interfaces operation="merge"> <name>Ethernet2</name> <hello-interval>10</hello-interval> <disable-establish-hello>true</disable-establish-hello> </interfaces> </address-family> </address-families> </mpls-ldp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:00000000-0000-0000-0000-000000000012"> <ok/></rpc-reply>Delete MPLS LDP Interface
Section titled “Delete MPLS LDP Interface”Request example to delete an interface-specific LDP configuration via edit-config.
<config> <top> <mpls-ldp> <address-families> <address-family> <type>ipv4</type> <interfaces operation="delete"> <name>Ethernet3</name> </interfaces> </address-family> </address-families> </mpls-ldp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:00000000-0000-0000-0000-000000000013"> <ok/></rpc-reply>Modify LDP Label Policy
Section titled “Modify LDP Label Policy”Request example to merge label policy configuration via edit-config.
<config> <top> <mpls-ldp> <address-families> <address-family> <type>ipv4</type> <label operation="merge"> <local-allocate-host-routes-only>true</local-allocate-host-routes-only> <remote-accept-peer-filter>only-peer1</remote-accept-peer-filter> </label> </address-family> </address-families> </mpls-ldp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:00000000-0000-0000-0000-000000000014"> <ok/></rpc-reply>Delete LDP Label Policy
Section titled “Delete LDP Label Policy”Request example to delete label policy configuration via edit-config.
<config> <top> <mpls-ldp> <address-families> <address-family> <type>ipv4</type> <label operation="delete"/> </address-family> </address-families> </mpls-ldp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:00000000-0000-0000-0000-000000000015"> <ok/></rpc-reply>Create Address Family LDP Neighbor
Section titled “Create Address Family LDP Neighbor”Request example to create an address family-specific neighbor via edit-config.
<config> <top> <mpls-ldp> <address-families> <address-family> <type>ipv4</type> <neighbors operation="create"> <neighbor>20.20.20.20</neighbor> <targeted>true</targeted> </neighbors> </address-family> </address-families> </mpls-ldp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:00000000-0000-0000-0000-000000000016"> <ok/></rpc-reply>Modify Address Family LDP Neighbor
Section titled “Modify Address Family LDP Neighbor”Request example to merge an address family-specific neighbor via edit-config.
<config> <top> <mpls-ldp> <address-families> <address-family> <type>ipv4</type> <neighbors operation="merge"> <neighbor>20.20.20.20</neighbor> <targeted>true</targeted> </neighbors> </address-family> </address-families> </mpls-ldp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:00000000-0000-0000-0000-000000000017"> <ok/></rpc-reply>Delete Address Family LDP Neighbor
Section titled “Delete Address Family LDP Neighbor”Request example to delete an address family-specific neighbor via edit-config.
<config> <top> <mpls-ldp> <address-families> <address-family> <type>ipv4</type> <neighbors operation="delete"> <neighbor>20.20.20.20</neighbor> </neighbors> </address-family> </address-families> </mpls-ldp> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:00000000-0000-0000-0000-000000000018"> <ok/></rpc-reply>