Files in /etc/sysconfig/:
=========================

/etc/sysconfig/network:
-----------------------

  NETWORKING=yes|no
  HOSTNAME=<fqdn by default, but whatever hostname you want>
  GATEWAY=<gateway IP>
  GATEWAYDEV=<gateway device> (e.g. eth0)
  NISDOMAIN=<nis domain name>
  IPX=yes|no
  IPXAUTOPRIMARY=on|off (note, that MUST be on|off, not yes|no)
  IPXAUTOFRAME=on|off (again, not yes|no)
  IPXINTERNALNETNUM=<netnum>
  IPXINTERNALNODENUM=<nodenum>
  RESOLV_MODS=yes|no

  All the IPX stuff is optional, and should default to off.
  RESOLV_MODS=yes|no
    Setting this to "no" prevents ppp scripts from modifying
    /etc/resolv.conf. Useful for kppp users. This is a global
    flag for all PPP interfaces.
  USE_HOTPLUG=yes|no
    If this is a CardBus interface, set this to "yes", because service
    pcmcia handles PCMCIA cards only, not CardBus.
  NETWORKING_IPV6=yes|no
    Enable or disable global IPv6 initialization
    Default: no
  IPV6FORWARDING=yes|no
    Enable or disable global forwarding of incoming IPv6 packes
    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 autoconfiguration.
    Default: yes if IPV6FORWARDING=no, no if IPV6FORWARDING=yes
  IPV6_ROUTER=yes|no
    Sets the default for device-based Host/Router behaviour.
    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:
      IPV6_DEFAULTGW="3ffe:ffff:1234:5678::1"
        Add default route through 3ffe:ffff:1234:5678::1
      IPV6_DEFAULTGW="3ffe:ffff:1234:5678::1%eth0"
        Add default route through 3ffe:ffff:1234:5678::1 and device eth0
      IPV6_DEFAULTGW="fe80::1%eth0"
        Add default route through fe80::1 and device 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:
      IPV6_DEFAULTDEV="eth0" INVALID example!
      IPV6_DEFAULTDEV="ppp0"
      IPV6_DEFAULTDEV="sit1"
    Examples for 6to4
      IPV6_DEFAULTDEV="tun6to4"
        Add default route through dedicated 6to4 tunnel device "tun6to4", if configured

  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:
       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
    Default: SIGHUP

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

  Following variables are obsolete and no longer supported:
    FORWARD_IPV4=yes|no
      This setting has been moved into net.ipv4.ip_forward setting
      in /etc/sysconfig/network-scripts/sysctl.conf. Setting it to 1
      there enables IP forwarding, setting it to 0 disables it
      (which is the default for RFC compliance).
    DEFRAG_IPV4=yes|no
      Setting this to yes used to automatically defragment IPv4
      packets. This is a good idea for masquerading, and
      a bad idea otherwise. This setting has been moved into
      net.ipv4.ip_always_defrag setting in
      /etc/sysconfig/network-scripts/sysctl.conf.

/etc/sysconfig/vlan:
--------------------

  DOT1Q_VLANS=yes|no
  VLAN_NAMING=<naming schema>

    DOT1Q_VLANS=yes|no
      init VLANs at startup

    VLAN_NAMING=VLAN_PLUS_VID
      naming schema for VLAN interfaces
	VLAN_PLUS_VID 		= vlan0005
	VLAN_PLUS_VID_NO_PAD	= vlan5
	DEV_PLUS_VID		= eth0.0005
	DEV_PLUS_VID_NO_PAD	= eth0.5

  see vlan-utils package documentation for details.

/etc/sysconfig/static-routes:
-----------------------------

  Contains lines of the form:

    <device> host|net <arguments to route command>

  <device> may be a device name to have the route brought up and
  down with the device, or "any" to have the correct devices calculated
  at run time.

  For example:

  1. eth0 host 192.168.2.2

     adds a host route through eth0 to 192.168.2.2, while

  2. any net 192.168.2.0 netmask 255.255.255.0 ppp0

     adds a network route to the 192.168.2.0 network through ppp0.

Files in /etc/sysconfig/network-scripts/
========================================

