beautypg.com

Znyx targets, Zaction examples – Znyx Networks bh5700 User Manual

Page 112

background image

ZNYX Targets

ZACTION

This is the ZNYX Action target.

Parameters for ZACTION:

--drop

Drops the packet

--accept

Accepts the packet

--set-prio Set the 802.1p priority to

--use-prio Use queue priority

--copy-cpu Send the packet to the CPU. This will force the full
installed chains traversal in software

--set-eport Redirect the packet to port

--set-mport Mirror the packet to port

--set-tos

Set the IP-Precedence bits in the TOS field of the IP

header to

--set-dscp Set the 6-bit DSCP in the TOS field of the IP header
to .

Options with any of these ZACTION parameters:

--counter

Increment classifier hit counter

--arp Not an action, match only ARP packets.

-i option can be used to specify ingress port or VLAN,

-d specifies target IP address,

-p specifies arp operation as request (1) or response (2).

For arp response, the -o field can be used to specify the egress port.

ZACTION Examples

Send all tcp packets arriving on zhp5 out port 2:

iptables -a FORWARD -i zhp5 -p tcp -j ZACTION --set-eport 2

Send all tcp packets arriving on zhp5 to the CPU (software).

iptables -a FORWARD -i zhp5 -p tcp -j ZACTION --copy-cpu

Set the 802.1p priority to 3 on all tcp packets arriving on zhp5.

iptables -a FORWARD -i zhp5 -p tcp -j ZACTION --set-prio 3

Ethernet Switch Blade User's Guide

release 3.2.2j

page 112