It works, i am doing this from the solaris machine, how do i set it so that i can release the ip address, and then start the dhcp server service automatically on start up.
because you have configured dhcp client in full mode (configured via /etc/dhcp.cnf0), dhcp client will always start at boot time, but if you want change to "limited" control, then you can just use a very simple shell script on startup, something like:
#!/sbin/sh
INTERFACE=cnft0
case "$1" in
'start')
echo "Start DHCP client on $INTERFACE. \c"
ifconfig $INTERFACE dhcp start
'stop')
echo "Stop DHCP client. \c"
ifconfig $INTERFACE dhcp release
;;
Hi,
The startup and shutdown scripts are kept in /etc/init.d dir
and linked to /etc/rc?.d dir where ? is the run level at which script is to be run.So if the script is to be started(/etc/rc2.d) then begin the name with capital 'S' like S73dhcp or if it is to be stopped(/etc/rc0.d) then begin the name with capital 'K' like K49dhcp....
i didnt get a chance yet to try the above script, been one of those weekends, i had a quick look to find the script. Couldnt find it, how do you add/link the script file. Put in the whole path/pointer ie /etc/rc(whatever).d/(name of script file)
or do i just copy the script into that directory, and does solaris run all the scripts in there. Uses them by the number assigned to them. ie S73dhcp will be the 73rd script to run.
Yes, scripts in "/etc/rc?.d" (? = run level), run in alphabetical order, you can put "dhcp" script (if you want just use the sample script posted here just copy/paste), then give execute perms "# chmod 755 dhcpctrl", for "dhcp" case I think the best for startup is late on level 2, and soon on shutdown in level 0, put "dhcp" script in "/etc/init.d" don't use "dhcp" for script name, because it is used for dhcp server and already exists so if you use something like "dhcpctrl" you can do the links as:
# cd /etc/rc2.d
# ln -s ../init.d/dhcpctrl ./S97dhcpctrl
# cd ../rc0.d
# ln -s ../init.d/dhcpctrl ./K04dhcpctrl
i've got a question about these starting and stoping scripts. Lets say i want to start on machine startup java class. How can i stop it?
What script should i write to stop running java class?
I have run the chmod command again, the name of the file was wrong in the init.d directory. I also ran this command on the other files too. the symbol has now changed, and thinks it is an executeable.
When i restart the computer, it is still not automatically starting. One thing i did notice was the way the error off the DHCP start was listed. It was as if the command has been typed in incorrect. Checked that, in the three files and it was correct.
Where are the logs kept, or is there anything else i could try.
Most dhcp servers don't provide you with a hostname, I have also a "linksys cable router", and I don't receive DNS configuration to, for hostname you can use a simple script to set up a hostname at boot time, i.e create a very simple script in "/etc/init.d/setup_hostname"
#!/bin/sh
HOSTNAME=`cat /etc/nodename`
echo "Set up hostname to $HOSTNAME\n"
uname -S $HOSTNAME
"/etc/nodename" have the hostname you chose on instalation.
Just started to use Linksys Cable/router yesterday. After a big fight got Internet connection to 2 Win2K machines and the SunBox (SUN Blade100)running Solaris8. My router DHCP function is enabled.
Now, I am running to another problem since I want to be able telnet/ftp functionality to the SunBox. Linksys docs say that I need to disable DHCP on the router if I want to use router 'Forwarding'(to forward telnet, http, ftp requests etc).
1) This means I need to setup all my machines to use static ip address and no DHCP. Is this correct? Where do I set static ip address for SunBox?
2) Will I still have internet connectivity (I have cable modem service through Comcast @Home) from my SunBox?
Well that is not a Linksys problem, what LinkSys doc is alerting is if you want to setup a web server or a ftp server or both with private addresses you will need to have a fixed IP address to forwarding http,ftp requests you will also need to register your domain name. if you don't want to setup any web server or ftp server in your private network, you can use telnet, ftp, etc on your private and to
servers in internet using linksys NAT capabilities the linksys will translate private addresses into your public one (private or dynamic), to be a ftp client and http client you don't need "port forwarding" just NAT, so you can use DHCP in your private addresses and have internet connectivity in all your machines on private addresses.
Thanks much Carlos for your input. I would to accomplish following:
-Be able to telnet/ftp TO A MACHINE sitting on my private network from outside (what linksys refres as WAN). In other words, I would like to be able to logon to the Sunbox I have in my home office from lets say my company office or university library.
I know I should be OK telneting/ftping from my private network outside. I need to be able to do it the other way around.
Comcast @Home does not provide me with static ip address even thgh the current address i am having is not changing in last 3 weeks even after powering off my cable modem (don't know what the policy is about ip_address change) but I do know that I will always be sitting on the followin host no matter what my ip_address is:
Well that is not a LinkSys problem, what LinkSys doc is alerting is if you want to set up a web server or a ftp server on your private network you will need to have a fixed public address to "forward" incoming http or ftp requests to your servers, also you need to register you domain name. If you don't want to set up any web or ftp server in you private network but want to be a http/ftp/etc
client you will only need to use LinkSys NAT capability this will translate requests from machines on your private network to your public address (fixed or dynamic), so in this case you can setup all machines on you private network to use LinkSys DHCP server capabilities and still have internet connectivity, ftp, etc, from all machines in your private network (including your Sun Blade), just by using LinkSys NAT.
Okay ! LinkSys only support "port forwarding" by ip address
this is why you need to disable DHCP Server, i.e, if you want to redirect ssh requests to your Sun Blade the Sun Blade needs to have always the same ip address (I think this is not a problem you can use static ip addresses on your private network). If you REALY want to use DHCP server in your private network you can check Linux LRP (you can port forward by hostname, and it runs on a flopply).
"
To access from outside I have a similar cenario by I ask a static ip address to by cable company, so I set up LinkSys to "forwarding" ssh (secure shell) port to a machine in my private network then I from where I can access all machines in my network. In your case if you can't ask for a static ip
you can use your dynamic ip (some cable companys will not allow this, they will filter incoming ssh,telnet,etc to their dynamic ip range), you can also check for a intermediate solution like the service provide by "
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.