Skip to content
Eddie Kohler edited this page Oct 17, 2017 · 3 revisions

IPEncap Element Documentation

NAME

IPEncap — Click element; encapsulates packets in static IP header

SYNOPSIS

IPEncap(PROTO, SRC, DST, KEYWORDS)

Ports: 1 input, 1 output
Processing: agnostic

DESCRIPTION

Encapsulates each incoming packet in an IP packet with protocol PROTO, source address SRC, and destination address DST. This is most useful for IP-in-IP encapsulation. Its destination address annotation is also set to DST.

As a special case, if DST is "DST_ANNO", then the destination address is set to the incoming packet's destination address annotation.

Keyword arguments are:

  • TTL — Byte. The IP header's time-to-live field. Default is 250.
  • DSCP — Number between 0 and 63. The IP header's DSCP value. Default is 0.
  • ECT — Boolean or "2". If true, sets the IP header's ECN bits to ECN Capable Transport. If "true", "1" or "yes", sets the ECN bits to 1; but if "2", sets them to 2. Default is false.
  • CE — Boolean. If true, sets the IP header's ECN bits to 3 (Congestion Experienced). Default is false.
  • TOS — Byte. The IP header's TOS value. Default is 0. If you specify TOS, you may not specify DSCP, ECT, or CE.
  • DF — Boolean. If true, sets the IP header's Don't Fragment bit to 1. Default is false.

The StripIPHeader element can be used by the receiver to get rid of the encapsulation header.

EXAMPLES

Wraps packets in an IP header specifying IP protocol 4 (IP-in-IP), with source 18.26.4.24 and destination 140.247.60.147:

  IPEncap(4, 18.26.4.24, 140.247.60.147)

You could also say "IPEncap(ipip, ...)".

ELEMENT HANDLERS

  • src (read/write) — Returns or sets the SRC parameter.
  • dst (read/write) — Returns or sets the DST parameter.

SEE ALSO

UDPIPEncap, StripIPHeader

Generated by click-elem2man from ../elements/ip/ipencap.hh:9 on 2017/10/17.

Clone this wiki locally