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