1.\" $OpenBSD: rad.conf.5,v 1.27 2024/12/28 08:58:13 florian Exp $ 2.\" 3.\" Copyright (c) 2018 Florian Obser <florian@openbsd.org> 4.\" Copyright (c) 2005 Esben Norby <norby@openbsd.org> 5.\" Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org> 6.\" Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> 7.\" Copyright (c) 2002 Daniel Hartmeier <dhartmei@openbsd.org> 8.\" 9.\" Permission to use, copy, modify, and distribute this software for any 10.\" purpose with or without fee is hereby granted, provided that the above 11.\" copyright notice and this permission notice appear in all copies. 12.\" 13.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 14.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 15.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 16.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 17.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 18.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 19.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 20.\" 21.Dd $Mdocdate: December 28 2024 $ 22.Dt RAD.CONF 5 23.Os 24.Sh NAME 25.Nm rad.conf 26.Nd router advertisement daemon configuration file 27.Sh DESCRIPTION 28The 29.Xr rad 8 30daemon is an IPv6 router advertisement daemon. 31.Pp 32The 33.Nm 34config file is divided into the following main sections: 35.Bl -tag -width xxxx 36.It Sy Macros 37User-defined variables may be defined and used later, simplifying the 38configuration file. 39.It Sy Global Configuration 40Global settings for 41.Xr rad 8 . 42These are used as default values for 43.Ic interface 44definitions and can be overwritten in an 45.Ic interface 46block. 47.It Sy Interfaces 48.Xr rad 8 49sends IPv6 router advertisement messages. 50This section defines on which interfaces to advertise prefix information 51and their associated parameters. 52.El 53.Pp 54Additional configuration files can be included with the 55.Ic include 56keyword. 57.Sh MACROS 58Macros can be defined that will later be expanded in context. 59Macro names must start with a letter, digit, or underscore, 60and may contain any of those characters. 61Macro names may not be reserved words (for example, 62.Ic interface ) 63Macros are not expanded inside quotes. 64.Sh GLOBAL CONFIGURATION 65The global configuration section sets defaults for router advertisement 66messages. 67These can be overwritten in interface blocks. 68.Bl -tag -width Ds 69.It Ic default router Pq Ic yes Ns | Ns Ic no 70Act as a default router or not. 71The default is yes. 72.It Ic dns Brq Ar option ... 73.Ic dns 74options are as follows: 75.Bl -tag -width Ds 76.It Ic lifetime Ar seconds 77The number of seconds the dns options are valid after receiving a router 78advertisement message. 79The default is 1800 seconds. 80.It Ic nameserver Pq Ar address Ns | Ns Brq Ar address ... 81IPv6 address or list of IPv6 addresses of DNS name servers. 82.It Ic search Pq Ar domain Ns | Ns Brq Ar domain ... 83Domain or list of domains for the 84.Xr resolv.conf 5 85search list. 86.El 87.It Ic hop limit Ar hops 88Specify the diameter of the internet. 89The default is 0, meaning unspecified by this router. 90.It Ic managed address configuration Pq Ic yes Ns | Ns Ic no 91If set to yes, indicate that stateless address configuration prefixes are 92not available and hosts should consult DHCPv6. 93The default is no. 94.It Ic mtu Ar bytes 95The MTU option is used in Router Advertisement messages to ensure that all 96nodes on a link use the same MTU value in those cases where the link MTU 97is not well known. 98The default is 0, meaning unspecified by this router. 99.It Ic nat64 prefix Ar prefix Op Brq Ar option ... 100Add a PREF64 router advertisement option to communicate prefixes used 101for Network Address and Protocol Translation from IPv6 to IPv4 (NAT64). 102If 103.Ar prefix 104is specified without a prefix length, its default is 64. 105.Pp 106.Ic nat64 prefix 107options are as follows: 108.Bl -tag -width Ds 109.It Ic lifetime Ar seconds 110The number of seconds the nat64 prefix option is valid after receiving a router 111advertisement message. 112A value of zero indicates to not use the prefix anymore. 113The maximum is 65528 seconds. 114The default is 1800 seconds. 115.El 116.It Ic other configuration Pq Ic yes Ns | Ns Ic no 117If set to yes, hosts should consult DHCPv6 for additional configuration 118like NTP servers or DNS name servers. 119.It Ic router lifetime Ar seconds 120The number of seconds this router is a valid default router after receiving 121a router advertisement message. 122The default is 1800 seconds. 123.It Ic router preference Pq Ic high Ns | Ns Ic medium Ns | Ns Ic low 124Indicate whether to prefer this router over other default routers. 125The default is medium. 126.\" .It Ic reachable time Ar number 127.\" XXX 128.\" .It Ic retrans timer Ar number 129.\" XXX 130.It Ic source link-layer address Pq Ic yes Ns | Ns Ic no 131Add a source link-layer address option to router advertisement messages, to 132communicate the link-layer address of the sending interface. 133The default is yes. 134.El 135.Sh INTERFACES 136A list of interfaces or interface groups to send advertisements on: 137.Bl -tag -width Ds 138.It Ic interface Ar name Op Brq Ar prefix ... 139Options set in the global section can be overwritten inside an interface 140block. 141In addition an interface block can contain a list of prefixes: 142.Pp 143.Bl -tag -width Ds -compact 144.It Oo Ic no Oc Ic auto prefix Op Brq Ar option ... 145.It Ic prefix Ar prefix Op Brq Ar option ... 146The default is to discover prefixes to announce by inspecting the IPv6 147addresses configured on an interface. 148This can be disabled with 149.Ic no auto prefix . 150If 151.Ar prefix 152is specified without a prefix length, its default is 64. 153.Pp 154.Ic prefix 155options are as follows: 156.Bl -tag -width Ds 157.It Ic autonomous address-configuration Pq Ic yes Ns | Ns Ic no 158This prefix can be used to generate IPv6 addresses. 159The default is yes. 160.It Ic on-link Pq Ic yes Ns | Ns Ic no 161This prefix is considered on-link. 162The default is yes. 163.It Ic preferred lifetime Ar seconds 164The preferred lifetime (pltime) in seconds for addresses generated from this 165prefix. 166The default is 2700. 167This option is ignored if the prefix is discovered from a network interface 168and it has a preferred lifetime configured. 169.It Ic valid lifetime Ar seconds 170The valid lifetime (vltime) in seconds for addresses generated from this 171prefix. 172The default is 5400. 173This option is ignored if the prefix is discovered from a network interface 174and it has a valid lifetime configured. 175.El 176.El 177.El 178.Sh FILES 179.Bl -tag -width /etc/examples/rad.conf -compact 180.It Pa /etc/rad.conf 181.Xr rad 8 182configuration file. 183.It Pa /etc/examples/rad.conf 184Example configuration file. 185.El 186.Sh EXAMPLES 187With the following example configuration, 188.Xr rad 8 189will pick a prefix from the ix1 interface and send router advertisements on it: 190.Pp 191.Dl interface ix1 192.Sh SEE ALSO 193.Xr ractl 8 , 194.Xr rad 8 , 195.Xr rc.conf.local 8 196.Sh HISTORY 197The 198.Nm 199file format first appeared in 200.Ox 6.4 . 201