27 June 2013

F5 Renaming and editing existing objects such as nodes, pools and virtual servers

Some object allow you to change certain parameters, but as a general rule, once an object has been created is is fixed and cannot be altered or renamed in the GUI.  Sometimes this is just a nuance, but sometimes it can set off a shuffle of creating and deleting temporary object just so you can reuse the name.

As an example I am going to step through changing the IP address of an existing node.  The follow can all be done directly from the shell.

  • SSH onto BigIP as root

Next up you have to find the correct bigip.conf file.  Depending on whether you have management partitions or not they will be in either:

/config  or
/config/partitions/partitionname

Start off by making a backup of the file

  • cp bigip.conf bigip.conf.bak

The easiest way to edit the file in the shell is with nano.  Open the file for editing the with the following command:

  • nano bigip.conf

The file is fairly easy to interpret and understand.  take some time to get used to the structure before you make any changes.


Find and replace for the IP address or the node name you want to change. I would suggest this over manually scrolling through the file - just in case you  miss an entry.

  • Ctrl W will bring up the search bar
  • Ctrl R will allow you to specify the text you want to replace (The current IP addess of the node), press enter and it will allow you to specify the text to replace it with (the new IP address of the node)
  • It will now prompt you for each replace unless you select all at the first prompt
  • Once the changes are all made you can exit nano with Ctrl X, this will also prompt you to save the file
You can verify that your config file is correct with the following command:

  • tmsh load sys config verify partitions all
If no errors are reported you can apply the new config with the following command:

  • tmsh load sys config partitions all
If you refresh the GUI you will now see that the change is reflected.

That's all there is to it!

****

A more user friendly, if slightly more long winded way of doing this is to use WinSCP.  Connect to the bigip and browse to the relevant partition. Right click the file - copy and then edit the original.


You would still need to execute the following command from the shell once changes are made
  • tmsh load sys config verify partitions all
  • tmsh load sys config partitions all
Hopefully this comes in handy some time and saves you some effort.

1 comment:

Anonymous said...

This is great mate thanks. Really saves alot of time. Why you cant edit or even rename things in the GUI is baffling to me

Post a Comment