Initial import from FreeBSD RELENG_4:
[dragonfly.git] / sbin / nos-tun / nos-tun.8
1 .\"
2 .\" ----------------------------------------------------------------------------
3 .\" "THE BEER-WARE LICENSE" (Revision 42):
4 .\" <phk@FreeBSD.org> wrote this file.  As long as you retain this notice you
5 .\" can do whatever you want with this stuff. If we meet some day, and you think
6 .\" this stuff is worth it, you can buy me a beer in return.   Poul-Henning Kamp
7 .\" ----------------------------------------------------------------------------
8 .\"
9 .\" $FreeBSD: src/sbin/nos-tun/nos-tun.8,v 1.6.2.6 2003/02/23 20:53:46 trhodes Exp $
10 .\"
11 .Dd April 11, 1998
12 .Dt NOS-TUN 8
13 .Os
14 .Sh NAME
15 .Nm nos-tun
16 .Nd implement ``nos'' or ``ka9q'' style IP over IP tunnel
17 .Sh SYNOPSIS
18 .Nm
19 .Fl t
20 .Ar tunnel
21 .Fl s
22 .Ar source
23 .Fl d
24 .Ar destination
25 .Fl p
26 .Ar protocol_number
27 .Ar target
28 .Sh DESCRIPTION
29 The
30 .Nm
31 utility is used to establish an
32 .Em nos
33 style tunnel, (also known as
34 .Em ka9q
35 or
36 .Em IP-IP
37 tunnel) using a
38 .Xr tun 4
39 kernel interface.
40 .Pp
41 .Ar Tunnel
42 is the name of the tunnel device
43 .Pa /dev/tun0
44 for example.
45 .Pp
46 .Ar Source
47 and
48 .Ar destination
49 are the addresses used on the tunnel device.
50 If you configure the tunnel against a cisco router, use a netmask of
51 .Dq 255.255.255.252
52 on the cisco.  This is because the tunnel is a point-to-point interface
53 in the
54 .Fx
55 end, a concept cisco doesn't really implement.
56 .Pp
57 .Ar Protocol number
58 sets tunnel mode.
59 Original KA9Q NOS uses 94 but many people use 4
60 in worldwide backbone of ampr.org.
61 .Pp
62 .Ar Target
63 is the address of the remote tunnel device, this must match the source
64 address set on the remote end.
65 .Sh EXAMPLES
66 This end, a
67 .Fx
68 box on address 192.168.59.34:
69 .Bd -literal -offset indent
70 nos-tun -t /dev/tun0 -s 192.168.61.1 -d 192.168.61.2 192.168.56.45
71 .Ed
72 .Pp
73 Remote cisco on address 192.168.56.45:
74 .Bd -literal -offset indent
75 interface tunnel 0
76 ip address 192.168.61.2 255.255.255.252
77 tunnel mode nos
78 tunnel destination 192.168.59.34
79 tunnel source 192.168.56.45
80 .Ed
81 .Sh BUGS
82 We don't allow for setting our source address for multihomed machines.
83 .Sh AUTHORS
84 .An -nosplit
85 .An Nickolay N. Dudorov Aq nnd@itfs.nsk.su
86 wrote the program,
87 .An Poul-Henning Kamp Aq phk@FreeBSD.org
88 wrote the man-page.
89 .An Isao SEKI Aq iseki@gongon.com
90 added a new flag, IP protocol number.