Print this page
NEX-15896 net-routing-setup should not enable in.routed
Contributed by: Alexander Pyhalov <alp@rsu.ru>
Reviewed by: Alexander Eremin <alexander.eremin@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Cynthia Eastham <cynthia.eastham@nexenta.com>
        
*** 1,547 ****
! '\" te
  .\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
! .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
! .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
! .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
! .TH ROUTEADM 1M "May 13, 2017"
! .SH NAME
! routeadm \- IP forwarding and routing configuration
! .SH SYNOPSIS
! .LP
! .nf
! \fBrouteadm\fR  [\fB-p\fR  [\fIoption\fR]]
! .fi
! 
! .LP
! .nf
! \fBrouteadm\fR  [\fB-R\fR \fIroot-dir\fR] [\fB-e\fR \fIoption\fR ...] [\fB-d\fR \fIoption\fR...]
!  [\fB-r\fR \fIoption\fR...] [\fB-s\fR \fIvar\fR=\fIvalue\fR]
! .fi
! 
! .LP
! .nf
! \fBrouteadm\fR  [\fB-l\fR \fIfmri\fR]
! .fi
! 
! .LP
! .nf
! \fBrouteadm\fR  [\fB-m\fR \fIfmri\fR \fIkey\fR=\fIvalue\fR [\fIkey\fR=\fIvalue\fR]...]
! .fi
! 
! .LP
! .nf
! \fBrouteadm\fR  [\fB-u\fR]
! .fi
! 
! .SH DESCRIPTION
! .LP
! The \fBrouteadm\fR command is used to administer system-wide configuration for
! IP forwarding and routing. IP forwarding is the passing of IP packets from one
! network to another; IP routing is the use of a routing protocol to determine
! routes.
! .sp
! .LP
  IP forwarding and routing functions are also represented as services within the
  service management facility (SMF), and can be administered by means of
! \fBsvcadm\fR(1M) also, using the following fault management resource
! identifiers (FMRIs):
! .sp
! .in +2
! .nf
  svc:/network/ipv4-forwarding:default
  svc:/network/ipv6-forwarding:default
  svc:/network/routing/route:default
  svc:/network/routing/ripng:default
! .fi
! .in -2
! 
! .sp
! .LP
! See EXAMPLES for relevant examples.
! .sp
! .LP
! In addition to enabling and disabling routing and forwarding, \fBrouteadm\fR is
! used to interact with SMF-based routing daemon services. Routing daemon
! services are identified by the presence of a \fBrouteadm\fR application
! property group, which \fBrouteadm\fR uses in administering the given service.
  Routing daemon services can also specify properties relating to their operation
! in the \fBrouting\fR application property group; these can be modified by means
! of routeadm -m. If an FMRI for a service without such a property group is
! specified, an error is issued and the operation is not carried out. If a
! routing daemon has not been converted to SMF, the \fBipv4\fI[or
! 6]\fR-routing-daemon\fR, \fBipv4\fI[or 6]\fR-routing-daemon-args\fR, and
! \fBipv4\fI[or 6]\fR-routing-stop-cmd\fR variables can be used to specify the
! appropriate daemon for IPv4 or IPv6 routing. \fBrouteadm\fR will then run that
! daemon using the \fBsvc:/network/routing/legacy-routing:ipv4\fR\fI[or 6]\fR
! service as appropriate. This conversion process occurs when you issue an enable
! (\fB-e\fR), disable (\fB-d\fR) or an update (\fB-u\fR) command.
! .sp
! .LP
! The first usage, in the SYNOPSIS above, reports the current configuration.
! .SH OPTIONS
! .LP
  The following command-line options are supported:
