Forum Discussion

rgordon_01's avatar
rgordon_01
Icon for Nimbostratus rankNimbostratus
Feb 07, 2018

Best way to configure new LTM to replace old with same settings but different ips

Here's what I'm trying to do. We purchased new LTMs to replace our existing EOL LTMs. Normally I would just take the UCS file and import it to the new LTM. I can't do that in this case because we are changing the network/subnet ips. I was trying to figure out the best way to do this. The main part I would like to get the info from the old is the virtual servers/pools. Would it be to copy the bigip.conf file to my laptop and then just go in and replace the virtual server ips and then copy the new edited bigip.conf to my new LTM? will that work or is there a better way to do this? Is the bigip.conf file all I need for the virtual servers? I'm ok with manually configuring the self ips and such.

 

7 Replies

  • Hi there,

    if the new F5 self-ip's are different but you're planning to keep the same IP's for the virtual servers (and I assume, the pool members) you can copy the current virtual servers and pools from the bigip.conf file of one of the old devices and save it in a text file (my_old_config.txt).

    Upload that .txt to the new F5's (config folder) after configuring the Self-IP's and then you can run:

    tmsh load sys config file my_old_config.txt merge verify
    

    The "verify" bit is key as it will just run this a test and will flag to you should there be any issue or inconsistency when combining the old config into the new device. it will flag if the old vips refer to any profiles or vlans that doesn't exist on the new devices.

    I think that for most profiles but the SSL ones, you can copy them also from the old bigip.conf (I'm sure that if there's a better way for that, someone will add to this answer). For SSL profiles, if any, you may want to ensure that the cert/keys are exported from the old devices.

    Once that command is happy (no errors), you can run it again without the "verify", in which case it will effectively merge the old config into the new bigip.conf file.

    tmsh load sys config file my_old_config.txt merge
    
  • Hi Robell, thanks for the quick response! I probably didn't explain it clearly enough but all or almost all of the ips will be changing. which includes VIPs, pool members, self ips, etc... The self ips aren't much to them so I don't mind setting up that part manually. What I wanted from the old was all the configs for the VIPs and pool members b/c that would take forever to do manually. I've copied the bigip.conf back and opened in notepad ++ and so far I've just done a find and replace for the first 3 octets on all the VIPs. My thoughts were I'd edit the bigip.conf and enter the new ips for VIPs and pools then REPLACE the new LTMs bigip.conf b/c nothing is configured yet on the new box. Would that not work? Is there something specific in that file for the new LTM? otherwise shouldn't I replace it instead of merge? and yeah, I haven't even got to the part with all the SSL profiles. ideally I'd like to copy that stuff over too if possible but trying to take this 1 step at a time. thanks!

     

  • Hi rgordon.

     

    I understand the logic and it makes sense to manually edit the old bigip.conf. But if you replace the ENTIRE bigip.conf file of the new F5 with the ENTIRE bigip.conf of the old F5, you'll have to do a "tmsh load sys config" and hope it all loads just fine (I'm unsure it will) and even if it does all sort of things can go wrong.

     

    I would try the merge option described before as it will tell you what's required to make the old config work on the new device without actually breaking anything :) and will give you more control over the config.

     

    You could even break the old file down in different smaller text files (one with just the nodes and pools for example) and run the merge verify on that, then do the profiles, vips, etc.

     

    Rgds,

     

  • Now I understand. Thanks for the explanation! Your way sounds better. I will do it your way.

     

  • you can do like that

    • import UCS file with command
      tmsh load sys ucs  platform-migrate
      . look this article.
    • extract virtual server list with tmsh commands:

      list ltm virtual one-line

    • edit all records in text editor (like notepad++) to change IPs

    • import all records with

      load sys config merge from-terminal

    • create new VLANs

    • create new self IPs
  • This worked for me!

     

    tmsh load sys config file my_old_config.txt merge

     

    thanks Robell!

     

  • This worked for me!

     

    tmsh load sys config file my_old_config.txt merge

     

    thanks Robell!