Dhcp


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Dhcp
# 1  
Old 07-30-2003
Network Dhcp

Hi you all. I'm trying to enable DHCP in a Sun Utra 5 runing Solaris 8 but during the boot process it sends me the message : "Device not in appropiate status"

Do anyone have enabled DHCP on solaris 8?
Any Procedure?

The DHCP server is an NT I guess.
# 2  
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
# 3  
Old 08-04-2003
Setting up a DHCP client on Solaris
Introduction :
If you are trying to set up DHCP on a Solaris box, this could be just what you're looking for! For example, if you're trying to get your Sun workstation (or PC running Solaris x86) to talk to your cable modem, but your hostname gets set to "unknown", this document will tell you how to get round that.

Throughout this page, I'll assume that you're using le0 for your DHCP connection. Substitute hme0 (or whatever interface you do use) in the examples below.

Setting up a DHCP client
There are two ways of using DHCP:

DHCP has limited control
DHCP has full control

The first case may be where you want to set your own /etc/resolv.conf and so on, with a minimum of hassle.

The second case would be the normal situation, especially if your cable modem provider has a habit of changing DNS name server IP addresses on you (like mine does!), so I'll concentrate on that here. You'll need to change the DEFAULT_ADDR and INTERFACE variables as required.

The first thing to do is to create an empty /etc/hostname.le0; I use touch:

# touch /etc/hostname.le0
Another way of creating the file is to simply say:
# > /etc/hostname.le0
The latter method will work even if /etc/hostname.le0 already exists on your system. Creating this file ensures that the interface gets plumbed, ready for the DHCP software to do its stuff.
Next, you create /etc/dhcp.le0. This file can be empty if you want to accept the defaults, but may also contain one or both of these directives:

wait time, and
primary

By default, ifconfig will wait 30 seconds for the DHCP server to respond (after which time, the boot will continue, while the interface gets configured in the background). Specifying the wait directive tells ifconfig not to return until the DHCP has responded. time can be set to the special value of forever, with obvious meaning. I use a time value of 300, which seems to be long enough for my cable provider.

The primary directive indicates to ifconfig that the current interface is the primary one, if you have more than one interface under DHCP control. If you only have one interface under DHCP control, then it is automatically the primary one, so primary is redundant (although it's permissible).

With these files in place, subsequent reboots will place le0 under DHCP control: you're ready to play!

Actually, there's one snag: most (if not all) cable modem DHCP servers don't provide you with a hostname (even if they did, odds are it won't be one you want anyway!). This wouldn't be a problem, except that the boot scripts (/etc/init.d/rootusr in particular) try to be clever, and set your hostname to "unknown" in this case, which is not at all useful!

The trick is to change your hostname back to the right one, preferably without changing any of the supplied start up scripts, which are liable to be being stomped on when you upgrade or install a patch. You've also got to do it early enough in the boot process, so that rpcbind, sendmail and friends don't get confused by using the wrong hostname. I put this little script in to /etc/init.d/set_hostname, with a symbolic link to it from /etc/rc2.d/S70set_hostname to solve this problem.

With these modifications in place, reboot, and you'll be using your cable modem in no time!

so long...
greetings Preßy
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
Login or Register to Ask a Question