Tunnel Interfaces
Create tunnel interface
Release
This configuration was introduced in OcNOS version 4.2.
Configuration
OpenConfig NETCONF Payload
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>Tunnel30</name>
<config>
<name>Tunnel30</name>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:tunnel</type>
</config>
<tunnel xmlns="http://openconfig.net/yang/interfaces/tunnel">
<ipv4>
<addresses>
<address>
<ip>40.1.1.1</ip>
<config>
<ip>40.1.1.1</ip>
<prefix-length>24</prefix-length>
</config>
</address>
</addresses>
</ipv4>
<config>
<src>20.2.2.1</src>
<dst>20.2.2.2</dst>
<ttl>250</ttl>
</config>
</tunnel>
</interface>
</interfaces>
OcNOS CLI Command
interface Tunnel30
ip address 40.1.1.1/24
tunnel source 20.2.2.1
tunnel destination 20.2.2.2
tunnel ttl 250
OcNOS NETCONF Payload
<interfaces xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-interface">
<interface>
<name>Tunnel30</name>
<config>
<name>Tunnel30</name>
</config>
<tunnel xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-extended">
<config>
<src>20.2.2.1</src>
<dst>20.2.2.2</dst>
<ttl>250</ttl>
</config>
</tunnel>
<ipv4 xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-if-ip">
<secondary-addresses>
<ip-address>40.1.1.1/24</ip-address>
<config>
<ip-address>40.1.1.1/24</ip-address>
</config>
</secondary-addresses>
</ipv4>
</interface>
</interfaces>
Validation with NETCONF get
<interfaces xmlns="http://openconfig.net/yang/interfaces">
<interface>
<name>Tunnel30</name>
<config>
<name>Tunnel30</name>
<type
xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:tunnel</type>
</config>
<state>
<name>Tunnel30</name>
<logical>false</logical>
<last-change>0</last-change>
<oper-status>DOWN</oper-status>
<admin-status>UP</admin-status>
<ifindex>0</ifindex>
<type
xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:tunnel</type>
</state>
<ethernet xmlns="http://openconfig.net/yang/interfaces/ethernet">
<state>
<negotiated-port-speed
xmlns:oc-eth="http://openconfig.net/yang/interfaces/ethernet">oc-eth:SPEED_UNKNOWN</negotiated-port-speed>
<negotiated-duplex-mode>HALF</negotiated-duplex-mode>
<hw-mac-address>0000.0000.0000</hw-mac-address>
</state>
</ethernet>
<tunnel xmlns="http://openconfig.net/yang/interfaces/tunnel">
<ipv4>
<addresses>
<address>
<ip>40.1.1.1</ip>
<config>
<ip>40.1.1.1</ip>
<prefix-length>24</prefix-length>
</config>
<state>
<ip>40.1.1.1</ip>
<prefix-length>24</prefix-length>
</state>
</address>
</addresses>
</ipv4>
<config>
<src>20.2.2.1</src>
<dst>20.2.2.2</dst>
<ttl>250</ttl>
</config>
<state>
<src>20.2.2.1</src>
<dst>20.2.2.2</dst>
<ttl>250</ttl>
</state>
</tunnel>
</interface>
</interfaces>
Restrictions
/interfaces/interface/name
Tunnel interfaces must start with “Tunnel” followed by a number, for example, “Tunnel30”.
/interfaces/interface/tunnel/config/dst
/interfaces/interface/tunnel/config/src
For tunnel src and dst parameters, IPv6 is not supported.
/interfaces/interface/tunnel/config/ttl
The type of this leaf was changed from “uint8” to “uint16”.
/interfaces/interface/tunnel/ipv4/addresses/address/config/ip
The first configured address will be considered the primary IP address. It is not possible to delete the primary address without deleting the other addresses.
Last modified date: 07/14/2023