Applies To:

Show Versions Show Versions

Manual Chapter: Working with Single Configuration Files
Manual Chapter
Table of Contents   |   << Previous Chapter   |   Next Chapter >>

The single configuration file feature allows you to save the configuration of a BIG-IP® system in a single, flat, text file. You can then use the text file to easily replicate the configuration across multiple BIG-IP systems. This not only saves you time, but also allows you to create a consistent, secure, comprehensive local traffic management environment on your network.
Important: Before you begin working with the SCF feature, it is important to understand the two states of BIG-IP system configuration data: the stored configuration and the running configuration. For more information, see Chapter 5, Managing the BIG-IP System Configuration State.
A single configuration file (SCF) is a flat, text file that contains a series of bigpipe commands, and the attributes and values of those commands, that reflect the configuration of the BIG-IP system. Specifically, the SCF contains the local traffic management and TMOS® configuration of the BIG-IP system. Figure 6.1 shows a small part of a sample SCF.
You use the bigpipe utility to create and work with single configuration files. You create an SCF using the command export. When you run the command export, the bigpipe utility gathers all of the commands, (and their attributes and values), that compose the running configuration, and saves this configuration in a file with the extension.scf. (For detailed information, see Creating a single configuration file.) You then use the command import to apply the configuration contained in the SCF to another BIG-IP system.
When you run the command import on a BIG-IP system, the bigpipe utility first saves the systems stored configuration in a backup file, and then resets the systems running configuration using the information contained in the SCF that you are importing. It is important to understand that to write the new running configuration to the systems stored configuration you must run the command save all after you run the command import.
Warning: Never copy the contents of an SCF and paste it onto the command line in order to configure a system. Always use the import command to configure a system using an SCF, for example, import myconfiguration.scf.
Tip: If you create an SCF file twice (on two different occasions), you can compare the contents of the two files. To do this, you use the bigpipe config diff command.
As stated in the previous section, when you run the bigpipe import command on a BIG-IP system, the bigpipe utility first saves the systems running configuration in a backup file, named /var/local/scf/backup.scf.
If a backup SCF already exists, the bigpipe utility appends a number to the name of the existing backup file, and then creates a new backup file. Thus:
The first time the system backs up the running configuration during an import operation, the system names the backup file /var/local/scf/backup.scf.
The next time the system backs up the running configuration, the system renames the file /var/local/scf/backup.scf to /var/local/scf/backup-1.scf. and creates a new file named /var/local/scf/backup.scf.
If you import an SCF a third time, the system renames the file /var/local/scf/backup-1.scf to /var/local/scf/backup-2.scf, renames the file /var/local/scf/backup.scf to /var/local/scf/backup-1.scf, and once again creates a new file named /var/local/scf/backup.scf.
By default, the system only saves two backup SCFs. You can configure the system to save a different number of backup files using the
bigpipe cli import save <integer> command. For more information on using this command, see the Bigpipe Utility Reference Guide.
You use the bigpipe commands export and import to create and work with an SCF. You use the bigpipe commands save and load to affect the running and stored configurations of the BIG-IP system. Table 6.1 compares the use of these four commands.
Table 6.1 Comparison of the bigpipe commands export, import, save, and load
bigpipe
Command
Use the export command to create an SCF that you can then use to configure another BIG-IP system using the import command.
It is important to note that the export command does not affect the running or stored configurations of the BIG-IP system upon which you run the command; the export command simply saves the running configuration to an SCF.
For more information about the parameters that you can use with the export command, see the Bigpipe Utility Reference Guide.
Use the import command to replace the entire running configuration of a BIG-IP system with the values in the SCF that you are importing. You must then use the save all command to write the running configuration to the stored configuration.
For more information about the parameters that you can use with the import command, see the Bigpipe Utility Reference Guide.
Use the save all command to write the running configuration to the configuration files that contain the stored configuration. For example, if you add a new NTP server to your network, and then use the ntp command to configure that server on the BIG-IP system, you must then run the save all command to save this change to the stored configuration.
Important: When you want to save to the stored configuration changes that you make to the system, F5 Networks® recommends that you use the save all command.
For more information about the parameters that you can use with the save command, see the Bigpipe Utility Reference Guide or the Traffic Management Shell (tmsh) Reference Guide.
Use the load command to replace the entire running configuration of a BIG-IP system with the values contained in the stored configuration. For example, when you use the bigpipe utility to make changes to the system, the running configuration contains those changes. If you decide that you do not want the running configuration to contain those changes, run the load command.
For more information about the parameters that you can use with the load command, see the Bigpipe Utility Reference Guide or the Traffic Management Shell (tmsh) Reference Guide.
You use the command bigpipe export to create an SCF. This command saves the running configuration of the system in a flat, text file with a specified name and the extension .scf.
Warning: The command bigpipe export is independent of, and distinct from, the command bigpipe save all command. The command bigpipe export does not save the running configuration into the configuration files that contain the stored configuration. To save the running configuration, you must use the bigpipe save all command.
You use the command bigpipe export to create an SCF. When you use this command, the system by default creates a file (using a name that you specify) in the /var/local/scf directory. The system appends the specified file name with the .scf extension. However, if you use the .scf extension in the file name, the system does not add an additional extension.
As an option, you can create an SCF in a location other than /var/local/scf, by specifying a different path name during the creation procedure.
Note: When you use the command bigpipe export, you can optionally specify the oneline attribute. The oneline attribute formats the contents of an SCF in a more compact way. For more information, see the Bigpipe Utility Reference Guide.
1.
Access the bigpipe shell.
2.
Run the command export and include a name for the SCF, for example:
The system creates the file, myConfiguration053107.scf, in the /var/local/scf directory. To create the SCF in another location, specify a full path for the file. For example, the command export /config/myConfiguration creates the SCF in the /config directory.
The primary benefit of the SCF feature is that you can use an SCF from one BIG-IP system to configure another BIG-IP system (hereafter referred to as the target BIG-IP system). The process to do this is simple:
First, you create an SCF using the bigpipe export command, which places the file in an accessible location on the network.
Next, using a text editor, you modify any data in the SCF that is unique to the target BIG-IP system, such as the management IP address.
Next, from the target BIG-IP system, you import the modified SCF using the bigpipe import command. This creates a running configuration on the target system.
The following section provides the procedure for using an SCF to configure a target BIG-IP system, using the bigpipe utility.
Note: As an alternative to this procedure, you can create an SCF, and then copy and paste the file contents to the target BIG-IP system. For more information, see Using the copy-and-paste feature with an SCF.
4.
b)
Where necessary, change the values of the management IP address, network mask, management default route, self IP addresses, virtual server IP addresses, routes, default routes, and host name fields to the values for the new system.
c)
If necessary, change the passwords for the root and admin accounts using the user <name> password none newpassword <password> command.
Important: When configuring a unit that is part of a redundant system using the SCF from the other unit in the system, do not modify the root and admin accounts. These accounts must be identical on both units of a redundant system.
5.
On the target BIG-IP system, use the import command to import the SCF:
The system saves a backup of the running configuration in the /var/local/scf directory, and then resets the running configuration with the configuration contained in the SCF you are importing.
Note: In step 4, you edited the SCF to change certain information that is unique for the target BIG-IP system. Therefore, you do not need to run the Setup utility on the target system.
The BIG-IP system ships with a default SCF. You can restore a BIG-IP system to either the factory default configuration or a previous configuration. When you restore the system to the factory default configuration, the management IP address and management default route are not reset to the default values. These settings remain the same.
You can use either the command bigpipe import default or bigpipe import <file_name>.scf. These commands differ as follows:
You use the command sequence bigpipe import default to restore a system to the factory default configuration. When you use this command, the system first saves the running configuration in the backup.scf file. Then, the system resets the local traffic management and the operating system configuration to the factory default configuration by loading the SCF, /defaults/defaults.scf.
You can use the command sequence bigpipe import <file_name>.scf to change the configuration of a system using the values in the specified SCF. When you use this command, the system first saves the running configuration in the backup.scf file, and then resets the running configuration to the values contained in the specified SCF. You must then run the command sequence bigpipe save all to save the running configuration in the stored configuration files.
Warning: The bigpipe import default command does not reset manually-modified bigdb database variables to their factory defaults. Therefore, F5 Networks recommends that you do not manually modify any of the bigdb database variables. Instead, use the bigpipe commands to change the system configuration.
1.
Access the bigpipe shell.
2.
Run the command sequence import default.
The system saves the running configuration in the backup.scf file, and then resets the local traffic management and the operating system configuration to the factory default configuration by loading the SCF, /defaults/defaults.scf.
Note: The command sequence bigpipe import default does not reset the management IP address or the management default route back to the default values. These settings remain the same.
1.
Access the bigpipe shell.
2.
Run the command sequence import <file name>.scf, using the name of the SCF that contains the configuration to which you want to restore the system.
The system saves the running configuration in the backup file, and then resets the running configuration to the values contained in the specified SCF.
3.
To save the running configuration to the stored configuration files, use the command sequence save all.
The system saves the running configuration to the stored configuration files.
In addition to using the bigpipe import command with an SCF file name, there are two alternative ways to use an SCF to configure a target BIG-IP system:
By copying the contents of an SCF, typing the command import - at the bigpipe shell prompt, and then pasting the contents of the SCF.
For more information, see Pasting a copied SCF after using the import command, on this page.
One way to import configuration data to a target BIG-IP system is to copy the contents of an SCF from the original system, and then paste that content onto the target system, at the bigpipe shell prompt. However, whenever you cut and paste content from any BIG-IP configuration file (including an SCF) from one BIG-IP system to another, there are certain constraints:
Only 4096 characters in total are guaranteed to be accepted. If the copy-and-paste operation fails because the content exceeded 4096 characters, the BIG-IP system generates a syntax or validation error.
If one command in the pasted content fails, the preceding commands in the content still take effect, and successive commands can generate a series of error messages.
Warning: If the pasted content contains a command that fails, the running configuration can be left in an ambiguous state.
If no single line in the SCF is longer than 4,096 characters, you can use the copy-and-paste feature to import the SCF to another system. That is, you can copy the content of an SCF, type the command sequence bigpipe import - on the target BIG-IP system, and then paste the content onto the command line. For the procedure on using the copy-and-paste feature with the bigpipe import command, see To configure a system using the copy-and-paste feature with the import - command.
If any one line in the SCF is longer than 4,096 characters (due to the use of the bigpipe export oneline command), do not use the copy-and-paste feature to import the SCF; instead, use the command bigpipe import <filename>.scf. For more information, see To use an SCF to configure a target BIG-IP system.
Important: If the system encounters an error after you have pasted the content, no configuration changes take effect. The running configuration is rolled back to its previous state.
2.
On the target BIG-IP system, access the bigpipe shell.
The system displays the bigpipe shell prompt.
3.
Type import - , followed by the Enter key.
Note: No prompt appears after pressing the Enter key.
5.
Type CTRL-D.
The system replaces the running configuration of the system with a new running configuration, based on the data you pasted.
6.
Press Enter to insert a carriage return.
Important: It is essential that you insert the carriage return to indicate to the system that all content has been pasted. Omitting the carriage return causes the copy-and-paste operation to fail.
7.
After the command runs, type save all.
The system saves the running configuration in the stored configuration files.
Table of Contents   |   << Previous Chapter   |   Next Chapter >>

Was this resource helpful in solving your issue?




NOTE: Please do not provide personal information.



Incorrect answer. Please try again: Please enter the words to the right: Please enter the numbers you hear:

Additional Comments (optional)