Refer to the exhibit. An engineer constructs an EEM applet to prevent anyone from entering configuration mode on a switch. Which snippet is required to complete the EEM applet?
Provided answer is correct.
The "sync no" option tells the script to run before the CLI command is executed. This means that this applet is executed before the actual "configure terminal" CLI command is executed. This gives you the opportunity to choose what to do after the applet is run.
Since "skip yes" is indicated, the "configure terminal" CLI command is skipped completely and is replaced by the actions of the script.
B - another example and use case for sync no skip yes
event manager applet NoReload
event cli pattern "reload"
sync no <------The EEM script intercepts the command
skip yes <------ skips the CLI command from running at all
action 1.0 syslog priority errors msg "Cannot reload this router"
sync yes - would you be used to run the CLI command once the EEM script has completed successfully, enabling additional checks and control over the operation
It can't be C or D because skip no = comand would run and we don't want it to, it should be skip yes for the command not to run. It should be sync = yes for EEM script to run and apply the skip, so the answer is A: sync yes skip yes: run applet do not run command
Options A and D are incorrect.
Sync "yes" doesn't have the skip option, because both the CLI command and the EEM script will run simultaneously.
C. Incorrect, the CLI command will be executed after the EEM script ("skip" is set to no.)
B. Correct!
Sync "no" does have the "skip" option, because they are run asynchronously (not at the same time.) The EEM script will run first, and then we can decide whether or not to run the CLI command that triggered the event. "skip" yes means, the CLI command will be skipped (not executed,) whenever it is entered on the terminal.
D. sync yes skip no
Explanation:
sync yes: This ensures that the EEM applet will wait for the command to complete before continuing with the next steps, providing synchronous behavior.
skip no: This prevents the execution of the command (in this case, entering configuration mode) when the EEM applet is triggered.
I don't even have the skip option when using sync yes:
R2(config)#event manager applet Config
R2(config-applet)#event cli pattern "configure terminal" sync yes ?
default Default action timer
maxrun Maximum runtime of applet
occurs The number of occurrences before raising the event
period Number of occurrences must occur within this time period
<cr>
B is correct.
sync no = run the EEM applet first (asynchronously i.e. ahead of the CLI command)
skip yes = skip (don't run) the CLI command after the EEM applet is done
"The sync no option tells the script to run before the CLI command is executed. This means that this applet is executed before the actual CLI command is executed. This gives you the opportunity to choose what to do after the applet is run. Since skip yes is indicated, the CLI command is skipped completely and is replaced by the actions of the script."
https://notes.networklessons.com/eem-sync-and-skip-keywords
To prevent anyone from entering configuration mode on a switch using the provided EEM applet, you would want to ensure that the applet does not synchronize with other applets (sync no) and that it does not skip subsequent statements if the current one fails (skip no). Therefore, the correct option for the snippet to complete the EEM applet is:
C. sync no skip no
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Aaron_0801
Highly Voted 1 year agoAaron_0801
1 year agochmacnp
Most Recent 1 week agozbeugene7
4 months, 2 weeks agozbeugene7
4 months agoAbdullahMohammad251
4 months, 3 weeks agoAbdullahMohammad251
4 months, 3 weeks ago16561f6
4 months, 3 weeks ago[Removed]
8 months, 2 weeks ago[Removed]
9 months agoslacker_at_work
11 months, 2 weeks agoMistwalker
1 year agoteems5uk
1 year agoMizuchan
1 year, 1 month agoMizuchan
1 year ago