OcNOS-SP : Ansible Guide : Ansible User Guide : Route Map Configuration
Route Map Configuration
Template File for Route Map
ocnos_route_map.j2
{%if Route_Map is defined%}
{% for routemap in Route_Map.params -%}
route-map {{ routemap.name }} {{routemap.permission}} {{routemap.seq_no}}
{% if routemap.match=="address" %}
{{ routemap.operation}} {{ routemap.protocol }} {{ routemap.match }} prefix-list {{routemap.prefix_list}}
{%else%}
{{ routemap.operation}} {{ routemap.protocol }} {{ routemap.match }} {{routemap.prefix_list}}
{%endif%}
!
{% endfor %}
{%endif%}
Sample Parameter File for Route Map
sw2.yml
 
Route_Map:
Route map configurations
params:
Route map parameters configuration
- name: NEXTHOP_SELF
Configures the name of the route_map
permission: permit
Configure the permission type as permit for route map
seq_no: 10
Configure the sequence no. as 10
operation: set
Configures the operation type under route-map as set
protocol: vpnv4
Configures the protocol as vpnv4
match: next-hop
Configures the match-type as next-hop under route-map NEXTHOP_SELF
prefix_list: 36.0.0.1
Configure the matching prefix as 36.0.0.1 .we can define prefix list name also if it is created .
- name: LO_RED_TO_0
Configures the name of the route_map
permission: permit
Configure the permission type as permit for route map
seq_no: 10
Configure the sequence no. as 10
operation: match
onfigures the operation type under route-map as match
protocol: ip
Configures the matching protocol as ip
match: address
Configures the match-type as addressunder route-map LO_RED_TO_0
prefix_list: LO_RED_TO_0
Configure the matching prefix list name
Last modified date: 06/08/2023