Download Distributed CPU Protection and more Lecture notes Statistics in PDF only on Docsity!
7750 SR Advanced Configuration Guide Page 1933
Distributed CPU Protection
In This Chapter
This section describes Distributed CPU Protection (DCP) configurations.
Topics in this section include:
- Applicability on page 1934
- Overview on page 1935
- Configuration on page 1936
- Conclusion on page 1958
Applicability
Page 1934 7750 SR Advanced Configuration Guide
Applicability
This Distributed CPU Protection (DCP) configuration example was created using the 7750 SR-
c12 platform but is equally applicable to the following platforms: 7 750 SR-7/12, 7450 ESS-6/7/
12, 7750 SR-c4/c12 and 7950 XRS. DCP is not supported on the 7750 SR-1, 7450 ESS-1 or 7710
SR platforms.
DCP operates on the line cards and requires line cards with the FP2 or greater hardware (for
example, IOM3-XP, IMMs and C-XMAs).
The configuration was tested on release 11.0R1.
Configuration
Page 1936 7750 SR Advanced Configuration Guide
Configuration
The test topology is shown in Figure 299. A Gigabit Ethernet link is used between the Tester and
the router.
Figure 299: Test Topology
Step 1. The basic configuration of the mda, port, interface and a security event log on the
router is shown below.
*A:PE-1# configure card 1 mda 1 *A:PE-1>config>card>mda# info
mda-type m5-1gb-sfp-b no shutdown
*A:PE-1>config>card>mda# exit all *A:PE-1# configure port 1/1/ *A:PE-1>config>port# info
ethernet exit no shutdown
*A:PE-1>config>port# exit all *A:PE-1# configure router interface "int-pe1-to-tester" *A:PE-1>config>router>if# info
address 192.168.10.1/ port 1/1/ no shutdown
*A:PE-1>config>router>if# exit all *A:PE-1# configure log log-id 15 *A:PE-1>config>log>log-id# info
from security to memory 1024
Port 1/1/
Interface “int-pe1-to-tester”
al_
7750 SR-c (PE-1)
Tester
Distributed CPU Protection
7750 SR Advanced Configuration Guide Page 1937
This example was developed on a 7750 SR-c12 platform but it is equally applicable to other
platforms such as the 7750 SR-7/12. If other platforms, such as the 7750 SR-7/12 that support
centralized CPU Protection, are used to explore Distributed CPU Protection then the centralized
CPU Protection should be disabled (for the purposes of this example) so that it does not interfere
with reproducing the same results as described below. In a normal production network CPU
Protection and DCP are complimentary and can be used together. To disable centralized CPU
Protection for the purposes of reproducing the results below please ensure that:
- protocol-protection is disabled.
- All rates in all polices (including any default polices) are configure to max.
Step 2. In order to activate DCP a policy is created and assigned to the interface.
The first policy that is used in this example is used to simply count protocol packets to see
that they are indeed flowing from the tester to the router and being extracted and
indentified.
The dcp-policy-count policy is configured as follows:
*A:PE-1# configure system security dist-cpu-protection *A:PE-1>config>sys>security>dist-cpu-protection# info
policy "dcp-policy-count" create description "Static policers with rate 0 for counting packets" static-policer "sp-arp" create rate packets 0 within 1 exit static-policer "sp-icmp" create rate packets 0 within 1 exit static-policer "sp-igmp" create rate packets 0 within 1 exit protocol arp create enforcement static "sp-arp" exit protocol icmp create enforcement static "sp-icmp" exit protocol igmp create enforcement static "sp-igmp" exit exit
For the dcp-policy-count policy configuration:
Distributed CPU Protection
7750 SR Advanced Configuration Guide Page 1939
IMSI Db Appl 120 ~0.00% ~0.00% IOM 132,522 1.47% 3.11% IP Stack 7,666 0.08% 0.39% IS-IS 1,415 0.01% 0.07% ISA 11,988 0.13% 0.43% LDP 496 ~0.00% 0.04% Logging 185 ~0.00% 0.01% MBUF 0 0.00% 0.00% MPLS/RSVP 6,219 0.06% 0.48% MSCP 0 0.00% 0.00% MSDP 0 0.00% 0.00% Management 4,077 0.04% 0.13% OAM 10,311 0.11% 0.44% OSPF 661 ~0.00% 0.05% PIM 0 0.00% 0.00% RIP 0 0.00% 0.00% RTM/Policies 0 0.00% 0.00% Redundancy 7,641 0.08% 0.51% SNMP Daemon 0 0.00% 0.00% Services 3,965 0.04% 0.09% Stats 0 0.00% 0.00% Subscriber Mgmt 7,437 0.08% 0.44% System 57,081 0.63% 3.49% Traffic Eng 0 0.00% 0.00% VRRP 1,918 0.02% 0.09% WEB Redirect 77 ~0.00% ~0.00%
Total 8,965,427 100.00% Idle 8,605,657 95.98% Usage 359,770 4.01% Busiest Core Utilization 134,481 13.49% ===============================================================================
The DCP feature is reporting no violations for interfaces on card 1.
*A:PE-1# tools dump security dist-cpu-protection violators enforcement interface card 1
Distributed Cpu Protection Current Interface Enforcer Policer Violators
Interface Policer/Protocol Hld Rem
Violators on Slot-1 Fp-
[S]-Static [D]-Dynamic [M]-Monitor
===============================================================================
There are no security log events.
*A:PE-1# show log log-id 15
Event Log 15
Description : (Not Specified) Memory Log contents [size=1024 next event=1 (not wrapped)]
Configuration
Page 1940 7750 SR Advanced Configuration Guide
The detailed DCP status for the interface shows all three policers are currently in the conform
state.
*A:PE-1# show router interface "int-pe1-to-tester" dist-cpu-protection
Interface "int-pe1-to-tester" (Router: Base)
Distributed CPU Protection Policy : dcp-policy-count
Statistics/Policer-State Information
Static Policer
Policer-Name : sp-arp Card/FP : 1/1 Policer-State : Conform Protocols Mapped : arp Exceed-Count : 0 Detec. Time Remain : 0 seconds Hold-Down Remain. : none
Policer-Name : sp-icmp Card/FP : 1/1 Policer-State : Conform Protocols Mapped : icmp Exceed-Count : 0 Detec. Time Remain : 0 seconds Hold-Down Remain. : none
Policer-Name : sp-igmp Card/FP : 1/1 Policer-State : Conform Protocols Mapped : igmp Exceed-Count : 0 Detec. Time Remain : 0 seconds Hold-Down Remain. : none
Local-Monitoring Policer
No entries found
Dynamic-Policer (Protocol)
No entries found
===============================================================================
Configuration
Page 1942 7750 SR Advanced Configuration Guide
Figure 300: Count Traffic with DCP Policy Count
Step 6. Notice that DCP now reports some violations of the policy against the interface.
*A:PE-1# tools dump security dist-cpu-protection violators enforcement interface card 1
Distributed Cpu Protection Current Interface Enforcer Policer Violators
Interface Policer/Protocol Hld Rem
Violators on Slot-1 Fp-
int-pe1-to-tester sp-arp [S] none int-pe1-to-tester sp-icmp [S] none int-pe1-to-tester sp-igmp [S] none
[S]-Static [D]-Dynamic [M]-Monitor
===============================================================================
After a few seconds the DCP exceed-count values can be seen incrementing.
Note the following details:
- Exceed-Count is non-zero. This will continue incrementing and will never reset since the
rate configured in the DCP policy is zero.
- The Policer-State is Exceed. The policers have detected that the protocol is non-
conformant to the configured rate.
- Detec. Time Remain stays at 29 seconds. This countdown timer is automatically reset to
30 seconds every time a policer is detected as non-conformant (which will be continually
when the rate is set to 0 and packets of that protocol are being received).
Tester Sending: SSV$ SSV,& SSV,*
&RQILJXUHG
5DWH SSV
al_
Tester
7750 SR-c (PE-1)
$
,&
,*
Distributed CPU Protection
7750 SR Advanced Configuration Guide Page 1943
*A:PE-1# show router interface "int-pe1-to-tester" dist-cpu-protection
Interface "int-pe1-to-tester" (Router: Base)
Distributed CPU Protection Policy : dcp-policy-count
Statistics/Policer-State Information
Static Policer
Policer-Name : sp-arp Card/FP : 1/1 Policer-State : Exceed Protocols Mapped : arp Exceed-Count : 72 Detec. Time Remain : 29 seconds Hold-Down Remain. : none
Policer-Name : sp-icmp Card/FP : 1/1 Policer-State : Exceed Protocols Mapped : icmp Exceed-Count : 144 Detec. Time Remain : 29 seconds Hold-Down Remain. : none
Policer-Name : sp-igmp Card/FP : 1/1 Policer-State : Exceed Protocols Mapped : igmp Exceed-Count : 290 Detec. Time Remain : 29 seconds Hold-Down Remain. : none
[snip]
Step 7. Keep the tester running.
Now a DCP policy that enforces protocol rates using static policers will be applied to the
interface. First, the policy is created:
*A:PE-1# configure system security dist-cpu-protection *A:PE-1>config>sys>security>dist-cpu-protection# policy "dcp-static-policy-1" create description "Static policers for arp, icmp and igmp" static-policer "sp-arp" create rate packets 10 within 1 exceed-action discard exit static-policer "sp-icmp" create rate packets 20 within 1 exceed-action discard exit static-policer "sp-igmp" create rate packets 10 within 1 exceed-action discard exit protocol arp create enforcement static "sp-arp" exit protocol icmp create enforcement static "sp-icmp" exit protocol igmp create
Distributed CPU Protection
7750 SR Advanced Configuration Guide Page 1945
Step 8. Increase the rate of IGMP packets that the tester is sending to 1000pps (keep ARP
and ICMP at 2pps and 4pps).
Figure 301: Limit Traffic with dcp-static-policy-
Step 9. Notice that the system has identified a violation of the DCP rates for the igmp
policer.
*A:PE-1# tools dump security dist-cpu-protection violators enforcement interface card 1
Distributed Cpu Protection Current Interface Enforcer Policer Violators
Interface Policer/Protocol Hld Rem
Violators on Slot-1 Fp-
int-pe1-to-tester sp-igmp [S] none
[S]-Static [D]-Dynamic [M]-Monitor
===============================================================================
After a few minutes the violation will be indicated as a log event. This delay is due to the design of
DCP. In order to support large scale operation of DCP, and also to avoid overload conditions, a
polling process is used to monitor state changes in the policers and to gather violations. This
means there can be a delay between when an event occurs in the data plane and when the relevant
state change or event notification occurs towards an operator, but in the meantime the policers are
still operating and protecting the control plane.
*A:PE-1# show log log-id 15
Event Log 15
Description : (Not Specified)
Tester Sending: SSV$ SSV,& SSV,*
5DWH SSV
5DWH SSV
5DWH SSV
$
,&
,*
al_
Tester
7750 SR-c (PE-1)
Configuration
Page 1946 7750 SR Advanced Configuration Guide
Memory Log contents [size=1024 next event=11 (not wrapped)]
10 2013/04/18 17:31:54.58 EDT WARNING: SECURITY #2066 Base DCPUPROT "Non conformant network_if "int-pe1-to-tester" on fp 1/1 detected at 04/18/2013 17:31:33. Policy "dcp-static-policy-1". Policer="sp-igmp"(static). Excd count=135" … [snip] …
The status of DCP on the interface also shows the igmp policer as being in an Exceed state:
*A:PE-1# show router interface "int-pe1-to-tester" dist-cpu-protection
Interface "int-pe1-to-tester" (Router: Base)
Distributed CPU Protection Policy : dcp-static-policy-
Statistics/Policer-State Information
Static Policer
Policer-Name : sp-arp Card/FP : 1/1 Policer-State : Conform Protocols Mapped : arp Exceed-Count : 0 Detec. Time Remain : 0 seconds Hold-Down Remain. : none
Policer-Name : sp-icmp Card/FP : 1/1 Policer-State : Conform Protocols Mapped : icmp Exceed-Count : 0 Detec. Time Remain : 0 seconds Hold-Down Remain. : none
Policer-Name : sp-igmp Card/FP : 1/1 Policer-State : Exceed Protocols Mapped : igmp Exceed-Count : 19031 Detec. Time Remain : 29 seconds Hold-Down Remain. : none
…[snip]…
The CPU utilization of the IGMP task group is not impacted since DCP is discarding packets that
are non-conformant to the configure rate.
*A:PE-1# show system cpu
CPU Utilization (Sample period: 1 second)
Name CPU Time CPU Usage Capacity (uSec) Usage
BFD 0 0.00% 0.00% …[snip]… IGMP/MLD 1,883 0.02% 0.12% IMSI Db Appl 120 ~0.00% ~0.00% IOM 132,522 1.47% 3.11% IP Stack 7,666 0.08% 0.39%
Configuration
Page 1948 7750 SR Advanced Configuration Guide
IP Stack 935,491 10.43% 93.45% IS-IS 1,343 0.01% 0.06% ISA 12,350 0.13% 0.45% LDP 394 ~0.00% 0.03% …[snip]… WEB Redirect 116 ~0.00% 0.01%
Total 8,966,128 100.00% Idle 6,972,962 77.77% Usage 1,993,166 22.22% Busiest Core Utilization 484,748 48.65% ===============================================================================
Step 12. Reinstall the DCP policy to the interface and see the CPU utilization drop.
*A:PE-1# configure router interface "int-pe1-to-tester" *A:PE-1>config>router>if# dist-cpu-protection "dcp-static-policy-1" *A:PE-1>config>router>if# exit all *A:PE-1# show system cpu =============================================================================== CPU Utilization (Sample period: 1 second) =============================================================================== Name CPU Time CPU Usage Capacity (uSec) Usage
BFD 0 0.00% 0.00% …[snip]… IGMP/MLD 2,058 0.02% 0.10% IMSI Db Appl 48 ~0.00% ~0.00% IOM 135,148 1.50% 3.04% IP Stack 7,851 0.08% 0.47% IS-IS 1,398 0.01% 0.07% ISA 11,730 0.13% 0.43% LDP 299 ~0.00% 0.02% …[snip]… WEB Redirect 71 ~0.00% ~0.00%
Total 8,975,262 100.00% Idle 8,611,593 95.94% Usage 363,669 4.05% Busiest Core Utilization 136,669 13.70% ===============================================================================
Step 13. Stop the tester from sending packets, wait a few minutes and then note the status of
the system.
There are no longer any violations of any enforcement policers on any interfaces on card 1.
*A:PE-1# tools dump security dist-cpu-protection violators enforcement interface card 1
Distributed Cpu Protection Current Interface Enforcer Policer Violators
Interface Policer/Protocol Hld Rem
Violators on Slot-1 Fp-
Distributed CPU Protection
7750 SR Advanced Configuration Guide Page 1949
[S]-Static [D]-Dynamic [M]-Monitor
===============================================================================
The IGMP policer is indicated as conformant in the log events.
*A:PE-1# show log log-id 15
Event Log 15
Description : (Not Specified) Memory Log contents [size=1024 next event=7 (not wrapped)]
…[snip]…
12 2013/04/18 17:42:12.43 EDT WARNING: SECURITY #2072 Base DCPUPROT "Network_if "int-pe1-to-tester" on fp 1/1 newly conformant at 04/18/2013 17:41:57:27. Pol- icy "dcp-static-policy-1". Policer="sp-igmp"(static). Excd count=316418"
…[snip]…
The interface DCP details show all policers as conformant.
*A:PE-1# show router interface "int-pe1-to-tester" dist-cpu-protection
Interface "int-pe1-to-tester" (Router: Base)
Distributed CPU Protection Policy : dcp-static-policy-
Statistics/Policer-State Information
Static Policer
Policer-Name : sp-arp Card/FP : 1/1 Policer-State : Conform Protocols Mapped : arp Exceed-Count : 0 Detec. Time Remain : 0 seconds Hold-Down Remain. : none
Policer-Name : sp-icmp Card/FP : 1/1 Policer-State : Conform Protocols Mapped : icmp Exceed-Count : 0 Detec. Time Remain : 0 seconds Hold-Down Remain. : none
Policer-Name : sp-igmp Card/FP : 1/1 Policer-State : Conform Protocols Mapped : igmp Exceed-Count : 0 Detec. Time Remain : 0 seconds Hold-Down Remain. : none
…[snip]…
Distributed CPU Protection
7750 SR Advanced Configuration Guide Page 1951
protocol arp create enforcement dynamic "local-mon" dynamic-parameters rate packets 20 within 10 exceed-action discard exit exit protocol icmp create enforcement dynamic "local-mon" dynamic-parameters rate packets 20 within 10 exceed-action discard exit exit protocol igmp create enforcement dynamic "local-mon" dynamic-parameters rate packets 20 within 10 exceed-action discard exit exit protocol all-unspecified create enforcement dynamic "local-mon" dynamic-parameters rate packets 100 within 10 exceed-action discard exit exit
Configuration
Page 1952 7750 SR Advanced Configuration Guide
For the dcp-dynamic-policy-1 policy configuration:
- The policy contains no static policers. Per-protocol enforcement policers will be
instantiated dynamically but only if triggered by a violation of the local-monitoring-
policer.
- A local-monitoring-policer is configured for the policy. The configured rate determines
the rate of arriving protocol packets at which the policy will trigger the automatic
instantiation of dynamic per-protocol policers for the interface.
- Four protocols are configured and they are all associated with the local-monitoring-
policer. The all-unspecified protocol will include all other extracted control packets on the
interface.
- Each protocol has its own configured dynamic rates that will be used by the dynamic
enforcement policers if they are instantiated. Note these rates are lower than previous
scenarios (the within parameter is 10 seconds instead of 1 second).
- When this DCP policy is associated with an interface, only a single policer (the local-
monitoring-policer) will be instantiated (statically/permanently). The per-protocol
dynamic policers are only instantiated when there is a violation of the local-monitoring-
policer.
The policy is then associated with the interface:
*A:PE-1# configure router interface "int-pe1-to-tester" *A:PE-1>config>router>if# dist-cpu-protection "dcp-dynamic-policy-1"
Step 15. Configure the tester to send:
- 1pps of ARP
- 4pps of ICMP
- 1000pps of IGMP