! .sp
! .ne 2
! .na
! \fB\fB-p\fR [\fIoption\fR]\fR
! .ad
! .sp .6
! .RS 4n
! Print the configuration in parsable format. If \fIoption\fR is specified, only
! the configuration for the specified option or variable is displayed.
! .RE
! 
! .sp
! .ne 2
! .na
! \fB\fB-R\fR \fIroot-dir\fR\fR
! .ad
! .sp .6
! .RS 4n
! Specify an alternate root directory where \fBrouteadm\fR applies changes.
! .LP
! Note -
! .sp
! .RS 2
! The root file system of any non-global zones must not be referenced with the
! \fB-R\fR option. Doing so might damage the global zone's file system, might
! compromise the security of the global zone, and might damage the non-global
! zone's file system. See \fBzones\fR(5).
! .RE
! .RE
! 
! .sp
! .ne 2
! .na
! \fB\fB-e\fR \fIoption\fR...\fR
! .ad
! .sp .6
! .RS 4n
! Enable the specified option. The effect is to prepare the associated services
! (\fBsvc:/network/ipv4-forwarding:default\fR in the case of
! \fBipv4-forwarding\fR) for enabling. By means of the \fBrouting-svcs\fR
! variable, the routing daemons are specified to be enabled on subsequent boot or
! when \fBrouteadm\fR \fB-u\fR is run.
! .RE
! 
! .sp
! .ne 2
! .na
! \fB\fB-d\fR \fIoption\fR...\fR
! .ad
! .sp .6
! .RS 4n
! Disable the specified option. The effect is to prepare the associated services
! (\fBsvc:/network/ipv4-forwarding:default\fR in the case of
! \fBipv4-forwarding\fR) for enabling. By means of the \fBrouting-svcs\fR
  variable, the routing daemons are specified to be disabled on subsequent boot
! or when \fBrouteadm\fR \fB-u\fR is run.
! .RE
! 
! .sp
! .ne 2
! .na
! \fB\fB-l\fR \fIfmri\fR\fR
! .ad
! .sp .6
! .RS 4n
  List all properties in the routing application property group for the SMF
  routing daemon service.
! .RE
! 
! .sp
! .ne 2
! .na
! \fB\fB-m\fR \fIfmri\fR\ \fIkey\fR=\fIvalue\fR\fR
! .ad
! .sp .6
! .RS 4n
! Change property value of property \fIkey\fR to \fIvalue\fR in routing
! application property group for the SMF routing daemon service. For multi-valued
! properties, the property name can be used multiple times in the modify
! operation, and each associated value will be added.
! .RE
! 
! .sp
! .ne 2
! .na
! \fB\fB-r\fR \fIoption...\fR\fR
! .ad
! .sp .6
! .RS 4n
! Revert the specified option to the system default. The system defaults are
! specified in the description of each \fIoption\fR.
! .RE
! 
! .sp
! .ne 2
! .na
! \fB\fB-u\fR\fR
! .ad
! .sp .6
! .RS 4n
! Apply the currently configured options to the running system. These options
! might include enabling or disabling IP forwarding and launching or killing
! routing daemons, if any are specified. It does not alter the state of the
! system for those settings that have been set to default. This option is meant
! to be used by administrators who do not want to reboot to apply their changes.
! In addition, this option upgrades non-SMF configurations from the invocations
! of daemon stop commands, which might include a set of arguments, to a simple
! enabling of the appropriate service.
! .RE
! 
! .sp
! .ne 2
! .na
! \fB\fB-s\fR \fIkey\fR=\fIvalue\fR\fR
! .ad
! .sp .6
! .RS 4n
  Specify string values for specific variables in a comma-separated list with no
! intervening spaces. If invalid options are specified, a warning message is
! displayed and the program exits. The following variables can be specified:
! .sp
! .ne 2
! .na
! \fB\fBrouting-svcs=\fR\fIfmrilist\fR\fR
! .ad
! .sp .6
! .RS 4n
! Specifies the routing daemon services to be enabled. Routing daemon services
! are determined to be IPv4 or IPv6 (and so enabled or disabled when
! \fBrouteadm\fR \fB-e\fR/\fB-d\fR \fBipv4\fR\fI(6)\fR\fB-routing\fR is run) on
! the basis of property values in the \fBrouteadm\fR application property group.
! Default: \fBroute:default ripng:default\fR
! .RE
! 
! .sp
! .ne 2
! .na
! \fB\fBipv4-routing-daemon=\fI<full_path_to_routing_daemon>\fR\fR\fR
! .ad
! .sp .6
! .RS 4n
! Specifies the routing daemon to be started when \fBipv4-routing\fR is enabled.
! The routing daemon specified must be an executable binary or shell-script. If
! the specified program maps to an SMF service, the service will be used, and
  daemon arguments to the program will be transferred to the properties of the
