This target is used to set the Netfilter mark value associated with the packet. The target can only be used in the mangle table. It can, for example, be used in conjunction with routing based on fwmark (needs iproute2). The mark field is 32 bits wide.

--set-xmark value[/mask]
    Zeroes out the bits given by mask and XORs value into the packet mark ("nfmark"). If mask is omitted, 0xFFFFFFFF is assumed.

--set-mark value[/mask]
    Zeroes out the bits given by mask and ORs value into the packet mark. If mask is omitted, 0xFFFFFFFF is assumed.

The following mnemonics are available:

--and-mark bits
    Binary AND the nfmark with bits. (Mnemonic for --set-xmark 0/invbits, where invbits is the binary negation of bits.)

--or-mark bits
    Binary OR the nfmark with bits. (Mnemonic for --set-xmark bits/bits.)

--xor-mark bits
    Binary XOR the nfmark with bits. (Mnemonic for --set-xmark bits/0.)