Tuesday, May 9, 2017

IPIP Tunnel


The IPIP tunneling implementation on the MikroTik RouterOS is RFC 2003 compliant. IPIP tunnel is a simple protocol that encapsulates IP packets in IP to make a tunnel between two routers. The IPIP tunnel interface appears as an interface under the interface list. Many routers, including Cisco and Linux, support this protocol. This protocol makes multiple network schemes possible. for more details

IP tunnelling protocol adds the following possibilities to a network setups:
  • to tunnel Intranets over the Internet
  • to use it instead of source routing

##Router-1
##Ether1- WAN IP 42.166.17.158/28
##Ether5- LAN IP 192.168.1.1/24

/interface ethernet
set [ find default-name=ether1 ] name=ether1
set [ find default-name=ether5 ] name=ether5
/interface ipip
add !keepalive name=42.166.17.160 remote-address=42.166.17.160
/ip address
add address=42.166.17.158/28 interface=ether1 network=42.166.17.144
add address=192.168.1.1/24 interface=ether5 network=192.168.1.0
add address=172.16.10.1/30 interface=42.166.17.60 network=172.16.10.0
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1
/ip route
add distance=2 dst-address=192.168.2.0/24 gateway=172.16.10.2


##Router-2
##Ether1- WAN IP 42.166.17.160/28
##Ether5- LAN IP 192.168.2.1/24
/interface ethernet
set [ find default-name=ether1 ] name=ether1
set [ find default-name=ether5 ] name=ether5
/interface ipip
add !keepalive name=42.166.17.158 remote-address=42.166.17.158
/ip address
add address=42.166.17.160/28 interface=ether1 network=42.166.17.144
add address=192.168.2.1/24 interface=ether5 network=192.168.2.0
add address=172.16.10.2/30 interface=42.166.17.158 network=172.16.10.0
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1
/ip route
add distance=2 dst-address=192.168.1.0/24 gateway=172.16.10.1


0 comments:

Post a Comment