164 lines
4.6 KiB
Groff
164 lines
4.6 KiB
Groff
.\" %FreeBSD: src/usr.sbin/gifconfig/gifconfig.8,v 1.1.2.10 2001/12/21 08:11:57 ru Exp %
|
|
.\" $KAME: gifconfig.8,v 1.6 2000/11/22 11:10:09 itojun Exp $
|
|
.\"
|
|
.\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
|
.\" All rights reserved.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\" 3. Neither the name of the project nor the names of its contributors
|
|
.\" may be used to endorse or promote products derived from this software
|
|
.\" without specific prior written permission.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
.\" SUCH DAMAGE.
|
|
.\"
|
|
.\" $FreeBSD$
|
|
.Dd May 17, 1998
|
|
.Dt GIFCONFIG 8
|
|
.Os
|
|
.Sh 名称
|
|
.Nm gifconfig
|
|
.Nd 一般的な IP トンネルを設定する
|
|
.\"
|
|
.Sh 書式
|
|
.Nm
|
|
.Ar interface
|
|
.Op Ar af
|
|
.Op Ar physsrc physdest
|
|
.Nm
|
|
.Ar interface
|
|
.Ic delete
|
|
.Nm
|
|
.Fl a
|
|
.Sh 解説
|
|
.Nm
|
|
は "gif0" のような一般的な IP トンネルインタフェースに
|
|
物理アドレスを設定します。引数
|
|
.Ar physsrc
|
|
と
|
|
.Ar physdest
|
|
はカプセル化された IPv4/v6 ヘッダに対する始点/終点アドレスとして
|
|
解釈されます。引数
|
|
.Ar af
|
|
は
|
|
.Ar physsrc
|
|
と
|
|
.Ar physdest
|
|
のアドレスファミリを指定します。
|
|
.Ar af
|
|
は
|
|
.Li inet
|
|
または
|
|
.Li inet6
|
|
であり、省略時には
|
|
.Li inet
|
|
であるとみなされます。
|
|
.Pp
|
|
特別な引数
|
|
.Ic delete
|
|
を指定すると、
|
|
.Nm
|
|
は、
|
|
.Ar interface
|
|
上の既存の始点アドレスと終点アドレスを単に削除します。
|
|
外部のアドレスを指定しない場合、この用途は効果がありません。
|
|
.Pp
|
|
.Nm
|
|
は以下の引数をオプションとして取ることができます:
|
|
.Bl -tag -width Ds
|
|
.It Fl a
|
|
全ての
|
|
.Xr gif 4
|
|
インタフェースに関連する情報を表示します。
|
|
.El
|
|
.Pp
|
|
同じアドレスファミリ
|
|
(たとえば IPv4-over-IPv4)
|
|
でトンネルの設定を行うと、
|
|
簡単に無限ルーティングループを作ることができてしまうことに
|
|
注意してください。
|
|
.Pp
|
|
各
|
|
.Xr gif 4
|
|
インタフェースは、実行時に、インタフェース複製を使用して作成されます。
|
|
これは、
|
|
.Xr ifconfig 8
|
|
.Cm create
|
|
コマンドを使用するか、
|
|
.Xr rc.conf 5
|
|
の
|
|
.Va gifconfig_ Ns Aq Ar interface
|
|
変数を使用して、最も簡単に作成できます。
|
|
.Sh 使用例
|
|
.Li 10.1.1.1
|
|
と
|
|
.Li 10.2.3.4
|
|
の間で IPv6 over IPv4
|
|
(別名 IPv6 in IPv4)
|
|
トンネルを設定する場合には、
|
|
以下のコマンドを実行します:
|
|
.Bd -literal -offset
|
|
# gifconfig gif0 inet 10.1.1.1 10.2.3.4
|
|
.Ed
|
|
.Pp
|
|
.\" To use the
|
|
.\" .Li 0.0.0.0
|
|
.\" feature to establish a tunnel from host1 to host3
|
|
.\" which will encapsulate and carry packets from host2, on host1 do:
|
|
.\" .Bd -literal -offset
|
|
.\" # ifconfig gif0 inet host1 127.0.0.2 # assign an address to gif0
|
|
.\" # gifconfig gif0 inet host1 0.0.0.0 # assign encapsulation addresses
|
|
.\" # route add host2 host3 -ifp gif0: # encap host2 packets, send to host3
|
|
.\" .Ed
|
|
.\" .Pp
|
|
.\" Note: the
|
|
.\" .Fl ifp
|
|
.\" option to route does not work as documented in
|
|
.\" most versions of FreeBSD.
|
|
.\" .Pp
|
|
.\" On host3 do:
|
|
.\" .Bd -literal -offset
|
|
.\" # ifconfig gif0 inet host3 127.0.0.2 # assign an address to gif0
|
|
.\" # gifconfig gif0 inet host3 0.0.0.0 # assign encapsulation addresses
|
|
.\" .Ed
|
|
.\" .Pp
|
|
.\" Now if you ping host2 from host1, the packets should be encapsulated
|
|
.\" with outer source address = host1 and outer destination address = host3,
|
|
.\" and delivered to host3.
|
|
.\" host3 will decapsulate the packet and deliver it normally to host2.
|
|
.\" .Pp
|
|
上述の例で
|
|
.Li inet
|
|
を
|
|
.Li inet6
|
|
に置き換えることで外部のプロトコルとして IPv6 を使用することも可能です。
|
|
.Sh 戻り値
|
|
コマンドはエラー時には終了ステータス 1 を、成功時には 0 を返します。
|
|
.Sh 関連項目
|
|
.Xr gif 4 ,
|
|
.Xr ifconfig 8
|
|
.Sh 歴史
|
|
.Nm
|
|
コマンドは WIDE Hydrangea IPv6 プロトコルスタックキットで
|
|
はじめて登場しました。
|
|
.Pp
|
|
KAME Project (http://www.kame.net/) スタックを基とする
|
|
IPv6 および IPsec のサポートは、
|
|
.Fx 4.0
|
|
で始めて組み込まれました。
|