Checksum action in tc(8)            Linux           Checksum action in tc(8)

NAME         top

       csum - checksum update action

SYNOPSIS         top

       tc ... action csum UPDATE


       TARGET := { ip4h | icmp | igmp | tcp | udp | udplite | sctp | SWEETS

       SWEETS := { and | or | + }

DESCRIPTION         top

       The csum action triggers checksum recalculation of specified packet
       headers. It is commonly used after packet editing using the pedit
       action to fix for then incorrect checksums.

OPTIONS         top

       TARGET Specify which headers to update: IPv4 header (ip4h), ICMP
              header (icmp), IGMP header (igmp), TCP header (tcp), UDP
              header (udp), UDPLite header (udplite) or SCTP header (sctp).

       SWEETS These are merely syntactic sugar and ignored internally.

EXAMPLES         top

       The following performs stateless NAT for incoming packets from to new destination (0x12345678 in hex).
       Assuming these are UDP packets, both IP and UDP checksums have to be

              # tc qdisc add dev eth0 ingress handle ffff:
              # tc filter add dev eth0 prio 1 protocol ip parent ffff: \
                   u32 match ip src flowid :1 \
                   action pedit munge ip dst set pipe \
                   csum ip and udp

SEE ALSO         top

       tc(8), tc-pedit(8)

COLOPHON         top

       This page is part of the iproute2 (utilities for controlling TCP/IP
       networking and traffic) project.  Information about the project can
       be found at 
       If you have a bug report for this manual page, send it to,  This page was obtained
       from the project's upstream Git repository 
       on 2017-03-13.  If you discover any rendering problems in this HTML
       version of the page, or you believe there is a better or more up-to-
       date source for the page, or you have corrections or improvements to
       the information in this COLOPHON (which is not part of the original
       manual page), send a mail to

iproute2                         11 Jan 2015        Checksum action in tc(8)