]> git.saurik.com Git - apple/network_cmds.git/blame_incremental - ip6conf.tproj/ip6config.8
network_cmds-307.tar.gz
[apple/network_cmds.git] / ip6conf.tproj / ip6config.8
... / ...
CommitLineData
1.\" $NetBSD: 6to4.8,v 1.5 2001/12/03 19:03:21 wiz Exp $
2.Dd May 21, 2002
3.Dt ip6config 8
4.Os
5.Sh NAME
6.Nm ip6config
7.Nd Configure IPv6 and 6to4 IPv6 tunnelling
8.Sh SYNOPSIS
9.Nm
10.Op Fl h
11.Ar command interface
12.Sh DESCRIPTION
13The
14.Nm
15script can be used to start up or shut down IPv6 on active interfaces. It
16can also be used to configure a 6to4 tunnel and start or stop router
17advertisement.
18.Pp
19When IPv6 is enabled on an interface the protocol is attached to the
20interface, at which point the default settings in the kernel allow it
21to acquire a link-local address and listen for router advertisements.
22.Pp
236to4 is a mechanism by which your IPv6 address(es) are derived from an
24assigned IPv4 address, and which involves automatic tunnelling to one or
25more remove 6to4 hubs, which will then forward your v6 packets on the
266bone etc. Replies are routed back to you over IPv4 via (possibly) other
276to4 capable remote gateways. As such, IPv6-in-IPv4-encapsulated
28packets are accepted from all v4-hosts.
29.Pp
30From your (single) IPv4 address, you get a whole IPv6 /48 network,
31which allows you to split your network in 2^16 subnets, with 2^64
32hosts each. You need to setup routing for your internal network
33properly, help is provided for setting up the border router here.
34.Pp
35This script takes the burden to calculate your IPv6 address from
36existing IPv4 address and runs the commands to setup (and tear down)
37automatic 6to4 IPv6 tunnelling.
38.Pp
39Finally, router advertisement for an internal network can be started
40and stopped. This uses sysctl to set net.inet6.ip6.forwarding and
41net.inet6.ip6.accept_rtadv to the proper values for routing.
42.Pp
43Possible options are:
44.Bl -tag -width xxx
45.It Fl h
46Show usage.
47.El
48.Pp
49Possible commands are:
50.Bl -tag -width start-rtadvd
51.It Sy start-v6
52Start IPv6 on given interface using default kernel settings. Attaches
53protocol to the interface. If interface is "all", all valid interfaces
54will be configured.
55.It Sy stop-v6
56Stop IPv6 on given interface. Detaches protocol from the interface. If
57interface is "all", all valid interfaces will be configured.
58.It Sy start-stf
59Configure 6to4 IPv6. The
60.Xr stf 4
61interface is configured, and a default route to a remote 6to4
62gateway is established. In addition, the internal
63network interface is assigned an address.
64.It Sy stop-stf
65Stops 6to4 IPv6. All addresses are removed from the
66.Xr stf 4
67device, and the default route is removed.
68.It Sy start-rtadvd
69Starts router advertizement and IPv6 packet forwarding,
70turning the machine into a IPv6 router.
71.Xr rtadvd 8
72is invoked with a custom config file created under
73.Pa /var/run .
74Clients just need to be told to accept router advertizements, i.e.
75the
76.Sq net.inet6.ip6.accept_rtadv
77sysctl needs to be set to
78.Sq 1 .
79You can arrange that by setting
80.Dq ip6mode=autohost
81in
82.Pa /etc/rc.conf .
83.It Sy stop-rtadvd
84Stops router advertizement and IPv6 packet forwarding.
85.Xr rtadvd 8
86is stopped, and the
87.Xr rtadvd.conf 5
88config file is removed from
89.Pa /var/run .
90.El
91.Sh REQUIREMENTS
92Besides IPv4 connectivity, you need support for IPv6 and the
93.Xr stf 4
94device in your kernel. This is provided beginning with Darwin
95Kernel Version 6.0.
96.Pp
97No special values are needed in
98.Pa /etc/rc.conf
99to run this script, but see comment on setting up IPv6-clients
100.Sq behind
101your 6to4 router for the
102.Sy rtadvd-start
103command!
104.Sh CONFIGURATION
105The default IPv6 configuration for an interface assigns a link-local
106address to it and sets the interface to receive router advertisements.
107No further configuration is necessary for basic functionality.
108However, various settings can be modified by using sysctl.
109.Pp
110The
111.Nm
112script reads its 6to4 configuration from a config file named
113.Pa 6to4.conf .
114The
115.Pa 6to4.conf
116file is in
117.Xr perl 1
118syntax, and contains several
119variables that can be tuned to adjust your setup.
120.Bl -tag -width start-rtadvd
121.It Sy in_if
122The inside interface. If non-empty, this interface is
123assigned the IPv6 address
1242002:x:x:v6_innernet:hostbits6, see below.
125This is only useful on machines that
126have more than one network interface, e.g. with a modem and a
127local ethernet.
128.It Sy v6_net
129The subnet address you want to use on the address of
130your outbound interface. Defaults to
131.Dq 1 .
132.It Sy v6_innernet
133The subnet address you want to use on the address of
134your inbound interface. Defaults to
135.Dq 2 .
136.It Sy hostbits6
137The lower 64 bits of both the inbound and outbound interface's
138addresses.
139.It Sy peer
140Name of the remote 6to4 server that'll take our
141IPv6-in-IPv4 encapsulated packets and route them on
142via IPv6. A special value of
143.Dq 6to4-anycast
144can be used for the anycast service defined in RFC 3068.
145Other possible values are given in the example config file.
146.El
147.Sh SEE ALSO
148.Xr stf 4 ,
149.Dq 6to4 IPv6 Explained
150at
151.Pa http://www.feyrer.de/NetBSD/6to4.html ,
152.Nx
153IPv6 Documentation at
154.Pa http://www.netbsd.org/Documentation/network/ipv6/ ,
155RFC 3068.
156.Sh HISTORY
157The
158.Nm
1596to4 utility and manpage portions were written by
160Hubert Feyrer <hubert@feyrer.de> for NetBSD.