! service at enable time. Default: \fB""\fR
! .RE
! 
! .sp
! .ne 2
! .na
! \fB\fBipv4-routing-daemon-args=\fI<args>\fR\fR\fR
! .ad
! .sp .6
! .RS 4n
! Specifies the startup arguments to be passed to the \fBipv4-routing-daemon\fR
! when \fBipv4-routing\fR is enabled. Default: no arguments
! .RE
! 
! .sp
! .ne 2
! .na
! \fB\fBipv4-routing-stop-cmd=\fI<command>\fR\fR\fR
! .ad
! .sp .6
! .RS 4n
  Specifies the command to be executed to stop the routing daemon when
! \fBipv4-routing\fR is disabled. \fI<command>\fR can be an executable binary or
! shell-script, or a string that can be parsed by \fBsystem\fR(3C). Default:
! \fB""\fR
! .RE
! 
! .sp
! .ne 2
! .na
! \fB\fBipv6-routing-daemon=\fI<full_path_to_routing_daemon>\fR\fR\fR
! .ad
! .sp .6
! .RS 4n
! Specifies the routing daemon to be started when \fBipv6-routing\fR is enabled.
! The routing daemon specified must be an executable binary or shell-script. If
! the specified program maps to an SMF service, the service will be used, and
  daemon arguments to the program will be transferred to the properties of the
! service at enable time. Default: \fB""\fR
! .RE
! 
! .sp
! .ne 2
! .na
! \fB\fBipv6-routing-daemon-args=\fI<args>\fR\fR\fR
! .ad
! .sp .6
! .RS 4n
! Specifies the startup arguments to be passed to the \fBipv6-routing-daemon\fR
! when \fBipv6-routing\fR is enabled. Default: \fB""\fR
! .RE
! 
! .sp
! .ne 2
! .na
! \fB\fBipv6-routing-stop-cmd=\fI<command>\fR\fR\fR
! .ad
! .sp .6
! .RS 4n
  Specifies the command to be executed to stop the routing daemon when
! \fBipv6-routing\fR is disabled. \fI<command>\fR can be an executable binary or
! shell-script, or a string that can be parsed by \fBsystem\fR(3C). Default:
! \fB""\fR
! .RE
! 
! .RE
! 
! .sp
! .LP
! Multiple \fB-e\fR, \fB-d\fR, and \fB-r\fR options can be specified on the
! command line. Changes made by \fB-e\fR, \fB-d\fR, and \fB-r\fR are persistent,
! but are not applied to the running system unless \fBrouteadm\fR is called later
! with the \fB-u\fR option.
! .sp
! .LP
! Use the following options as arguments to the \fB-e\fR, \fB-d\fR, and \fB-r\fR
! options (shown above as \fIoption...\fR).
! .sp
! .ne 2
! .na
! \fB\fBipv4-forwarding\fR\fR
! .ad
! .sp .6
! .RS 4n
! Controls the global forwarding configuration for all IPv4 interfaces. The
! system default is \fBdisabled\fR. If enabled, IP will forward IPv4 packets to
! and from interfaces when appropriate. If disabled, IP will not forward IPv4
! packets to and from interfaces when appropriate. The SMF service associated
! with this configuration variable is \fBsvc:/network/routing/ipv4-forwarding\fR.
! This service will be enabled or disabled as appropriate when \fBrouteadm\fR is
! called with the \fBu\fR option. As an alternative, you can use
! \fBsvcadm\fR(1M). Services that require \fBipv4-forwarding\fR to be enabled
! should specify a dependency on this service.
! .RE
! 
! .sp
! .ne 2
! .na
! \fB\fBipv4-routing\fR\fR
! .ad
! .sp .6
! .RS 4n
! Determines whether an IPv4 routing daemon is run. The system default is
! \fBenabled\fR unless the \fB/etc/defaultrouter\fR file exists (see
! \fBdefaultrouter\fR(4)), in which case the default is \fBdisabled\fR. The value
! of this option reflects the state of all IPv4 routing services, such that if
! any IPv4 routing service is enabled, \fBipv4-routing\fR is enabled. This allows
! users to interact with routing services using \fBsvcadm\fR(1M), as well as
! through \fBrouteadm\fR. IPv4 routing services, specified by means of the
! \fBrouting-svcs\fR variable, will be prepared for enable on next boot when the
! user explicitly enables \fBipv4-routing\fR. The SMF routing daemon service for
! \fBin.routed\fR (\fBsvc:/network/routing/route:default\fR) is specified by
! default.
! .RE
! 
! .sp
! .ne 2
! .na
! \fB\fBipv6-forwarding\fR\fR
! .ad
! .sp .6
! .RS 4n
! Controls the global forwarding configuration for all IPv6 interfaces. The
! system default is \fBdisabled\fR. If enabled, IP will forward IPv6 packets to
! and from interfaces when appropriate. If disabled, IP will not forward IPv6
! packets to and from interfaces when appropriate. The SMF service associated
! with this configuration variable is \fBsvc:/network/routing/ipv6-forwarding\fR.
! This service will be enabled or disabled as appropriate when \fBrouteadm\fR is
! called with the \fB-u\fR option, or \fBsvcadm\fR(1M) is used. Services that
! require \fBipv6-forwarding\fR to be enabled should specify a dependency on this
! service.
! .RE
! 
! .sp
! .ne 2
! .na
! \fB\fBipv6-routing\fR\fR
! .ad
! .sp .6
! .RS 4n
! Determines whether an IPv6 routing daemon is run. The system default is
! \fBdisabled\fR. The value of this option reflects the state of all IPv6 routing
! services, such that, if any IPv6 routing service is enabled, \fBipv6-routing\fR
! is enabled. This allows users to interact with routing services via
! \fBsvcadm\fR(1M) as well as through \fBrouteadm\fR. IPv6 routing services,
! specified by means of the \fBrouting-svcs\fR variable, will be prepared for
! enable on next boot when the user explicitly enables \fBipv6-routing\fR. The
! SMF routing daemon service for \fBin.ripngd\fR
! (\fBsvc:/network/routing/ripng:default\fR) is specified by default.
! .RE
! 
! .sp
! .LP
! The forwarding and routing settings are related but not mutually dependent. For
! example, a router typically forwards IP packets and uses a routing protocol,
  but nothing would prevent an administrator from configuring a router that
