 |
Index for Section 8 |
|
 |
Alphabetical listing for I |
|
 |
Bottom of page |
|
iptunnel(8)
NAME
iptunnel - Creates, deletes, and displays configured tunnels
SYNOPSIS
/usr/sbin/iptunnel operation [args]
DESCRIPTION
The iptunnel command creates configured tunnels for sending and receiving
the following types of encapsulated packets:
· IPv4 or IPv6 packets encapsulated as the payload of an IPv4 datagram.
This is called an IPv4 configured tunnel.
· IPv4 or IPv6 packets encapsulated as the payload of an IPv6 datagram.
This is called an IPv6 configured tunnel.
The iptunnel command can perform one of the following operations:
create
Creates a tunnel interface, which you must subsequently configure by
using the ifconfig command. The syntax of the create operation is as
follows:
iptunnel create [-I int-name] [-V version] dest [src]
-I int-name
Specifies the interface unit of the tunnel to be created. This is
an optional parameter. The int-name parameter has the following
form: iptx, where x is the interface unit number. By default, the
interface name selected for the tunnel is iptx+1, or the value of
the interface unit number of the last tunnel created plus 1.
-V version
Specifies the type of configured tunnel to create. This is an
optional parameter. If you specify -V 4, the command creates an
IPv4 tunnel; the dst and src parameters are interpreted as IPv4
addresses. If you specify -V 6, the command creates an IPv6 tunnel;
the dst and src arguments are interpreted as IPv6 addresses.
dest
Specifies the remote end-point to which a tunnel is to be created.
You must specify either a host name or an IP unicast address. If
you specified the -V 4 option, you must specify an IPv4 address for
dest. If you specified the -V 6 option, you must specify an IPv6
address for dest. If you do not specify a tunnel version, the
iptunnel command determines the address type and creates a
configured tunnel for that type.
If dest is a non-global IPv6 address, the src parameter (if
specified) must be an address of the same scope. Also, either the
dest or src parameter (if specified) must contain a scope
identifier that indicates the interface on which the encapsulated
packets must be sent. On this operating system, the scope
identifier is the name of an interface.
src Sets the IPV4 (for IPv4 configured tunnels) or IPv6 (for IPv6
configured tunnels) source address in the encapsulating header.
This is an optional parameter. You can specify either a host name
or an IP unicast address. You can create a tunnel before you
configure the src address on the system. However, the tunnel is
enabled (packets are sent/received on the tunnel) only if src is a
valid address configured on the system.
If you do not specify a source address for the tunnel, by default
the system will find an interface and use the address configured on
that interface.
delete
Deletes a tunnel interface. You must disable the tunnel before you can
delete it by executing the following command:
# ifconfig tunnel name down delete abort
show
Shows the tunnel attributes (name, tunnel end points, next hop for
tunneled packets). For IPv6 configured tunnels created with addresses
that contain scope identifiers, the command also shows the scope
identifier.
EXAMPLES
1. To create an IPv4 tunnel from hobbes to calvin on interface ipt5,
enter:
# iptunnel create -I ipt5 -V 4 calvin
ipt5 iftype IFT_IPV4 (208) src 16.140.16.86 dst 16.140.16.91
2. To display the tunnel attributes of the previous command, enter:
# iptunnel show ipt5
interface ipt5 src 16.140.16.86 dst 16.140.16.91 gate 16.140.16.86
3. To create an IPv6 tunnel from a node with address
3ffe:1200:4110:1:a00:2bff:fe98:9f68 to a remote IPv6 node, enter:
# iptunnel create -V 6 3ffe:1200:4110:1:a00:2bff:fe98:9505 \
3ffe:1200:4110:1:a00:2bff:fe98:9f68
ipt6 iftype IFT_IPV6 (209) src 3ffe:1200:4110:1:a00:2bff:fe98:9f68
dst 3ffe:1200:4110:1:a00:2bff:fe98:9505
4. To display the tunnel attributes of the previous command, enter:
# iptunnel show ipt6
interface ipt6 src 3ffe:1200:4110:1:a00:2bff:fe98:9f68
dst 3ffe:1200:4110:1:a00:2bff:fe98:9505 gate fe80::200:f8ff:fe21:ba4
5. To create an IPv6 tunnel from a node with an address and scope
identifier to a remote IPv6 node, enter:
# iptunnel create -V 6 fe80::a00:2bff:fe98:9505%le0
ipt7 iftype IFT_IPV6 (209) src fe80::a00:2bff:fe95:9f68
dst fe80::a00:2bff:fe98:9505
6. To display the tunnel attributes of the previous command, enter:
# iptunnel show ipt7
interface ipt7 src fe80::a00:2bff:fe95:9f68%1
dst fe80::a00:2bff:fe98:9505 gate fe80::a00:2bff:fe95:9f68
7. To configure the IPv4 tunnel created in the first example to
encapsulate IPv6 packets, enter:
# ifconfig ipt5 ipv6 up
IPv6 packets will be sent as payloads of IPv4 datagrams from
16.140.16.86 to 16.140.16.91.
The tunnel may also be used to send IPV4 packets encapsulated within
IPV4 headers as follows:
# ifconfig ipt5 10.10.80.60 netmask 255.255.255.0
To verify the previous command, enter:
# ifconfig ipt5
ipt5: flags=4c1<UP,RUNNING,NOARP,MULTICAST>
16.140.16.86 --> 16.140.16.91
inet 10.10.80.60 netmask ffffff00 ipmtu 1280
inet6 fe80::108c:1056
8. To delete a tunnel, delete the address on the tunnel interface first,
enter:
# ifconfig ipt5 down delete abort
ipt5: delete inet address 10.10.80.60
10.10.80.60: aborting 0 tcp connection(s)
Then, enter:
# iptunnel delete ipt5
interface ipt5 deleted
SEE ALSO
Commands: ifconfig(8).
RFC 2003, IP Encapsulation within IP, Perkins, C., October 1996
RFC 2473, Generic Packet Tunnelling in IPv6, Conta, A. and Deering, S.,
December 1998
 |
Index for Section 8 |
|
 |
Alphabetical listing for I |
|
 |
Top of page |
|