Table Of Contents
Configuring the Line Interface
Line Interfaces
How to Configure Traffic Rules and Counters
Information About Traffic Rules and Counters
What are Traffic Rules and Counters?
Traffic Rules
Traffic Counters
How to Configure Traffic Counters
How to Create a Traffic Counter
How to Delete a Traffic Counter
How to Delete all Existing Traffic Counters
How to Configure Traffic Rules
How to Create a Traffic Rule
How to Delete a Traffic Rule
How to Delete all Traffic Rules
How to Manage Traffic Rules and Counters
How to View a Specified Traffic Rule
How to View all Traffic Rules
How to View a Specified Traffic Counter
How to View all Traffic Counters
How to Reset a Specified Traffic Counter
How to Reset all Traffic Counters
Configuring the Line Interface
This module describes how to configure the physical line interfaces (ports) as well how to configure those interfaces for VLAN translation, and traffic rules.
•
Line Interfaces
•
How to Configure Traffic Rules and Counters
Line Interfaces
The Line Interfaces (User and Network) are used to connect the NME-APA module to the network. The NME-APA module has Fast Ethernet line interfaces.
How to Configure Traffic Rules and Counters
•
Information About Traffic Rules and Counters
•
How to Configure Traffic Counters
•
How to Configure Traffic Rules
•
How to Manage Traffic Rules and Counters
Information About Traffic Rules and Counters
•
What are Traffic Rules and Counters?
•
Traffic Rules
•
Traffic Counters
What are Traffic Rules and Counters?
Traffic rules and counters may be configured by the user. This functionality enables the user to define specific operations on the traffic flowing through the NME-APA Module, such as ignoring certain flows or counting certain packets. The configuration of traffic rules and counters is independent of the application loaded by the NME-APA module, and thus is preserved when the application being run by the NME-APA module is changed.
Possible uses for traffic rules and counters include:
•
Enabling the user to count packets according to various criteria. Since the traffic counters are readable via the NME-APA SNMP MIB, these might be used to monitor up to 32 types of packets, according to the requirements of the installation.
•
Ignoring certain types of flows. When a traffic rules specifies an "ignore" action, packets matching the rule criteria will not open a new flow, but will pass through the NME-APA module without being processed. This is useful when a particular type of traffic should be ignored by the NME-APA module.
Possible examples include ignoring traffic from a certain IP range known to require no service, or traffic from a certain protocol.
It should be noted that using traffic rules and counters does not affect performance. It is possible to define the maximum number of both traffic rules and counters without causing any degradation in the NME-APA module performance.
Traffic Rules
A traffic rule specifies that a defined action should be taken on packets processed by the NME-APA Module that meet certain criteria. The maximum number of rules is 128, which includes not only traffic rules configured via the NME-APA module CLI, but also any additional rules configured by external management systems, such as NME-APA Device Console. Each rule is given a name when it is defined, which is then used when referring to the rule.
Packets are selected according to user-defined criteria, which may be any combination of the following:
•
IP address —A single address or a subnet range can be specified for each of the line ports (Subscriber / Network).
•
Protocol —TCP/UCP/ICMP/IGRP/EIGRP/IS-IS/OSPF/Other
•
TCP/UDP Ports —A single port or a port range can be specified for each of the line ports (Subscriber / Network). Valid for the TCP/UDP protocols only.
•
Direction (Upstream/Downstream) (TCP only).
The possible actions are:
•
Count the packet by a specific traffic counter
•
Ignore the packet (do not provide service for this packet — No bandwidth metering, transaction reporting etc. is done)
•
Quick-forward the packet with service — forward delay-sensitive packets through the fast path while maintaining serviceability for these packets
•
Quick-forward the packet with no service — forward delay-sensitive packets through the fast path with no service provided for these packets
The Ignore action affects only packets that are not part of an existing flow.
It is possible for a single packet to match more that one rule (The simplest way to cause this is to configure two identical rules with different names). When this happens, the system operates as follows:
•
Any counter counts a specific packet only once. This means that:
–
If two rules specify that the packet should be counted by the same counter, it is counted only once.
–
If two rules specify that the packet should be counted by different counters, it is counted twice, once by each counter.
Traffic Counters
Traffic counters count the traffic as specified by the traffic rules. The maximum number of counters is 32. Each counter is given a name when it is defined, which is then used when referring to the counter.
A traffic counter can be configured in one of two ways:
•
Count packets —The counter is incremented by 1 for each packet it counts.
•
Count bytes —The counter is incremented by the number of bytes in the packet for each packet it counts.
How to Configure Traffic Counters
A traffic counter must be created before it can be referenced in a traffic rule. Use the following commands to create and delete traffic counters.
•
How to Create a Traffic Counter
•
How to Delete a Traffic Counter
•
How to Delete all Existing Traffic Counters
How to Create a Traffic Counter
Options
The following options are available:
•
name —The name of the counter
•
Count packets —The counter is incremented by 1 for each packet it counts.
•
Count bytes —The counter is incremented by the number of bytes in the packet for each packet it counts.
Step 1
From the NME-APA(config if)# prompt, type traffic-counter name name count-bytes|count-packets and press Enter.
Adds a traffic counter with the specified name and counting mode..
How to Delete a Traffic Counter
Step 1
From the NME-APA(config if)# prompt, type no traffic-counter name nameand press Enter.
Note that a traffic counter cannot be deleted if it is used by any existing traffic rule.
How to Delete all Existing Traffic Counters
Step 1
From the NME-APA(config if)# prompt, type no traffic-counter all and press Enter.
Removes all traffic counters.
Note that a traffic counter cannot be deleted if it is used by any existing traffic rule.
How to Configure Traffic Rules
Use the following commands to create and delete traffic rules.
•
How to Create a Traffic Rule
•
How to Delete a Traffic Rule
•
How to Delete all Traffic Rules
How to Create a Traffic Rule
•
Options
•
Configuring Traffic Rules: Examples
Options
The following options are available:
IP specification:
all|([all-but] (ip-address|ip-range))
•
ip-address is a single IP address in dotted-decimal notation, such as 10.1.2.3
•
ip-range is an IP subnet range, in the dotted-decimal notation followed by the number of significant bits, such as 10.1.2.0/24.
•
Use the all-but keyword to exclude the specified IP address or range of IP addresses
protocol:
Any one of the following protocols:
TCP/UCP/ICMP/IGRP/EIGRP/IS-IS/OSPF/Other
direction:
Any of the following:
traffic-counter:
Either of the following:
•
name <name of an existing traffic counter>— Packets meeting the criteria of the rule are to be counted in the specified counter. If a counter name is defined, the "count" action is also defined implicitly. The keyword namemust appear as well as the actual name of the counter.
•
none —If noneis specified, then an action must be explicitly defined via the action option.
action: (not required if the action is count only)
One of the following:
•
ignore —Bypass the specified traffic; traffic receives no service
•
quick-forwarding —Forward delay-sensitive packets through the fast path while maintaining serviceability for these packets
•
quick-forwarding-ignore —Forward delay-sensitive packets through the fast path with no service provided for these packets
Step 1
From the NME-APA(config if)# prompt, type traffic-rule name nameIP-addresses (all|(subscriber-side <IP specification> network-side <IP specification>)) protocol protocoldirection directiontraffic-counter <traffic-counter> [action action]
Enables privileged EXEC mode.
Configuring Traffic Rules: Examples
Example 1
This example creates the following traffic rule:
•
Name = rule1
•
IP addresses: subscriber side = all IP addresses, network side = 10.10.10.10 only
•
Protocol = other
•
Direction = both
•
Traffic counter = counter1
•
The only action performed will be counting
NME-APA(config if)# traffic-rule rule1 IP-addresses subscriber-side all network-side
10.10.10.10 protocol other direction both traffic-counter name counter1
Example 2
This example creates the following traffic rule:
•
Name = rule2
•
IP addresses: all
•
Protocol = IS-IS
•
Direction = upstream
•
Traffic counter = none
•
Action = ignore (required since traffic-counter = none)
•
The only action performed will be Ignore .
NME-APA(config if)# traffic-rule rule2 IP-addresses all protocol IS-IS direction upstream
traffic-counter none action ignore
How to Delete a Traffic Rule
Step 1
From the NME-APA(config if)# prompt, type no traffic-rule name nameand press Enter.
Removes the specified traffic rule.
How to Delete all Traffic Rules
Step 1
From the NME-APA(config if)# prompt, type no traffic-rule all and press Enter.
Removes all existing traffic rules.
How to Manage Traffic Rules and Counters
Use these commands to display existing traffic rule configuration, as well as traffic counter configuration (packets/bytes and the name of the rule using the counter) and traffic counter value.
You can also reset a specific counter or all counters.
•
How to View a Specified Traffic Rule
•
How to View all Traffic Rules
•
How to View a Specified Traffic Counter
•
How to View all Traffic Counters
•
How to Reset a Specified Traffic Counter
•
How to Reset all Traffic Counters
How to View a Specified Traffic Rule
Step 1
From the NME-APA# prompt, type show interface linecard 0 traffic-rule name rule-nameand press Enter.
Displays the configuration of the specified traffic rule.
How to View all Traffic Rules
Step 1
From the NME-APA# prompt, type show interface linecard 0 traffic-rule all and press Enter.
Displays the configuration of all existing traffic rules.
How to View a Specified Traffic Counter
Step 1
From the NME-APA# prompt, type show interface linecard 0 traffic-counter name counter-nameand press Enter.
Displays the value of the specified counter and lists the traffic rules that use it.
Viewing a Traffic Counter: Example
The following example displays information for the traffic counter "cnt".
NME-APA# show interface linecard 0 traffic-counter name cnt
Counter 'cnt' value: 0 packets. Rules using it: None.
How to View all Traffic Counters
Step 1
From the NME-APA# prompt, type show interface linecard 0 traffic-counter all and press Enter.
Displays the value of the each counter and lists the traffic rules that use it.
Viewing the Traffic Counters: Example
The following example displays information for all existing traffic counters.
NME-APA# show interface linecard 0 traffic-counter all
Counter 'cnt' value: 0 packets. Rules using it: None.
Counter 'cnt2' value: 0 packets. Rules using it: Rule2.
2 counters listed out of 32 available.
How to Reset a Specified Traffic Counter
Step 1
From the NME-APA# prompt, type clear interface linecard 0 traffic-counter name counter-nameand press Enter.
Displays the value of the specified counter and lists the traffic rules that use it.
How to Reset all Traffic Counters
Step 1
From the NME-APA# prompt, type clear interface linecard 0 traffic-counter all and press Enter.
Displays the value of the each counter and lists the traffic rules that use it.