! forwards packets and does not use a routing protocol. In that case, the
! administrator would enable forwarding, disable routing, and populate the
! router's routing table with static routes.
! .sp
! .LP
! The forwarding settings are global settings. Each interface also has an
! \fBIFF_ROUTER\fR forwarding flag that determines whether packets can be
! forwarded to or from a particular interface. That flag can be independently
! controlled by means of \fBifconfig\fR(1M)'s router option. When the global
! forwarding setting is changed (that is, \fB-u\fR is issued to change the value
! from \fBenabled\fR to \fBdisabled\fR or vice-versa), all interface flags in the
! system are changed simultaneously to reflect the new global policy. Interfaces
! configured by means of DHCP automatically have their interface-specific
! \fBIFF_ROUTER\fR flag cleared.
! .sp
! .LP
! When a new interface is plumbed by means of \fBifconfig\fR, the value of the
! interface-specific forwarding flag is set according to the current global
! forwarding value. Thus, the forwarding value forms the "default" for all new
! interfaces.
! .SH EXAMPLES
! .LP
! \fBExample 1 \fREnabling IPv4 Forwarding
! .sp
! .LP
! IPv4 forwarding is disabled by default. The following command enables IPv4
! forwarding:
! 
! .sp
! .in +2
! .nf
! example# \fBrouteadm -e ipv4-forwarding\fR
! .fi
! .in -2
! .sp
! 
! .LP
! \fBExample 2 \fRApply Configured Settings to the Running System
! .sp
! .LP
  In the previous example, a system setting was changed, but will not take effect
  until the next reboot unless a command such as the following is used:
! 
! .sp
! .in +2
! .nf
! example# \fBrouteadm -u\fR
! .fi
! .in -2
! .sp
! 
! .sp
! .LP
  An alternative to the above two steps is to simply enable the equivalent SMF
  service:
! 
! .sp
! .in +2
! .nf
! example# \fBsvcadm enable svc:/network/ipv4-forwarding\fR
! .fi
! .in -2
! .sp
! 
! .sp
! .LP
  \&...or, using the abbreviated FMRI:
! 
! .sp
! .in +2
! .nf
! example# \fBsvcadm enable ipv4-forwarding\fR
! .fi
! .in -2
! .sp
! 
! .LP
! \fBExample 3 \fRMaking a Setting Revert to its Default
! .sp
! .LP
  To make the setting changed in the first example revert to its default, enter
  the following:
