fir3net
PPS-Firenetbanner-780.5x190-30-03-17

How do I to rename a Virtual Server on a F5 LTM ?

Below provides the steps rename a virtual server, pool or any other object within the configuration of a F5 LTM. The steps provided involve the editing of the (bigip.conf) configuration file. This file is then verified for any potential issues before it is loaded and committed to the F5 LTM`s running configuration.

Backup Configuration

First of we back up the configuration.

cp bigip.conf bigip.conf.bak

Change Name

Next we amend the old object name with its new name. The -i option ensures that the changes are saved to the bigip.conf file.

sed -i 's/[OLD NAME]/[NEW NAME]/g' bigip.conf

Verify Configuration

We then verfiy the configuration to ensure we don't get any nasty surprises at the point of loading the new configuration.

b verify load

Commit Configuration

Finally we commit the new configuration to the running configuration.

b load

Example

[root@f5-ltm:Active] config # b virtual list
virtual VS-FOWARD-TEST {
   ip forward
   destination any:any
   mask 0.0.0.0
   rules IRULE-SNAT
   vlans {
      EXTERNAL
      INTERNAL
   } enable
}

[root@f5-ltm:Active] config # cp bigip.conf bigip.conf.bak
[root@f5-ltm:Active] config # sed -i 's/VS-FOWARD-TEST/VS-FOWARD-PRODUCTION/g' bigip.conf

[root@f5-ltm:Active] config # b verify load
Reading configuration from /config/low_profile_base.conf.
Reading configuration from /defaults/config_base.conf.
Reading configuration from /config/bigip_sys.conf.
Reading configuration from /config/bigip_base.conf.
Reading configuration from /usr/share/monitors/base_monitors.conf.
Reading configuration from /config/profile_base.conf.
Reading configuration from /config/daemon.conf.
Reading configuration from /config/bigip.conf.
Reading configuration from /config/bigip_local.conf.
Validating the configuration ...

[root@f5-ltm:Active] config # b load
Reading configuration from /config/low_profile_base.conf.
Reading configuration from /defaults/config_base.conf.
Reading configuration from /config/bigip_sys.conf.
Reading configuration from /config/bigip_base.conf.
Reading configuration from /usr/share/monitors/base_monitors.conf.
Reading configuration from /config/profile_base.conf.
Reading configuration from /config/daemon.conf.
Reading configuration from /config/bigip.conf.
Reading configuration from /config/bigip_local.conf.
Loading the configuration ...

[root@f5-ltm:Active] config # b virtual list
virtual VS-FOWARD-PRODUCTION {
   ip forward
   destination any:any
   mask 0.0.0.0
   rules IRULE-SNAT
   vlans {
      EXTERNAL
      INTERNAL
   } enable
}

v11.x Update

As the bigpipe commands have now been deprecated with v11.x. When using v11.x replace the following bigpipe commands with the equivalent tmsh commands,

 BIGPIPE TMSH
b verify load load sys config verify
b load load sys config partitions all

About the Author

RDonato

R Donato

Rick Donato is the Founder and Chief Editor of Fir3net.com. He currently works as a Principal Network Security Engineer and has a keen interest in automation and the cloud.

You can find Rick on Twitter @f3lix001