Skip to content

Commit

Permalink
Create default.j2
Browse files Browse the repository at this point in the history
  • Loading branch information
stralex7 authored Feb 3, 2017
1 parent 595cec7 commit 4620d04
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions roles/vrf/templates/default.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
!
{% for vpn in item.vpns %}
vrf {{ vpn.name }}
address-family ipv4 unicast
import route-target {{ item.as_number }}:{{ vpn.iRT }}
export route-target {{ item.as_number }}:{{ vpn.eRT }}
!
{% endfor %}
router static
{% for vpn in item.vpns %}
vrf {{ vpn.name }}
address-family ipv4 unicast
0.0.0.0/0 Null0 description Default_route_for_VPN_{{vpn.name}}
{% endfor %}
!
router bgp {{ item.as_number }}
{% for vpn in item.vpns %}
vrf {{ vpn.name }}
rd {{ item.as_number }}:{{ vpn.RD }}
default-information originate
address-family ipv4 unicast
redistribute connected
redistribute static
{% endfor %}

0 comments on commit 4620d04

Please sign in to comment.