CL configuring IPs that stick around on reboot

Rick Stevens rstevens at vitalstream.com
Tue Apr 13 22:50:59 UTC 2004


jludwig wrote:
> I am not sure what you mean but --
> 1) If you mean multi-homed
>    A) Copy the ifcfg-ethX to ifcfg-ethx:1
>    B) Edit the ip address, gateway, etc. of ifcfg-ethx:1
>    C) Do A and B for /etc/sysconfig/network-scripts
>    D) Remember hsts hohts.allow, export, etc. as needed.

Eh, sorta.  As the root user, do the following:

	1. Enter the command: "cd /etc/sysconfig/network-scripts"

	2. Enter the command: "cp ifcfg-eth0 ifcfg-eth0:1"

	3. Repeat step 2 as many times as needed, updating the number
	after the ":", e.g.

		cp ifcfg-eth0 ifcfg-eth0:2
		cp ifcfg-eth0 ifcfg-eth0:3

	and so on.

	4. Edit each of the new "ifcfg-eth0:x" scripts.  Each file
	should contain only 3 lines:

		DEVICE=eth0:x	(replace "x" with the right number)
		BOOTPROTO=static
		IPADDR=xxx.xxx.xxx.xxx (put in the right address)

	5. Enter "/etc/rc.d/init.d/network restart" and your new aliases
	should come up.  They will come up each time you reboot, too.

All of these pseudo-devices will share the same gateway and netmask.
The network startup scripts look for any files in
/etc/sysconfig/network-scripts that match the pattern "ifcfg-eth?:?"
and uses the data in them to set up the aliases.
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-   To err is human.  To forgive, a large sum of money is needed.    -
----------------------------------------------------------------------





More information about the Redhat-install-list mailing list