Skip to content

Commit

Permalink
add blue-vrf
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebates123 committed Aug 31, 2023
1 parent 0e00683 commit 1bb881f
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 47 deletions.
27 changes: 13 additions & 14 deletions network_modeling/configs/templates/1.5/aruba/common/bgp.primary.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,40 @@ router bgp {{ variables.SWITCH_ASN }}
maximum-paths 32
timers bgp 1 3
distance bgp 20 70
{%- for name, ip in variables.NMN_IPs.items() if "sw-spine-002" in name %}
{%- for name, ip in variables.CMN_IPs.items() if "sw-spine-002" in name %}
neighbor {{ ip }} remote-as {{ variables.SWITCH_ASN }}
{%- endfor %}
{%- for name, ip in variables.NMN_IPs.items() if "ncn-w" in name %}
neighbor {{ ip }} remote-as {{ variables.NMN_ASN }}
{%- for name, ip in variables.CMN_IPs.items() if "ncn-w" in name %}
neighbor {{ ip }} remote-as {{ variables.CMN_ASN }}
neighbor {{ ip }} passive
{%- endfor %}
address-family ipv4 unicast
{%- for name, ip in variables.NMN_IPs.items() if "sw-spine-002" in name %}
{%- for name, ip in variables.CMN_IPs.items() if "sw-spine-002" in name %}
neighbor {{ ip }} activate
{%- endfor %}
{%- for name, ip in variables.NMN_IPs.items() if "ncn-w" in name %}
{%- for name, ip in variables.CMN_IPs.items() if "ncn-w" in name %}
neighbor {{ ip }} activate
neighbor {{ ip }} route-map {{ name }} in
neighbor {{ ip }} route-map {{ name }}-Customer in
{%- endfor %}
exit-address-family
vrf Customer
vrf blue
bgp router-id {{ variables.LOOPBACK_IP }}
maximum-paths 32
timers bgp 1 3
distance bgp 20 70
{%- for name, ip in variables.CMN_IPs.items() if "sw-spine-002" in name %}
{%- for name, ip in variables.NMN_IPs.items() if "sw-spine-002" in name %}
neighbor {{ ip }} remote-as {{ variables.SWITCH_ASN }}
{%- endfor %}
{%- for name, ip in variables.CMN_IPs.items() if "ncn-w" in name %}
neighbor {{ ip }} remote-as {{ variables.CMN_ASN }}
{%- for name, ip in variables.NMN_IPs.items() if "ncn-w" in name %}
neighbor {{ ip }} remote-as {{ variables.NMN_ASN }}
neighbor {{ ip }} passive
{%- endfor %}
address-family ipv4 unicast
{%- for name, ip in variables.CMN_IPs.items() if "sw-spine-002" in name %}
{%- for name, ip in variables.NMN_IPs.items() if "sw-spine-002" in name %}
neighbor {{ ip }} activate
{%- endfor %}
{%- for name, ip in variables.CMN_IPs.items() if "ncn-w" in name %}
{%- for name, ip in variables.NMN_IPs.items() if "ncn-w" in name %}
neighbor {{ ip }} activate
neighbor {{ ip }} route-map {{ name }}-Customer in
neighbor {{ ip }} route-map {{ name }} in
{%- endfor %}
exit-address-family
{#- end bgp #}
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,40 @@ router bgp {{ variables.SWITCH_ASN }}
maximum-paths 32
timers bgp 1 3
distance bgp 20 70
{%- for name, ip in variables.NMN_IPs.items() if "sw-spine-001" in name %}
{%- for name, ip in variables.CMN_IPs.items() if "sw-spine-001" in name %}
neighbor {{ ip }} remote-as {{ variables.SWITCH_ASN }}
{%- endfor %}
{%- for name, ip in variables.NMN_IPs.items() if "ncn-w" in name %}
neighbor {{ ip }} remote-as {{ variables.NMN_ASN }}
{%- for name, ip in variables.CMN_IPs.items() if "ncn-w" in name %}
neighbor {{ ip }} remote-as {{ variables.CMN_ASN }}
neighbor {{ ip }} passive
{%- endfor %}
address-family ipv4 unicast
{%- for name, ip in variables.NMN_IPs.items() if "sw-spine-001" in name %}
{%- for name, ip in variables.CMN_IPs.items() if "sw-spine-001" in name %}
neighbor {{ ip }} activate
{%- endfor %}
{%- for name, ip in variables.NMN_IPs.items() if "ncn-w" in name %}
{%- for name, ip in variables.CMN_IPs.items() if "ncn-w" in name %}
neighbor {{ ip }} activate
neighbor {{ ip }} route-map {{ name }} in
neighbor {{ ip }} route-map {{ name }}-Customer in
{%- endfor %}
exit-address-family
vrf Customer
vrf blue
bgp router-id {{ variables.LOOPBACK_IP }}
maximum-paths 32
timers bgp 1 3
distance bgp 20 70
{%- for name, ip in variables.CMN_IPs.items() if "sw-spine-001" in name %}
{%- for name, ip in variables.NMN_IPs.items() if "sw-spine-001" in name %}
neighbor {{ ip }} remote-as {{ variables.SWITCH_ASN }}
{%- endfor %}
{%- for name, ip in variables.CMN_IPs.items() if "ncn-w" in name %}
neighbor {{ ip }} remote-as {{ variables.CMN_ASN }}
{%- for name, ip in variables.NMN_IPs.items() if "ncn-w" in name %}
neighbor {{ ip }} remote-as {{ variables.NMN_ASN }}
neighbor {{ ip }} passive
{%- endfor %}
address-family ipv4 unicast
{%- for name, ip in variables.CMN_IPs.items() if "sw-spine-001" in name %}
{%- for name, ip in variables.NMN_IPs.items() if "sw-spine-001" in name %}
neighbor {{ ip }} activate
{%- endfor %}
{%- for name, ip in variables.CMN_IPs.items() if "ncn-w" in name %}
{%- for name, ip in variables.NMN_IPs.items() if "ncn-w" in name %}
neighbor {{ ip }} activate
neighbor {{ ip }} route-map {{ name }}-Customer in
neighbor {{ ip }} route-map {{ name }} in
{%- endfor %}
exit-address-family
{#- end bgp #}
12 changes: 7 additions & 5 deletions network_modeling/configs/templates/1.5/aruba/tds/sw-leaf-bmc.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
hostname {{ variables.HOSTNAME }}
{%- include variables.CSM_VERSION+'/aruba/common/banner-motd.j2' %}
no ip icmp redirect
vrf Customer
vrf blue
ntp server {{ variables.NCN_W001 }}
ntp server {{ variables.NCN_W002 }}
ntp server {{ variables.NCN_W003 }}
Expand All @@ -14,7 +14,7 @@ aruba-central
disable
ssh server vrf default
ssh server vrf mgmt
ssh server vrf Customer
ssh server vrf blue
{%- include variables.CSM_VERSION+'/aruba/common/acl.j2' %}

vlan 1
Expand Down Expand Up @@ -50,36 +50,38 @@ interface loopback 0
ip address {{ variables.LOOPBACK_IP }}/32
ip ospf 1 area 0.0.0.0
interface vlan 1
vrf attach blue
ip mtu 9198
ip address {{ variables.MTL_IP }}/{{variables.MTL_PREFIX_LEN}}
ip ospf 1 area 0.0.0.0
ip ospf passive
interface vlan {{ variables.NMN_VLAN }}
vrf attach blue
description NMN
ip mtu 9198
ip address {{ variables.NMN_IP }}/{{variables.NMN_PREFIX_LEN}}
ip ospf 1 area 0.0.0.0
interface vlan {{ variables.HMN_VLAN }}
vrf attach blue
description HMN
ip mtu 9198
ip address {{ variables.HMN_IP }}/{{variables.HMN_PREFIX_LEN}}
ip ospf 1 area 0.0.0.0
ip ospf passive
interface vlan {{ variables.CMN_VLAN }}
vrf attach Customer
description CMN
ip mtu 9198
ip address {{ variables.CMN_IP }}/{{variables.CMN_PREFIX_LEN}}
ip ospf 2 area 0.0.0.0
snmp-server vrf default
ip dns server-address {{ variables.NMNLB_DNS }}
router ospf 2 vrf Customer
router ospf 3 vrf blue
router-id {{ variables.LOOPBACK_IP }}
area 0.0.0.0
router ospf 1
router-id {{ variables.LOOPBACK_IP }}
area 0.0.0.0
https-server vrf Customer
https-server vrf default
https-server vrf mgmt
https-server vrf blue
{# end sw-leaf-bmc #}
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
hostname {{ variables.HOSTNAME }}
{%- include variables.CSM_VERSION+'/aruba/common/banner-motd.j2' %}
no ip icmp redirect
vrf Customer
vrf keepalive
vrf blue
ntp server {{ variables.NCN_W001 }}
ntp server {{ variables.NCN_W002 }}
ntp server {{ variables.NCN_W003 }}
ntp enable

aruba-central
disable
ssh server vrf Customer
ssh server vrf default
ssh server vrf keepalive
ssh server vrf mgmt
ssh server vrf blue
{%- include variables.CSM_VERSION+'/aruba/common/acl.j2' %}

vlan 1
Expand Down Expand Up @@ -61,6 +61,7 @@ interface loopback 0
ip address {{ variables.LOOPBACK_IP }}/32
ip ospf 1 area 0.0.0.0
interface vlan 1
vrf attach blue
ip mtu 9198
ip address {{ variables.MTL_IP }}/{{variables.MTL_PREFIX_LEN}}
active-gateway ip mac 12:00:00:00:6b:00
Expand All @@ -69,6 +70,7 @@ interface vlan 1
ip ospf 1 area 0.0.0.0
ip ospf passive
interface vlan {{ variables.NMN_VLAN }}
vrf attach blue
description NMN
ip mtu 9198
ip address {{ variables.NMN_IP }}/{{variables.NMN_PREFIX_LEN}}
Expand All @@ -77,6 +79,7 @@ interface vlan {{ variables.NMN_VLAN }}
ip helper-address 10.92.100.222
ip ospf 1 area 0.0.0.0
interface vlan {{ variables.HMN_VLAN }}
vrf attach blue
description HMN
ip mtu 9198
ip address {{ variables.HMN_IP }}/{{variables.HMN_PREFIX_LEN}}
Expand All @@ -87,7 +90,6 @@ interface vlan {{ variables.HMN_VLAN }}
ip ospf passive
{%- if variables.CMN != None %}
interface vlan {{ variables.CMN_VLAN }}
vrf attach Customer
description CMN
ip mtu 9198
ip address {{ variables.CMN_IP }}/{{ variables.CMN_PREFIX_LEN }}
Expand All @@ -97,7 +99,6 @@ interface vlan {{ variables.CMN_VLAN }}
{%- endif %}
{%- if variables.CAN != None %}
interface vlan {{ variables.CAN_VLAN }}
vrf attach Customer
description CAN
ip mtu 9198
ip address {{ variables.CAN_IP_PRIMARY }}/{{ variables.CAN_PREFIX_LEN }}
Expand All @@ -108,16 +109,15 @@ interface vlan {{ variables.CAN_VLAN }}
ip dns server-address {{ variables.NMNLB_DNS }}
{% include variables.CSM_VERSION+'/aruba/common/prefix-list.j2' %}
{% include variables.CSM_VERSION+'/aruba/common/route-map.j2' %}
router ospf 2 vrf Customer
router ospf 3 vrf blue
router-id {{ variables.LOOPBACK_IP }}
default-information originate
area 0.0.0.0
router ospf 1
router-id {{ variables.LOOPBACK_IP }}
redistribute bgp
area 0.0.0.0
{% include variables.CSM_VERSION+'/aruba/common/bgp.primary.j2' %}
https-server vrf Customer
https-server vrf default
https-server vrf mgmt
https-server vrf blue
{# end sw-spine.primary #}
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
hostname {{ variables.HOSTNAME }}
{%- include variables.CSM_VERSION+'/aruba/common/banner-motd.j2' %}
no ip icmp redirect
vrf Customer
vrf keepalive
vrf blue
ntp server {{ variables.NCN_W001 }}
ntp server {{ variables.NCN_W002 }}
ntp server {{ variables.NCN_W003 }}
ntp enable

aruba-central
disable
ssh server vrf Customer
ssh server vrf default
ssh server vrf keepalive
ssh server vrf mgmt
ssh server vrf blue
{%- include variables.CSM_VERSION+'/aruba/common/acl.j2' %}

vlan 1
Expand Down Expand Up @@ -61,6 +61,7 @@ interface loopback 0
ip address {{ variables.LOOPBACK_IP }}/32
ip ospf 1 area 0.0.0.0
interface vlan 1
vrf attach blue
ip mtu 9198
ip address {{ variables.MTL_IP }}/{{variables.MTL_PREFIX_LEN}}
active-gateway ip mac 12:00:00:00:6b:00
Expand All @@ -69,6 +70,7 @@ interface vlan 1
ip ospf 1 area 0.0.0.0
ip ospf passive
interface vlan {{ variables.NMN_VLAN }}
vrf attach blue
description NMN
ip mtu 9198
ip address {{ variables.NMN_IP }}/{{variables.NMN_PREFIX_LEN}}
Expand All @@ -77,6 +79,7 @@ interface vlan {{ variables.NMN_VLAN }}
ip helper-address 10.92.100.222
ip ospf 1 area 0.0.0.0
interface vlan {{ variables.HMN_VLAN }}
vrf attach blue
description HMN
ip mtu 9198
ip address {{ variables.HMN_IP }}/{{variables.HMN_PREFIX_LEN}}
Expand All @@ -87,7 +90,6 @@ interface vlan {{ variables.HMN_VLAN }}
ip ospf passive
{%- if variables.CMN != None %}
interface vlan {{ variables.CMN_VLAN }}
vrf attach Customer
description CMN
ip mtu 9198
ip address {{ variables.CMN_IP }}/{{ variables.CMN_PREFIX_LEN }}
Expand All @@ -97,7 +99,6 @@ interface vlan {{ variables.CMN_VLAN }}
{%- endif %}
{%- if variables.CAN != None %}
interface vlan {{ variables.CAN_VLAN }}
vrf attach Customer
description CAN
ip mtu 9198
ip address {{ variables.CAN_IP_SECONDARY }}/{{ variables.CAN_PREFIX_LEN }}
Expand All @@ -108,16 +109,16 @@ interface vlan {{ variables.CAN_VLAN }}
ip dns server-address {{ variables.NMNLB_DNS }}
{% include variables.CSM_VERSION+'/aruba/common/prefix-list.j2' %}
{% include variables.CSM_VERSION+'/aruba/common/route-map.j2' %}
router ospf 2 vrf Customer
router ospf 3 vrf blue
router-id {{ variables.LOOPBACK_IP }}
default-information originate
redistribute bgp
area 0.0.0.0
router ospf 1
router-id {{ variables.LOOPBACK_IP }}
redistribute bgp
area 0.0.0.0
{% include variables.CSM_VERSION+'/aruba/common/bgp.secondary.j2' %}
https-server vrf Customer
https-server vrf default
https-server vrf mgmt
https-server vrf blue
{# end sw-spine.secondary #}

0 comments on commit 1bb881f

Please sign in to comment.