Tutorial 1 - Config Maker - Use it

The intention for this tool was to simplify the creation process of many similar text files like it is needed for router configuration.
We had a lot of projects with a central site and many remote sites where only IP addresses, hostnames, DLCI numbers... differ.
With this tool you can shortcut the fault-prone way to create each config per hand. Another benefit is that configs can be changed easily when the customer needs some enhancements in the last second.

Here I will describe step by step how to use this tool.

Download the used files here.



Step 1 - Create a pattern file:

The pattern file contains the configuration with placeholders for the variable data.

Example:

config.txt:

    hostname $hostname
   
!
 
  interface Loopback0
     ip address $lip 255.255.255.0
    
no shutdown
   
!
    interface Serial0.$dlci point-to-point
    
ip address $sip 255.255.255.252
    
frame-relay interface-dlci $dlci IETF
     !


Step 2 - Create the Data File:

The Data file contains the information which should be filled into the pattern file.
in our projects we always got an excel sheet with all sites from the customer or project management where all the needed information was included. This excel sheet can be saved as csv file which can be processed by wktools.

Example:

data.csv: 
    $hostname;$lip;$dlci;$sip 
    host1;10.1.1.1;100;10.1.2.1 
    host2;10.2.1.1;101;10.2.2.1 
    host3;10.3.1.1;102;10.3.2.1 


The variable names must be in the first line. In the following lines please place the associated values.
Make sure that no SPACES are at the end of any line.


Step 3 - Choose your Options

In the example we use "$hostname" for Filename Variable and "One file per line".


Step 4 - Start

Press Start Button to begin the process.




Step 5 - Result

A log can be found in the Output Tab. In our case it would look like the following:




The three files are the following:

hostname host1
!
interface Loopback0
ip address 10.1.1.1 255.255.255.0
no shutdown
!
interface Serial0.100 point-to-point
ip address 10.1.2.1 255.255.255.252
frame-relay interface-dlci 100 IETF
!

-----------------------------------------------------

hostname host2
!
interface Loopback0
ip address 10.2.1.1 255.255.255.0
no shutdown
!
interface Serial0.101 point-to-point
ip address 10.2.2.1 255.255.255.252
frame-relay interface-dlci 101 IETF
!

-----------------------------------------------------

hostname host3
!
interface Loopback0
ip address 10.3.1.1 255.255.255.0
no shutdown
!
interface Serial0.102 point-to-point
ip address 10.3.2.1 255.255.255.252
frame-relay interface-dlci 102 IETF
!