Sponsored Content
Full Discussion: Dhcp
Top Forums UNIX for Advanced & Expert Users Dhcp Post 38956 by RTM on Thursday 31st of July 2003 12:50:55 PM
Old 07-31-2003
The procedure as found on SunSolve:
Quote:
************************************************************************
DHCP Client Setup
************************************************************************

1. Create two empty file /etc/hostname.xxx and /etc/dhcp.xxx for each
interface, where xxx is interface name, like le0, hme0. For more
than one interfaces you can create both files for each interface.
In this example I am creating le0 and le0:1 (virtual interface).

client# touch /etc/hostname.le0 /etc/hostname.le0:1
client# touch /etc/dhcp.le0 /etc/dhcp.le0:1

client#ls -l /etc/*.le*
-rw-r--r-- 1 root root 9 Mar 18 1997 /etc/hostname.le0
-rw-r--r-- 1 root other 11 Oct 23 11:33 /etc/hostname.le0:1

client# ls -l /etc/dhcp.*
-rw-r--r-- 1 root root 0 Oct 24 09:11 /etc/dhcp.le0
-rw-r--r-- 1 root other 0 Oct 27 09:11 /etc/dhcp.le0:1
client-1#

2. After creating these files you can setup you can reboot the machine
or you can use ifconfig command to configure the interface.

client# ifconfig le0 dhcp start
client#
client-1# ifconfig -a

lo0: flags=849<UP,LOOPBACK,RUNNING,MULTICAST> mtu 8232
inet 127.0.0.1 netmask ff000000
le0: flags=4843<UP,BROADCAST,RUNNING,MULTICAST,DHCP> mtu 1500
inet 129.145.71.1 netmask ffffff00 broadcast 129.145.71.255
ether 8:0:20:7d:5f:a2
client-1# ifconfig le0:1 dhcp start
client-1# ifconfig -a

lo0: flags=849<UP,LOOPBACK,RUNNING,MULTICAST> mtu 8232
inet 127.0.0.1 netmask ff000000
le0: flags=4843<UP,BROADCAST,RUNNING,MULTICAST,DHCP> mtu 1500
inet 129.145.71.1 netmask ffffff00 broadcast 129.145.71.255
ether 8:0:20:7d:5f:a2
le0:1: flags=4843<UP,BROADCAST,RUNNING,MULTICAST,DHCP> mtu 1500
inet 129.145.71.2 netmask ffffff00 broadcast 129.145.71.255

3. Release an interface.

client-1# ifconfig le0:1 dhcp release
client-1# ifconfig -a

lo0: flags=849<UP,LOOPBACK,RUNNING,MULTICAST> mtu 8232
inet 127.0.0.1 netmask ff000000
le0: flags=4843<UP,BROADCAST,RUNNING,MULTICAST,DHCP> mtu 1500
inet 129.145.71.1 netmask ffffff00 broadcast 129.145.71.255
ether 8:0:20:7d:5f:a2
le0:1: flags=842<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 0.0.0.0 netmask 0
you can bring that interface back up again as:

client-1# ifconfig le0:1 dhcp start

To get status on any dhcp interface:

client-1# ifconfig le0 dhcp status

Interface Status Sent Received Rejects
le0 BOUND 1 1 0
(Began,expires,Renew) =(10/28/1997 22:05,10/30/1997 10:05, 10/29/1997 16:05)

There are other commands with ifconfig command that you can use:

/usr/sbin/ifconfig interface { auto-dhcp | dhcp }
[ primary ] [ wait seconds ]
drop | extend | ping | release | start | status


Also refer to ifconfig man pages.

client-1#
client-1# cat /etc/hosts
129.145.71.1 client-1 # Added by DHCP
client-1#
client-1#
client-1# cat /etc/nsswitch.conf
#
# /etc/nsswitch.files:
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# does not use any naming service.
#
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.