! 
! .sp
! .in +2
! .nf
! example# \fBrouteadm -r ipv4-forwarding\fR
! example# \fBrouteadm -u\fR
! .fi
! .in -2
! .sp
! 
! .LP
! \fBExample 4 \fRStarting \fBin.routed\fR with the \fB-q\fR Flag
! .sp
! .LP
! Setting the \fB-q\fR flag is represented in the SMF service by setting the
! \fBquiet_mode\fR property to true. The following sequence of commands starts
! \fBin.routed\fR with the \fB-q\fR flag:
! 
! .sp
! .in +2
! .nf
! example# \fBrouteadm -m route:default quiet_mode=true\fR
! example# \fBrouteadm -e ipv4-routing -u\fR
! .fi
! .in -2
! .sp
! 
! .sp
! .LP
! See \fBin.routed\fR(1M) for details of property names and how they relate to
! daemon behavior.
! 
! .SH EXIT STATUS
! .LP
! The following exit values are returned:
! .sp
! .ne 2
! .na
! \fB\fB0\fR\fR
! .ad
! .RS 7n
! Successful completion.
! .RE
! 
! .sp
! .ne 2
! .na
! \fB\fB!=0\fR\fR
! .ad
! .RS 7n
! An error occurred while obtaining or modifying the system configuration.
! .RE
! 
! .SH FILES
! .ne 2
! .na
! \fB\fB/etc/inet/routing.conf\fR\fR
! .ad
! .RS 26n
! Parameters for IP forwarding and routing. (Not to be edited.)
! .RE
! 
! .SH ATTRIBUTES
! .LP
! See \fBattributes\fR(5) for descriptions of the following attributes:
! .sp
! 
! .sp
! .TS
! box;
! c | c
! l | l .
! ATTRIBUTE TYPE  ATTRIBUTE VALUE
! _
! Interface Stability     Stable
! .TE
! 
! .SH SEE ALSO
! .LP
! \fBifconfig\fR(1M), \fBin.routed\fR(1M), \fBsvcadm\fR(1M), \fBgateways\fR(4),
! \fBattributes\fR(5), \fBsmf\fR(5)
--- 1,457 ----
! .\"
! .\" The contents of this file are subject to the terms of the
! .\" Common Development and Distribution License (the "License").
! .\" You may not use this file except in compliance with the License.
! .\"
! .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
! .\" or http://www.opensolaris.org/os/licensing.
! .\" See the License for the specific language governing permissions
! .\" and limitations under the License.
! .\"
! .\" When distributing Covered Code, include this CDDL HEADER in each
! .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
! .\" If applicable, add the following below this CDDL HEADER, with the
! .\" fields enclosed by brackets "[]" replaced with your own identifying
! .\" information: Portions Copyright [yyyy] [name of copyright owner]
! .\"
! .\"
  .\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
! .\" Copyright 2018 Nexenta Systems, Inc.
! .\"
! .Dd July 4, 2018
! .Dt ROUTEADM 1M
! .Os
! .Sh NAME
! .Nm routeadm
! .Nd IP forwarding and routing configuration
! .Sh SYNOPSIS
! .Nm
! .Op Fl p Op Ar option
! .Nm
! .Op Fl R Ar root-dir
! .Op Fl e Ar option ...
! .Op Fl d Ar option ...
! .Op Fl r Ar option ...
! .Op Fl s Ar var Ns = Ns Ar value
! .Nm
! .Fl l Ar fmri
! .Nm
! .Fl m Ar fmri
! .Ar key Ns = Ns Ar value Oo Ar key Ns = Ns Ar value Oc Ns ...
! .Nm
! .Fl u
! .Sh DESCRIPTION
! The
! .Nm
! command is used to administer system-wide configuration for IP forwarding and
! routing.
! IP forwarding is the passing of IP packets from one network to another; IP
! routing is the use of a routing protocol to determine routes.
! .Pp
  IP forwarding and routing functions are also represented as services within the
  service management facility (SMF), and can be administered by means of
! .Xr svcadm 1M
! also, using the following fault management resource identifiers (FMRIs):
! .Bd -literal
  svc:/network/ipv4-forwarding:default
  svc:/network/ipv6-forwarding:default
  svc:/network/routing/route:default
  svc:/network/routing/ripng:default
