etherip docs
[eoip.git] / README.md
blob9cf724cb4e863541687f542650bdfff056d57c36
1 EOIP tunnels
2 ============
3 Are handy feature of RouterOS allowing easy setup of high-performance ethernet VPNs.
4 For documentation and setup guide, see http://wiki.mikrotik.com/wiki/Manual:Interface/EoIP
6 Protocol spec
7 -------------
9 After IP header (which can be fragmented, MTU 1500 is usually used for tunnels)
10 GRE-like datagram follows. Note that it's nothing like RFC 1701 MikroTik mentioned in their docs:
12      0                   1                   2                   3
13      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
14     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
15     |       GRE FLAGS 0x20 0x01     |      Protocol Type  0x6400    | = MAGIC "\x20\x01\x64\x00"
16     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
17     |   Encapsulated frame length   |           Tunnel ID           |
18     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
19     | Ethernet frame...                                             |
21 Installation
22 ------------
24     # git clone git://github.com/katuma/eoip.git
25     # make install
27 Usage
28 =====
30     # apt-get install uml-utilities
31     # tunctl -t tap0
32     # eoip
33     eoip [-f] [-s /tmp/statusfile] <intf> [<local> [<remote>:<tunnelid> <remote:tunnelid...>]]
34     Flags:
35             -f      filter switch ports
36             -t N    mac address timeout (seconds, 1800 by default)
37             -s path store connected status and mac learning reports in here
39 Example:
41     # eoip tap0 1.2.3.4 5.6.7.8:1234
42     [admin@5.6.7.8] /interface eoip add name=eoip-test tunnel-id=1234 remote-address=1.2.3.4
44 This will run the daemon in fixed p2p mode, ie single peer is allowed to establish tunnel via
45 Tunnel ID 1234.
47 Tunnel ID with value 'etherip' is special - etherip tunnels will be established instead, fe:
49     # eoip tap0 1.2.3.4 5.6.7.8:etherip
51 Will establish single etherip tunnel between hosts 1.2.3.4 and 5.6.7.8. "open" etherip mode is
52 achieved via:
54     # eoip tap0 1.2.3.4 0.0.0.0:etherip
56 Modes of operation
57 ------------------
59 * Fixed, single tunnel:
60   `eoip tap0 localip remoteip:1234`
61 * Fixed, multiple tunnels:
62   `eoip tap0 localip remoteip1:1234 remoteip2:1235 ....`
63 * Open, single tunnel:
64   `eoip tap0 localip 0.0.0.0:1234`
65 * Open, multiple/unlimited tunnels:
66   `eoip tap0 localip`
67 * Open, multiple predefined tunnels:
68   `eoip tap0 localip 0.0.0.0:1234 0.0.0.0:1235`
70 In "open" mode remote peer is learned via incoming packet (tunnelIDs being used to distinguish between each other).
72 In "multiple" mode, all tunnels will be bridged together exactly like STP unaware ethernet switch.
74 Flag '-f' prevents virtual "ports" from talking with each other to prevent packet storms - that means only the tap interface itself will be reachable.