You should consider using this procedure under the following condition:
- You want to create or modify BIG-IP configuration objects by merging the configuration changes into the existing running configuration from a text file or from the terminal.
Original Publication Date: Dec 20, 2017
Updated Date: Feb 22, 2018
You should consider using this procedure under the following condition:
You can change the behavior of the tmsh load sys config command with the merge option. During a configuration load, instead of replacing the entire BIG-IP configuration, the merge option allows you to merge configuration changes that you specify in a text file or from the terminal into the existing running configuration. You can create or modify BIG-IP configuration objects with a merge operation. This option can be very helpful when you want to create a large number of configuration objects on the BIG-IP system in one operation.
The following procedures assume you have included the administrative partition path in the object names and the object references of the BIG-IP configuration that you plan to merge. If the administrative partition path is omitted in configuration objects, the system creates or modifies the object in the current administrative partition or looks for the reference to an object in the current administrative partition. The following example shows a configuration object that does not include the administrative partition path in the object name or in the Virtual Local Area Network (VLAN) referenced by the vlan property:
net self example_self {
address 10.250.250.1/24
allow-service {
default
}
traffic-group /Common/traffic-group-local-only
vlan example_vlan
}
To change the current administrative partition from the TMOS Shell (tmsh), use the following command syntax:
cd </path/to/partition>
In this example if you wanted to merge example_self into the configuration in example_partition you would need to change to this administrative partition using the cd command mentioned previously. For example:
cd /example_partition
The VLAN referenced in the vlan property would need to reside in the example_partition or you would need to add the full administrative partition path.
The following example shows BIG-IP configuration objects that include the administrative partition path in the object names and object references. The example also illustrates that you can merge configuration objects into multiple different administrative partitions in a single merge operation by specifying the full path in the object name:
net self /Common/example_self {
address 10.250.250.1/24
allow-service {
default
}
traffic-group /Common/traffic-group-local-only
vlan /Common/example_vlan
}
net self /example_partition/example_self_2 {
address 10.251.251.1/24
allow-service {
default
}
traffic-group /Common/traffic-group-local-only
vlan /example_partition/example_vlan_2
}
Since the path is specified in the object name, you can run the tmsh load sys config merge command from any administrative partition. For example, when you issue the command, if the current administrative partition is Common, the example_self_2 self IP will merge into the example_partition as specified and not the Common partition. The result of a merge operation in the context of the previous example is the system will create and merge example_self self IP into the running configuration in the Common administrative partition and create and merge example_self_2 into the running configuration in the example_partition administrative partition. The tmsh save sys config command saves the changes you merge in the running configuration to disk.
Modifying existing configuration objects with a merge operation
In addition to creating objects, you can also modify existing configuration objects with a merge operation. For example, you want to replace the pool on the following virtual server:
ltm virtual /Common/example_vs {
destination /Common/172.16.1.1:0
ip-protocol tcp
mask 255.255.255.255
pool /Common/example_pool
profiles {
/Common/tcp { }
}
source 0.0.0.0/0
source-address-translation {
type automap
}
translate-address enabled
translate-port disabled
}
Ensuring the object path and name match, you can merge the following stanza with a change to the value of the pool property:
ltm virtual /Common/example_vs {
destination /Common/172.16.1.1:0
ip-protocol tcp
mask 255.255.255.255
pool /Common/another_pool
profiles {
/Common/tcp { }
}
source 0.0.0.0/0
source-address-translation {
type automap
}
translate-address enabled
translate-port disabled
}
Prerequisites
You must meet the following prerequisite to use this procedure:
Procedures
Merging a BIG-IP configuration from a specified file into the running configuration
To load the configuration from a specified file and merge its contents into the running configuration, perform the following procedure:
Impact of procedure: Performing the following procedure modifies the running configuration on your BIG-IP system.
tmsh
load /sys config merge file <filename> verify
For example, to validate the file example_config.inc, type the following command:
load /sys config merge file example_config.inc verify
If the system finds configuration errors, it reports them on the command line.
Note: For loading a file with a relative path in shell mode, the system uses the default directory, /var/local/scf. For loading a file with a relative path in bash mode, the system first searches the current directory, and if the system can't find the file in the current directory, it searches /var/local/scf. If the file is not stored in the default directory or the current directory, you can specify the full path to the file. For example: load /sys config merge file /var/tmp/example_config.inc.
load /sys config merge file <filename>
For example, to merge the configuration in the file example_config.inc into the running configuration, type the following command:
load /sys config merge file example_config.inc
save /sys config
Merging a BIG-IP configuration from the terminal into the running configuration
To load the configuration from the terminal and merge it into the running configuration, perform the following procedure:
Impact of procedure: Performing the following procedure modifies the running configuration on your BIG-IP system.
tmsh
load /sys config merge from-terminal verify
The prompt displays the following message:
Enter configuration. Press CTRL-D to submit or CTRL-C to cancel.
Validating configuration...
If the system finds configuration errors, it reports them on the command line.
load /sys config merge from-terminal
The prompt displays the following message:
Enter configuration. Press CTRL-D to submit or CTRL-C to cancel.
Loading configuration...
save /sys config
Applies to:
Product: BIG-IP, BIG-IP AAM, BIG-IP AFM, BIG-IP Analytics, BIG-IP APM, BIG-IP ASM, BIG-IP DNS, BIG-IP FPS, BIG-IP GTM, BIG-IP Link Controller, BIG-IP LTM, BIG-IP PEM
13.X.X, 12.X.X, 11.X.X
Feedback? Login to give feedback on this article.