From 2d9735a88de6cfb9f31e2fe63be6d9c9eea39cc2 Mon Sep 17 00:00:00 2001 From: Shannon Byrnes Date: Fri, 31 Jan 2025 14:21:21 -0700 Subject: [PATCH] re-add ipv6 ip information --- .../startup-config/cisco2.conf | 81 ++++++++++--------- .../startup-config/cisco3.conf | 81 ++++++++++--------- 2 files changed, 88 insertions(+), 74 deletions(-) diff --git a/internal-lab-setup-assets/startup-config/cisco2.conf b/internal-lab-setup-assets/startup-config/cisco2.conf index 0fb77a3..05c0adc 100644 --- a/internal-lab-setup-assets/startup-config/cisco2.conf +++ b/internal-lab-setup-assets/startup-config/cisco2.conf @@ -5,30 +5,43 @@ username clab secret 10 $6$7/293.lG/gI3....$qhqRPSKeGBilG47Ii/xlYF9xJVR1IK7bnw.7HHiVj4Aj8cb58bxiLAim8Xz.beUfJ6TQTP3vHUty3UO.4KmaL. ! grpc - vrf {{ .Env.CLAB_MGMT_VRF }} - port 9339 +{{ if .Env.CLAB_MGMT_VRF }} vrf {{ .Env.CLAB_MGMT_VRF }}{{end}} no-tls address-family dual ! +! +{{- if .Env.CLAB_MGMT_VRF }} +vrf {{ .Env.CLAB_MGMT_VRF }} + address-family ipv4 unicast + ! + address-family ipv6 unicast + ! +{{- end}} +! line default transport input ssh ! -! netconf-yang agent -! ssh +netconf-yang agent + ssh ! cdp lldp ! -vrf {{ .Env.CLAB_MGMT_VRF }} +interface MgmtEth0/RP0/CPU0/0 +{{ if .Env.CLAB_MGMT_VRF }} vrf {{ .Env.CLAB_MGMT_VRF }}{{end}} +! +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 - ! -! -interface MgmtEth0/RP0/CPU0/0 - no ip address - vrf {{ .Env.CLAB_MGMT_VRF }} - ip address {{ .MgmtIPv4Addr }} {{ .MgmtIPv4SubnetMask }} + ::/0 MgmtEth0/RP0/CPU0/0 {{ .MgmtIPv6Gateway }} + ! +{{- end}} ! interface Loopback0 ip address 198.51.100.2 255.255.255.255 @@ -64,39 +77,33 @@ route-policy PERMIT_ALL pass end-policy ! -router static - vrf {{ .Env.CLAB_MGMT_VRF }} -{{- if .MgmtIPv4Gateway }} - address-family ipv4 unicast - 0.0.0.0/0 MgmtEth0/RP0/CPU0/0 {{ .MgmtIPv4Gateway }} - ! -{{- end}} -! -router bgp 64500 - bgp router-id 198.51.100.1 - address-family ipv4 unicast - redistribute connected +!router bgp 64500 +! bgp router-id 198.51.100.1 +! address-family ipv4 unicast +! redistribute connected ! - neighbor-group LAB - remote-as 64500 - password encrypted 15140403062B39 - update-source Loopback0 - address-family ipv4 unicast - route-policy PERMIT_ALL in - route-policy PERMIT_ALL out +! neighbor-group LAB +! remote-as 64500 +! password encrypted 15140403062B39 +! update-source Loopback0 +! address-family ipv4 unicast +! route-policy PERMIT_ALL in +! route-policy PERMIT_ALL out ! ! - neighbor 172.17.1.17 - use neighbor-group LAB +! neighbor 172.17.1.17 +! use neighbor-group LAB ! - neighbor 172.17.1.19 - use neighbor-group LAB +! neighbor 172.17.1.19 +! use neighbor-group LAB ! ! ! xml agent tty ! iteration off ! ssh server v2 +{{- if .Env.CLAB_MGMT_VRF }} ssh server vrf {{ .Env.CLAB_MGMT_VRF }} -! ssh server netconf vrf {{ .Env.CLAB_MGMT_VRF }} -end +{{- end}} +ssh server netconf {{ if .Env.CLAB_MGMT_VRF }} vrf {{ .Env.CLAB_MGMT_VRF }}{{end}} +end \ No newline at end of file diff --git a/internal-lab-setup-assets/startup-config/cisco3.conf b/internal-lab-setup-assets/startup-config/cisco3.conf index 5697549..818cafb 100644 --- a/internal-lab-setup-assets/startup-config/cisco3.conf +++ b/internal-lab-setup-assets/startup-config/cisco3.conf @@ -5,30 +5,43 @@ username clab secret 10 $6$7/293.lG/gI3....$qhqRPSKeGBilG47Ii/xlYF9xJVR1IK7bnw.7HHiVj4Aj8cb58bxiLAim8Xz.beUfJ6TQTP3vHUty3UO.4KmaL. ! grpc - vrf {{ .Env.CLAB_MGMT_VRF }} - port 9339 +{{ if .Env.CLAB_MGMT_VRF }} vrf {{ .Env.CLAB_MGMT_VRF }}{{end}} no-tls address-family dual ! +! +{{- if .Env.CLAB_MGMT_VRF }} +vrf {{ .Env.CLAB_MGMT_VRF }} + address-family ipv4 unicast + ! + address-family ipv6 unicast + ! +{{- end}} +! line default transport input ssh ! -! netconf-yang agent -! ssh +netconf-yang agent + ssh ! cdp lldp ! -vrf {{ .Env.CLAB_MGMT_VRF }} +interface MgmtEth0/RP0/CPU0/0 +{{ if .Env.CLAB_MGMT_VRF }} vrf {{ .Env.CLAB_MGMT_VRF }}{{end}} +! +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 - ! -! -interface MgmtEth0/RP0/CPU0/0 - no ip address - vrf {{ .Env.CLAB_MGMT_VRF }} - ip address {{ .MgmtIPv4Addr }} {{ .MgmtIPv4SubnetMask }} + ::/0 MgmtEth0/RP0/CPU0/0 {{ .MgmtIPv6Gateway }} + ! +{{- end}} ! interface Loopback0 ip address 198.51.100.3 255.255.255.255 @@ -54,39 +67,33 @@ route-policy PERMIT_ALL pass end-policy ! -router static - vrf {{ .Env.CLAB_MGMT_VRF }} -{{- if .MgmtIPv4Gateway }} - address-family ipv4 unicast - 0.0.0.0/0 MgmtEth0/RP0/CPU0/0 {{ .MgmtIPv4Gateway }} - ! -{{- end}} -! -router bgp 64500 - bgp router-id 198.51.100.1 - address-family ipv4 unicast - redistribute connected +!router bgp 64500 +! bgp router-id 198.51.100.1 +! address-family ipv4 unicast +! redistribute connected ! - neighbor-group LAB - remote-as 64500 - password encrypted 15140403062B39 - update-source Loopback0 - address-family ipv4 unicast - route-policy PERMIT_ALL in - route-policy PERMIT_ALL out +! neighbor-group LAB +! remote-as 64500 +! password encrypted 15140403062B39 +! update-source Loopback0 +! address-family ipv4 unicast +! route-policy PERMIT_ALL in +! route-policy PERMIT_ALL out ! ! - neighbor 172.17.1.17 - use neighbor-group LAB +! neighbor 172.17.1.17 +! use neighbor-group LAB ! - neighbor 172.17.1.19 - use neighbor-group LAB +! neighbor 172.17.1.19 +! use neighbor-group LAB ! ! ! xml agent tty ! iteration off ! ssh server v2 +{{- if .Env.CLAB_MGMT_VRF }} ssh server vrf {{ .Env.CLAB_MGMT_VRF }} -! ssh server netconf vrf {{ .Env.CLAB_MGMT_VRF }} -end +{{- end}} +ssh server netconf {{ if .Env.CLAB_MGMT_VRF }} vrf {{ .Env.CLAB_MGMT_VRF }}{{end}} +end \ No newline at end of file