LDP
Create LDP router
Release
This configuration was introduced in OcNOS version 4.2.
Configuration
OpenConfig NETCONF Payload
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<mpls>
<signaling-protocols>
<ldp>
<targeted>
<address-families>
<address-family>
<afi-name>IPV4</afi-name>
<config>
<afi-name>IPV4</afi-name>
</config>
<targets>
<target>
<remote-address>1.1.1.1</remote-address>
<config>
<remote-address>1.1.1.1</remote-address>
<local-address>192.168.1.1</local-address>
<enabled>true</enabled>
</config>
</target>
</targets>
</address-family>
</address-families>
</targeted>
</ldp>
</signaling-protocols>
</mpls>
</network-instance>
</network-instances>
OcNOS CLI Command
router ldp
targeted-peer ipv4 1.1.1.1
exit-targeted-peer-mode
transport-address ipv4 192.168.1.1
!
OcNOS NETCONF Payload
<network-instances xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-network-instance">
<network-instance>
<instance-name>default</instance-name>
<config>
<instance-name>default</instance-name>
<instance-type>vrf</instance-type>
</config>
<vrf xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-vrf">
<config>
<vrf-name>default</vrf-name>
</config>
</vrf>
<bridge xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bridge">
<config>
<protocol>ieee-vlan-bridge</protocol>
</config>
</bridge>
</network-instance>
</network-instances>
<ldp xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-ldp">
<global>
<config>
<ldp-instance>ldp</ldp-instance>
</config>
</global>
<targeted-peers>
<targeted-peer>
<target-address>1.1.1.1</target-address>
<config>
<target-address>1.1.1.1</target-address>
</config>
</targeted-peer>
</targeted-peers>
<transport-address>
<label-space-identifier>0</label-space-identifier>
<config>
<transport-address-ipv4>192.168.1.1</transport-address-ipv4>
<label-space-identifier>0</label-space-identifier>
</config>
</transport-address>
</ldp>
Validation with NETCONF get
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<config>
<name>default</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:DEFAULT_INSTANCE</type>
<enabled>true</enabled>
</config>
<state>
<name>default</name>
<type
xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:DEFAULT_INSTANCE</type>
<enabled>true</enabled>
</state>
<mpls>
<signaling-protocols>
<ldp>
<targeted>
<address-families>
<address-family>
<afi-name>IPV4</afi-name>
<config>
<afi-name>IPV4</afi-name>
</config>
<targets>
<target>
<remote-address>1.1.1.1</remote-address>
<config>
<remote-address>1.1.1.1</remote-address>
<enabled>true</enabled>
<local-address>192.168.1.1</local-address>
</config>
<state>
<remote-address>1.1.1.1</remote-address>
<enabled>true</enabled>
<local-address>192.168.1.1</local-address>
</state>
</target>
</targets>
</address-family>
</address-families>
</targeted>
</ldp>
</signaling-protocols>
</mpls>
</network-instance>
</network-instances>
Restrictions
/network-instances/network-instance/mpls/signaling-protocols/ldp/targeted/address-families/address-family/targets/target/config/local-address
This leaf was not supported
/network-instances/network-instance/mpls/signaling-protocols/ldp/targeted/address-families/address-family/targets/target/config/enabled
This leaf can not be configured
Enable label switching (LDP)
Release
This configuration was introduced in OcNOS version 4.2.
Configuration
OpenConfig NETCONF Payload
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<mpls>
<signaling-protocols>
<ldp>
<global>
<config>
<lsr-id>192.168.1.1</lsr-id>
</config>
</global>
<interface-attributes>
<interfaces>
<interface>
<interface-id>xe1</interface-id>
<address-families>
<address-family>
<afi-name>IPV4</afi-name>
<config>
<afi-name>IPV4</afi-name>
<enabled>true</enabled>
</config>
</address-family>
</address-families>
<config>
<interface-id>xe1</interface-id>
</config>
</interface>
</interfaces>
</interface-attributes>
</ldp>
</signaling-protocols>
<global>
<interface-attributes>
<interface>
<interface-id>xe1</interface-id>
<interface-ref>
<config>
<interface>xe1</interface>
</config>
</interface-ref>
<config>
<interface-id>xe1</interface-id>
<mpls-enabled>true</mpls-enabled>
</config>
</interface>
</interface-attributes>
</global>
</mpls>
</network-instance>
</network-instances>
OcNOS CLI Command
router ldp
router-id 192.168.1.1
!
interface xe1
label-switching
enable-ldp ipv4
!
OcNOS NETCONF Payload
<network-instances xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-network-instance">
<network-instance>
<instance-name>default</instance-name>
<config>
<instance-name>default</instance-name>
<instance-type>vrf</instance-type>
</config>
<vrf xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-vrf">
<config>
<vrf-name>default</vrf-name>
</config>
</vrf>
<bridge xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-bridge">
<config>
<protocol>ieee-vlan-bridge</protocol>
</config>
</bridge>
</network-instance>
</network-instances>
<ldp xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-ldp">
<global>
<config>
<router-identifier>192.168.1.1</router-identifier>
<ldp-instance>ldp</ldp-instance>
</config>
</global>
<interfaces>
<interface>
<name>xe1</name>
<config>
<enable-ldp-ipv4>enable-ldp</enable-ldp-ipv4>
</config>
</interface>
</interfaces>
</ldp>
<mpls xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-mpls">
<interfaces>
<interface>
<name>xe1</name>
<label-switching>
<config>
<enable />
</config>
</label-switching>
</interface>
</interfaces>
</mpls>
Validation with NETCONF get
<network-instances xmlns="http://openconfig.net/yang/network-instance">
<network-instance>
<name>default</name>
<config>
<name>default</name>
<type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:DEFAULT_INSTANCE</type>
<enabled>true</enabled>
</config>
<mpls>
<signaling-protocols>
<ldp>
<global>
<config>
<lsr-id>192.168.1.1</lsr-id>
</config>
</global>
<interface-attributes>
<interfaces>
<interface>
<interface-id>xe1</interface-id>
<address-families>
<address-family>
<afi-name>IPV4</afi-name>
<config>
<afi-name>IPV4</afi-name>
<enabled>true</enabled>
</config>
</address-family>
</address-families>
<config>
<interface-id>xe1</interface-id>
</config>
</interface>
</interfaces>
</interface-attributes>
</ldp>
</signaling-protocols>
<global>
<interface-attributes>
<interface>
<interface-id>xe1</interface-id>
<interface-ref>
<config>
<interface>xe1</interface>
</config>
</interface-ref>
<config>
<interface-id>xe1</interface-id>
<mpls-enabled>true</mpls-enabled>
</config>
</interface>
</interface-attributes>
</global>
</mpls>
</network-instance>
</network-instances>
Restrictions
/network-instances/network-instance/config/enabled
This leaf can not be configured as OcNOS does not have the concept of enable/disable.
/network-instances/network-instance/encapsulation/config/label-allocation-mode
This leaf does not support the PER_NEXTHOP type.