Skip to main content
Version: 7.26

ipip


interface/ipip​

Type: Directory

IPIP (IP-in-IP) is a tunneling protocol defined in RFC 2003 that carries IPv4 packets inside an outer IPv4 header. The outer header uses IP protocol 4, which the firewall matches as protocol=ipencap.

FlagNameDescription
XdisabledWhether an item is disabled.
RrunningWhether the interface is running.
DdynamicWhether the interface was created dynamically.
ArgumentTypeDescription
namestringInterface name.
mtunumLayer 3 maximum transmission unit of the tunnel. Default: auto, which sets actual-mtu to the MTU of the underlying interface minus 20 bytes for the outer IPv4 header. A fixed value overrides this calculation.
local-addressipAddrIP address on the router used by the IPIP tunnel. The remote router must reach this address as its remote-address.
remote-address ( mandatory )address (flags=4Dv)IP address of the remote end of the IPIP tunnel. The router must have a route to this address that does not use the tunnel itself.
keepalivesuper { keepalive-interval: time [1 .. ] , [keepalive-retries] [ ,num [1 .. ]] }

Sends keepalive probes to the remote endpoint and keeps the running flag only while the peer answers. The interface running flag is removed after KeepaliveRetries consecutive unanswered probes. Parameters are written in the following format: KeepaliveInterval,KeepaliveRetries where KeepaliveInterval is the time interval between probes and KeepaliveRetries is the number of retry attempts. Default: 10s,10. The interval must be at least 1 second and the retry count at least 1. The remote end must answer RouterOS keepalive probes; peers such as a Linux ipip tunnel do not, so unset the property for them. Unsetting keepalive disables dead-peer detection: the running flag stays set when the peer stops answering.

dscpnumDSCP value set in the outer header of tunnel packets. Default: inherit, which copies the DSCP value from the tunneled packet. A number marks the outer packets with that value instead.
clamp-tcp-mssboolControls whether to change the MSS size for received TCP SYN packets. When enabled, the router changes the MSS size for received TCP SYN packets if the current MSS size exceeds the tunnel interface MTU (taking into account the TCP/IP overhead). The received encapsulated packet still contains the original MSS, and only after decapsulation the MSS is changed. Default: yes.
dont-fragmentbool

Whether to set the DF bit in the outer header.

  • no - clear the DF bit, so the outer packet can be fragmented. Default.
  • inherit - use the DF flag of the tunneled packet.
ipsec-secret (syscap=security)stringWhen a secret is specified, the router adds a dynamic IPsec peer to remote-address with a pre-shared key and a transport-mode policy for the tunnel packets, using the default IPsec proposal. Keepalive packets are protected too. Both ends need the same secret. Requires allow-fast-path=no; setting the secret while FastPath is enabled fails with cannot enable fastpath together with ipsec yet.
allow-fast-pathboolWhether to allow FastPath processing. Default: yes. Must be disabled if IPsec tunneling is used. With FastPath, packets of an established flow can bypass the firewall, so the rule counters do not show every packet.
Read-only ArgumentTypeDescription
actual-mtunumActual maximum transmission unit of the tunnel: the largest inner packet the tunnel accepts. With mtu=auto it follows the MTU of the underlying interface minus the outer header size, and becomes smaller when IPsec is enabled.
current-remote-addressipAddrCurrent IP address of the remote end.