SmartNA-X 1G/10G Modular | Command Line Reference |
127
SmartNA-X
™
1G/10G User Guide 1.4
©
2015 Network Critical Solutions Limited
Filtering and load balancing commands
This section provides reference information for packet filtering commands.
set filter any
Use the
set filter any
command to create filters for packets that match ether-types IPv4, IPv6, ARP or MPLS. The filter
can be further refined by specifying layer 2, 3 and/or layer 4 headers, plus any user pre-defined custom fields.
Syntax
set filter
filter-name
any
[
VLAN
tag
] [
PCP
level
] [
MAC
src
mac-id
] [
MAC
dest
mac-id
] [
MAC
either
mac-id
]
[
Customfield
custom-field-name
value
]
Parameters
filter-name
Specify a unique, case-sensitive, name for the filter. The name may contain spaces, but if it does it must be
contained in quotes "..." (the name cannot itself contain quotes).
VLAN
tag
Filter by Virtual LAN (VLAN) tag. Use one of the following formats to specify a single or multiple tags:
•
100
single tag
•
100–110
inclusive tag range
•
0/1
a value/mask tag pair (here all even tags)
•
100,150
several tags (use commas to separate values, no spaces)
PCP
level
Filter by Priority Code Point (user priority) from a VLAN header.
You may use the following formats when specifying levels:
• 2—A single level
• 2-4—An inclusive range
• 0/1—A value/mask pair (here all even)
• 0,2—Multiple levels (use commas to separate values, no spaces)
MAC
src
,
dest
,
either
mac-id
Filter by MAC address source, destination, or either. Use one of the following formats to
specify a single MAC address or multiple MAC addresses:
•
01:23:45:67:89:ab
•
01:23:45:67:89:ab,01:23:45:67:89:ac
(use commas to separate values, no spaces)
Customfield
custom-field-name
value
Filter by custom field if a compatible field has been defined. The value entered
here must be within the scope of the field length defined for the custom field. For example, if the custom field was defined
with an 8-bit length, then values of 0-255 are permitted.
Examples
Define a filter that matches any packet type from Mac source 01:23:45:67:89:ab. Review and commit to the system.
CONTROLLER>
set filter "Example filter" any mac src 01:23:45:67:89:ab
CONTROLLER>
show filters
Use commit command to configure the switch with these.
filters
Example filter
packetType : any
mac
source : 01:23:45:67:89:ab
...
CONTROLLER>
commit
Committing maps and vline
Committing filters