/etc/sysconfig/network-scripts/ifup:
/etc/sysconfig/network-scripts/ifdown:
--------------------------------------

  Symlinks to /sbin/ifup and /sbin/ifdown, respectively.
  These are the only two scripts "in" this directory that should
  be called directly; these two scripts call all the other
  scripts as needed.  These symlinks are here for legacy purposes
  only -- they'll will probably be removed in future versions, so
  only /sbin/ifup and /sbin/ifdown should currently be used.

  These scripts take one argument normally: the name of the device
  (e.g. eth0).  They are called with a second argument of "boot"
  during the boot sequence so that devices that are not meant to
  be brought up on boot (ONBOOT=no, see below) can be ignored at
  that time.

/etc/sysconfig/network-scripts/network-functions:
-------------------------------------------------

  Not really a public file.  Contains functions which the scripts use
  for bringing interfaces up and down.  In particular, it contains
  most of the code for handling alternative interface configurations
  and interface change notification through netreport.

/etc/sysconfig/network-scripts/network-functions-ipv6:
------------------------------------------------------

  Not really a public file.  Contains functions which the scripts use
  for bringing IPv6 on interfaces up and down, like addresses, routes,
  forwarding handling and static or automatic tunneling.

/etc/sysconfig/network-scripts/ifcfg-<interface-name> and
/etc/sysconfig/network-scripts/ifcfg-<interface-name>:<alias-name> and
/etc/sysconfig/network-scripts/ifcfg-<interface-name>.<vlan-id> or
/etc/sysconfig/network-scripts/ifcfg-vlanXXXX (XXXX is VLAN ID):

  The first defines an interface, and the second contains
  only the parts of the definition that are different in a
  "alias" (or alternative) interface.  For example, the
  network numbers might be different, but everything else
  might be the same, so only the network numbers would be
  in the alias file, but all the device information would
  be in the base ifcfg file.

  The items that can be defined in an ifcfg file depend on the
  interface type.  The really obvious ones I'm not going to
  bother to define; you can figure out what "IPADDR" is, I
  think...  :-)

  Base items:
    NAME=<friendly name for users to see>
      Most important for PPP.  Only used in front ends.
    DEVICE=<name of physical device (except dynamically-allocated PPP
      devices where it is the "logical name")>
    IPADDR=
    NETMASK=
    GATEWAY=
    MULTICAST=on|off
    ONBOOT=yes|no
    USERCTL=yes|no
    BOOTPROTO=none|(bootp|dhcp|zcip)[,zcip]
    DHCP_CLIENT=
    MTU=
    PEERDNS=yes|no
      modify /etc/resolv.conf if peer uses msdns extension (PPP only) or
      DNS{1,2} are set, or if using pump or dhcpcd. default to "yes".
    DNS{1,2}=<ipaddress>
      provide DNS addresses that are dropped into the resolv.conf
      file if PEERDNS is not set to "no".
    SYSCTL_FORWARDING=0|1
      useful for tunnel carriers (not tunnels)
    SYSCTL_RP_FILTER=0|1
      useful for multihomed hosts and routers
    SYSCTL_LOG_MARTIANS=0|1
      useful for security/debugging

  BOOTPROTO can contain more than one comma-separated value,
  in latter case first succeeded method stops further attempts.
  If BOOTPROTO is not "none", then the only other item that
  must be set is the DEVICE item; all the rest will be determined
  by the boot protocol. No "dummy" entries need to be created.
  As an additional feature, user can specify MTU, ARP, MACADDR, PROMISC,
  ALLMULTI and MULTICAST parameters for dynamically configured interfaces.
  zcip (zeroconf) configuration will work only if zcip package is installed.
  Additional feature includes link status detection before running
  DHCP or ZCIP client (only if ifplugd package is installed _AND_
  CHECK_ETH_LINK is set to "yes" in ifcfg file).

  MULTICAST allows to change default value of corresponding interface flag

  You can specify which dhcp client to use with the DHCP_CLIENT, if
  the DHCP_CLIENT is not specified we trying to launch in order :
      /sbin/dhcpxd
      /sbin/dhclient
      /sbin/dhcpcd
  if you have a preferred client define the DHCP_CLIENT variable.

  Base items being deprecated:
    NETWORK=<will be calculated automatically with ifcalc>
    BROADCAST=<will be calculated automatically with ifcalc>

  IPv6-only items for real interfaces:
    IPV6INIT=yes|no
      Enable or disable IPv6 configuration for this interface
      Default: no
    IPV6FORWARDING=yes|no
      Enable or disable global forwarding of incoming IPv6 packets
      Note: Obsolete in interface specification!
      Default: no
    IPV6ADDR=<IPv6 address>[/<prefix length>]
      Specify a primary static IPv6 address here
      Optional, if normal host and a router advertisement daemon is on local link
      Required, if node is a router and interface should route packets
      Note: if prefix length is omitted, 64 is assumed
      Example:
        IPV6ADDR="3ffe:ffff:0:5::1"
        IPV6ADDR="3ffe:ffff:0:1::1/128"
    IPV6ADDR_SECONDARIES="<IPv6 address>[/<prefix length>] ..." (optional)
      A list of secondary IPv6 addresses (e.g. useful for virtual hosting)
      Example:
        IPV6ADDR_SECONDARIES="3ffe:ffff:0:1::10 3ffe:ffff:0:2::11/128"
    IPV6_MTU=<MTU of link> (optional)
      Optional, dedicated MTU of this link
      Note: Must be greater or equal to 1280.
      Example:
        IPV6_MTU="1280"

  Special configuration options for multi-homed hosts etc.
	IPV6_ROUTER=yes|no: Controls IPv6 autoconfiguration
	IPV6_AUTOCONF=yes|no: Controls IPv6 autoconfiguration
	 Defaults:
	  Global IPV6FORWARDING=yes: IPV6_AUTOCONF=no, IPV6_ROUTER=yes
	  Global IPV6FORWARDING=no: IPV6_AUTOCONF=yes

  Optional settings for a 6to4 tunnel
    IPV6TO4INIT=yes|no
      Enable or disable 6to4 tunneling setup
      Default: no
    IPV6TO4_RELAY=<IPv4 address> (optional)
      IPv4 address of the remote 6to4 relay
      Note: if this is omitted, ::192.88.99.1 (the anycast relay address) is chosen
    IPV6TO4_IPV4ADDR=<IPv6 address>[/<prefix length>] (optional)
      Overwrite local IPv4 address which is accessable from the Internet
       (optional, in case of static IPv4-NAT behind a router or other special scenarios)
    IPV6TO4_MTU=<MTU for IPv6> (optional)
      Controls IPv6 MTU for the 6to4 tunnel
      Note: Must be greater or equal to 1280
      Example:
        IPV6TO4_MTU="1280"
      Default: MTU of master device - 20
    IPV6TO4_ROUTING="<device>-<suffix>/<prefix length> ..." (optional)
      A list of routing tokens to setup proper IPv6 routes on the LAN
      Example:
         IPV6TO4_ROUTING="eth0-:0004::0/64 eth1-:0005::0/64"
         Will create one route per eth0 and eth1, taking given SLA

  Optional settings for a 6to4 tunnel or a ppp link
    IPV6_CONTROL_RADVD=yes|no (optional)
      Enable signalling radvd that the 6to4 prefix has been changed or a
       preconfigured dynamic device is up or down
      Default: no

  IPv6-only items for static tunnel interface:
    Interface name: sitX (X => 1)
    IPV6INIT=yes|no
      Enable or disable IPv6 configuration for this interface
      Default: no
    IPV6TUNNELIPV4=<IPv4 address>
      Specify IPv4 address of a foreign IPv6-in-IPv4 tunnel endpoint
      Example:
        IPV6TUNNELIPV4="1.2.3.4"
    IPV6TUNNELIPV4LOCAL=<IPv4 address>
      Specify local IPv4 address of tunnel, useful on interfaces with multiple IPv4 addresses
    IPV6ADDR=<IPv6 address>[/<prefix length>] (optional)
     local IPv6 address of a numbered tunnel
    IPV6ADDR_SECONDARIES="<IPv6 address>[/<prefix length>] ..." (optional)
      A list of secondary IPv6 addresses (example see above)
    IPV6_MTU=<MTU of tunnel> (optional)
      Optional, dedicated MTU of this tunnel
      Note: Must be greater or equal to 1280
      Example:
        IPV6_MTU="1280"

  Ethernet-only items:
    {IPXNETNUM,IPXPRIMARY,IPXACTIVE}_{802_2,802_3,ETHERII,SNAP}
    configuration matrix for IPX.  Only used if IPX is active.
    Managed from /etc/sysconfig/network-scripts/ifup-ipx
    ARP=yes|no (adds 'arp' flag to ifconfig, for use with the
      ethertap device)
    PROMISC=yes|no (enable or disable promiscuous mode)
    ALLMULTI=yes|no (enable or disable all-multicast mode)

  VLAN-only items:
    VLAN_TRUNK_IF=<device>
      interface name for trunking VLANs
    ENABLE_VLAN_DHCP=yes
      enable ethernet header reorder on VLAN intreface. This need
      for support DHCP operations on given VLAN. See docs for vconfig.

  PPP/SLIP items:
    PERSIST=yes|no
    MODEMPORT=<device, say /dev/modem>
    LINESPEED=<speed, say 115200>
    DEFABORT=yes|no (tells netcfg whether or not to put default
      abort strings in when creating/editing the chat script and/or
      dip script for this interface)
      (meaningless with WVDIALSECT)

  PPP-specific items
    WVDIALSECT=<list of sections from wvdial.conf to use>
      If this variable is set, then the chat script (if it
      exists) is ignored, and wvdial is used to open the
      PPP connection.
    DEFROUTE=yes|no (set this interface as default route? yes is
default)
    DEBUG=yes|no (defaults to yes)
      turns on/off pppd and chat (if used) debugging.
    ESCAPECHARS=yes|no (simplified interface here doesn't let people
      specify which characters to escape; almost everyone can use
      asyncmap 00000000 anyway, and they can set PPPOPTIONS to
      asyncmap foobar if they want to set options perfectly)
    HARDFLOWCTL=yes|no (yes imples "modem crtscts" options)
    PPPOPTIONS=<arbitrary option string; is placed last on the
      command line, so it can override other options like asyncmap
      that were specified differently>
    PAPNAME=<"name $PAPNAME" on pppd command line> (note that
      the "remotename" option is always specified as the logical
      ppp device name, like "ppp0" (which might perhaps be the
      physical device ppp1 if some other ppp device was brought
      up earlier...), which makes it easy to manage pap/chap
      files -- name/password pairs are associated with the
      logical ppp device name so that they can be managed
      together.
    REMIP=<remote ip address, normally unspecified>
    MTU=
    MRU=
    DISCONNECTTIMEOUT=<number of seconds, default currently 5>
      (time to wait before re-establishing the connection after
      a successfully-connected session terminates before attempting
      to establish a new connection.)
    RETRYTIMEOUT=<number of seconds, default currently 60>
      (time to wait before re-attempting to establish a connection
      after a previous attempt fails.)
    RETRYCONNECT=yes|no (defaults to yes)
      If this is yes, then we will re-run pppd if it exits with a
      "connect script failed" status.  Otherwise, only one attempt
      is made to bring up the connection.  Note that some connect
      scripts (for example, wvdial) might do their own retries (such
      as BUSY or NO DIALTONE conditions).
    MAXFAIL=<number>
      If this is set, this will cause ppp-watch to exit after
      the specified number of attempts.
    DEMAND=yes|no
      Switches on demand-dialing mode using pppd's "demand" option.
    IDLETIMEOUT=600
      The amount of time the link needs to be inactive before pppd will
      bring it down automatically.

/etc/sysconfig/network-scripts/chat-<interface-name>:
-----------------------------------------------------

  chat script for PPP or SLIP connection intended to establish
  the connection.  For SLIP devices, a DIP script is written
  from the chat script; for PPP devices, the chat script is used
  directly.

/etc/sysconfig/network-scripts/dip-<interface-name>:
----------------------------------------------------

  A write-only script created from the chat script by netcfg.
  Do not modify this.  In the future, this file may disappear
  by default and created on-the-fly from the chat script if
  it does not exist.

/etc/sysconfig/network-scripts/ifup-post:
-----------------------------------------

  Called when any network device EXCEPT a SLIP device comes
  up.  Calls /etc/sysconfig/network-scripts/ifup-routes to
  bring up static routes that depend on that device.  Calls
  /etc/sysconfig/network-scripts/ifup-aliases to bring up
  aliases for that device.  Sets the hostname if it is not
  already set and a hostname can be found for the IP for that
  device.  Sends SIGIO to any programs that have requested
  notification of network events.

  Could be extended to fix up nameservice configuration, call
  arbitrary scripts, etc, as needed.

/etc/sysconfig/network-scripts/ifup-routes:
-------------------------------------------

  Set up static routes for a device.

/etc/sysconfig/network-scripts/ifup-aliases:
--------------------------------------------

  Bring up aliases for a device.

/etc/sysconfig/network-scripts/ifdhcpc-done:
--------------------------------------------

  Called by dhcpcd once dhcp configuration is complete; sets
  up /etc/resolv.conf from the version dhcpcd dropped in
  /etc/dhcpc/resolv.conf

