mirror of
https://gitlab.com/netravnen/NetworkLabNotes.git
synced 2024-11-11 18:39:40 +00:00
13 lines
328 B
Plaintext
13 lines
328 B
Plaintext
|
tclsh
|
||
|
puts [ open "flash:resetvlans.tcl" w+ ] {
|
||
|
foreach vlanItem [regexp -all -line -inline "^\[0-9\]+" [exec "show vlan brief"]] {
|
||
|
if { ($vlanItem == 1) || (($vlanItem >= 1002) && ($vlanItem <= 1005)) } {
|
||
|
puts "Skipping VLAN $vlanItem"
|
||
|
} else {
|
||
|
puts "Removing VLAN $vlanItem"
|
||
|
ios_config "no vlan $vlanItem"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
tclquit
|