Forum Discussion

Andrew_Pearce_4's avatar
Andrew_Pearce_4
Icon for Nimbostratus rankNimbostratus
May 14, 2012

assistance in migrating css to f5

Hi and thanks in advance for viewing and assisting me out here.

 

 

I am trying to migrate a old css to a new ltm running version 11.1

 

I have no experience of the css's and have been "volunteered" to migrate them.

 

 

I found the migration scripts on dev central.

 

 

I got an error when I first ran the script. That error was that it could not find the file switch.pm

 

 

So i moved the css-config file to the same directory that switch.pm resides in.

 

c:\perl64\lib\cgi

 

 

I re-ran the file and now I get a whole load more errors.

 

 

C:\Perl64\lib\CGI>css2f5-v11.pl css-a-config.txt > ltm-1.conf

 

String found where operator expected at C:\Perl64\lib\CGI\css2f5-v11.pl line 44,

 

near "case "255.255.255.0""

 

(Do you need to predeclare case?)

 

String found where operator expected at C:\Perl64\lib\CGI\css2f5-v11.pl line 45,

 

near "case "255.255.0.0""

 

(Do you need to predeclare case?)

 

String found where operator expected at C:\Perl64\lib\CGI\css2f5-v11.pl line 46,

 

near "case "0.0.0.0""

 

(Do you need to predeclare case?)

 

String found where operator expected at C:\Perl64\lib\CGI\css2f5-v11.pl line 47,

 

near "case "255.255.255.255""

 

(Do you need to predeclare case?)

 

String found where operator expected at C:\Perl64\lib\CGI\css2f5-v11.pl line 48,

 

near "case "255.255.255.128""

 

(Do you need to predeclare case?)

 

String found where operator expected at C:\Perl64\lib\CGI\css2f5-v11.pl line 49,

 

near "case "255.255.255.192""

 

(Do you need to predeclare case?)

 

String found where operator expected at C:\Perl64\lib\CGI\css2f5-v11.pl line 50,

 

near "case "255.255.255.224""

 

(Do you need to predeclare case?)

 

String found where operator expected at C:\Perl64\lib\CGI\css2f5-v11.pl line 51,

 

near "case "255.255.255.240""

 

(Do you need to predeclare case?)

 

String found where operator expected at C:\Perl64\lib\CGI\css2f5-v11.pl line 52,

 

near "case "255.255.255.252""

 

(Do you need to predeclare case?)

 

String found where operator expected at C:\Perl64\lib\CGI\css2f5-v11.pl line 53,

 

near "case "255.255.255.248""

 

(Do you need to predeclare case?)

 

String found where operator expected at C:\Perl64\lib\CGI\css2f5-v11.pl line 99,

 

near "case "username""

 

(Do you need to predeclare case?)

 

String found where operator expected at C:\Perl64\lib\CGI\css2f5-v11.pl line 106

 

, near "case "circuit""

 

(Do you need to predeclare case?)

 

String found where operator expected at C:\Perl64\lib\CGI\css2f5-v11.pl line 122

 

, near "case "ip""

 

(Do you need to predeclare case?)

 

syntax error at C:\Perl64\lib\CGI\css2f5-v11.pl line 43, near ") {"

 

syntax error at C:\Perl64\lib\CGI\css2f5-v11.pl line 45, near "case "255.255.0.0

 

""

 

Can't use global @_ in "my" at C:\Perl64\lib\CGI\css2f5-v11.pl line 59, near "=@

 

_"

 

syntax error at C:\Perl64\lib\CGI\css2f5-v11.pl line 65, near "}"

 

syntax error at C:\Perl64\lib\CGI\css2f5-v11.pl line 70, near "exit }"

 

syntax error at C:\Perl64\lib\CGI\css2f5-v11.pl line 97, near ") {"

 

syntax error at C:\Perl64\lib\CGI\css2f5-v11.pl line 102, near "} else"

 

syntax error at C:\Perl64\lib\CGI\css2f5-v11.pl line 120, near "}"

 

syntax error at C:\Perl64\lib\CGI\css2f5-v11.pl line 126, near "}"

 

syntax error at C:\Perl64\lib\CGI\css2f5-v11.pl line 130, near "}"

 

C:\Perl64\lib\CGI\css2f5-v11.pl has too many errors.

 

 

C:\Perl64\lib\CGI>

 

 

 

 

Can anyone assist me in getting the script to work.

 

 

Many Thanks in advance

 

 

Andrew

 

 

 

 

 

 

