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

本文详细介绍了 Red Hat Enterprise Linux 6 中 /etc/sysconfig/network 文件的配置选项,包括 IPv4 和 IPv6 的设置,如启用/禁用网络、设置主机名、网关、NIS 域、网络延迟等,以及 IPv6 特定选项,如自动配置、路由公告、隧道等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

https://access.redhat.com/solutions/464293

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

 SOLUTION 已验证 - 已更新 2015年十一月25日18:28 - 

English 

环境

  • 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

Note: Enabling/disabling IPv6 in RHEL6 has been documented in How do I disable or enable the IPv6 protocol in Red Hat Enterprise Linux?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值