diff --git a/SwitchCisco.md b/SwitchCisco.md index c9b0836f..3fdbe6fb 100644 --- a/SwitchCisco.md +++ b/SwitchCisco.md @@ -1042,6 +1042,34 @@ Switch(config-if)# switchport nonegotiate Mais cette commande n'a pas d'intérêt dans le cas où le mode dynamic n'est pas utilisé. Attention cependant, désactiver cette option (`no switchport nonegotiate`) entraînera une coupure de 3 secondes de la liaison. +### Scripting avec tclsh + +Les appareils Cisco incluent tclsh, un shell contenant l'interpréteur Tcl. + +Il peut permettre par exemple de rapidement exécuter des pings à de multiples destinations : + +~~~ +Switch# tclsh +Switch(tcl)# foreach address { ++> 192.168.0.3 ++> 192.168.0.4 ++> 192.168.0.5 ++> } { ping $address repeat 3 } + +Type escape sequence to abort. +Sending 3, 100-byte ICMP Echos to 192.168.0.3, timeout is 2 seconds: +!!! +Success rate is 100 percent (3/3), round-trip min/avg/max = 5/10/21 ms +Type escape sequence to abort. +Sending 3, 100-byte ICMP Echos to 192.168.0.4, timeout is 2 seconds: +!!! +Success rate is 100 percent (3/3), round-trip min/avg/max = 1/7/15 ms +Type escape sequence to abort. +Sending 3, 100-byte ICMP Echos to 192.168.0.5, timeout is 2 seconds: +!!! +Success rate is 100 percent (3/3), round-trip min/avg/max = 1/2/5 ms +~~~ + ## Catalyst niveau 3 ### DHCP relay sur plusieurs VLANs