7 Replies

  • John_Alam_45640's avatar
    John_Alam_45640
    Historic F5 Account
    Andrew,

     

    Some versions of the TCL do not include the switch command any more. I will fix the script and upload it to devcentral again.

     

     

    I will notify you when the new version is available.

     

     

    John
  • I performed two successful migrations from CSS to F5 and I also used the F5 conversion script, beware as it doesnt convert everything.

     

     

    Some examples are the CSS NAT Groups, CSS ACL's (In the F5 world these are forwarders)

     

    Some of the CSS keepalive checks (F5 world monitors)

     

  • Andrew if you have any questions let me know I can help out if needed
  • John_Alam_45640's avatar
    John_Alam_45640
    Historic F5 Account
    I just uploaded the new version:

     

    https://devcentral.f5.com/wiki/GetFile.aspx?Page=AdvDesignConfig.Cisco&File=css2f5-tmsh.zip

     

     

    This latest version avoids the "switch.pm" issue and uses tmsh commands.

     

     

    also available From this link:

     

    https://devcentral.f5.com/wiki/AdvDesignConfig.Cisco.ashx?NoRedirect=1&NS=AdvDesignConfig

     

     

    let us know how it works.
  • How many VIP's are on the CSS? If there aren't thousands, I would recommend doing it by hand. Not everything transfers over 1:1. I just took my CSS running-config on one screen and re-built everything on the F5. That way you can make sure everything is moved over perfectly.
  • Hi

     

    I'm running activeperl version 5.14.2 on windows 7 64bit.

     

    I'm getting the below errors while running the script:

     

    C:\Downloads\F5>css2f5-tmsh.pl css2.txt

     

    Global symbol "$exceptions_file" requires explicit package name at C:\Downloads\

     

    F5\css2f5-tmsh.pl line 76.

     

    Global symbol "$exceptions_file" requires explicit package name at C:\Downloads\

     

    F5\css2f5-tmsh.pl line 78.

     

    Global symbol "$exceptions_file" requires explicit package name at C:\Downloads\

     

    F5\css2f5-tmsh.pl line 80.

     

    Global symbol "@pool_list" requires explicit package name at C:\Downloads\F5\css

     

    2f5-tmsh.pl line 81.

     

    Global symbol "@virt_list" requires explicit package name at C:\Downloads\F5\css

     

    2f5-tmsh.pl line 82.

     

    Global symbol "@unique_VIP_list" requires explicit package name at C:\Downloads\

     

    F5\css2f5-tmsh.pl line 83.

     

    Global symbol "@pools" requires explicit package name at C:\Downloads\F5\css2f5-

     

    tmsh.pl line 84.

     

    Global symbol "@virtuals" requires explicit package name at C:\Downloads\F5\css2

     

    f5-tmsh.pl line 85.

     

    Global symbol "@servers" requires explicit package name at C:\Downloads\F5\css2f

     

    5-tmsh.pl line 86.

     

    Global symbol "$policy_count" requires explicit package name at C:\Downloads\F5\

     

    css2f5-tmsh.pl line 87.

     

    Global symbol "$virt_count" requires explicit package name at C:\Downloads\F5\cs

     

    s2f5-tmsh.pl line 88.

     

    Global symbol "$pool_count" requires explicit package name at C:\Downloads\F5\cs

     

    s2f5-tmsh.pl line 89.

     

    Global symbol "$policy_count" requires explicit package name at C:\Downloads\F5\

     

    css2f5-tmsh.pl line 90.

     

    Global symbol "@ssl_servers" requires explicit package name at C:\Downloads\F5\c

     

    ss2f5-tmsh.pl line 91.

     

    Global symbol "$one" requires explicit package name at C:\Downloads\F5\css2f5-tm

     

    sh.pl line 98.

     

    Global symbol "$two" requires explicit package name at C:\Downloads\F5\css2f5-tm

     

    sh.pl line 98.

     

    Global symbol "$three" requires explicit package name at C:\Downloads\F5\css2f5-

     

    tmsh.pl line 98.

     

    Global symbol "$four" requires explicit package name at C:\Downloads\F5\css2f5-t

     

    msh.pl line 98.

     

    Global symbol "$five" requires explicit package name at C:\Downloads\F5\css2f5-t

     

    msh.pl line 98.

     

    Global symbol "$six" requires explicit package name at C:\Downloads\F5\css2f5-tm

     

    sh.pl line 98.

     

    Global symbol "$seven" requires explicit package name at C:\Downloads\F5\css2f5-

     

    tmsh.pl line 98.

     

    Global symbol "$eight" requires explicit package name at C:\Downloads\F5\css2f5-

     

    tmsh.pl line 98.

     

    Global symbol "$nine" requires explicit package name at C:\Downloads\F5\css2f5-t

     

    msh.pl line 98.

     

    Global symbol "$ten" requires explicit package name at C:\Downloads\F5\css2f5-tm

     

    sh.pl line 98.

     

    Global symbol "$one" requires explicit package name at C:\Downloads\F5\css2f5-tm

     

    sh.pl line 100.

     

    Global symbol "$two" requires explicit package name at C:\Downloads\F5\css2f5-tm

     

    sh.pl line 103.

     

    Global symbol "$two" requires explicit package name at C:\Downloads\F5\css2f5-tm

     

    sh.pl line 103.

     

    Global symbol "$two" requires explicit package name at C:\Downloads\F5\css2f5-tm

     

    sh.pl line 104.

     

    Global symbol "%users" requires explicit package name at C:\Downloads\F5\css2f5-

     

    tmsh.pl line 106.

     

    Global symbol "$two" requires explicit package name at C:\Downloads\F5\css2f5-tm

     

    sh.pl line 106.

     

    Global symbol "$two" requires explicit package name at C:\Downloads\F5\css2f5-tm

     

    sh.pl line 106.

     

    Global symbol "%vlans" requires explicit package name at C:\Downloads\F5\css2f5-

     

    tmsh.pl line 110.

     

    Global symbol "$two" requires explicit package name at C:\Downloads\F5\css2f5-tm

     

    sh.pl line 110.

     

    Global symbol "$two" requires explicit package name at C:\Downloads\F5\css2f5-tm

     

    sh.pl line 110.

     

    Global symbol "$i" requires explicit package name at C:\Downloads\F5\css2f5-tmsh

     

    .pl line 111.

     

    Global symbol "$mask" requires explicit package name at C:\Downloads\F5\css2f5-t

     

    msh.pl line 117.

     

    Global symbol "%selfip" requires explicit package name at C:\Downloads\F5\css2f5

     

    -tmsh.pl line 118.

     

    Global symbol "$mask" requires explicit package name at C:\Downloads\F5\css2f5-t

     

    msh.pl line 118.

     

    Global symbol "$two" requires explicit package name at C:\Downloads\F5\css2f5-tm

     

    sh.pl line 118.

     

    Global symbol "$i" requires explicit package name at C:\Downloads\F5\css2f5-tmsh

     

    .pl line 120.

     

    Global symbol "$i" requires explicit package name at C:\Downloads\F5\css2f5-tmsh

     

    .pl line 121.

     

    Global symbol "$two" requires explicit package name at C:\Downloads\F5\css2f5-tm

     

    sh.pl line 126.

     

    Global symbol "$mask" requires explicit package name at C:\Downloads\F5\css2f5-t

     

    msh.pl line 127.

     

    Global symbol "$four" requires explicit package name at C:\Downloads\F5\css2f5-t

     

    msh.pl line 127.

     

    Global symbol "%routes" requires explicit package name at C:\Downloads\F5\css2f5

     

    -tmsh.pl line 128.

     

    Global symbol "$three" requires explicit package name at C:\Downloads\F5\css2f5-

     

    tmsh.pl line 128.

     

    Global symbol "$four" requires explicit package name at C:\Downloads\F5\css2f5-t

     

    msh.pl line 128.

     

    Global symbol "$three" requires explicit package name at C:\Downloads\F5\css2f5-

     

    tmsh.pl line 128.

     

    Global symbol "$mask" requires explicit package name at C:\Downloads\F5\css2f5-t

     

    msh.pl line 128.

     

    Global symbol "$three" requires explicit package name at C:\Downloads\F5\css2f5-

     

    tmsh.pl line 128.

     

    Global symbol "$mask" requires explicit package name at C:\Downloads\F5\css2f5-t

     

    msh.pl line 128.

     

    Global symbol "$five" requires explicit package name at C:\Downloads\F5\css2f5-t

     

    msh.pl line 128.

     

    Global symbol "$two" requires explicit package name at C:\Downloads\F5\css2f5-tm

     

    sh.pl line 130.

     

    Global symbol "$three" requires explicit package name at C:\Downloads\F5\css2f5-

     

    tmsh.pl line 130.

     

    Global symbol "$mask" requires explicit package name at C:\Downloads\F5\css2f5-t

     

    msh.pl line 131.

     

    Global symbol "$five" requires explicit package name at C:\Downloads\F5\css2f5-t

     

    msh.pl line 131.

     

    Global symbol "%routes" requires explicit package name at C:\Downloads\F5\css2f5

     

    -tmsh.pl line 132.

     

    Global symbol "$four" requires explicit package name at C:\Downloads\F5\css2f5-t

     

    msh.pl line 132.

     

    Global symbol "$five" requires explicit package name at C:\Downloads\F5\css2f5-t

     

    msh.pl line 132.

     

    Global symbol "$four" requires explicit package name at C:\Downloads\F5\css2f5-t

     

    msh.pl line 132.

     

    Global symbol "$mask" requires explicit package name at C:\Downloads\F5\css2f5-t

     

    msh.pl line 132.

     

    Global symbol "$four" requires explicit package name at C:\Downloads\F5\css2f5-t

     

    msh.pl line 132.

     

    Global symbol "$mask" requires explicit package name at C:\Downloads\F5\css2f5-t

     

    msh.pl line 132.

     

    Global symbol "$six" requires explicit package name at C:\Downloads\F5\css2f5-tm

     

    sh.pl line 132.

     

    syntax error at C:\Downloads\F5\css2f5-tmsh.pl line 137, near "when "interface""

     

    C:\Downloads\F5\css2f5-tmsh.pl has too many errors.

     

     

    I edit the script with the below changes in order to overcome the "swich" errors:

     

    I comment the line "use Switch 'Perl6';" and added the line "use 5.14.2;" instead.

     

    I added the "(" for all the when line like - when ("255.255.255.0") { return "24"}

     

    Will you be able to help with the script?