Home
Understanding content of /etc/sysconfig/network-scripts Folder
Understanding content of /etc/sysconfig/network-scripts Folder
- /etc/sysconfig/network-scripts/ifup and /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 /sbin/ifup and /sbin/ifdown should currently be used at the user level.
· 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/init.ipv6-global:
Contains different basic settings that are set from /etc/[rc.d]/init.d/network at different stages of network initialization.
- /etc/sysconfig/network-scripts/network-functions:
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:
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>:
The first defines an interface, and the second contains only the parts of the definition that are different in a "alias" (or alternative) interface.
Base items are as listed below with brief description for each,
· NAME = friendly name for users to see
· DEVICE = name of physical device (except dynamically-allocated PPP devices where it is the "logical name")
· IPADDRn = IP address to be configured to interface (The "n" is expected to be consecutive positive integers starting from 0.)
· PREFIXn = Network prefix. It is used for all configurations except aliases and ippp devices (The "n" is expected to be consecutive positive integers starting from 0.)
· NETMASKn = Subnet mask; just useful for aliases and ippp devices. (The "n" is expected to be consecutive positive integers starting from 0.)
· GATEWAY = IP address of Gateway
· METRIC = Metric for the default route using GATEWAY (Similar to priority)
· ONBOOT = yes|no, To get interface up on boot up or not (not valid for alias devices; use ONPARENT)
· HOTPLUG = yes|no
· USERCTL = yes|no
· BOOTPROTO = none|bootp|dhcp, 'bootp' or 'dhcp' cause a DHCP client to run on the device. Any other value causes any static configuration in the file to be applied.
· VLAN = yes|no
· MTU = Default MTU for this device, i.e. value of packet size to be sent and received over the device
· WINDOW = Default window for routes from this device
· PEERDNS = yes|no, modify /etc/resolv.conf if peer uses msdns extension (PPP only) or DNS{1,2} are set, or if using dhclient. default to "yes".
· DNS{1,2} = <ip address> provide DNS addresses that are dropped into the resolv.conf file if PEERDNS is not set to "no".
· SCOPE= Set to "scope SCOPE-ID" to set a non-default scope for a statically configured IP address, Need to explore actual implementation usage.
· SRCADDR = use the specified source address for outgoing packets if to be hardcoded for any business requirement, Need to explore actual implementation usage.
· HWADDR = ethernet hardware address for this device
· MACADDR = Set the hardware address for this device to this, Use of this in conjunction with HWADDR= may cause unintended behavior.
· NOZEROCONF = Set this to not set a route for dynamic link-local addresses over this device, Need to explore actual implementation usage.
· PERSISTENT_DHCLIENT=yes|no|1|0, Without this option, or if it is 'no'/'0', and BOOTPROTO=dhcp, dhclient is run for the interface in "one-shot" mode; if the dhcp server does not respond for a configurable timeout, then dhclient exits and the interface is not brought up - the '-1' option is given to dhclient.
· If PERSISTENT_DHCLIENT=yes, then dhclient will keep on trying to contact the dhcp server when it does not respond - no '-1' option is given to dhclient. Need to explore actual implementation usage.
· DHCPRELEASE=yes|no|1|0, With this option set to 'yes' (1), when a dhcp configured interface is brought down with 'ifdown', the lease will be released. Need to explore actual implementation usage.
· DHCP_HOSTNAME=<name> Sends the specified hostname to the DHCP server.
· DHCLIENT_IGNORE_GATEWAY=yes|no|1|0, If set to 'yes', it will cause dhclient-script to ignore any $GATEWAY setting that may be in the ifcfg file for this interface. Otherwise, the dhclient session which obtains an ip-address on the same subnet as $GATEWAY will set the default route to be via $GATEWAY, and no other dhclient session will set the default route. Need to explore actual implementation usage.
· DHCLIENTARGS= Any additional arguments to dhclient. Need to explore actual implementation usage.
· NM_CONTROLLED = yes|no If set to 'no', NetworkManager will ignore this connection/device. Defaults to 'yes'.
· ZONE= Network zone (trust level) of this connection. If not set, default zone (specified in /etc/firewalld/firewalld.conf) is used. To see all available zones, run 'firewall-cmd --get-zones'. Need to explore actual implementation usage.
· ARPCHECKn=yes|no If set to 'no', ifup will not try to determine, if requested ip address is used by other machine in network. Defaults to 'yes'. Need to explore actual implementation usage.
· IPV4_FAILURE_FATAL=yes|no, If set to yes, ifup-eth will end immediately after ipv4 dhclient fails. Defaults to 'no'. For dynamic addressing (BOOTPROTO=dhcp) only DEVICE needs to be set; all the rest will be determined by the boot protocol. Need to explore actual implementation usage.
Base items being deprecated and will not be used further are as below,
· NETWORK=<will be calculated automatically with ipcalc>
· BROADCAST=<will be calculated automatically with ipcalc>
Alias specific items:
Need to explore actual implementation usage.
Ethernet-only items:
· ARP=yes|no (adds 'arp' flag to ip, for use with the ethertap device)
· LINKDELAY=<time in seconds> Time that the system should pause after the specific interface is enabled. This may be useful if one interface is connected to a switch which has spanning tree enabled and must wait for STP to converge before the interface should be considered usable.
· BRIDGE=<br* device> If set, the ethernet device is not assigned an address. It is added to the specified bridge device instead.
Ethernet 802.1q VLAN items:
Need to explore actual implementation usage.
PPP/SLIP items:
Need to explore actual implementation usage.
Wireless-specific items:
Need to explore actual implementation usage.
IPSEC specific items:
Need to explore actual implementation usage.
Manual keying:
Need to explore actual implementation usage.
Automatic keying:
Need to explore actual implementation usage.
Bonding-specific items:
· SLAVE=yes Specifies device as a slave
· MASTER=bondXX Specifies master device to bind to
· BONDING_OPTS=A space-separated list of options to the bonding driver for this interface, such as: "mode = active-backup arp_interval = 60 arp_ip_target = 192.168.1.1, 192.168.1.2"
Tunnel-specific items:
· TYPE=GRE|IPIP|IPIP6 MY_INNER_IPADDR=local IP address of the tunnel interface
· PEER_OUTER_IPADDR=IP address of the remote tunnel endpoint
· MY_OUTER_IPADDR=IP address of the local tunnel endpoint If unspecified, an IP address is selected automatically for outgoing tunnel packets, and incoming tunnel packets are accepted on all local IP addresses.
· PEER_INNER_IPADDR=IP address of the remote end of the tunnel interface If this is specified, a route to PEER_INNER_IPADDR through the tunnel is added automatically.
· TTL=TTL value for tunnel packets Default is to use the TTL of the packet transported through the tunnel
Bridge-specific items:
· TYPE=Bridge
· STP=off|on (see 'brctl stp')
· DELAY=forward delay time in seconds (see 'brctl setfd')
· BRIDGING_OPTS=A space-separated list of bridging options for either the bridge device, or the port device, such as: BRIDGING_OPTS="hello_time=200 priority=65535" for bridge devices, or BRIDGING_OPTS="hairpin_mode=1" for port devices.
TUN/TAP-specific items:
Need to explore actual implementation usage.
- /etc/sysconfig/network-scripts/chat-<interface-name>:
chat script for PPP or SLIP connection intended to establish the connection. Need to explore actual implementation usage.
- /etc/sysconfig/network-scripts/dip-<interface-name>
A write-only script created from the chat script by netcfg. Need to explore actual implementation usage.
- /etc/sysconfig/network-scripts/ifup-post
Need to explore actual implementation usage.
- /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/route-<interface-name>
Contains lines that specify additional routes that should be added when the associated interface is brought up. The files are processed by the ifup-routes script and uses the /sbin/ipcalc utility for all network masks and numbers. Routes are specified using the
- /etc/sysconfig/network-scripts/rule-<interface-name> and /etc/sysconfig/network-scripts/rule6-<interface-name>
Contains lines that specify additional routing rules that should be added when the associated interface is brought up. Each non-comment line is used directly as an argument to "/sbin/ip rule add" or "/sbin/ip -6 rule add" for rule6 files.
On this page there are some part which we would be updating soon, highlighted as “Need to explore actual implementation usage.”
No comments:
Post a Comment