Configuration maker
From CT3
Configuration maker is a PERL script that creates initial router configurations from Dynagen network files and configuration templates (people with the right marketing streak might call them configlets) stored in an initialization file.
Contents |
Features
- Supports ROUTER, LAN and FRSW dynagen objects;
- Template-driven router configuration generation with PERL-like variable interpolation including:
- router-wide configuration
- router-to-router Ethernet link configuration
- multi-access (LAN) configuration
- router-to-router serial link (PPP) configuration
- Frame-relay interface configuration
- Frame-relay DLCI configuration
- host (NIO) interface configuration
- Automatic assignment of IP addresses from predefined pools to loopback, LAN and WAN interfaces
- Manual override of IP address assignment with extra keywords in the dynagen file
- Automatic per-subnet IP address calculation when only some devices in the IP subnet have manually-assigned IP addresses
Major omissions
- IP addresses (dynamic or static) are not assigned to Frame Relay subinterfaces. The only means of assigning IP address to a Frame Relay subinterface in the initial configuration is to use ip unnumbered command.
- Ethernet switch (ETHSW) is not supported.
More information
- Download the source code: Image:ConfigMaker.tar.gz
- Initialization file documentation
- Automatic IP address assignment
- Sample router configuration template
- Sample results
Prerequisites
- PERL 5.8 or later. It's included in most Unix/Linux distributions, on Windows platforms use the ActiveState ActivePerl.
- PERL modules Config::INI::Simple, Math::BigInt and Net::IP. Download them from CPAN.
Installation
- Download and unpack the source code from Image:ConfigMaker.tar.gz
- Edit the initialization file configMaker.ini. This file has to reside in the same directory as the configMaker.pl.
- Customize the configuration templates in simpleConfig.ini or create your own templates. Unless you change the settings in configMaker.ini, the router configuration templates should be in the same directory as configMaker.pl
Usage guidelines
Usage: configMaker.pl [-d] [-x] [-o outputDirectory] [-t templateFile] networkFile
Command line parameters:
- -o: output directory. If the parameter is not present, the router configuration files will be generated in the current directory;
- -t: overrides the default template file specified in the configMaker.ini. The template file's path is relative to the configMaker's directory;
- -d: enables debugging printouts
- -o: dumps parsed Dynagen file instead of creating router configurations. Used primarily for testing purposes.
Version history
- Release 0.2.1 (April 12th 2008)
- Recognize case-insensitive keywords ROUTER, FRSW and LAN
- Recognize device names with hyphens and underscores
- Release 0.2 (April 3rd 2008): added the support for IP address assignments
- Release 0.1 (January 2008): initial version
Author
© Ivan Pepelnjak, 2008
BlogMarks
del.icio.us
digg
Newsvine
reddit
Slashdot