! .Ed
! .Pp
! See
! .Sx EXAMPLES
! for relevant examples.
! .Pp
! In addition to enabling and disabling routing and forwarding,
! .Nm
! is used to interact with SMF-based routing daemon services.
! Routing daemon services are identified by the presence of a
! .Nm
! application property group, which
! .Nm
! uses in administering the given service.
  Routing daemon services can also specify properties relating to their operation
! in the
! .Cm routing
! application property group; these can be modified by means of
! .Nm Fl m .
! If an FMRI for a service without such a property group is specified, an error is
! issued and the operation is not carried out.
! If a routing daemon has not been converted to SMF, the
! .Cm ipv4-routing-daemon , ipv6-routing-daemon ,
! .Cm ipv4-routing-daemon-args , ipv6-routing-daemon-args ,
! and
! .Cm ipv4-routing-stop-cmd , ipv6-routing-stop-cmd
! variables can be used to specify the appropriate daemon for IPv4 or IPv6
! routing.
! .Nm
! will then run that daemon using the
! .Em svc:/network/routing/legacy-routing:ipv4
! or
! .Em svc:/network/routing/legacy-routing:ipv6
! service as appropriate.
! This conversion process occurs when you issue an enable
! .Pq Fl e ,
! disable
! .Pq Fl d
! or an update
! .Pq Fl u
! command.
! .Pp
! The first usage, in the
! .Sx SYNOPSIS
! above, reports the current configuration.
! .Sh OPTIONS
  The following command-line options are supported:
! .Bl -tag -width Ds
! .It Fl d Ar option ...
! Disable the specified option.
! The effect is to prepare the associated services
! .Po Em svc:/network/ipv4-forwarding:default
! in the case of
! .Cm ipv4-forwarding
! .Pc
! for disabling.
! By means of the
! .Cm routing-svcs
  variable, the routing daemons are specified to be disabled on subsequent boot
! or when
! .Nm Fl u
! is run.
! .It Fl e Ar option ...
! Enable the specified option.
! The effect is to prepare the associated services
! .Po Em svc:/network/ipv4-forwarding:default
! in the case of
! .Cm ipv4-forwarding
! .Pc
! for enabling.
! By means of the
! .Cm routing-svcs
! variable, the routing daemons are specified to be enabled on subsequent boot or
! when
! .Nm Fl u
! is run.
! .It Fl l Ar fmri
  List all properties in the routing application property group for the SMF
  routing daemon service.
! .It Fl m Ar fmri Ar key Ns = Ns Ar value
! Change property value of property
! .Ar key
! to
! .Ar value
! in routing application property group for the SMF routing daemon service.
! For multi-valued properties, the property name can be used multiple times in the
! modify operation, and each associated value will be added.
! .It Fl p Op Ar option
! Print the configuration in parsable format.
! If
! .Ar option
! is specified, only the configuration for the specified option or variable is
! displayed.
! .It Fl r Ar option ...
! Revert the specified option to the system default.
! The system defaults are specified in the description of each
! .Ar option .
! .It Fl R Ar root-dir
! Specify an alternate root directory where
! .Nm
! applies changes.
! .Pp
! Note: The root file system of any non-global zones must not be referenced with
! the
! .Fl R
! option.
! Doing so might damage the global zone's file system, might compromise the
! security of the global zone, and might damage the non-global zone's file system.
! See
! .Xr zones 5 .
! .It Fl s Ar key Ns = Ns Ar value
  Specify string values for specific variables in a comma-separated list with no
! intervening spaces.
! If invalid options are specified, a warning message is displayed and the program
! exits.
! The following variables can be specified:
! .Bl -tag -width Ds
! .It Cm routing-svcs Ns = Ns Ar fmrilist
! Specifies the routing daemon services to be enabled.
! Routing daemon services are determined to be IPv4 or IPv6
! .Po and so enabled or disabled when
! .Nm Fl e Ns / Ns Fl d Sy ipv4(6)-routing
! is run
! .Pc
! on the basis of property values in the
! .Nm
! application property group.
! Default: empty.
! .It Cm ipv4-routing-daemon Ns = Ns Pa full_path_to_routing_daemon
! Specifies the routing daemon to be started when
! .Cm ipv4-routing
! is enabled.
! The routing daemon specified must be an executable binary or shell-script.
! If the specified program maps to an SMF service, the service will be used, and
  daemon arguments to the program will be transferred to the properties of the
