11-29-2018 08:32 PM
set var EGRESS "GigabitEthernet"
set var PortNumber 1
set var BladeNumber 0
set var ErrorOnBlade "% Invalid input detected at '^' marker."
while {$BladeNumber != 9} {
show interfaces $EGRESS $BladeNumber/0/$PortNumber switchport | include Access
if {[regexp $ErrorOnBlade $CLI.OUT] !=0} {
incr BladeNumber 1
}
while {$PortNumber != 25 } {
CLI show interfaces $EGRESS $BladeNumber/0/$PortNumber switchport | include Access
if {[regexp "Access Mode VLAN: $VLANID" $CLI.OUT] !=0} {
CLI config t
CLI interface $EGRESS 1/0/$PortNumber
CLI switchport mode access
CLI switchport access vlan $NEWVLANID
CLI exit
CLI exit
}
incr PortNumber 1
}
incr BladeNumber 1
set var PortNumber 1
puts $BladeNumber
}
12-04-2018 08:01 AM
set var abort_when_error no