This section provides information to configure and manage filter policies using the command line interface.
Topics in this section include:
The most basic IPv4, IPv6, MAC, and VLAN filter policy must have the following:
This section provides a brief overview of the tasks that must be performed for IP filter configuration and provides the CLI commands.
Configuring and applying filter policies is optional. Each filter policy must have the following:
Use the following CLI syntax to create a template IPv4 or IPv6 filter policy:
The following example displays a template filter policy configuration.
Use the following CLI syntax to create an exclusive IPv4 or IPv6 filter policy:
The following example displays an exclusive filter policy configuration.
Within a filter policy, configure filter entries that contain criteria against which ingress, egress, and network traffic is matched. The action specified in the entry determines how the packets are handled, either dropped or forwarded.
The forward next-hop command is used to implement policy-based routing. For details, see Policy-Based Routing. Use the indirect keyword to identify the indirect next-hop router to which packets with matching criteria will be forwarded. The forward fc command is used to implement multi-field classification. For details, see Multi-field Classification (MFC).
Use the following CLI syntax to create an IP filter entry:
The following example displays an IP filter entry configuration.
Use the following CLI syntax to configure IPv4 filter matching criteria:
The following example displays a matching configuration.
| Note:
IPv4 filter entries can specify one or more matching criteria, with one caveat. In order to support the maximum 256 entries for IPv4 filters, any entry that uses source port (src-port) and/or destination port (dst-port) ranges (lt, gt, or range keywords) as match criteria must be within the first 64 entries. |
Use the following CLI syntax to configure IPv6 filter matching criteria:
The following example displays a matching configuration.
A PBR rule can be set up to extract packets from the data path and send them to the CSM for debugging or slow path forwarding, by having the next-hop point to a system IP or loopback interface of the 7705 SAR.
The extracted traffic can be rerouted to a final destination based on a RIB lookup on the CSM. The traffic is reinjected to the datapath based on the next-hop address.
Table 45 summarizes the queuing parameters for this functionality. These parameters are for slow path queues created for PBR and are not user-configurable.
Parameter | Maximum Value |
PIR | 1500 kb/s |
CIR | 100 kb/s |
MBS | 20 (non-buffer-chained adapter cards) 80 (buffer-chained adapter cards) |
CBS | 8 buffers |
The following syntax shows an example of extracting and reinjecting packets to a system IP address. An example for a loopback address would be similar.
Configuring and applying filter policies is optional. Each filter policy must have the following:
Use the following CLI syntax to configure a MAC filter with exclusive scope:
The following example displays an exclusive scope configuration.
Within a filter policy, configure filter entries that contain criteria against which ingress, egress, or network traffic is matched. The action specified in the entry determines how the packets are handled, either dropped or forwarded.
Use the following CLI syntax to configure a MAC filter entry:
The following example displays a MAC filter entry configuration.
Use the following CLI syntax to configure a MAC filter entry with matching criteria:
The following example displays a filter matching configuration.
Configuring and applying filter policies is optional. Each filter policy must have the following:
Use the following CLI syntax to configure a VLAN filter policy:
The following example displays a VLAN filter configuration.
Within a VLAN filter policy, configure filter entries that contain criteria against which ingress traffic on a ring port is matched. The action specified in the entry determines how the packets are handled, either dropped or forwarded. Forwarded packets are sent to the other ring port or the v-port, depending on the destination.
Use the following CLI syntax to configure a VLAN filter entry:
The following example displays a VLAN filter entry configuration.
Use the following CLI syntax to configure a VLAN filter entry with matching criteria:
The following example displays a filter matching configuration.
Use the following CLI syntax to configure filter log policy:
The following example displays a filter log configuration.
Filter policies must be created before they can be applied to a service. Create filter policies in the config>filter context.
The following CLI syntaxes show how to apply filter policies to services. Use the first CLI syntax to apply an IP or MAC filter policy to a VPLS SAP, mesh SDP, or spoke SDP. Use the second CLI syntax for Epipe or Ipipe services. Use the third CLI syntax for VPRN or IES interface SAPs and spoke SDPs. (For IES SAPs, IPv6 ingress and egress filters can also be applied.)
The following example is for VPLS. A VPRN example includes the interface command (config>service>vprn>interface).
The following example displays an IP and MAC filter assignment for a VPLS service configuration:
IP filter policies can be applied to ingress and egress network IP interfaces.
IPv4 filters are supported on all ingress and egress network interfaces. IPv6 filters are supported on all Ethernet ingress and egress network interfaces (with null or dot1q encapsulation) and on ingress and egress interfaces on the 4-port OC3/STM1 Clear Channel Adapter card (with POS encapsulation).
Filter policies must be created before they can be applied to a network interface. Create filter policies in the config>filter context.
VLAN filter policies can be applied to a ring port on the 2-port 10GigE (Ethernet) Adapter card and 2-port 10GigE (Ethernet) module. The filter operates on ingress traffic. Filter policies must be created before they can be applied. Create filter policies in the config>filter context.
This section discusses the following filter policy management tasks:
The 7705 SAR OS exits the matching process when the first match is found and then executes the actions in accordance with the specified action. Because the ordering of entries is important, the numbering sequence can be rearranged. Entries should be numbered from the most explicit to the least explicit.
Use the following CLI syntax to resequence existing IP, MAC, and VLAN filter entries:
The following output displays the original IP filter entry order followed by the reordered filter entries:
To access a specific IPv4 or IPv6 filter, you must specify the filter ID. Use the no form of the command to remove the command parameters or return the parameter to the default setting.
The following output displays a modified IP filter output.
To access a specific MAC filter, you must specify the filter ID. Use the no form of the command to remove the command parameters or return the parameter to the default setting. The example below changes the action to forward.
The following output displays the modified MAC filter output:
To access a specific VLAN filter, you must specify the filter ID. Use the no form of the command to remove the command parameters or return the parameter to the default setting. The example below adds entry 65535.
The following output displays the modified VLAN filter output:
Before you can delete a filter, you must remove the filter association from the applied ingress and egress SAPs, ingress SDPs, and ingress network interfaces.
You can remove a filter policy and then delete it from the following entities:
To remove an IP or MAC filter from a VPLS SAP or VPLS SDP (spoke or mesh), use the first CLI syntax (below). For a VPRN or IES interface SAP or spoke SDP, use the second CLI syntax:
The following example is for VPLS. A VPRN example includes the interface command (config>service>vprn>interface).
To remove an IPv4 or IPv6 filter from a network interface, enter the following CLI commands:
To remove a VLAN filter from a ring port, enter the following CLI command. Including filter-id is optional because only one filter can be applied to a port.
After you have removed the filter from all the network interfaces, SAPs, and SDPs (spoke and/or mesh) where it was applied, use the following CLI syntax to delete the filter:
To configure NAT, you must first:
To configure a NAT security profile, you must create the profile ID. Once created, the profile ID is referenced when you set up a NAT policy.
The following example displays a profile configuration.
The following output displays a modified NAT profile.
To configure NAT, you must first:
To configure a NAT policy, you must create the policy ID.
For the action nat command, destination ip-address and port tcp-udp-port parameters apply only to static destination NAT (port forwarding).
The following example displays a policy configuration for source NAT.
The following example displays a policy configuration for static destination NAT.
The following output displays a modified NAT policy output.