Use this procedure to attach a source interface to a monitor session for an Access Control List (ACL). This task covers entering interface configuration mode, applying the IPv4 access group, attaching a source interface, and specifying the direction of traffic to be replicated for monitoring.
Use these steps to attach a source interface to a monitor session for an ACL.
Procedure
-
Enter global configuration mode.
Example:
Router# configure
-
Enter interface configuration mode for the specified source interface in interface type number . The interface number is entered in rack/slot/module/port notation. For more information about the syntax for the router, use the question mark (?) online help function.
Example:
Router(config)# interface HundredGigE 0/1/0/10/0/1/0
-
Control access to an interface in ipv4 access-group acl-name {ingress | egress} .
Example:
Router(config-if)# ipv4 access-group acl1 ingress
-
Attach a monitor session to the source interface and enter the monitor session configuration mode.
Example:
Router(config-if)# monitor-session mon1 ethernet direction rx-only port-level acl
Router(config-if-mon)#
Note
rx-only specifies that only ingress traffic is replicated.
-
Specify that the traffic mirrored is according to the defined ACL.
Example:
Router(config-if-mon)# acl
Note
f an ACL is configured by name, it overrides any ACL that may be configured on the interface.
-
Exit the monitor session configuration mode and return to interface configuration mode.
Example:
Router(config-if-mon)# exit
Router(config-if)#
-
Save configuration changes.
Example:
RP/0/RP0/CPU0(config-if)# end
or
RP/0/RP0/CPU0(config-if)# commit
When you execute the
end command, the system prompts you to commit changes.
Uncommitted changes found, commit them before exiting (yes/no/cancel)?
[cancel]:
- yes - Entering yes saves configuration changes to the running configuration file, exits the configuration session, and returns the router to EXEC mode.
- no - Entering no exits the configuration session and returns the router to EXEC mode without committing the configuration changes.
- cancel - Entering cancel leaves the router in the current configuration session without exiting or committing the configuration changes.
- commit - Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
-
Display information about the monitor session.
Example:
Router# show monitor-session status