Red Hat
RegisterLogin
Red Hat
Post Description: Red Hat
Tags: red, hat
This Post Was Posted On Jun 10, 2009 By tony #28
Post Description: Red Hat
Tags: red, hat
This Post Was Posted On Jun 10, 2009 By tony #28
Red Hat by tony
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.
/etc/sysconfig/network-scripts/ifcfg-eth0:
DEVICE=eth0
IPADDR=192.168.1.42
NETMASK=255.255.255.0
ONBOOT=yes
GATEWAY=192.168.1.1
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:
/etc/sysconfig/network-scripts/ifcfg-eth0:0:
DEVICE=eth0:0
IPADDR=192.168.1.41
NETMASK=255.255.255.0
ONBOOT=yes
/etc/sysconfig/network-scripts/ifcfg-eth0:1:
DEVICE=eth0:1
IPADDR=192.168.1.44
NETMASK=255.255.255.0
ONBOOT=yes
/etc/sysconfig/network-scripts/ifcfg-eth0:2:
DEVICE=eth0:2
IPADDR=192.168.1.45
NETMASK=255.255.255.0
ONBOOT=yes
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
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
lauri
#9181 1

yes, thanks you, the instructions where helpful. i am working with a redhat right now amd i learning alot
Nov 12, 2011 Reply Report abuse
rh4
#18 2
i have a free copy if you need one
Jun 15, 2009 Reply Report abuse
linuxme
#9 3
how much does a copy of redhat costs?
Jun 11, 2009 Reply Report abuse
Leave Your Comments...
©2012 Redoso - Tue Apr 24, 2012 8:03 am
Powered by: Webune Forums V3
Powered by: Webune Forums V3