cancel
Showing results for 
Search instead for 
Did you mean: 

Problem this snippet solves:

This scripts is built to convert Citrix Netscaler text based configuration files to BIG-IP commands. This scripts aim to reduce the largest burden of entering object names, IP addresses and other parameters, as well as logically linking these objects to each other. This script is not meant to perform a totally automated and unattended migration. For the objects that the script migrates, not all parameters may be converted. For the parameters that are converted, some are mapped to the closest matching BIG-IP feature.

If there are any non-ASCII characters or line-breaks in the source file, this will need to be manually fixed first (some screen captures may wrap lines so copying the file directly is preferred). All Netscaler commands are on a single line.

Note that this script will produce a comprehensive list of errors, warnings, notes, etc, at the bottom of the output file. You should look through these first, starting with the errors and working your way down to less critical messages. You may need to correct problems in the input file or in the Perl script and re-run the conversion. Once you have reviewed the warnings and notes, you should look through the configuration that was generated. The original Netscaler commands are provided for each portion of the BIG-IP configuration and you should compare the "before and after" for each object.

How to use this snippet:

To get command line config execute the following command on Netscaler:

  • more /nsconfig/ns.conf (Or you can secure copy it to your PC using something like winscp/pscp.)

Input restrictions:

  • Probably only supports Netscaler v7, v8, and v9

Output restrictions:

  • Outputs BIG-IP 9.4.x format (which v10 appears to read fine)
  • Output file contains warnings errors, base config, and main bigip.conf

It is best to have Active Perl on you PC to perform the conversions. You can also use the Perl installation on the BIG-IP command line.

Once the file is converted you can import the configuration into the BigIP using (b load, or b merge). You can also copy/paste into bpsh.

Read the header of each of the scripts files, they have addition information on the usage of the scripts.

Usage:

perl nsv8_to_f5.pl netscalerconfigfile /var/tmp/bigipoutputfile

Comments
Nath
Cirrostratus
Cirrostratus

Do you have the latest script for CItrix 11.X to F5 13.X version?

IsaiahH
Nimbostratus
Nimbostratus

Did you get a response? I need the same thing..

Sanjeev_Sharma
Nimbostratus
Nimbostratus

I am getting errors, warnings etc, at the bottom of the output file. Can someone guide me how I can resolve them or can someone share the updated Perl script which has the latest features and can reduce those errors for me?

madclicker
Nimbostratus
Nimbostratus

This script not seems to be for version 7-9 of Netscaler

madclicker
Nimbostratus
Nimbostratus

sorry it is tested on 7 to 9 and might not work on 10 or 11 etc

 

 

kailas
Nimbostratus
Nimbostratus

I tried but getting error

 

C:\Perl64\bin>perl nsv8_to_f5.pl netscalerconfigfile1.txt F5.backup1

Use of uninitialized value in string eq at nsv8_to_f5.pl line 1966, <INFILE> line 5498.

Use of uninitialized value in string eq at nsv8_to_f5.pl line 1966, <INFILE> line 5498.

Use of uninitialized value in string eq at nsv8_to_f5.pl line 1966, <INFILE> line 5498.

Use of uninitialized value in string eq at nsv8_to_f5.pl line 1966, <INFILE> line 5498.

Use of uninitialized value in string eq at nsv8_to_f5.pl line 1966, <INFILE> line 5498.

Use of uninitialized value in string eq at nsv8_to_f5.pl line 1966, <INFILE> line 5498.

Can't use an undefined value as an ARRAY reference at nsv8_to_f5.pl line 2090, <INFILE> line 5498.

 

 

Exactly at  if (($virtuals{$virtual}{'persistence'} eq 'source_addr') and $virtuals{$virtual}{'persistmask'}) {

   my $persist_name = "src_addr_$virtuals{$virtual}{'persistmask'}";

   $persist_profiles{$persist_name}{'name'} = $persist_name;

   $persist_profiles{$persist_name}{'type'} = 'source_addr';

   $persist_profiles{$persist_name}{'mode'} = 'source addr';

   $persist_profiles{$persist_name}{'mask'} = $virtuals{$virtual}{'persistmask'};

   push @{$persist_profiles{$persist_name}{'lines'}}, $virtuals{$virtual}{'lines'}[0];

   $virtuals{$virtual}{'persistence'} = $persist_name;

  }

 

some help me to correct this Please

 

 

SerG
Nimbostratus
Nimbostratus

Some problem

 

[ActiveState/ActivePerl-5.28] C:\Perl64>nsv8_to_f5.pl ns.conf out-to-f5

Can't use an undefined value as an ARRAY reference at C:\Perl64\nsv8_to_f5.pl line 2089, <INFILE> line 835.

Version history
Last update:
‎12-Mar-2015 09:47
Updated by:
Contributors