Line Auto Consolidation
Cisco IOS XE software runs a nonvolatile generation (NVGEN) process to retrieve the configuration state of the device. During the NVGEN process, the system auto consolidates the LINE commands based on common parameters.
When the device connects to Cisco Digital Network Architecture (DNA) Center or Cisco vManage and the center sends a line configuration through the Yet Another Next Generation (YANG) interface the resulting configuration is auto consolidated. This can cause a mismatch between the device and the DNA Center. The mismatch in configurations can lead to reverse sync from the device to the DNA Center. The device will be locked from any other configuration changes during this reverse sync. This can affect the performance of the device.
Starting with Cisco IOS XE 17.4.1 release, you can use the no line auto-consolidation command, in the global configuration mode, to disable the auto consolidation of LINE commands. Auto consolidation is enabled by default. To disable it use the no form of the command.
You can use the show running-configuration all command to display the configuration on the device. In the following example line auto-consolidation is enabled.
Device#sh running-config all | i auto-consolidation
line auto-consolidation
After auto consolidation is disabled the show run command output will be lengthy. This will impact the sizes of the running configuration and start-up configuration files. If you disable auto consolidation you will observe the following behaviors:
-
Contiguous groups of lines that belong to the same configuration in a sub-mode will not be combined into a single range.
Device#show run | sec line line con 0 stopbits 1 line vty 0 4 transport input ssh line vty 5 9 transport input all Device#configure terminal Device(config)#no line auto-consolidation Device(config)#line vty 10 15 Device(config-line)#transport input all Device(config-line)#end Device#show run | sec line no line auto-consolidation line con 0 stopbits 1 line vty 0 4 transport input ssh line vty 5 9 transport input all line vty 10 15 transport input all
-
If you disable auto consolidation after configuring some lines with auto consolidation enabled, only the lines which were configured after auto consolidation was disabled will not be consolidated.
Device#show run | sec line line con 0 stopbits 1 line vty 0 4 transport input ssh line vty 5 9 transport input all Device#configure terminal Device(config)#line vty 10 15 Device(config-line)#transport input all Device(config-line)#end Device#show run | sec line line con 0 stopbits 1 consolidated line vty 0 4 transport input ssh line vty 5 15 transport input all Device#configure terminal Device(config)#no line auto-consolidation Device(config)#line vty 16 20 Device(config-line)#transport input all Device(config-line)#end Device#show run | sec line no line auto-consolidation line con 0 stopbits 1 consolidated line vty 0 4 transport input ssh line vty 5 15 transport input all line vty 16 20 transport input all
-
If you enable auto consolidation after it has been disabled, lines that were not consolidated will be auto consolidated.
Device#sh running-config | sec line no line auto-consolidation line con 0 exec-timeout 0 0 logging synchronous stopbits 1 line vty 0 4 transport input ssh line vty 5 15 transport input ssh line vty 16 19 transport input ssh Device#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Device(config)#line vty 20 25 Device(config-line)#transport input ssh Device(config-line)#end Device#sh running-config | sec line no line auto-consolidation line con 0 exec-timeout 0 0 logging synchronous stopbits 1 line vty 0 4 transport input ssh line vty 5 15 transport input ssh line vty 16 19 transport input ssh line vty 20 25 transport input ssh Device#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Device(config)#line auto-consolidation Device(config)#end Device#show running-config | sec line line con 0 exec-timeout 0 0 logging synchronous stopbits 1 line vty 0 4 transport input ssh line vty 5 25 transport input ssh
-
You can configure lines with contiguous ranges. The configuration will be permitted.
Device#show run | sec line no line auto-consolidation line con 0 stopbits 1 line vty 0 4 transport input ssh Device#configure terminal Device(config)#line vty 5 20 Device(config)#transport input all Device(config-line)#end Device#show run | sec line line con 0 stopbits 1 line vty 0 4 transport input ssh line vty 5 20 transport input all
-
You can't configure lines with non-contiguous ranges. The configuration is rejected.
Device#show run | sec line no line auto-consolidation line con 0 logging synchronous line aux 0 line vty 0 4 transport input none Device# configure terminal Device(config)# line vty 10 20 % Bad line number - VTY line number is not contiguous.
-
You can delete lines which are contiguous and at the end of the list. In the controller mode, you can delete one line at a time. You cannot delete lines in bulk. In autonomous mode, you can delete lines in bulk.
Device# show run | sec line no line auto-consolidation line con 0 stopbits 1 line vty 0 4 transport input ssh line vty 5 20 transport input all Device# configure terminal Device(config)# no line vty 5 20 Device(config)# end Device#show run | sec line line con 0 stopbits 1 line vty 0 4 transport input ssh
-
You can't delete lines which are not contiguous and at the end of the list. You can't delete a line that will result in a non-contiguous range when it is deleted. This will generate an error stating the line cannot be deleted.
Device# show run | sec line no line auto-consolidation line con 0 stopbits 1 line vty 0 4 transport input ssh line vty 5 9 transport input none line vty 10 20 transport input all Device# configure terminal Device(config)# no line vty 5 9 % Cannot delete the 9 line number as it is not the last VTY line number
-
You can't delete lines that are in use or are default lines. Device#show run | sec line no line auto-consolidation line con 0 stopbits 1 line vty 0 4 transport input ssh line vty 5 20 transport input ssh Device#configure terminal Router(config)#no line vty 15 % Can't delete last 16 VTY lines, lines in use, statbit: 0x10C40, tiptop: 590 % process name: SSH Process
-
You can modify subranges in autonomous mode. This will cause the lines to split which will cause a reverse sync of the configuration. You can’t modify subranges in the controller mode. This is a behavioural change between the controller and autonomous modes. In the controller mode, any modification of subranges is rejected to avoid discrepancy with the configuration pushed from a controller.
The following examples shows how you can modify subranges in autonomous mode.
Device#show run | sec line no line auto-consolidation line con 0 stopbits 1 line vty 0 4 transport input ssh line vty 5 9 transport input none Device#configure terminal Device(config)#line vty 7 8 Device(config-line)#transport input telnet Device(config-line)#end Device#show run | sec line line con 0 stopbits 1 line vty 0 4 transport input ssh line vty 5 6 transport input none line vty 7 8 transport input telnet line vty 9 transport input none
-
The following example shows that modification of subranges is not supported in controller mode
Device#show run | sec line no line auto-consolidation line con 0 stopbits 1 line vty 0 4 transport input ssh line vty 5 9 transport input none Device#configure terminal Device(config)# line vty 5 8 Device(config-line)# end Uncommitted changes found, commit them? [yes/no/CANCEL] yes Aborted: inconsistent value: Device refused one or more commands: line vty 5 8 ^ % Invalid input detected at '^' marker. Component Response: " % Modifications of overlapping/sub range is not allowed in controller mode" Error executing command: CLI command error - Device(config)# end
-
You can modify overlapping ranges in autonomous mode. This will cause the lines to split which will cause a reverse sync of the configuration. You cannot modify overlapping ranges in the controller mode. In the controller mode, any modification of overlapping ranges is rejected to avoid discrepancy with the configuration pushed from a controller.
The following example shows how you can modify overlapping ranges in autonomous mode.
Device#show run | sec line no line auto-consolidation line con 0 stopbits 1 line vty 0 4 transport input ssh line vty 5 10 transport input none line vty 11 20 transport input all Device#configure terminal Device(config)#line vty 8 12 Device(config-line)#transport input ssh Device(config-line)#end Device#show run | sec line line con 0 stopbits 1 line vty 0 4 transport input ssh line vty 5 7 transport input none line vty 8 10 transport input ssh line vty 11 12 transport input ssh line vty 13 20 transport input all
-
The following example shows that modification of overlapping ranges is not supported in controller mode.
Device#show run | sec line no line auto-consolidation line con 0 stopbits 1 line vty 0 4 transport input ssh line vty 5 10 transport input none line vty 11 20 transport input all Device(config)# line vty 5 11 Device(config-line)# end Uncommitted changes found, commit them? [yes/no/CANCEL] yes Aborted: inconsistent value: Device refused one or more commands: line vty 5 11 ^ % Invalid input detected at '^' marker. Component Response: " % Modifications of overlapping/sub range is not allowed in controller mode" Error executing command: CLI command error - Device(config)# end
-
You can replace a configuration from an auto consolidation enabled state to an auto consolidation disabled state.
Device#show run | sec line line con 0 stopbits 1 line vty 0 4 transport input all line vty 5 9 transport input ssh line vty 10 15 transport input telnet line vty 16 20 transport input ssh Device#configure replace bootflash:cfg2.txt This will apply all necessary additions and deletions to replace the current running configuration with the contents of the specified configuration file, which is assumed to be a complete configuration, not a partial configuration. Enter Y if you are sure you want to proceed. ? [no]: y Total number of passes: 1 Rollback Done Device#show run | sec line no line auto-consolidation line con 0 stopbits 1 line vty 0 4 transport input all line vty 5 20 transport input ssh
-
You can replace a configuration from an auto consolidation disabled state to an auto consolidation enabled state
Device#show run | sec line no line auto-consolidation line vty 0 4 transport input all line vty 5 20 transport input ssh Device#configure replace bootflash:cfg1.txt This will apply all necessary additions and deletions to replace the current running configuration with the contents of the specified configuration file, which is assumed to be a complete configuration, not a partial configuration. Enter Y if you are sure you want to proceed. ? [no]: y Total number of passes: 1 Rollback Done Device#show run | sec line line con 0 stopbits 1 line vty 0 4 transport input all line vty 5 9 transport input ssh line vty 10 15 transport input telnet line vty 16 20 transport input ssh