Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Solaris Network card configuration 6

Status
Not open for further replies.

nutta

Technical User
Jun 4, 2001
44
GB
I have installed solaris on my desktop machine. It has picked up my card compaq netitelligent 10/100.

I want to configure this to full duplex 10mbps.

how do i do it... i am a newbie to the sortof unix enviroment
 
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.

or double click on a batch file...


any ideas...

thanks.. all who helped, especially carlos..

SAF

B-)
 
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
;;

*)
echo "Usage: $0 { start | stop }"
;;
esac
exit 0

... just do the job.

Kind Regards,

Carlos Almeida,
 
What is the nameing conventions used for script files in Solaris is it same as the DOS enviroment, ie 'scipt.bat'..

i will try it when i get home later today..

B-)

Thanks again carlos

SAF
 
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 hope this helps...
 
ok will try that.. cheers

SAF

'never know one day i might be one of you guys.. B-) '
 
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.

SAF B-)
 
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

Hope this helps
Regards,

Carlos Almeida,


 
hi,

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?

Thanks
Tomasz
 
Sorry,
In between moving my office, so havent had the chance yet. This is how i have understood it.

Make a file 'DHCPCTRL' in the "/etc/init.d" directory.

# cd /etc/rc2.d
# ln -s ../init.d/dhcpctrl ./S97dhcpctrl
# cd ../rc0.d
# ln -s ../init.d/dhcpctrl ./K04dhcpctrl

If the '/etc/rc2.d' and '/etc/rc0.d'
don't exist do i have to create them.

Also does it pick these files up automaticly. Does it filter this by the 's' and the number. Or do you have to add it to another script somewhere.

 
Sorry about the delay,
just getting around to it now. I wrote those scripts, and rand the 'ln' commands. Which comes back with file already exists.

Also all the other scripts have a lightening bolt icon. But the two scripts that i have created look like text files.

Also when i run the '# chmod 755 dhcpctrl'

i get
chmod: WARNING: can't access dhcpctrl

The folders did exist. I was going from memory at work. But i was wrong.

I have double checked. But probably doing something wrong.

Thanks in advance again.
SAF B-)
 
Hi again,

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.

B-)
SAF
 
Hi

I am using linksys cablemode router and my host became 'unknown' host. Any way to fix this problem?

Anyway to fix this? Thanks.

-- ado










 
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.

then create a symbolic link from rc2,

# chmod 755 /etc/init.d/setup_hostname
# cd /etc/rc2.d
# ln -s /etc/init.d/setup_hostname ./S70setup_hostname

note (S70), after inet setup.

Then just reboot ...

Hope this Helps,

Regards,

Carlos Almeida,
 
Need your help here PLEASE.

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?

Many thanks in advance.

-- ado

















 
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.

Hope this helps,

Regards,

Carlos Almeida,
 
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:


Any help is greatly appreciated. THANKS!

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

Hope this helps.

Regards,
Carlos Almeida,


 
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 "
Hope this helps,

Regards,

Carlo Almeida,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top