passwd: files
group: files
#hosts: files # Commented out by DHCP
#hosts: files # Added by DHCP # Commented out by DHCP
hosts: files # Added by DHCP dns # Added by DHCP
networks: files
protocols: files
rpc: files
ethers: files
netmasks: files
bootparams: files
publickey: files
# At present there isn't a 'files' backend for netgroup; the system will
# figure it out pretty quickly, and won't use netgroups at all.
netgroup: files
automount: files
aliases: files
services: files
sendmailvars: files
#

I have used this to set up Ultra 10 systems in the past with no problems.

You might also want to look at Solaris DHCP Admin guide
 

10 More Discussions You Might Find Interesting

1. IP Networking

Dhcp

Hello all, I have this Intel Pentium 233/128 running Solaris 8. I also have a dhcp/router/dns running SuSElinux 7.2.(Sorry if it is out of topic here) My problem is that the Solaris box when it tries to configure the interface (elxl0) via dhcp it fails. It appears, according to the... (1 Reply)
Discussion started by: jdevarie
1 Replies

2. UNIX for Dummies Questions & Answers

Dhcp

When using DHCP how can I can my hostname. I vi all the hosts file and if still didn't work. So now my hostname is unknown and I want to change it. So if anyone out there can help me. Thank You (6 Replies)
Discussion started by: aojmoj
6 Replies

3. UNIX for Dummies Questions & Answers

Dhcp

HI, New to Unix and I inherited a network that runs DHCP in manual configuration mode. Basically, in order for a machine to get an IP it has to have an entry in dhcpd.conf with its MAC address mapped to a hostname (the hostname then maps to an IP address listed in the DNS db file). If there is... (2 Replies)
Discussion started by: NJay
2 Replies

4. UNIX for Advanced & Expert Users

Dhcp

Last question for today!! :rolleyes: In what file does the DHCP server keep its list of leases? THANKS!!! :) Maria from Maria (2 Replies)
Discussion started by: marjeg
2 Replies

5. Solaris

DHCP help

Can someone help me with this please. I am new to this: I am trying to install Solaris 8 over the network using my DHCP. After I type the comman: ./add_install_client -d -e 8:0:20:7e:97:51 I would get something like this: cleaning up preexisting install client "8:0:20:7e:97:51"... (0 Replies)
Discussion started by: aliban83
0 Replies

6. IP Networking

dhcp

can I request for an ipaddress through dhcp client by sending ipaddress as input during the invokation of dhcpclient so that it requests the server for the same,instead of depending on the configuration file . (3 Replies)
Discussion started by: Gopi Krishna P
3 Replies

7. UNIX for Dummies Questions & Answers

Help on DHCP

Hi All, I am trying to configure dhcp server on a linux host with eth0:1 which is using 192.168.1.10 I also want to restrict my DHCP client to just one Host adcnew222. DHCP Server Host name - adcnew111 DHCP client name - adcnew222 My conf file is as follows on dhcp server : ... (2 Replies)
Discussion started by: sriram003
2 Replies

8. IP Networking

Can't get DHCP IP

Dear Experts, I have a TI DM8148 EVM board REV C, the EZSDK5.05 SW package, and DVRRDK1.09 SW package. EZSDK5.05, DVRRDK1.09 both use Linux2.6.37, however, there are some modifications between these two kernels. When I use uImage of DVRRDK1.09 to boot up EVM board, this board can be given a... (0 Replies)
Discussion started by: oobin168
0 Replies

9. IP Networking

Get DHCP relay interfaces IP address using DHCP

Hi All , please view the set up below: ------------------------------------------------------------------- | DHCP Server |-----------| ROUTER & |-----------| Clients | | 192.168.99.1 | - -<eth1>| DHCP-RELAY|<eth2>-- | 192.168.88.X | ... (2 Replies)
Discussion started by: gdangoor
2 Replies

10. IP Networking

Dhcp

I have a DHCP thing on my HP printer. How can I find information on numbers for that? (2 Replies)
Discussion started by: teak
2 Replies
All times are GMT -4. The time now is 04:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy