The matched upper-view command matches the undo command in the upper view automatically and returns to the upper view.
The undo matched upper-view command cancels the matching of the undo command in the upper view automatically.
By default, the undo command is not searched in the upper view.
With the matched upper-view command, the system can match the undo command in the upper view when the user runs the undo command that is not registered in the current view. If a matched undo command is found in the upper view, the command is run. Otherwise, the system continues to search for a matched undo command until it enters the system view.
Running the matched upper-view command results in some hidden troubles. For example, when you run the undo ospf command in the interface view where the command is not registered, the system searches in the upper view automatically, that is, in system view. As a result, the OSPF features configured globally are deleted.
The matched upper-view command takes effect only on the current login user who runs this command.
# Allow the undo command to be used in the upper view.
<sysname> system-view
[sysname] matched upper-view
[sysname] interface GigabitEthernet 0/0/1
[sysname-GigabitEthernet0/0/1
] undo ftp server
Info: Succeeded in closing the FTP server.
[sysname]
# Prevent the undo command from being used in the upper view.
<sysname> system-view
[sysname] undo matched upper-view
[sysname] interface GigabitEthernet 0/0/1
[sysname-GigabitEthernet0/0/1
] undo ftp server
^
Error: Wrong parameter found at '^' position.
[sysname-GigabitEthernet0/0/1
]