​What all options are available in /etc/sysconfig/network file in Red Hat Enterprise Linux 6?

环境

  • Red Hat Enterprise Linux 6
  • initscripts-9.03.38-1.el6_4.2

问题

  • What all options are available in /etc/sysconfig/network file in Red Hat Enterprise Linux 6?

决议

Below are the available option in ​​/etc/sysconfig/network​​ file:

  • NETWORKING=<yes|no>
    Enable/Disable IPv4 networking.
  • HOSTNAME=<FQDN>
    by default, but whatever hostname you want
  • GATEWAY=<gateway IP>
    Set the gateway's IP address for routing.
  • GATEWAYDEV=<interface>
    gateway device to use, when multiple devices have GATEWAY= (e.g. eth0)
  • NISDOMAIN=<nis domain name>
    Set NIS domain for NIS service.
  • NOZEROCONF=<yes|no>
    Set this to not set a route for dynamic link-local addresses.
  • NETWORKDELAY=<delay in seconds>
    Delay in seconds after all network interfaces are initialized. Useful if network has spanning tree running and must wait for STP convergence. Default: 0 (no delay)
  • NETWORKWAIT=<yes|no>
    When using NetworkManager, wait for an active network interface to be configured before continuing. This can be useful if you have legacy daemons that do not react properly to changing network configuration. If this is set but no active devices receive an address, it will timeout and continue 30 seconds after link acquisition. Default: no (do not wait)
  • IPV6FORWARDING=<yes|no>
    Enable or disable global forwarding of incoming IPv6 packets on all interfaces. Note: Actual packet forwarding cannot be controlled per-device, use netfilter6 for such issues. Default: no
  • IPV6INIT=<yes|no>
    Enable or disable IPv6 configuration for all interfaces. Use with caution! Default: value not set in this file
  • IPV6_AUTOCONF=<yes|no>
    Sets the default for device-based auto configuration. Default: yes if IPV6FORWARDING=no, no if IPV6FORWARDING=yes
  • IPV6_ROUTER=<yes|no>
    Sets the default for device-based Host/Router behavior. Default: yes if IPV6FORWARDING=yes, no if IPV6FORWARDING=no
  • IPV6_AUTOTUNNEL=<yes|no>
    Controls automatic IPv6 tunneling. Default: no
  • IPV6_DEFAULTGW=<IPv6 address[%interface]> (optional)
    Add a default route through specified gateway. An interface can be specified: required for link-local addresses
    Examples:
    Raw
    #Add default route through 3ffe:ffff:1234:5678::1 IPV6_DEFAULTGW="3ffe:ffff:1234:5678::1" #Add default route through 3ffe:ffff:1234:5678::1 and device eth0 IPV6_DEFAULTGW="3ffe:ffff:1234:5678::1%eth0" #Add default route through fe80::1 and device eth0 IPV6_DEFAULTGW="fe80::1%eth0"
    Note: if IPV6_DEFAULTGW is specified with %interface scope and it doesn't match IPV6_DEFAULTDEV, IPV6_DEFAULTDEV is ignored.
    Note: it's preferred to use %interface for all addresses, not just link-local if you have multiple IPv6-enabled interfaces.
  • IPV6_DEFAULTDEV=<interface> (optional)
    Add a default route through specified interface without specifying next hop. Type of interface will be tested whether this is allowed
    Examples:
    Raw
    IPV6_DEFAULTDEV="eth0" INVALID example! IPV6_DEFAULTDEV="ppp0" IPV6_DEFAULTDEV="sit1"
    Examples for 6to4
    Raw
    #Add default route through dedicated 6to4 tunnel device "tun6to4", if configured IPV6_DEFAULTDEV="tun6to4"
    Note: "tun6to4" does not support an additional IPV6_DEFAULTGW. Other interfaces prefer IPV6_DEFAULTGW, if specified.
  • IPV6_RADVD_PIDFILE=<pid-file> (optional)
    Location of PID file for controlling radvd, see IPV6_CONTROL_RADVD. Default: "/var/run/radvd/radvd.pid"
    Example:
    Raw
    IPV6_RADVD_PIDFILE="/some/other/location/radvd.pid"
  • IPV6TO4_RADVD_PIDFILE=<pid-file> (obsolete)
    As above, still supported for a while for backward compatibility.
  • IPV6_RADVD_TRIGGER_ACTION=startstop|reload|restart|SIGHUP (optional)How to trigger radvd in case of 6to4 or PPP action.
  • startstop: radvd starts if interface goes up and stops if interface goes down using initscript call of radvd with related parameter.
  • reload|restart: initscript of radvd is called with this parameter
  • SIGHUP: signal HUP is sent to radvd, pidfile must be specified, if not the default

Note: IPv6 options above can be overridden in interface-specific configuration.

obsoleted values from earlier releases

  • FORWARD_IPV4=<yes|no>
    This setting has been moved into net.ipv4.ip_forward setting in /etc/sysctl.conf. Setting it to 1 there enables IP forwarding, setting it to 0 disables it (which is the default for RFC compliance).
  • NETWORKING_IPV6=<yes|no>
    Enable or disable global IPv6 initialization