This documents describes the IP Tunnel feature, which is part of OpenROUTE Networks Virtual Private Network (VPN) software.
Introducing IP Tunnels
How IP Tunnels Work
Configuring IP Tunnels
IP Tunnel Commands
Introducing IP Tunnels
Virtual Private Networks (VPNs) securely connect sites over a public network, such as the Internet. VPNs provide data encryption to guarantee the privacy of information while it passes over the public network. They also provide authentication to make sure traffic is not forged or tampered with.
With VPNs, remote offices, telecommuters, and travelling employees can connect to corporate networks over the public Internet at a greatly reduced cost over private, point-to-point leased lines, long-distance dialup connections, or Frame Relay connections.
The OpenROUTE Networks VPN implementation uses IP Tunnels to transport data and SKIP (Simple Key-Management for Internet Protocols) to secure the data. This document describes IP Tunnels.
Using SKIP explains how SKIP works, how to set up SKIP, and defines the SKIP commands.
Using IP Tunnels With SKIP gives examples of how to assemble several types of VPNs using IP Tunnels and SKIP.
Using VPNs With NAT gives examples of how to set up VPNs using IP Tunnels with SKIP when Network Address Translation (NAT) is also running.
Sample Configuration
Figure 1 shows an IP Tunnel configuration that has three tunnel endpoints. The tunnel endpoints encapsulate IP data in an IP header before sending the data through the tunnel. When a tunnel endpoint receives traffic from the tunnel, it removes the IP header before forwarding the packet.
Figure 1 Simple IP Tunnel Configuration

IP Tunnel Features and Benefits
IP Tunnels have several major features and benefits:
IP tunnels work with SKIP encryption to let you securely send business data over the public Internet without that data being visible. Using the public Internet for business data can result in a great cost savings. For example, a remote user who needs to connect to a central site can securely connect to that site by placing a local call to their nearest Internet Service Provider (ISP).
The tunnel can join two networks that use unregistered IP addresses over a public IP network. This feature saves you the time and expense of allocating registered IP addresses.
If you are running SKIP with your IP tunnel, you can increase the speed of sending your data over the Internet by compressing your data using the STAC-LZS algorithm. See set compression.
The tunnel topology is equivalent to a single point-to-point link between the tunnel endpoints, independent of the actual number of hops within the tunnel. Routing protocols can run across the tunnel without knowing the topology of the public network that carries the tunnel.
The tunnel transparently performs special processing, such as IP security.
If the router cannot reach the remote tunnel endpoint, the tunnel software notifies the local network.
The tunnel dynamically determines the MTU (maximum transfer unit) size using MTU discovery. MTU discovery lets the tunnel determine if a packet needs to be fragmented before it sends the packet, ensuring that the tunnel does not encapsulate fragments unnecessarily.
RFC 1191, Path MTU Discovery.
RFC 2003, IP Encapsulation in IP.
IP
SKIP (Simple Key-Management for Internet Protocols)
Tunnel source and destination addresses are usually symmetric. My source address is usually your destination address and vice versa. However, this is not required. The router can use any of its publicly reachable interface addresses as the destination address of tunnels that end at that router. The source address that the router uses to send packets into the tunnel may or may not be the same as that destination address.
The following sections describe each type of IP tunnel address.
Interface Addresses
For each remote tunnel endpoint, you add a tunnel interface on the router and assign an IP address to the interface using the IP configuration. Typically, tunnel interfaces use unnumbered IP addresses. Tunnel interfaces can use numbered IP addresses, but you must assign addresses from the same subnet at each end of the tunnel, the same way you would on a point-to-point link.
IP Addressing on Interfaces That Connect to a SunScreen SKIP for Windows Client
If the tunnel interface connects to a remote SunScreen SKIP for Windows client, and the router does not know the client's IP address, you can set up the router to dynamically assign the client's IP address to the tunnel interface. This feature is a variation of dynamic IP addressing used with PPP. With SKIP, the tunnel interface is assigned the address of the remote SKIP client, causing the router to send packets to that client over the tunnel rather than sending those packets over the Internet.Note:
This feature is only supported if the local SKIP router is also the gateway to the Internet.
Answering Yes instructs the router to automatically learn the address of the SKIP client. You do not have to enter routing table entries. The router assigns a network mask to the address. The mask distinguishes this type of dynamically assigned address, where the interface assumes the address of the peer, from a PPP-style assignment, where the peer assigns an address. You can display the mask using the list address command at theIP config>ADD ADDRESS
Which net is this address for [0]? 4
New address [0.0.0.0]? 0.0.0.4
Is this interface a tunnel to a single SKIP PC or workstation(Yes or [No]): YES
IP Config> prompt. Interfaces 3 and 4 are PPP interfaces with dynamically assigned addresses. Interfaces 5 and 6 are configured for single SKIP PC clients. Both types of addresses are dynamic. When you enter list interface at the + prompt, the software displays the actual IP address that was dynamically assigned to the SKIP interface. If you change an address on IP Tunnel interfaces to an unnumbered or dynamically assigned format of 0.0.0.n, the router asks if the remote peer is a single user SKIP PC. If you answer Yes, the router sets the mask to 255.255.255.255.IP config>LIST ADDRESS
IP addresses for each interface:
intf 0 192.168.4.31 255.255.255.0 IP address is: Numbered
intf 1 192.168.220.1 255.255.255.252 IP address is: Numbered
intf 2 192.168.220.5 255.255.255.252 IP address is: Numbered
intf 3 0.0.0.3 255.255.255.0 IP address is: Dynamic
intf 4 0.0.0.4 255.255.255.0 IP address is: Dynamic
intf 5 0.0.0.5 255.255.255.255 IP address is: Dynamic
intf 6 0.0.0.6 255.255.255.255 IP address is: Dynamic
IP config>CHANGE ADDRESS 192.168.220.123
New address [192.168.220.123]? 0.0.0.6
Is this interface a tunnel to a single SKIP PC or workstation? [Yes]: yes
valid, the router uses the address as the tunnel source address.
unnumbered, the router proceeds to step 2.
defined, the router uses the address as the tunnel source address. (To define the router ID, enter set router-id at the IP config> prompt.)
not defined, the router proceeds to step 3.
Destination Address
For each remote tunnel destination, you add a tunnel interface and assign a destination address to the interface. There are different ways to assign the destination. You can use a name for the remote destination, which the tunnel maps to an IP address, or you can use the IP address of the remote destination.
When the router receives a packet from a remote tunnel endpoint, the router searches its destination addresses to find the tunnel whose destination matches the arriving packet's source address.
If it finds a match, it passes the packet to that IP Tunnel.
If it does not find a match, it passes the packet to upper layers of the IP protocol stack, such as SKIP. SKIP may be able to use information in the SKIP header to determine the identity of the packet source. See Identifying the Packet Source.
Figure 2 IP Tunnel Addresses

Payload Address
The tunnel encapsulates IP packets within another IP packet. The inner IP packets have a destination address called the payload address. The payload address is the address of the final destination on a network (probably the LAN) that is behind the remote tunnel endpoint.
Unreachable Networks
If a tunnel sends a packet and the packet is returned with an ICMP unreachable error, the router marks the remote tunnel endpoint as unreachable and marks the tunnel interface as Down.
Once the router marks a remote endpoint as unreachable, the tunnel refuses connection requests to that remote endpoint. However, when the tunnel receives those connection requests, the tunnel sends a packet to the UDP Discard port on the remote endpoint. These packets let the tunnel find out when the remote endpoint becomes reachable. When the remote endpoint becomes reachable, the router marks the tunnel interface as Up.
Marking interfaces as Up or Down lets the tunnel work with WAN Reroute. It also allows IP to return ICMP unreachable messages back to workstations that are attempting to send data through a tunnel that is Down.
MTU Discovery
To ensure that encapsulated packets are not fragmented unnecessarily, the router uses MTU discovery to determine the MTU size of packets in the tunnel. IP fragments packets accordingly before sending packets into the tunnel.
IP Tunnels require a single MTU size across all remote destinations. This single size must be the smallest MTU required across all remote destinations. Using a minimum value assures that no traffic is fragmented between the local router and any remote destination. Thus, the MTU that IP tunnels use is the minimum value determined for each remote destination. The router discovers each remote endpoint's MTU in one of two ways:
Dynamically using MTU discovery. ICMP messages the router receives back from the tunnel define the actual MTU that is achievable along the tunnel's path.
Statically using a configured MTU value.
Config>add interface ip-tunnel
Adding IP Tunnel as interface 3.
The router must have at least one valid and visible IP address that the router uses as the destination address for all tunnels ending at the router. You can set this valid IP address on either a physical interface or as the router ID. You can address these routing restrictions in one of the following ways:
Use static routes for routes through the tunnels. By using static routes, you can enable RIP to export the route to a local LAN that has a valid IP address. You must use the following command to prevent RIP from exporting those static routes across the WAN (presumably PPP) interface:
disable sending static-routes <WAN IP address>
If RIP is running in the router, you should set the following RIP settings:
disable sending default-routes <tunnel 1 IP address>
disable sending default-routes <tunnel 2 IP address>
.....
disable sending all-routes <WAN IP address>
These settings prevent the router from advertising its default route (to the Internet) to the other VPN routers that are attached via the tunnels. The last disable command prevents the router from sending routes to 10.x.x.x networks to the Internet.
Note: Disabling sending all routes means a router with a globally valid IP subnet on its LAN interface does not export a route to that LAN. To solve this, use static routes through the tunnels.
Config> network 3
Circuit Config <NET-3>
Circuit Config <NET-1> set destination
Assign destination address name []? 128.185.2.2
Circuit Config <NET-5> set idle
Idle timer (seconds, 0 means always active) [120]?
To set a parameter for a specific endpoint, add a name for that endpoint using the add remote command.
IP Tunnel Config <NET-3> add remote
New remote destination name? roadwarrior
Then, to set a parameter that applies just to roadwarrior, include the name roadwarrior in the command.
IP Tunnel Config <NET-3> set mtu roadwarrior
Maximum Packet Size? [1500]? 1518
To set a parameter that applies to all endpoints for which you have not specifically set a parameter, include the name default in the command.
IP Tunnel Config <NET-3> set mtu default
Maximum Packet Size? [1500]?
This command causes all IP Tunnels to use an MTU of 1500, except tunnels for which you specifically set a different value. For example, the tunnel that connects to roadwarrior uses an MTU of 1518.
IP Tunnel Config <NET-#> prompt and the IP Tunnel <NET-#> prompt. This section explains the differences between these two prompts and shows how to display the prompts.
IP Tunnel Config <NET-#> prompt, you can save changes you make to the tunnel configuration in the router's configuration memory. These changes do not take effect until you restart the router.
Display the IP Tunnel Config <NET-#> prompt as follows:Config>NETWORK 5
Circuit Configuration
Circuit Config <NET-5> iptn
IP Tunnel Configuration
IP Tunnel Config <NET-5>
IP Tunnel <NET-#> prompt, changes that you make to the tunnel configuration take effect immediately. Unless you explicitly save changes using the save command, they are not saved when you restart the router.
Also, at the IP Tunnel <NET-#> prompt, you can set parameters only for endpoints that are currently reachable. If a remote endpoint is not accessible, it has no runtime configuration and the endpoint does not appear at this prompt.
Display the IP Tunnel <NET-#> prompt as follows:+network 5
Circuit <NET-5> iptn
IP Tunnel
IP Tunnel <NET-5>
Press Space twice after you type a command to display the available parameters for each command. Enter help for information about using the command line interface.
[C] means the command is available at the IP Tunnel Config <NET-#> prompt.
[M] means the command is available at the IP Tunnel <NET-#> prompt.
See IP Tunnel Prompts.
The IP Tunnel also maintains a number of settings and statistics that you can display using the interface command at the + prompt. These statistics are the cumulative counters across all remote tunnel endpoints. Clear statistics using the clear command at the + prompt. The following table describes the IP Tunnel commands.
Add Remote [C]
You need to add remote endpoints that you want to configure individually. When you add a destination, OpenROUTE asks you for a destination name. You can enter one of the following:
An IP address as the name, which causes the tunnel to use this IP address as the tunnel's destination.
A name that is in the IP Host Table, which causes the tunnel to use the IP address for that name as the tunnel's destination.
A name that is not in the IP Host Table. If you do so, you must specify the remote tunnel IP address with the IP tunnel set destination-address command.
add remote
New remote destination name?
delete remote jimmy
The tunnel uses the smallest MTU of all tunnel endpoints, whether it is an MTU that you set or an MTU derived from MTU discovery.
If your tunnel runs over a PPP interface and you disable MTU discovery, make sure the Maximum Receive Unit (MRU) size in PPP is at least 100 bytes larger than the MTU of the tunnel. The default MRU size in PPP is 1500.
disable mtu-discovery default
enable mtu-discovery jimmy
exit
Circuit Config <NET-1>
list
Name Source Destination Packet MTU Disc ICMP
Address Address MTU Disc Interval Timeout
DEFAULT (automatic) (none) (auto) ON 3600 5000
boston (automatic) (unknown) 1515 OFF 3600 5000
roadwarrior (automatic) (unknown) (auto) ON 3600 5000
Maximum number of simultaneous tunnel users: 16
list counters
Name Destination Input Input Output Output Packets
Address Packets Bytes Packets Bytes Too Big
rbx205-23 128.2.41.23 199 225620 499 208396 0
list parameters
Name Source Destination Packet MTU Disc ICMP
Address Address MTU Disc Interval Timeout
rbx205-23 128.2.55.21 10.2.41.23 ON 3600 2579 5000
Tunnel(s) maximum packet size: 1500
IP Tunnel <NET-#> prompt, this command restores the saved configuration for the destination that you specify.
Syntax: revert
Example: revert
destination default
IP Tunnel <NET-#> prompt, this command saves the changes for the destination you specify to permanent memory.
Syntax: save
Example: save
Example:
set destination-address jimmy
IP Tunnel Destination Address? 50.10.10.2
If the tunnel does not receive an ICMP unreachable packet before this time elapses, the tunnel assumes the packet successfully arrived at the remote tunnel endpoint. The tunnel marks the remote endpoint as reachable and accepts the next connection request it receives for the destination.
If the tunnel receives an ICMP unreachable packet before this time elapses, the software marks the tunnel interface as down and denies connection requests for the destination.
set icmp-timeout default
ICMP Unreachable Timeout? [5000]?
set max-users
Maximum number of simultaneous tunnel users? [16]? 4
The tunnel uses the smallest MTU of all tunnel endpoints, whether it is an MTU that you set or an MTU derived from MTU discovery.
If your tunnel runs over a PPP interface and you disable MTU discovery, make sure the Maximum Receive Unit (MRU) size in PPP is at least 100 bytes larger than the MTU of the tunnel. The default MRU size in PPP is 1500.
set mtu default
Maximum Packet Size? [ ]?
set mtu-interval default
MTU Discovery Interval? [3600]?
Note: If you are running NAT on a router that has an IP Tunnel with SKIP authentication, setting the source address has more restrictions. See Source Address Considerations.
Example:set source-address default
IP Tunnel Source Address? [0.0.0.0]?