Beruflich Dokumente
Kultur Dokumente
Manual:Interface/Gre
< Manual:Interface
Contents
1 Summary A pplies to
RouterOS:
2 Properties
v5+
3 Setup examples
Summary
GRE (generic routing encapsulation) is a tunneling protocol that was originally developed by Cisco. It can encapsulate wide
variety of protocols creating virtual point-to-point link.
GRE the same as IPIP and EoIP were originally developed as stateless tunnels. Meaning that if remote end of the tunnels
goes down all traffic that was routed over the tunnels gets blackholed. To solve this problem RouterOS have added
keepalive feature for GRE tunnels.
GRE tunnel adds 24 byte overhead (4-byte gre header + 20-byte IP header).
Note: Gre tunnel can forward only IP and IPv6 packets (ethernet type 800 and 86dd)
Properties
Property Description
keepalive(integer [1..4294967295]; Default: ) Tunnel keepalive timeout in seconds. By default keepalive is disabled.
local-address(IP; Default: 0.0.0.0) Ip addres that will be used as local tunnel end. If set to 0.0.0.0 then ip
address of outgoing interface will be taken.
Setup examples
w iki.mikrotik.com/w iki/Manual:Interface/Gre 1/3
11/21/12 Manual:Interface/Gre - MikroTik Wiki
The goal of example is to get Layer 3 connectivity between two remote sites over the internet.
We two sites Site1 with local network range 10.1.101.0/24 and Site2 with local network range 10.1.202.0/24.
Router on site 2:
Note: In this example keepalive is not configured, so tunnel interface will have running flag even if remote tunnel end is
not reachable
Now we just need to set up tunnel addresses and proper routing. Router on site 1:
/ip address
add address=172.16.1.1/30 interface=myGre
/ip route
add dst-address=10.1.202.0/24 gateway=172.16.1.2
Router on site 2:
/ip address
add address=172.16.1.2/30 interface=myGre
/ip route
add dst-address=10.1.101.0/24 gateway=172.16.1.1