Skip to content

Commit

Permalink
Update NTC lab
Browse files Browse the repository at this point in the history
  • Loading branch information
knewell committed Sep 27, 2018
1 parent 561d256 commit e866c82
Show file tree
Hide file tree
Showing 9 changed files with 159 additions and 14 deletions.
4 changes: 2 additions & 2 deletions core/core-model-csr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ links:
cost: 10, mpls: True, iso: True }

bgp:
rr: [10.0.0.51]
clients: [10.0.0.52, 100.0.53, 10.0.0.54, 10.0.0.55, 10.0.0.56]
rr: [1.1.1.1]
clients: [2.2.2.2, 3.3.3.3, 4.4.4.4, 5.5.5.5, 6.6.6.6]
af:
- inet
- inet-vpn
Expand Down
42 changes: 41 additions & 1 deletion core_config/ansible-csr1-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,47 @@ router ospf 1
network 172.10.12.1 0.0.0.255 area 0
network 172.10.14.1 0.0.0.255 area 0
network 172.10.13.1 0.0.0.255 area 0
virtual-service csr_mgmt
!
router bgp 65000
neighbor 2.2.2.2 remote-as 65000
neighbor 2.2.2.2 update-source Loopback0
neighbor 3.3.3.3 remote-as 65000
neighbor 3.3.3.3 update-source Loopback0
neighbor 4.4.4.4 remote-as 65000
neighbor 4.4.4.4 update-source Loopback0
neighbor 5.5.5.5 remote-as 65000
neighbor 5.5.5.5 update-source Loopback0
neighbor 6.6.6.6 remote-as 65000
neighbor 6.6.6.6 update-source Loopback0
!
address-family ipv4
neighbor 2.2.2.2 activate
neighbor 2.2.2.2 route-reflector-client
neighbor 3.3.3.3 activate
neighbor 3.3.3.3 route-reflector-client
neighbor 4.4.4.4 activate
neighbor 4.4.4.4 route-reflector-client
neighbor 5.5.5.5 activate
neighbor 5.5.5.5 route-reflector-client
neighbor 6.6.6.6 activate
neighbor 6.6.6.6 route-reflector-client
exit-address-family
!
address-family vpnv4
neighbor 2.2.2.2 activate
neighbor 2.2.2.2 route-reflector-client
neighbor 3.3.3.3 activate
neighbor 3.3.3.3 route-reflector-client
neighbor 4.4.4.4 activate
neighbor 4.4.4.4 route-reflector-client
neighbor 5.5.5.5 activate
neighbor 5.5.5.5 route-reflector-client
neighbor 6.6.6.6 activate
neighbor 6.6.6.6 route-reflector-client
exit-address-family
!
!
virtual-service csr_mgmt
!
ip forward-protocol nd
ip http server
Expand Down
16 changes: 15 additions & 1 deletion core_config/ansible-csr2-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,21 @@ router ospf 1
network 172.10.12.2 0.0.0.255 area 0
network 172.10.23.2 0.0.0.255 area 0
network 172.10.25.2 0.0.0.255 area 0
virtual-service csr_mgmt
!
router bgp 65000
neighbor 1.1.1.1 remote-as 65000
neighbor 1.1.1.1 update-source Loopback0
!
address-family ipv4
neighbor 1.1.1.1 activate
exit-address-family
!
address-family vpnv4
neighbor 1.1.1.1 activate
exit-address-family
!
!
virtual-service csr_mgmt
!
ip forward-protocol nd
ip http server
Expand Down
16 changes: 15 additions & 1 deletion core_config/ansible-csr3-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,21 @@ router ospf 1
router-id 3.3.3.3
network 172.10.23.3 0.0.0.255 area 0
network 172.10.13.3 0.0.0.255 area 0
virtual-service csr_mgmt
!
router bgp 65000
neighbor 1.1.1.1 remote-as 65000
neighbor 1.1.1.1 update-source Loopback0
!
address-family ipv4
neighbor 1.1.1.1 activate
exit-address-family
!
address-family vpnv4
neighbor 1.1.1.1 activate
exit-address-family
!
!
virtual-service csr_mgmt
!
ip forward-protocol nd
ip http server
Expand Down
16 changes: 15 additions & 1 deletion core_config/ansible-csr4-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,21 @@ router ospf 1
network 172.10.45.4 0.0.0.255 area 0
network 172.10.14.4 0.0.0.255 area 0
network 172.10.46.4 0.0.0.255 area 0
virtual-service csr_mgmt
!
router bgp 65000
neighbor 1.1.1.1 remote-as 65000
neighbor 1.1.1.1 update-source Loopback0
!
address-family ipv4
neighbor 1.1.1.1 activate
exit-address-family
!
address-family vpnv4
neighbor 1.1.1.1 activate
exit-address-family
!
!
virtual-service csr_mgmt
!
ip forward-protocol nd
ip http server
Expand Down
16 changes: 15 additions & 1 deletion core_config/ansible-csr5-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,21 @@ router ospf 1
network 172.10.45.5 0.0.0.255 area 0
network 172.10.56.5 0.0.0.255 area 0
network 172.10.25.5 0.0.0.255 area 0
virtual-service csr_mgmt
!
router bgp 65000
neighbor 1.1.1.1 remote-as 65000
neighbor 1.1.1.1 update-source Loopback0
!
address-family ipv4
neighbor 1.1.1.1 activate
exit-address-family
!
address-family vpnv4
neighbor 1.1.1.1 activate
exit-address-family
!
!
virtual-service csr_mgmt
!
ip forward-protocol nd
ip http server
Expand Down
16 changes: 15 additions & 1 deletion core_config/ansible-csr6-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,21 @@ router ospf 1
router-id 6.6.6.6
network 172.10.56.6 0.0.0.255 area 0
network 172.10.46.6 0.0.0.255 area 0
virtual-service csr_mgmt
!
router bgp 65000
neighbor 1.1.1.1 remote-as 65000
neighbor 1.1.1.1 update-source Loopback0
!
address-family ipv4
neighbor 1.1.1.1 activate
exit-address-family
!
address-family vpnv4
neighbor 1.1.1.1 activate
exit-address-family
!
!
virtual-service csr_mgmt
!
ip forward-protocol nd
ip http server
Expand Down
30 changes: 30 additions & 0 deletions ios/core.j2
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,36 @@ router ospf 1
{% for intf,intf_attr in node.links.items() %}
network {{intf_attr.ip}} 0.0.0.255 area {{node.ospf.area}}
{% endfor %}
!
router bgp {{common.bgp_asn}}
{% for peer in node.bgp.ibgp.peers %}
neighbor {{peer}} remote-as {{common.bgp_asn}}
neighbor {{peer}} update-source Loopback0
{% endfor %}
!
{% if 'inet' in node.bgp.ibgp.af %}
address-family ipv4
{% for peer in node.bgp.ibgp.peers %}
neighbor {{peer}} activate
{% if node.bgp.ibgp.rr is defined and node.bgp.ibgp.rr == true %}
neighbor {{peer}} route-reflector-client
{% endif %}
{% endfor %}
exit-address-family
{% endif %}
!
{% if 'inet-vpn' in node.bgp.ibgp.af %}
address-family vpnv4
{% for peer in node.bgp.ibgp.peers %}
neighbor {{peer}} activate
{% if node.bgp.ibgp.rr is defined and node.bgp.ibgp.rr == true %}
neighbor {{peer}} route-reflector-client
{% endif %}
{% endfor %}
exit-address-family
{% endif %}
!
!
virtual-service csr_mgmt
!
ip forward-protocol nd
Expand Down
17 changes: 11 additions & 6 deletions nodes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@ nodes:
GigabitEthernet3.0: { ip: 172.10.14.1, remote: ansible-csr4 , cost: 10 , vlan: 0 , mpls: True , iso: True}
bgp:
ibgp:
rr: true
peers:
- 10.0.0.51
- 2.2.2.2
- 3.3.3.3
- 4.4.4.4
- 5.5.5.5
- 6.6.6.6
af:
- inet
- inet-vpn
Expand All @@ -41,7 +46,7 @@ nodes:
bgp:
ibgp:
peers:
- 10.0.0.51
- 1.1.1.1
af:
- inet
- inet-vpn
Expand All @@ -60,7 +65,7 @@ nodes:
bgp:
ibgp:
peers:
- 10.0.0.51
- 1.1.1.1
af:
- inet
- inet-vpn
Expand All @@ -80,7 +85,7 @@ nodes:
bgp:
ibgp:
peers:
- 10.0.0.51
- 1.1.1.1
af:
- inet
- inet-vpn
Expand All @@ -100,7 +105,7 @@ nodes:
bgp:
ibgp:
peers:
- 10.0.0.51
- 1.1.1.1
af:
- inet
- inet-vpn
Expand All @@ -119,7 +124,7 @@ nodes:
bgp:
ibgp:
peers:
- 10.0.0.51
- 1.1.1.1
af:
- inet
- inet-vpn
Expand Down

0 comments on commit e866c82

Please sign in to comment.