EdgeRouter gre tunnel with MikroTik

edgerouter-x

vlan64 = WAN – 93.155.130.38/30
eth0 = LAN – 192.168.10.1/24
tun1 = routing remote network – 192.168.122.0/24


configure
set interfaces ethernet eth1 vif 64 address 93.155.130.38/30
set interfaces ethernet eth0 address 192.168.10.1/24
set firewall options mss-clamp interface-type tun
set firewall options mss-clamp mss 1360
set interfaces tunnel tun1 address 192.168.20.2/20
set interfaces tunnel tun1 description Fantazia
set interfaces tunnel tun1 encapsulation gre
set interfaces tunnel tun1 local-ip 93.155.130.38
set interfaces tunnel tun1 mtu 1476
set interfaces tunnel tun1 multicast disable
set interfaces tunnel tun1 remote-ip 93.155.169.251
set interfaces tunnel tun1 ttl 255
set protocols static route 0.0.0.0/0 next-hop 93.155.130.37
set protocols static route 192.168.122.0/24 next-hop 192.168.20.1
set system offload ipv4 gre enable
commit
save
exit


ubnt@ubnt# run show interfaces tunnel tun1
tun1@NONE: mtu 1476 qdisc noqueue state UNKNOWN
link/gre 93.155.130.38 peer 93.155.169.251
inet 192.168.20.2/20 brd 192.168.31.255 scope global tun1
valid_lft forever preferred_lft forever
inet6 fe80::200:5efe:5d9b:8226/64 scope link
valid_lft forever preferred_lft forever
Description: Fantazia

RX: bytes packets errors dropped overrun mcast
721308 4769 0 0 0 0
TX: bytes packets errors dropped carrier collisions
106856 1396 0 0 0 0
[edit]

mk

ether = WAN – 93.155.169.251
bridge1 = LAN – 192.168.122.1/24
tun1 = routing remote network – 192.168.10.0/24


/ip address
add address=93.155.169.251 interface=ether1
add address=192.168.122.1/24 interface=bridge1
add address=192.168.20.1/30 interface=tun1
/interface gre
add !keepalive mtu=1476 name=tun1 remote-address=93.155.130.38

/ip route
add distance=1 dst-address=0.0.0.0/0 gateway=93.155.169.1
add distance=1 dst-address=192.168.10.0/24 gateway=192.168.20.2

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.