Configuration automatique d’un équipement sous dynagen
Voici deux petites options bien pratiques:
cnfg= et configuration=, toutes les deux à placer dans une section device.
cnfg permet d’indiquer un fichier text contenant la configuration du routeur (show running-config) et la seconde accepte la configuration encodée en base 64.
Exemple de configuration
Prenons une configuration de base.
Current configuration : 604 bytes ! version 12.2 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname Router ! logging queue-limit 100 ! memory-size iomem 15 ip subnet-zero ! ! ! mpls ldp logging neighbor-changes ! ! ! ! ! ! ! ! ! no voice hpi capture buffer no voice hpi capture destination ! ! mta receive maximum-recipients 0 ! ! ! ! interface FastEthernet0/0 no ip address shutdown duplex auto speed auto ! ip http server ip classless ! ! ! ! ! call rsvp-sync ! ! mgcp profile default ! ! ! dial-peer cor custom ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end
Exemple avec cnfg
Imaginons que j’aie mis cette configuration dans un fichier appelé rtr1.txt
Mon fichier dynagen pourrait ressembler à ceci:
ghostios = True sparsemem = True [localhost] [[3660]] image = ..\images\C3660-JK.BIN ram = 128 idlepc = 0x604eb02c [[ROUTER rtr1]] model = 3660 cnfg=rtr1.txt
L’avantage de cette solution est que l’on peut modifier le fichier de configuration sans lancer dynagen. Par contre, il faut sauvegarder nos changements dans ce fichiers (write mem ou copy run start ne fonctionneront pas…)
Exemple avec configuration
Utilisez un encodeur base64, par exemple: http://www.paulschou.com/tools/xlate/
Je parse ma config, mon fichier .net ressemblerai à ça:
ghostios = True sparsemem = True [localhost] [[3660]] image = ..\images\C3660-JK.BIN ram = 128 idlepc = 0x604eb02c [[ROUTER rtr1]] model = 3660 configuration=Q3VycmVudCBjb25maWd1cmF0aW9uIDogNjA0IGJ5dGVzDQohDQp2ZXJzaW9uIDEyLjINCnNlcnZpY2UgdGltZXN0YW1wcyBkZWJ1ZyBkYXRldGltZSBtc2VjDQpzZXJ2aWNlIHRpbWVzdGFtcHMgbG9nIGRhdGV0aW1lIG1zZWMNCm5vIHNlcnZpY2UgcGFzc3dvcmQtZW5jcnlwdGlvbg0KIQ0KaG9zdG5hbWUgUm91dGVyDQohDQpsb2dnaW5nIHF1ZXVlLWxpbWl0IDEwMA0KIQ0KbWVtb3J5LXNpemUgaW9tZW0gMTUNCmlwIHN1Ym5ldC16ZXJvDQohDQohDQohDQptcGxzIGxkcCBsb2dnaW5nIG5laWdoYm9yLWNoYW5nZXMNCiENCiENCiENCiENCiENCiENCiENCiENCiENCm5vIHZvaWNlIGhwaSBjYXB0dXJlIGJ1ZmZlcg0Kbm8gdm9pY2UgaHBpIGNhcHR1cmUgZGVzdGluYXRpb24NCiENCiENCm10YSByZWNlaXZlIG1heGltdW0tcmVjaXBpZW50cyAwDQohDQohDQohDQohDQppbnRlcmZhY2UgRmFzdEV0aGVybmV0MC8wDQogbm8gaXAgYWRkcmVzcw0KIHNodXRkb3duDQogZHVwbGV4IGF1dG8NCiBzcGVlZCBhdXRvDQohDQppcCBodHRwIHNlcnZlcg0KaXAgY2xhc3NsZXNzDQohDQohDQohDQohDQohDQpjYWxsIHJzdnAtc3luYw0KIQ0KIQ0KbWdjcCBwcm9maWxlIGRlZmF1bHQNCiENCiENCiENCmRpYWwtcGVlciBjb3IgY3VzdG9tDQohDQohDQohDQohDQpsaW5lIGNvbiAwDQpsaW5lIGF1eCAwDQpsaW5lIHZ0eSAwIDQNCiENCiENCmVuZA==
L’avantage de ces solutions est que l’on peut aisément préconfigurer une topologie dynagen pour un scénario donné.
Recent Entries
- Reponse tardive aux commentaires
- CCIE #43827
- VRF-Aware GETVPN, DMVPN, et FLEXVPN Spoke To Spoke
- Mes articles sur supportforums
- Définir des « handlers » personnalisés pour associer les liens d’un protocole avec une application perso.
- DMVPN over GETVPN avec KS COOP (redondance) et KS Forwarding
- EAP-TLS avec Autorité de certification autonome (Standalone CA) sous Windows 2003
- Static subnet NAT avec VRF pour monter des ‘PODs’ (LAB)
- Capture WiFi en mode monitor sous windows, et capture par process
- Comment taper un point d’interrogation ‘?’ dans un mot de passe ?