[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
RE: static ips and automation
- From: <Elizabeth Brosch thomson com>
- To: <kickstart-list redhat com>
- Subject: RE: static ips and automation
- Date: Wed, 15 Feb 2006 14:57:34 -0500
Liz Brosch
TSH System Services
Philadelphia, PA 19104
office: (215) 386-0100 x1144
cell: (267) 784-9166
I configure static IPs for each host as part of the post-install.
Here is the simple script I use to change to static IP addressing:
#!/bin/sh
# replace /etc/sysconfig/network and
/etc/sysconfig/network-scripts/ifcfg-eth0
# to use static IP addressing, not DHCP
echo -n "Switching to static IP address allocation..."
(cat << EOF
NETWORKING=yes
HOSTNAME=xxxxxxx
GATEWAY=xx.xxx.xx.x
NISDOMAIN=xxxxx.com
EOF
) > /etc/sysconfig/network
/bin/chmod 644 /etc/sysconfig/network
(cat << EOF
DEVICE=eth0
BOOTPROTO=static
BROADCAST=xxx.xxx.xxx.xxx
IPADDR=xxx.xxx.xxx.xxx
NETMASK=xxx.xxx.xxx.xxx
NETWORK=xxx.xxx.xxx.xxx
ONBOOT=yes
EOF
) > /etc/sysconfig/network-scripts/ifcfg-eth0
/bin/chmod 644 /etc/sysconfig/network-scripts/ifcfg-eth0
echo " done"
Elizabeth Brosch
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]