5
2008
Le show vlan ne fonctionne pas sur certains switch Cisco (Rancid)
Voici ma fonction shVlan du fichier bin/rancid
sub ShowVLAN {
print STDERR ” In ShowVLAN: $_” if ($debug);#($_=<INPUT>,return(1)) if (!$DO_SHOW_VLAN);
while (<INPUT>) {
tr/ 15//d;
last if (/^$prompt/);
next if (/^(s*|s*$cmds*)$/);
return(1) if /Line has invalid autocommand /;
return(1) if /(Invalid input detected|Type help or )/;
return(1) if /Ambiguous command/i;
# newer releases (~12.1(9)) place the vlan config in the normal
# configuration (write term).
return(-1) if (/command authorization failed/i);
# the pager can not be disabled per-session on the PIX
if (/^(<;-+ More -+>;)/) {
my($len) = length($1);
s/^$1s{$len}//;
}
ProcessHistory(“COMMENTS”,”keysort”,”IO”,”!VLAN: $_”);
}
ProcessHistory(“COMMENTS”,”keysort”,”IO”,”!n”);
return(0);}
Cette fonction m’a permis de résoudre mon problème.
Laissez un commentaire
Publicité :)
Articles récents
- Grep – Extraire toutes les adresses IP d’un fichier text, Json, etc…
- Failed to Start File System Check – Vcenter 7
- Powershell – Se connecter à l’active directory depuis un poste windows 11
- Powershell – Autoriser l’exécution de scripts non signés
- Powershell – Changer le domaine des adresses emails de tous les utilisateurs AD
Partenaires
Mot-clefs
Mes derniers tweets
-
RT @BSE_Anoss: Lancement de #Starwheels le 19 Juin à 20h30 sur twitch/oganoss ! C'est mon plus gros projet, j’espère que vous sere… https://t.co/NjLCKbaHXA