Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change management interface on IOL Layer 2 images from Vlan0 #2235

Merged
merged 3 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 7 additions & 14 deletions nodes/iol/iol.cfg.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,31 @@ no ip domain lookup
username admin privilege 15 secret admin
!
vrf definition clab-mgmt
description clab-mgmt
address-family ipv4
!
address-family ipv6
!
!
interface Ethernet0/0
{{ if .IsL2Node }}
interface Vlan1
no switchport
{{ end }}
vrf forwarding clab-mgmt
description clab-mgmt
ip address {{ .MgmtIPv4Addr }} {{ .MgmtIPv4SubnetMask }}
ipv6 address {{ .MgmtIPv6Addr }}/{{ .MgmtIPv6PrefixLen }}
!
{{ end }}
interface Ethernet0/0
no shutdown
mac-address {{ .MgmtIntfMacAddr }}
{{ if .IsL2Node }}
switchport mode access
switchport access vlan 1
{{ else }}
vrf forwarding clab-mgmt
ip address {{ .MgmtIPv4Addr }} {{ .MgmtIPv4SubnetMask }}
ipv6 address {{ .MgmtIPv6Addr }}/{{ .MgmtIPv6PrefixLen }}
{{ end }}
!{{ range $index, $item := .DataIFaces }}
interface Ethernet{{ .Slot }}/{{ .Port }}
no shutdown
mac-address {{ .MacAddr }}
!{{ end }}
ip forward-protocol nd
!
ip route vrf clab-mgmt 0.0.0.0 0.0.0.0 {{ if .IsL2Node }}Vlan1{{ else }}Ethernet0/0{{ end }} {{ .MgmtIPv4GW }}
ipv6 route vrf clab-mgmt ::/0 {{ if .IsL2Node }}Vlan1{{ else }}Ethernet0/0{{ end }} {{ .MgmtIPv6GW }}
ip route vrf clab-mgmt 0.0.0.0 0.0.0.0 Ethernet0/0 {{ .MgmtIPv4GW }}
ipv6 route vrf clab-mgmt ::/0 Ethernet0/0 {{ .MgmtIPv6GW }}
!
ip ssh version 2
crypto key generate rsa modulus 2048
Expand Down
2 changes: 1 addition & 1 deletion tests/10-basic-cisco_iol/01-iol.robot
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Verify links in node router1

Verify links in node switch
${rc} ${output} = Run And Return Rc And Output
... sshpass -p "admin" ssh -o "IdentitiesOnly=yes" admin@clab-${lab-name}-switch sh ip int br | head -9 | tail -1
... sshpass -p "admin" ssh -o "IdentitiesOnly=yes" admin@clab-${lab-name}-switch sh ip int br | head -5 | tail -1
Log ${output}
Should Be Equal As Integers ${rc} 0
Should Contain ${output} 172.20.20.
Expand Down
Loading