This module adds support for Mikrotik's EoIP
tunneling, which looks like GRE, but it's custom and ugly GRE modification. In GRE terms, it uses protocol type 0x6400
and splits one optional field 'key' into 2 fields. First half of 'key' used for payload length (in network byte order),
second - for tunnel ID (in little-endian byte order).
Repository on gitorious.org
# cd /usr/ports/net/ng_mikrotik_eoip
# make install clean
# kldload ng_mikrotik_eoip
Node support single hook named "out" and up to 216 hooks with decimal integer numbers as names
(which is used as tunnel IDs). Packets received on "out" hook are expected to be GRE packets and checked only
to contain 0x6400 as protocol type; next, tunnel ID extracted from GRE header and packet with stripped IP and GRE headers
forwarded to corresponding decimal-named hook. Packets received on decimal-named hook forwarded to "out" hook
with prepended GRE header.
+ mkpeer eiface t ether
+ rmhook t
+ mkpeer ngeth0: mikrotik_eoip ether 2222
+ mkpeer ngeth0:ether ksocket out inet/raw/gre
+ msg ngeth0:ether.out connect inet/22.214.171.124
MAC-address can be specified on ngeth0 interface.
Ugly userspace implementation for Linux