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