OcNOS-SP : Ansible Guide : Ansible User Guide : L3VPN Configuration
L3VPN Configuration
Template File for L3VPN
ocnos_l3vpn.j2
{% if L3VPN.vrfs is defined %}
{% for vrf in L3VPN.vrfs -%}
ip vrf {{ vrf.vrf_name }}
rd {{ vrf.rd_1 }}:{{ vrf.rd_2 }}
route-target both {{ vrf.rt_1 }}:{{ vrf.rt_2 }}
{% endfor %}
 
{% for interface in L3VPN.vrf_interfaces -%}
interface {{ interface.interface_name }}
ip vrf forwarding {{ interface.vrf_name }}
ip address {{ interface.address }}
 
{% endfor %}
{% endif %}
Sample Parameter File for L3VPN
sw2.yml
 
L3VPN:
L3VPN configurations
vrfs:
VRF instance configuration
- vrf_name: 1001
Configures the name of VRFas 1001
rd_1: 36.0.0.2
Configures the ASN or IP-address value depending on the ASN:nn_or_IP-address:nn route distinguisher value used .
rd_2: 1001
Configures the nn on the ASN:nn_or_IP-address:nn route distinguisher value.
rt_1: 65001
Configures the ASN or IP-address value depending on the ASN:nn_or_IP-address:nn format used for route-target
rt_2: 1001
Configure nn value of the route-target
vrf_interfaces:
Vrf interface configuration
- interface_name: eth2
Configure interface eth2
vrf_name: 1001
Configure the interface as part of the vrf 1001
address: 19.19.19.1/24
Configure the ip address 19.19.19.1/24on the vrf interface
Last modified date: 06/08/2023