Phase A complete: VLAN DB + names + handover

- HANDOVER.md: full delegation doc (Status, Architektur, Phasen, Gotchas)
- switch/cli/backup.exp: show running-config mit --More-- handling
- switch/cli/02-vlan-names.cli/exp: set VLAN names (MAIN/INFRA/IOT/UNTRUSTED/GUEST/MGMT/WAN)
- switch/cli/running-PRE.txt: pre-changes config backup (networkmask-Syntax bestaetigt)
- switch/cli/02-vlan-names.log: verifikations-Output (show vlan)

VLAN-DB jetzt: 1, 10, 20, 30, 40, 90, 99, 100 (alle benannt, alle Static)
Alle Ports weiterhin in VLAN 1 (non-disruptiv).
save: Success

Switch-Recovery: Telnet-VTY-Lockout (stale Session) erforderte User-Reboot
  des Switches. Credentials OK, WebUI ebenfalls blockiert (Session-Drop).
  Nach Reboot funktioniert Telnet ueber plain pipe UND expect.
This commit is contained in:
Christoph Emsenhuber
2026-06-09 18:55:43 +02:00
parent 498fa06472
commit a73db06354
5 changed files with 412 additions and 0 deletions

47
switch/cli/backup.exp Normal file
View File

@@ -0,0 +1,47 @@
#!/usr/bin/expect -f
# Backup running-config mit --More-- Handling
# Schreibt komplette running-config nach STDOUT (zur Weiterleitung in Datei)
set timeout 60
log_user 1
spawn telnet $env(SW_HOST)
expect "Username:"
send "$env(SW_USER)\r"
expect "Password:"
sleep 1
send "$env(SW_PASS)\r"
expect {
"sw1#" { }
timeout { puts "TIMEOUT: kein Prompt"; exit 1 }
}
send "show running-config\r"
# Seiten durchblättern bis zurück zum Prompt
set more_count 0
while {$more_count < 100} {
expect {
-ex "--More--" {
set more_count [expr $more_count + 1]
sleep 0.3
send " "
}
-ex "sw1#" {
break
}
timeout {
puts "TIMEOUT beim Paging"
break
}
}
}
send "\r"
expect "sw1#"
send "exit\r"
expect eof