! service at enable time.
! Default: empty string.
! .It Cm ipv4-routing-daemon-args Ns = Ns Ar args
! Specifies the startup arguments to be passed to the
! .Cm ipv4-routing-daemon
! when
! .Cm ipv4-routing
! is enabled.
! Default: no arguments
! .It Cm ipv4-routing-stop-cmd Ns = Ns Ar command
  Specifies the command to be executed to stop the routing daemon when
! .Cm ipv4-routing
! is disabled.
! .Ar command
! can be an executable binary or shell-script, or a string that can be parsed by
! .Xr system 3C .
! Default: empty string.
! .It Cm ipv6-routing-daemon Ns = Ns Pa full_path_to_routing_daemon
! Specifies the routing daemon to be started when
! .Cm ipv6-routing
! is enabled.
! The routing daemon specified must be an executable binary or shell-script.
! If the specified program maps to an SMF service, the service will be used, and
  daemon arguments to the program will be transferred to the properties of the
! service at enable time.
! Default: empty string.
! .It Cm ipv6-routing-daemon-args Ns = Ns Ar args
! Specifies the startup arguments to be passed to the
! .Cm ipv6-routing-daemon
! when
! .Cm ipv6-routing
! is enabled.
! Default: empty string.
! .It Cm ipv6-routing-stop-cmd Ns = Ns Ar command
  Specifies the command to be executed to stop the routing daemon when
! .Cm ipv6-routing
! is disabled.
! .Ar command
! can be an executable binary or shell-script, or a string that can be parsed by
! .Xr system 3C .
! Default: empty string.
! .El
! .It Fl u
! Apply the currently configured options to the running system.
! These options might include enabling or disabling IP forwarding and launching or
! killing routing daemons, if any are specified.
! It does not alter the state of the system for those settings that have been set
! to default.
! This option is meant to be used by administrators who do not want to reboot to
! apply their changes.
! In addition, this option upgrades non-SMF configurations from the invocations
! of daemon stop commands, which might include a set of arguments, to a simple
! enabling of the appropriate service.
! .El
! .Pp
! Multiple
! .Fl e ,
! .Fl d ,
! and
! .Fl r
! options can be specified on the command line.
! Changes made by
! .Fl e ,
! .Fl d ,
! and
! .Fl r
! are persistent, but are not applied to the running system unless
! .Nm
! is called later with the
! .Fl u
! option.
! .Pp
! Use the following options as arguments to the
! .Fl e ,
! .Fl d ,
! and
! .Fl r
! options
! .Po shown above as
! .Ar option ...
! .Pc :
! .Bl -tag -width Ds
! .It Cm ipv4-forwarding
! Controls the global forwarding configuration for all IPv4 interfaces.
! The system default is
! .Cm disabled .
! If enabled, IP will forward IPv4 packets to and from interfaces when
! appropriate.
! If disabled, IP will not forward IPv4 packets to and from interfaces when
! appropriate.
! The SMF service associated with this configuration variable is
! .Em svc:/network/routing/ipv4-forwarding .
! This service will be enabled or disabled as appropriate when
! .Nm
! is called with the
! .Fl u
! option.
! As an alternative, you can use
! .Xr svcadm 1M .
! Services that require
! .Cm ipv4-forwarding
! to be enabled should specify a dependency on this service.
! .It Cm ipv4-routing
! Determines whether an IPv4 routing daemon is run.
! The system default is
! .Cm disabled .
! The value of this option reflects the state of all IPv4 routing services, such
! that if any IPv4 routing service is enabled,
! .Cm ipv4-routing
! is enabled.
! This allows users to interact with routing services using
! .Xr svcadm 1M ,
! as well as through
! .Nm .
! IPv4 routing services, specified by means of the
! .Cm routing-svcs
! variable, will be prepared for enable on next boot when the user explicitly
! enables
! .Cm ipv4-routing .
! .It Cm ipv6-forwarding
! Controls the global forwarding configuration for all IPv6 interfaces.
! The system default is
! .Cm disabled .
! If enabled, IP will forward IPv6 packets to and from interfaces when
! appropriate.
! If disabled, IP will not forward IPv6 packets to and from interfaces when
! appropriate.
! The SMF service associated with this configuration variable is
! .Em svc:/network/routing/ipv6-forwarding .
! This service will be enabled or disabled as appropriate when
! .Nm
! is called with the
! .Fl u
! option, or
! .Xr svcadm 1M
! is used.
! Services that require
! .Cm ipv6-forwarding
! to be enabled should specify a dependency on this service.
! .It Cm ipv6-routing
! Determines whether an IPv6 routing daemon is run.
! The system default is
! .Cm disabled .
! The value of this option reflects the state of all IPv6 routing services, such
! that, if any IPv6 routing service is enabled,
! .Cm ipv6-routing
! is enabled.
! This allows users to interact with routing services via
! .Xr svcadm 1M
! as well as through
! .Nm .
! IPv6 routing services, specified by means of the
! .Cm routing-svcs
! variable, will be prepared for enable on next boot when the user explicitly
! enables
! .Cm ipv6-routing .
! .El
! .Pp
! The forwarding and routing settings are related but not mutually dependent.
! For example, a router typically forwards IP packets and uses a routing protocol,
  but nothing would prevent an administrator from configuring a router that
