Koozali.org: home of the SME Server

Single NIC and DHCP

J Carlson

Single NIC and DHCP
« on: January 09, 2002, 06:58:39 AM »
There is probably an obvious awnser to this but im just not seeing it.  I have a single ethernet card in my esmith box.  I already have a DHCP server on my local network; how can I get my esmith box to accept a DHCP address?  I cant find an option to do this.  I have use the cmd line  'dhcpcd eth0'  and that will get an address, but I dont want to have to use that every time I boot it up.  Am I missing somthing?

Thanks,
   J Carlson

Damien Curtain

Re: Single NIC and DHCP
« Reply #1 on: January 09, 2002, 11:32:13 PM »
J Carlson wrote:
>
>
> There is probably an obvious awnser to this but im just not
> seeing it.  I have a single ethernet card in my esmith box.
> I already have a DHCP server on my local network; how can I
> get my esmith box to accept a DHCP address?  I cant find an
> option to do this.  I have use the cmd line  'dhcpcd eth0'
> and that will get an address, but I dont want to have to use
> that every time I boot it up.  Am I missing somthing?

Youve ensured that firstly the dhcp service on the e-smith server is disabled Im sure.

To get e-smith to use a dhcpd lease on a single card youll need to

mkdir -p /etc/e-smith/templates-custom/etc/sysconfig/network-scripts/ifcfg-eth0


cp /etc/e-smith/templates/etc/sysconfig/network-scripts/ifcfg-eth0/template-end /etc/e-smith/templates-custom/etc/sysconfig/network-scripts/ifcfg-eth0/.

Then make a template-begin fragment eg:
cat < /etc/e-smith/templates-custom/etc/sysconfig/network-scripts/ifcfg-eth0/template-begin
#------------------------------------------------------------
# DO NOT MODIFY THIS FILE! It is updated automatically by the
# e-smith server and gateway software. Instead, modify the source
# template in the /etc/e-smith/templates-custom directory. For more
# information, see http://www.e-smith.org.
#
# copyright (C) 1999-2001 e-smith, inc.
#------------------------------------------------------------

DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes

EOF
(ignore the cat and EOF lines if your just pasting into the file)

Then expand the file /sbin/e-smith/expand-template /etc/sysconfig/network-scripts/ifcfg-eth0 and you should be fine.
--
 Damien

J Carlson

Re: Single NIC and DHCP
« Reply #2 on: January 12, 2002, 04:02:08 AM »
Worked perfect!

Thanks,
   J Carlson