how to configure ip address in redhat linux 6 urdu/hindi | red hat linux network configuration | IP
Interface Configuration Files
Interface configuration files control the software interfaces for individual network devices. As the system boots, it uses these files to determine what interfaces to bring up and how to configure them. These files are usually named ifcfg-name, where name refers to the name of the device that the configuration file controls.
11.2.1. Ethernet Interfaces
One of the most common interface files is /etc/sysconfig/network-scripts/ifcfg-eth0, which controls the first Ethernet network interface card or NIC in the system. In a system with multiple NICs, there are multiple ifcfg-ethX files (where X is a unique number corresponding to a specific interface). Because each device has its own configuration file, an administrator can control how each interface functions individually.
The following is a sample ifcfg-eth0 file for a system using a fixed IP address:
The values required in an interface configuration file can change based on other values. For example, the ifcfg-eth0 file for an interface using DHCP looks different because IP information is provided by the DHCP server:
NetworkManager is graphical configuration tool which provides an easy way to make changes to the various network interface configuration files (see Chapter 10, NetworkManager for detailed instructions on using this tool).
However, it is also possible to manually edit the configuration files for a given network interface.
Below is a listing of the configurable parameters in an Ethernet interface configuration file:
sets the configuration parameters for the bonding device, and is used in /etc/sysconfig/network-scripts/ifcfg-bondN (see Section 11.2.4, “Channel Bonding Interfaces”). These parameters are identical to those used for bonding devices in /sys/class/net/bonding_device/bonding, and the module parameters for the bonding driver as described in bonding Module Directives.
This configuration method is used so that multiple bonding devices can have different configurations. In Red Hat Enterprise Linux 6, place all interface-specific bonding options after the BONDING_OPTS directive in ifcfg-name files. See Where to specify bonding module parameters for more information.
where protocol is one of the following:
none — No boot-time protocol should be used.
bootp — The BOOTP protocol should be used.
dhcp — The DHCP protocol should be used.
where address is the broadcast address. This directive is deprecated, as the value is calculated automatically with ipcalc.
where name is the name of the physical device (except for dynamically-allocated PPP devices where it is the logical name).
where name is a short host name to be sent to the DHCP server. Use this option only if the DHCP server requires the client to specify a host name before receiving an IP address.
where answer is one of the following:
yes — Use DHCP to obtain an IPv6 address for this interface.
no — Do not use DHCP to obtain an IPv6 address for this interface. This is the default value.
An IPv6 link-local address will still be assigned by default. The link-local address is based on the MAC address of the interface as per RFC 4862.
where answer is one of the following:
-P — Enable IPv6 prefix delegation.
-S — Use DHCP to obtain stateless configuration only, not addresses, for this interface.
-N — Restore normal operation after using the -T or -P options.
-T — Use DHCP to obtain a temporary IPv6 address for this interface.
-D — Override the default when selecting the type of DHCP Unique Identifier (DUID) to use.
By default, the DHCP client (dhclient) creates a DHCP Unique Identifier (DUID) based on the link-layer address (DUID-LL) if it is running in stateless mode (with the -S option, to not request an address), or it creates an identifier based on the link-layer address plus a timestamp (DUID-LLT) if it is running in stateful mode (without -S, requesting an address). The -D option overrides this default, with a value of either LL or LLT.
where address is a name server address to be placed in /etc/resolv.conf provided that the PEERDNS directive is not set to no.
where options are any device-specific options supported by ethtool. For example, if you wanted to force 100Mb, full duplex:
ETHTOOL_OPTS="autoneg off speed 100 duplex full"
Instead of a custom initscript, use ETHTOOL_OPTS to set the interface speed and duplex settings. Custom initscripts run outside of the network init script lead to unpredictable results during a post-boot network service restart.