- Red Hat
This Page Contains information about Red Hat By tony in category General with 3 Replies. , Last Updated: Sun Mar 01, 2020
Wed Jun 10, 2009
Redhat IP Configuration
The IP configurations on the Redhat distribution of the Linux operating system are stored in the directory /etc/sysconfig/network-scripts/. Each interface, as well as sub-interface, requires a unique configuration file.
The below example assigns the interface eth0 an IP address of 192.168.1.42 on a class C network with 192.168.1.1 as the gateway.
In order to assign multiple IP addresses on the same interface (eth0), there must be a configuration file for the sub-interface eth0:0 (incrementing as necessary). The below example will add three more IP addresses to the same interface:
Note that a gateway statement is not necessary in this file because the same gateway was defined in /etc/sysconfig/network-scripts/ifcfg-eth0.
To update your system's IP configuration after making changes to the /etc/sysconfig/network-scripts/ directory, execute
# service network restart