This section provides a brief overview of the tasks that must be performed for IP filter configuration and provides the CLI commands.
5.6.1. Creating an IPv4 or IPv6 Filter Policy
Configuring and applying filter policies is optional. Each filter policy must have the following:
the filter type specified (IP)
a filter policy ID
a default action (drop or forward)
scope specified, either exclusive or template
at least one filter entry with matching criteria specified
5.6.1.1. IP Filter Policy
Use the following CLI syntax to create a template IPv4 or IPv6 filter policy:
config>filter# ip-filter filter-id [create]
description description-string
scope {exclusive | template}
default-action {drop | forward}
config>filter# ip-filter 12 create
config>filter# description "IP-filter"
config>filter$ scope template
config>filter# ipv6-filter ipv6-filter-id [create]
description description-string
scope {exclusive | template}
default-action {drop | forward}
config>filter# ipv6-filter 10 create
config>filter# description "ipv6-filter"
config>filter# scope template
The following example displays a template filter policy configuration.
A:ALU-7>config>filter# info
----------------------------------------------
...
ip-filter 12 create
description "IP-filter"
scope template
exit
...
----------------------------------------------
A:ALU-7>config>filter#
Use the following CLI syntax to create an exclusive IPv4 or IPv6 filter policy:
config>filter# ip-filter filter-id
description description-string
scope {exclusive | template}
default-action {drop | forward}
config>filter# ip-filter 11 create
config>filter# description "filter-main"
config>filter# scope exclusive
config>filter# ipv6-filter ipv6-filter-id
description description-string
scope {exclusive | template}
default-action {drop | forward}
config>filter# ipv6-filter 9 create
config>filter# description "ipv6-filter-main"
config>filter# scope exclusive
The following example displays an exclusive filter policy configuration.
A:ALU-7>config>filter# info
----------------------------------------------
...
ip-filter 11 create
description "filter-main"
scope exclusive
exit
...
----------------------------------------------
A:ALU-7>config>filter#
5.6.1.2. IP Filter Entry
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.
Enter a filter entry ID. The system does not dynamically assign a value.
Assign an action, either drop or forward.
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:
config>filter# ip-filter {filter-id | filter-name}
entry entry-id
description description-string
action [drop]
action forward [next-hop {ip-address | indirect ip-address}] [fc fc-name [priority low | high]]
config>filter# ip-filter 11
config>filter>ip-filter# entry 10 create
config>filter>ip-filter>entry$ description "no-91"
config>filter>ip-filter>entry$ action drop
config>filter>ip-filter>entry# exit
config>filter# ip-filter {filter-id | filter-name}
entry entry-id
description description-string
action {drop | forward}]
config>filter# ipv6-filter 9
config>filter>ipv6-filter# entry 10 create
config>filter>ipv6-filter>entry$ description "no-91"
config>filter>ipv6-filter>entry$ action drop
config>filter>ipv6-filter>entry# exit
The following example displays an IP filter entry configuration.
A:ALU-7>config>filter>ip-filter# info
----------------------------------------------
description "filter-main"
scope exclusive
entry 10 create
description "no-91"
match
action drop
exit
exit
----------------------------------------------
5.6.1.3. IP Filter Entry Matching Criteria
Use the following CLI syntax to configure IPv4 filter matching criteria:
config>filter>ip-filter>entry#
match
dscp dscp-name
dst-ip {ip-address/mask | ip-address netmask}
dst-port {{lt | gt | eq} dst-port-number} | {range start end}
fragment {true | false}
icmp-code icmp-code
icmp-type icmp-type
ip-option ip-option-value [ip-option-mask]
multiple-option {true | false}
option-present {true | false}
src-ip {ip-address/mask | ip-address netmask}
src-port {{lt | gt | eq} src-port-number} | {range start end}
tcp-ack {true | false}
tcp-syn {true | false}
config>filter>ip-filter>entry# match
config>filter>ip-filter>entry>match# src-ip 10.10.10.10/32
config>filter>ip-filter>entry>match# dst-ip 10.10.10.91/24
config>filter>ip-filter>entry>match# exit
The following example displays a matching configuration.
A:ALU-7>config>filter>ip-filter# info
----------------------------------------------
description "filter-main"
scope exclusive
entry 10 create
description "no-91"
match
dst-ip 10.10.10.91/24
src-ip 10.10.10.10/32
exit
action forward
exit
----------------------------------------------
A:ALU-7>config>filter>ip-filter#
| 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:
config>filter>ipv6-filter>entry#
match
dscp dscp-name
dst-ip {ip-address/prefix-length}
dst-port {{lt | gt | eq} dst-port-number} | {range start end}
icmp-code icmp-code
icmp-type icmp-type
src-ip {ip-address/prefix-length}
src-port {{lt | gt | eq} src-port-number} | {range start end}
tcp-ack {true | false}
tcp-syn {true | false}
config>filter>ipv6-filter>entry# match
config>filter>ipv6-filter>entry>match# src-ip
11::12/128
config>filter>ipv6-filter>entry>match# dst-ip
13::14/128
config>filter>ipv6-filter>entry>match# exit
The following example displays a matching configuration.
A:ALU-7>config>filter>ipv6-filter# info
----------------------------------------------
description "ipv6-filter-main"
scope exclusive
entry 10 create
description "no-91"
match
dst-ip 13::14/128
src-ip 11::12128
exit
action forward exit
5.6.1.4. IP Filter Entry for PBR to a System IP or Loopback Address
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 72 summarizes the queuing parameters for this functionality. These parameters are for slow path queues created for PBR and are not user-configurable.
Table 72:
PBR CSM Extraction Queue Parameters
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.
config>filter# ip-filter {filter-id | filter-name}
entry entry-id
action forward [next-hop {ip-address | indirect ip-address}] [fc fc-name [priority low | high]]
match
dscp dscp-name
config>filter# ip-filter 12
config>filter>ip-filter# entry 112 create
config>filter>ip-filter>entry$ action forward next-hop indirect 10.10.10.10
config>filter>ip-filter>entry# match
config>filter>ip-filter>entry>match# dscp be
config>filter>ip-filter>entry>match# exit
A:ALU-7>config>filter>ip-filter# info
----------------------------------------------
scope exclusive
entry 12 create
match
dscp be
exit
action forward next-hop indirect 10.10.10.10
exit
----------------------------------------------
A:ALU-7>config>filter>ip-filter#
5.6.2. Creating a MAC Filter Policy
Configuring and applying filter policies is optional. Each filter policy must have the following:
the filter type specified (MAC)
a filter policy ID
a default action, either drop or forward
filter policy scope, either exclusive or template
at least one filter entry
matching criteria specified
5.6.2.1. MAC Filter Policy
Use the following CLI syntax to configure a MAC filter with exclusive scope:
config>filter>mac-filter filter-id [create]
description description-string
scope {exclusive | template}
default-action {drop | forward}
config>filter>mac-filter 90 create
config>filter>mac-filter# description filter-west
config>filter>mac-filter# scope exclusive
config>filter>mac-filter# default-action drop
The following example displays an exclusive scope configuration.
A:ALU-7>config>filter# info
----------------------------------------------
...
mac-filter 90 create
description "filter-west"
scope exclusive
default-action drop
exit
----------------------------------------------
A:ALU-7>config>filter#
5.6.2.2. MAC Filter Entry
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.
Enter a filter entry ID. The system does not dynamically assign a value.
Assign an action, either drop or forward.
Use the following CLI syntax to configure a MAC filter entry:
config>filter>mac-filter {filter-id | filter-name}
entry entry-id [create]
description description-string
action [drop]
action forward
exit
config>filter>mac-filter 90
config>filter>mac-filter# entry 1 create
config>filter>mac-filter>entry# description “allow-104”
config>filter>mac-filter>entry# action drop
config>filter>mac-filter>entry# exit
The following example displays a MAC filter entry configuration.
A:sim1>config>filter# info
----------------------------------------------
mac-filter 90 create
entry 1 create
description "allow-104"
match
exit
action drop
exit
exit
----------------------------------------------
A:sim1>config>filter#
5.6.2.3. MAC Entry Matching Criteria
Use the following CLI syntax to configure a MAC filter entry with matching criteria:
config>filter>mac-filter {filter-id | filter-name}
entry entry-id
match [frame-type {802dot3 | 802dot2-llc | 802dot2-snap | ethernet_II}]
src-mac ieee-address
dst-mac ieee-address
etype 0x0600..0xffff
config>filter>mac-filter 90
config>filter>mac-filter# entry 1
config>filter>mac-filter>entry# match frame-type
802dot3
config>filter>mac-filter>entry>match# src-mac
00:dc:98:1d:00:00
config>filter>mac-filter>entry>match# dst-mac
02:dc:98:1d:00:01
config>filter>mac-filter>entry>match# etype 0x8100
The following example displays a filter matching configuration.
A;ALU-7>config>filter# info
----------------------------------------------
description "filter-west"
scope exclusive
entry 1 create
description "allow-104"
match
src-mac 00:dc:98:1d:00:00
dst-mac 02:dc:98:1d:00:01
etype 0x8100
exit
action drop
exit
----------------------------------------------
A:ALU-7>config>filter#
5.6.3. Creating a VLAN Filter Policy
Configuring and applying filter policies is optional. Each filter policy must have the following:
the filter type specified (VLAN)
a filter policy ID
a default action, either drop or forward
at least one filter entry
5.6.3.1. VLAN Filter Policy
Use the following CLI syntax to configure a VLAN filter policy:
config>filter>vlan-filter filter-id [create]
description description-string
default-action {drop | forward}
config>filter>vlan-filter 2 create
config>filter>vlan-filter# description VLAN_filter_2
config>filter>vlan-filter# default-action drop
The following example displays a VLAN filter configuration.
A:ALU-7>config>filter# info
----------------------------------------------
...
vlan-filter 2 create
description "VLAN_filter_2"
default-action drop
exit
----------------------------------------------
A:ALU-7>config>filter#
5.6.3.2. VLAN Filter Entry
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.
Enter a filter entry ID. The system does not dynamically assign a value.
Assign an action, either drop or forward.
Use the following CLI syntax to configure a VLAN filter entry:
config>filter>vlan-filter {filter-id | filter-name}
entry entry-id [create]
description description-string
action {drop | forward}
exit
config>filter>vlan-filter 2
config>filter>vlan-filter# entry 2 create
config>filter>vlan-filter>entry# description “drop-104”
config>filter>vlan-filter>entry# action drop
config>filter>vlan-filter>entry# exit
The following example displays a VLAN filter entry configuration.
A:sim1>config>filter# info
----------------------------------------------
vlan-filter 2 create
entry 2 create
description "drop-104"
match
action drop
exit
exit
exit
----------------------------------------------
A:sim1>config>filter#
5.6.3.3. VLAN Entry Matching Criteria
Use the following CLI syntax to configure a VLAN filter entry with matching criteria:
config>filter>vlan-filter {filter-id | filter-name}
entry entry-id
match vlan {lt|gt|eq} vlan-id
match vlan range vlan-id to vlan-id
match untagged
config>filter>vlan-filter 2
config>filter>vlan-filter# entry 2
config>filter>vlan-filter# description drop_104
config>filter>vlan-filter>entry# match vlan eq 104
The following example displays a filter matching configuration.
A;ALU-7>config>filter# info
----------------------------------------------
description "drop-104"
entry 2 create
description "drop-104"
match vlan eq 104
action drop
exit
exit
----------------------------------------------
A:ALU-7>config>filter#
5.6.4. Creating an IP Exception Filter Policy
Configuring and applying IP exception filter policies is optional. Each exception filter policy must have the following:
an exception filter policy ID
scope specified, either exclusive or template
at least one filter entry with matching criteria specified
5.6.4.1. IP Exception Filter Policy
Use the following CLI syntax to create an IP exception filter policy:
config>filter# ip-exception filter-id [create]
description description-string
scope {exclusive | template}
config>filter# ip-exception 1 create
config>filter>ip-except# description "IP-exception"
config>filter>ip-except# scope template
The following example displays a template IP exception filter policy configuration.
A:ALU-7>config>filter# info
----------------------------------------------
...
ip-exception 1 create
description "IP-exception"
scope template
exit
...
----------------------------------------------
A:ALU-7>config>filter#
5.6.4.2. IP Exception Entry Matching Criteria
Within an exception filter policy, configure exception entries that contain criteria against which ingress, egress, and network traffic is matched. Packets that match the entry criteria are allowed to transit the NGE domain in clear text.
Enter an exception filter entry ID. The system does not dynamically assign a value.
Specify matching criteria.
Use the following CLI syntax to configure IP exception filter matching criteria:
config>filter# ip-exception filter-id
entry entry-id [create]
description description-string
match
dst-ip {ip-address/mask | ip-address ipv4-address-mask}
dst-port {lt | gt | eq} dst-port-number
dst-port range dst-port-number dst-port-number
icmp-code icmp-code
icmp-type icmp-type
src-ip {ip-address/mask | ip-address ipv4-address-mask}
src-port {lt | gt | eq} src-port-number
src-port range src-port-number src-port-number
config>filter>ip-except# entry 1 create
config>filter>ip-except>entry# match
config>filter>ip-except>entry>match# src-ip 10.10.10.10/32
config>filter>ip-except>entry>match# dst-ip 10.10.10.91/24
config>filter>ip-except>entry>match# exit
The following example displays a matching configuration.
A:ALU-7>config>filter>ip-exception# info
----------------------------------------------
description "exception-main"
scope exclusive
entry 1
match
dst-ip 10.10.10.91/24
src-ip 10.10.10.10/32
exit
exit
----------------------------------------------
A:ALU-7>config>filter>ip-except#
5.6.5. Configuring Filter Log Policies
Use the following CLI syntax to configure filter log policy:
config>filter# log log-id
description description-string
destination memory num-entries
destination syslog syslog-id
summary
no shutdown
summary-crit dst-addr
summary-crit src-addr
wrap-around
The following example displays a filter log configuration.
A:ALU-48>config>filter>log# info detail
---------------------------------------------
description "Test filter log."
destination memory 1000
wrap-around
no shutdown
---------------------------------------------
A:ALU-48>config>filter>log#
5.6.6. Configuring a NAT Security Profile
To configure NAT, you must first:
configure a NAT security profile and policy in the config>security context
in the config>security>profile context, specify the timeouts for the tcp/udp/icmp protocols. This step is optional. If you do not configure the profile, a default profile is assigned.
in the config>security>policy context, configure a NAT security policy, and specify the match criteria and the action to be applied to a packet if a match is found
then configure a NAT zone and apply the policy ID to the zone
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.
config>security# profile profile-id [create]
description description-string
name profile-name
timeouts
icmp-request days hours minutes seconds
tcp-established days hours minutes seconds
tcp-syn days hours minutes seconds
tcp-time-wait days hours minutes seconds
tcp-transitory days hours minutes seconds
udp days hours minutes seconds
udp-dns days hours minutes seconds
udp-initial days hours minutes seconds
The following example displays a profile configuration.
config>security# begin
config>security# session-high-wmark 90
config>security# session-low-wmark 70
config>security# profile 2 create
config>security>profile# name "default"
config>security>profile# description "session timer check"
config>security>profile# timeouts
config>security>profile>timeouts# icmp-request seconds 59
config>security>profile>timeouts# tcp-time-wait minutes 1
config>security>profile>timeouts# exit
config>security>profile# exit
config>security# commit
The following output displays a modified NAT profile.
A:ALU-7>config>security# info
----------------------------------------------
..
session-high-wmark 90
session-low-wmark 70
profile 2 create
name "default"
description "For session timer check"
timeouts
exit
exit
..
----------------------------------------------
A:ALU-7>config>security#
5.6.7. Configuring a NAT Security Policy
To configure NAT, you must first:
configure a NAT security profile and policy in the config>security context
in the config>security>profile context, specify the timeouts for the tcp/udp/icmp protocols. This step is optional. If you do not configure the profile, a default profile is assigned.
in the config>security>policy context, configure a NAT security policy, and specify the match criteria and the action to be applied to a packet if a match is found
then configure a NAT zone and apply the policy ID to the zone
To configure a NAT policy, you must create the policy ID.
config>security# policy policy-id [create]
description description-string
entry entry-id [create]
description description-string
match [local] protocol protocol-id
direction {zone-outbound | zone-inbound | both}
dst-ip ip-address to ip-address
dst-port {lt | gt | eq} tcp/udp port range start end
icmp-code icmp-code
icmp-type icmp-type
src-ip ip-address to ip-address
src-port {lt | gt | eq} tcp/udp port range start end
action {forward | reject | nat}
action nat [destination ip-address port tcp-udp-port]
limit
concurrent-sessions number
profile profile-id | profile-name
name policy-name
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.
config>security# begin
config>security# policy 1 create
config>security>policy# name "inbound policy"
config>security>policy# description "common egress policy"
config>security# entry 1 create
config>security>policy>entry# description "Source NAT"
config>security>policy>entry# match
config>security>policy>entry>match# direction zone-inbound
config>security>policy>entry>match# exit
config>security>policy>entry># limit
config>security>policy>entry># exit
config>security>policy>entry># action nat
config>security>policy>entry># profile 2
config>security>policy>entry># exit
config>security>policy># exit
config>security># commit
The following example displays a policy configuration for static destination NAT.
config>security# begin
config>security# policy 1 create
config>security# entry 2 create
config>security>policy>entry# description "Dest NAT"
config>security>policy>entry# match local protocol udp
config>security>policy>entry>match# dst-port eq 4000
config>security>policy>entry>match# exit
config>security>policy>entry># limit
config>security>policy>entry># exit
config>security>policy>entry># action nat destination 10.10.10.1 port 4000
config>security>policy>entry># profile 2
config>security>policy>entry># exit
config>security>policy># exit
config>security># commit
The following output displays a modified NAT policy output.
A:ALU-7>config>security# info
----------------------------------------------
..
policy 1 create
name "inbound policy"
description "common egress policy"
entry 1 create
description "Source NAT"
match
direction zone-inbound
exit
limit
action nat
profile 2
exit
entry 2 create
description "Dest NAT"
match local protocol udp
dst-port eq 4000
exit
limit
action nat destination 10.10.10.1 port 4000
profile 2
exit
commit
..
----------------------------------------------
A:ALU-7>config>security#
5.6.8. Applying IP and MAC Filter Policies to a Service
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.)
config>service# vpls service-id
sap sap-id
egress
filter ip ip-filter-id
filter ipv6 ipv6-filter-id
ingress
filter ip ip-filter-id
filter ipv6 ipv6-filter-id
mesh-sdp sdp-id:vc-id [vc-type {ether | vlan}]
ingress
filter ip ip-filter-id
filter ipv6 ipv6-filter-id
spoke-sdp sdp-id:vc-id [vc-type {ether | vlan}]
ingress
filter ip ip-filter-id
filter ipv6 ipv6-filter-id
config>service# epipe service-id
sap sap-id
ingress
filter ip ip-filter-id
config>service# vprn service-id
interface ip-int-name
sap sap-id
egress
filter ip ip-filter-id
filter ipv6 ipv6-filter-id
ingress
filter ip ip-filter-id
filter ipv6 ipv6-filter-id
spoke-sdp sdp-id:vc-id
ingress
filter ip ip-filter-id
filter ipv6 ipv6-filter-id
The following example is for VPLS. A VPRN example includes the interface command (config>service>vprn>interface).
config>service# vpls 5000
config>service>vpls# sap 1/5/5
config>service>vpls>sap# ingress filter mac 92
config>service>vpls>sap# egress filter ip 10
config>service>vpls>sap# exit
config>service>vpls# mesh-sdp 15:5000
config>service>vpls>mesh-sdp# ingress filter mac 93
config>service>vpls>mesh-sdp# exit
config>service>vpls# spoke-sdp 15:5001
config>service>vpls>spoke-sdp# ingress filter mac 94
config>service>vpls>spoke-sdp# exit
The following example displays an IP and MAC filter assignment for a VPLS service configuration:
A:ALU-48>config>service>vpls# info
----------------------------------------------
...
sap 1/5/5 create
ingress
filter mac 92
exit
egress
filter ip 10
exit
exit
mesh-sdp 15:5000 create
ingress
filter mac 93
exit
exit
spoke-sdp 15:5001 create
ingress
filter mac 94
exit
exit
no shutdown
...
----------------------------------------------
A:ALU-48>config>service>vpls#
5.6.9. Applying IP Filter Policies to Network Interfaces
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.
config>router# interface ip-int-name
egress
filter ip ip-filter-id
filter ipv6 ipv6-filter-id
ingress
filter ip ip-filter-id
filter ipv6 ipv6-filter-id
config>router# interface to-104
config>router>if# ingress
config>router>if>ingress# filter ip 10
config>router>if# exit
A:ALU-48>config>router# info
#------------------------------------------
# IP Configuration
#------------------------------------------
...
interface "to-104"
address 10.0.0.10/32
port 1/1/1
ingress
filter ip 10
exit
exit
...
#------------------------------------------
A:ALU-48>config>router#
5.6.10. Applying VLAN Filter Policies to a Ring Port
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.
config>port>ethernet# vlan-filter filter-id
config>port>ethernet# vlan-filter 2
A:ALU-48>config>port>ethernet# info
#------------------------------------------
...
vlan-filter 2
...
#------------------------------------------
A:ALU-48>config>port>ethernet#