Red Hat Configuration - eth0:1 in RH8 kickstart

This is Interesting: Free IT Magazines  
Home > Archive > Red Hat Configuration > March 2004 > eth0:1 in RH8 kickstart





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author eth0:1 in RH8 kickstart
Dennis Peere

2004-03-03, 4:34 am

Dear all,

I would like to know if it's possible to configure a second IP address when
performing a kickstart installation.
I configured my NIC as followed :
network --device=eth0 --bootproto=static --ip=192.168.0.2 --netmask=255.255.
255.0 --gateway=192.168.0.254 --nameserver= --hostname=MYSERVER

I'd like to add a second IP (100.100.1.2) in a 255.255.0.0 subnet
I only need this second IP during the %POST section of my kickstart
installation. Once the system is rebooted I only need the first IP.
Can I add a line to the kickstart file or do I need to script it with
ifconfig.
If I need to do it with ifconfig. How can I add/remove it then ?
Can anyone help me out please ?

Regards,

Dennis


Tommy Reynolds

2004-03-03, 11:35 am

On Wed, 03 Mar 2004 10:06:29 +0100, Dennis Peere wrote:

> I configured my NIC as followed :
> network --device=eth0 --bootproto=static --ip=192.168.0.2 --netmask=255.255.
> 255.0 --gateway=192.168.0.254 --nameserver= --hostname=MYSERVER
>
> I'd like to add a second IP (100.100.1.2) in a 255.255.0.0 subnet.
> I only need this second IP during the %POST section of my kickstart
> installation. Once the system is rebooted I only need the first IP.


Put something like this in your %POST section:

------------------------------------------------------------------------

cat <<-EOF >/etc/sysconfig/network-scripts/ifcfg-eth0:1
DEVICE=eth0:1
ONBOOT=yes
BOOTPROTO=static
IPADDR=100.100.1.2
NETMASK=255.255.255.0
GATEWAY=100.100.1.254
EOF

ifup eth0:1

<do your stuff here>

ifdown eth0:1

rm -f /etc/sysconfig/network-scripts/ifcfg-eth0:1

------------------------------------------------------------------------

Edit values as required.

Cheers!

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com