User guide
L2Filter Command Reference L2Filter
7-61
iMG/RG Software Reference Manual (Quality of Service)
7.2.1.1.2 Rules
The rule is the workhorse of the L2 Filter system. A user defines a set of rules which contain one packet clas-
sifier and its associated action. The packet classifier is an offset / value pair that the filter uses to identify packets
on which to apply a rule. Several of the basic classifier fields have been pre-defined for use however the user has
the ability to define their own.
7.2.1.1.3 Example
The following is an example of how the L2 Filter module can be used to filter incoming and outgoing DHCP
requests for VLAN 402 on the bridge.
Example
l2filter add fieldType udpDstPort base udp_header offset 2 mask 0xffff
l2filter add fieldType ipProtocol base ip_header offset 9 mask 0xff
l2filter add profile bridge_rx
l2filter add profile bridge_tx
l2filter add rule Vlan402DhcpServerRx
l2filter rule Vlan402DhcpServerRx add action drop
l2filter rule Vlan402DhcpServerRx add field udpDstPort EQ 67
l2filter rule Vlan402DhcpServerRx add field packetvid EQ 402
l2filter add rule Vlan402DhcpServerTx
l2filter rule Vlan402DhcpServerTx add action drop
l2filter rule Vlan402DhcpServerTx add field udpDstPort EQ 67
l2filter rule Vlan402DhcpServerTx add field packetvid EQ 402
l2filter profile bridge_rx attach rule Vlan402DhcpServerRx
l2filter profile bridge_tx attach rule Vlan402DhcpServerTx
transport attach default l2filter profile bridge_rx Rx
transport attach default l2filter profile bridge_tx Tx
transport set default l2filter state enabled
7.2.2 L2Filter Command Reference
7.2.2.1 L2 Filter CLI commands
The table below lists the l2filter commands provided by the CLI:
TABLE 7-4 L2filter commands
Commands
Fiber
A
Fiber
B
Fiber
C
Fiber
D
Fiber
E
Modul
ar
ADSL
A
ADSL
B
ADSL
C
L2FILTER ADD FIELDTYPE X XXXXXX