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