! forwards packets and does not use a routing protocol.
! In that case, the administrator would enable forwarding, disable routing, and
! populate the router's routing table with static routes.
! .Pp
! The forwarding settings are global settings.
! Each interface also has an
! .Em IFF_ROUTER
! forwarding flag that determines whether packets can be forwarded to or from a
! particular interface.
! That flag can be independently controlled by means of
! .Xr ifconfig 1M
! router option.
! When the global forwarding setting is changed
! .Po that is,
! .Fl u
! is issued to change the value from
! .Cm enabled
! to
! .Cm disabled
! or vice-versa
! .Pc ,
! all interface flags in the system are changed simultaneously to reflect the new
! global policy.
! Interfaces configured by means of DHCP automatically have their
! interface-specific
! .Em IFF_ROUTER
! flag cleared.
! .Pp
! When a new interface is plumbed by means of
! .Nm ifconfig ,
! the value of the interface-specific forwarding flag is set according to the
! current global forwarding value.
! Thus, the forwarding value forms the "default" for all new interfaces.
! .Sh FILES
! .Bl -tag -width Pa
! .It Pa /etc/inet/routing.conf
! Parameters for IP forwarding and routing.
! (Not to be edited.)
! .El
! .Sh EXIT STATUS
! .Ex -std
! .Sh EXAMPLES
! .Bl -tag -width Ds
! .It Sy Example 1 No Enabling IPv4 Forwarding
! IPv4 forwarding is disabled by default.
! The following command enables IPv4 forwarding:
! .Bd -literal
! # routeadm -e ipv4-forwarding
! .Ed
! .It Sy Example 2 No Apply Configured Settings to the Running System
  In the previous example, a system setting was changed, but will not take effect
  until the next reboot unless a command such as the following is used:
! .Bd -literal
! # routeadm -u
! .Ed
! .Pp
  An alternative to the above two steps is to simply enable the equivalent SMF
  service:
! .Bd -literal
! # svcadm enable svc:/network/ipv4-forwarding
! .Ed
! .Pp
  \&...or, using the abbreviated FMRI:
! .Bd -literal
! # svcadm enable ipv4-forwarding
! .Ed
! .It Sy Example 3 No Making a Setting Revert to its Default
  To make the setting changed in the first example revert to its default, enter
  the following:
! .Bd -literal
! # routeadm -r ipv4-forwarding
! # routeadm -u
! .Ed
! .It Sy Example 4 No Starting in.routed with the -q Flag
! Setting the
! .Fl q
! flag is represented in the SMF service by setting the
! .Cm quiet_mode
! property to true.
! The following sequence of commands starts
! .Nm in.routed
! with the
! .Fl q
! flag:
! .Bd -literal
! # routeadm -m route:default quiet_mode=true
! # routeadm -e ipv4-routing -u
! .Ed
! .Pp
! See
! .Xr in.routed 1M
! for details of property names and how they relate to daemon behavior.
! .El
! .Sh INTERFACE STABILITY
! .Sy Stable .
! .Sh SEE ALSO
! .Xr ifconfig 1M ,
! .Xr in.routed 1M ,
! .Xr svcadm 1M ,
! .Xr gateways 4 ,
! .Xr attributes 5 ,
! .Xr smf 5