IPIP Tunnel Interfaces
Document revision: | 1.1 (Fri Mar 05 08:25:43 GMT 2004) |
Applies to: | V2.8 |
General Information
Summary
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 based, support this protocol. This protocol makes multiple network schemes possible.
IP tunneling protocol adds the following possibilities to a network setups:
- to tunnel Intranets over the Internet
- to use it instead of source routing
Quick Setup Guide
To make an IPIP tunnel between 2 MikroTik routers with IP addresses 10.5.8.104 and 10.1.0.172, using IPIP tunnel addresses 10.0.0.1 and 10.0.0.2, follow the next steps.
-
Configuration on router with IP address 10.5.8.104:
-
Add an IPIP interface (by default, its name will be ipip1):
[admin@10.5.8.104] interface ipip> add local-address=10.5.8.104 \ remote-address=10.1.0.172 disabled=no
-
Add an IP address to created ipip1 interface:
[admin@10.5.8.104] ip address> add address=10.0.0.1/24 interface=ipip1
-
-
Configuration on router with IP address 10.1.0.172:
-
Add an IPIP interface (by default, its name will be ipip1):
[admin@10.1.0.172] interface ipip> add local-address=10.1.0.172 \ remote-address=10.5.8.104 disabled=no
-
Add an IP address to created ipip1 interface:
[admin@10.1.0.172] ip address> add address=10.0.0.2/24 interface=ipip1
-
Specifications
Packages required: systemLicense required: Level1 (limited to 1 tunnel) , Level3 (200 tunnels) , Level5 (unlimited)
Submenu level: /interface ipip
Standards and Technologies: IPIP (RFC 2003)
Hardware usage: Not significant
Related Documents
Additional Resources
IPIP Setup
Submenu level: /interface ipipDescription
An IPIP interface should be configured on two routers that have the possibility for an IP level connection and are RFC 2003 compliant. The IPIP tunnel may run over any connection that transports IP. Each IPIP tunnel interface can connect with one remote router that has a corresponding interface configured. An unlimited number of IPIP tunnels may be added to the router. For more details on IPIP tunnels, see RFC 2003.
Property Description
name (name; default: ipipN) - interface name for reference mtu (integer; default: 1480) - Maximum Transmission Unit. Should be set to 1480 bytes to avoid fragmentation of packets. May be set to 1500 bytes if mtu path discovery is not working properly on links local-address (IP address) - local address on router which sends IPIP traffic to the remote host remote-address (IP address) - the IP address of the remote host of the IPIP tunnel - may be any RFC 2003 compliant routerNotes
Use /ip address add command to assign an IP address to the IPIP interface.
There is no authentication or 'state' for this interface. The bandwidth usage of the interface may be monitored with the monitor feature from the interface menu.
MikroTik RouterOS IPIP implementation has been tested with Cisco 1005. The sample of the Cisco 1005 configuration is given below:
interface Tunnel0 ip address 10.3.0.1 255.255.255.0 tunnel source 10.0.0.171 tunnel destination 10.0.0.204 tunnel mode ipip
Application Examples
Description
Suppose we want to add an IPIP tunnel between routers R1 and R2:
At first, we need to configure IPIP interfaces and then add IP addresses to them.
The configuration for router R1 is as follows:
[admin@MikroTik] interface ipip> add local-address: 10.0.0.1 remote-address: 22.63.11.6 [admin@MikroTik] interface ipip> print Flags: X - disabled, R - running # NAME MTU LOCAL-ADDRESS REMOTE-ADDRESS 0 X ipip1 1480 10.0.0.1 22.63.11.6 [admin@MikroTik] interface ipip> en 0 [admin@MikroTik] interface ipip> /ip address add address 1.1.1.1/24 interface=ipip1
The configuration of the R2 is shown below:
[admin@MikroTik] interface ipip> add local-address=22.63.11.6 remote-address=10. 0.0.1 [admin@MikroTik] interface ipip> print Flags: X - disabled, R - running # NAME MTU LOCAL-ADDRESS REMOTE-ADDRESS 0 X ipip1 1480 22.63.11.6 10.0.0.1 [admin@MikroTik] interface ipip> enable 0 [admin@MikroTik] interface ipip> /ip address add address 1.1.1.2/24 interface=ipip1
Now both routers can ping each other:
[admin@MikroTik] interface ipip> /ping 1.1.1.2 1.1.1.2 64 byte ping: ttl=64 time=24 ms 1.1.1.2 64 byte ping: ttl=64 time=19 ms 1.1.1.2 64 byte ping: ttl=64 time=20 ms 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max = 19/21.0/24 ms [admin@MikroTik] interface ipip>