diff --git a/internal-lab-setup-assets/startup-config/cisco1.conf b/internal-lab-setup-assets/startup-config/cisco1.conf index e44692f..eaac678 100644 --- a/internal-lab-setup-assets/startup-config/cisco1.conf +++ b/internal-lab-setup-assets/startup-config/cisco1.conf @@ -26,6 +26,9 @@ call-home cdp lldp ! +interface MgmtEth0/RP0/CPU0/0 +{{ if .Env.CLAB_MGMT_VRF }} vrf {{ .Env.CLAB_MGMT_VRF }}{{end}} +! interface Loopback0 ip address 198.51.100.1 255.255.255.255 ! @@ -61,13 +64,17 @@ route-policy PERMIT_ALL end-policy ! router static +{{ if .Env.CLAB_MGMT_VRF }} vrf {{ .Env.CLAB_MGMT_VRF }}{{end}} +{{- if .MgmtIPv4Gateway }} address-family ipv4 unicast 0.0.0.0/0 MgmtEth0/RP0/CPU0/0 {{ .MgmtIPv4Gateway }} - ! + ! +{{- end}} +{{- if .MgmtIPv6Gateway }} address-family ipv6 unicast ::/0 MgmtEth0/RP0/CPU0/0 {{ .MgmtIPv6Gateway }} - ! -! + ! +{{- end}} router bgp 64500 bgp router-id 198.51.100.1 address-family ipv4 unicast diff --git a/internal-lab-setup-assets/startup-config/cisco2.conf b/internal-lab-setup-assets/startup-config/cisco2.conf index 9c046a5..d7d6e12 100644 --- a/internal-lab-setup-assets/startup-config/cisco2.conf +++ b/internal-lab-setup-assets/startup-config/cisco2.conf @@ -26,6 +26,9 @@ call-home cdp lldp ! +interface MgmtEth0/RP0/CPU0/0 +{{ if .Env.CLAB_MGMT_VRF }} vrf {{ .Env.CLAB_MGMT_VRF }}{{end}} +! interface Loopback0 ip address 198.51.100.2 255.255.255.255 ! @@ -61,12 +64,17 @@ route-policy PERMIT_ALL end-policy ! router static +{{ if .Env.CLAB_MGMT_VRF }} vrf {{ .Env.CLAB_MGMT_VRF }}{{end}} +{{- if .MgmtIPv4Gateway }} address-family ipv4 unicast 0.0.0.0/0 MgmtEth0/RP0/CPU0/0 {{ .MgmtIPv4Gateway }} - ! + ! +{{- end}} +{{- if .MgmtIPv6Gateway }} address-family ipv6 unicast ::/0 MgmtEth0/RP0/CPU0/0 {{ .MgmtIPv6Gateway }} - ! + ! +{{- end}} ! router bgp 64500 bgp router-id 198.51.100.2 diff --git a/internal-lab-setup-assets/startup-config/cisco3.conf b/internal-lab-setup-assets/startup-config/cisco3.conf index eb18654..26afbaa 100644 --- a/internal-lab-setup-assets/startup-config/cisco3.conf +++ b/internal-lab-setup-assets/startup-config/cisco3.conf @@ -26,6 +26,9 @@ call-home cdp lldp ! +interface MgmtEth0/RP0/CPU0/0 +{{ if .Env.CLAB_MGMT_VRF }} vrf {{ .Env.CLAB_MGMT_VRF }}{{end}} +! interface Loopback0 ip address 198.51.100.3 255.255.255.255 ! @@ -51,12 +54,17 @@ route-policy PERMIT_ALL end-policy ! router static +{{ if .Env.CLAB_MGMT_VRF }} vrf {{ .Env.CLAB_MGMT_VRF }}{{end}} +{{- if .MgmtIPv4Gateway }} address-family ipv4 unicast 0.0.0.0/0 MgmtEth0/RP0/CPU0/0 {{ .MgmtIPv4Gateway }} - ! + ! +{{- end}} +{{- if .MgmtIPv6Gateway }} address-family ipv6 unicast ::/0 MgmtEth0/RP0/CPU0/0 {{ .MgmtIPv6Gateway }} - ! + ! +{{- end}} ! router bgp 64500 bgp router-id 198.51.100.3 diff --git a/internal-lab-setup-assets/workshop.clab.yml.j2 b/internal-lab-setup-assets/workshop.clab.yml.j2 index f729af1..a7a7725 100644 --- a/internal-lab-setup-assets/workshop.clab.yml.j2 +++ b/internal-lab-setup-assets/workshop.clab.yml.j2 @@ -1,16 +1,16 @@ {%- set id = id|default(1) %} {%- macro shared_node_settings(x) %} mgmt-ipv4: 172.16.{{id}}.{{x}} - mgmt-ipv6: 2001:db8:16:{{id}}::{{x}} ports: - 2{{"%02d" % id}}{{x}}:22 + env: + CLAB_MGMT_VRF: management {%- endmacro -%} name: automation-workshop-{{"%02d" % id}} mgmt: network: automation-workshop-{{"%02d" % id}} ipv4-subnet: 172.16.{{id}}.0/24 - ipv6-subnet: 2001:db8:16:{{id}}::/80 topology: kinds: @@ -39,7 +39,7 @@ topology: image: internet2/getting_started {{- shared_node_settings(x) }} env: - LAB_PASSWORD: Ninja-{{"%02d" % id}}-Turtles + LAB_PASSWORD: Ninja-{{"%02d" % id}}-Turtle links: - endpoints: ["cisco1:Gi0-0-0-0", "cisco3:Gi0-0-0-0"]