Ciscoman's notes (Записки цыщика c дипломом)

I'm Cisco Champion Community member for 2017!

I'm Cisco Champion Community member for 2017!
"Cisco Champions are passionate about Cisco and happy to share our knowledge, experience, and feedback."

пятница, 8 февраля 2019 г.

How to remove all loopback from Cisco IOS configuration at once

Simple script to remove all loopbacks at one, e.g. especially if you created it with some other script as from here https://packetpushers.net/tcl-script-for-creating-many-loopback-interfaces/
or from here: https://blog.ine.com/2014/05/05/ios-random-ipv4-ipv6-route-generator-in-tcl

foreach line_a [split [ exec "sh ip int b | i Loopback" ] "\n"] { 
  if { [ regexp -inline {[0-9/.]+ } [ lindex $line_a 0 ] ] != "" } \
  { ios_config "no interface [ lindex $line_a 0 ]" } 
}

Комментариев нет:

Отправить комментарий

Постоянные читатели

Поиск по этому блогу