-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
61 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,3 @@ | ||
{% import "templates/routing/_redistribute.ios.j2" as redistribute with context %} | ||
{% import "ios.macro.j2" as rip with context %} | ||
! | ||
{% if ripv2.af.ipv4|default(False) %} | ||
router rip | ||
version 2 | ||
no auto-summary | ||
{% if 'import' in ripv2 %} | ||
default-metric {{ netlab_ripv2_default_metric|default(5) }} | ||
{% endif %} | ||
{{ redistribute.config(ripv2,af='ipv4',ospf_pid=ospf.process|default(1)) }} | ||
{% for intf in netlab_interfaces if 'ipv4' in intf and not 'vrf' in intf %} | ||
network {{ intf.ipv4|ipaddr('address') }} | ||
{% if intf.ripv2.passive|default(False) or not 'ripv2' in intf %} | ||
passive-interface {{ intf.ifname }} | ||
{% endif %} | ||
{% endfor %} | ||
{% endif %} | ||
! | ||
{% if ripv2.af.ipv6|default(False) %} | ||
ipv6 router rip Gandalf | ||
{{ redistribute.config(ripv2,af='ipv6',ospf_pid=ospf.process|default(1)) }} | ||
! | ||
{% for intf in netlab_interfaces if 'ripv2' in intf and 'ipv6' in intf %} | ||
! | ||
interface {{ intf.ifname }} | ||
ipv6 rip Gandalf enable | ||
{% endfor %} | ||
{% endif %} | ||
{{ rip.config(ripv2,vrf='',ospf_pid=ospf.process|default(1)) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{% import "templates/routing/_redistribute.ios.j2" as redistribute with context %} | ||
! | ||
{% macro config(ripv2,vrf='',ospf_pid=1) -%} | ||
{% if vrf %} | ||
ipv6 rip vrf-mode enable | ||
{% endif %} | ||
{% if ripv2.af.ipv4|default(False) %} | ||
router rip | ||
version 2 | ||
no auto-summary | ||
address-family ipv4 {{ 'vrf '+vrf if vrf else 'unicast' }} | ||
{% if 'import' in ripv2 %} | ||
default-metric {{ netlab_ripv2_default_metric|default(5) }} | ||
{% endif %} | ||
{{ redistribute.config(ripv2,af='ipv4',ospf_pid=ospf_pid)|indent(1,first=True) }} | ||
{% for intf in ripv2.interfaces|default(netlab_interfaces) %} | ||
{% if 'ripv2' in intf and intf.ipv4|default(False) is string %} | ||
network {{ intf.ipv4|ipaddr('address') }} | ||
{% endif %} | ||
{% set in_vrf = (vrf == '' and 'vrf' not in intf) or (intf.vrf == vrf) %} | ||
{% if in_vrf and (intf.ripv2.passive|default(False) or not 'ripv2' in intf) %} | ||
passive-interface {{ intf.ifname }} | ||
{% endif %} | ||
{% endfor %} | ||
{% endif %} | ||
! | ||
{% if ripv2.af.ipv6|default(False) %} | ||
{% set r_instance = vrf or 'default' %} | ||
ipv6 router rip default | ||
{% if vrf %} | ||
address-family ipv6 vrf {{ vrf }} | ||
{% endif %} | ||
{{ redistribute.config(ripv2,af='ipv6',ospf_pid=ospf_pid)|indent(1,first=True) }} | ||
! | ||
{% for intf in ripv2.interfaces|default(netlab_interfaces) if 'ripv2' in intf and 'ipv6' in intf %} | ||
! | ||
interface {{ intf.ifname }} | ||
ipv6 rip default enable | ||
{% endfor %} | ||
{% endif %} | ||
{%- endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters