In Solaris 10 and earlier, it was possible to create IP tunnels manually, using ifconfig
. In Solaris 11, you use the dladm
and ipadm
commands. The bad news is the process involves a few more steps. The good news is it is automatically persistent across reboots, and also is more readable, by virtue of the fact that you can name the tunnels.
To create an IPv4 tunnel between your own host at 1.2.3.4
and a remote gateway at 5.6.7.8
, use the following sequence of commands:
dladm create-iptun -T ipv4 -a local=1.2.3.4,remote=5.6.7.8 tunnelname0 ipadm create-ip tunnelname0 ipadm create-addr -T static -a local=1.2.3.4,remote=5.6.7.8 tunnelname0/usefulnamehere
As you can see, the syntax is fairly similar to VLAN creation. First, the creation of a base-layer kernel object is required, through dladm
. After that, the IP-level setup via ipadm
is almost identical to other IP administrative tasks.