Which files to modified in Solaris 10?


 
Thread Tools Search this Thread
Operating Systems Solaris Which files to modified in Solaris 10?
# 1  
Old 09-10-2009
Which files to modified in Solaris 10?

Hi All,

In Solaris 10, where can I change or modified parameter like /dev/ip ip_ignore_redirect 1? If I use ndd command to change it, it will only last until the next reboot but I need to set it permanently.

For Solaris 9, I will refer to /etc/rc2.d/S69inet but this file is no longer there in Solaris 10.

Thanks in advance.
# 2  
Old 09-10-2009
use this script and change it to fit your needs... read the instructions in the header!

Code:
#!/sbin/sh
# /etc/rc2.d/S68net-tune /etc/init.d/net-tune
# Copyright (c) 2000 by Sun Microsystems, Inc.
# All rights reserved.
#
#ident "@(#)net-tune 1.7.3 031106 SMI ES-PTS-NET/Lor"
#
################################################################################
# This script is not needed for most installations ! #
# #
# It MAY be needed for rare special customizations. In this case, #
# copy the script and edit the following example code to suit your needs. #
################################################################################
#
# Depending on your changes, this script overwrites the Sun[TM] recommended
# default values (To use the default values, you do not need this script).
# In particular, Sun's[TM] recommendation is to leave Ethernet Auto-negotiation
# ON at both link partners (this is the default). See Product Documentation and
# SunSolve Infodocs for proper use first (e.g. Infodocs 17416, 23041, 41665,
# 70282). Most parameters must be set on both sides to have effect
# (e.g check also switch and IP partner settings).
# To install:
# 1) cp S68net-tune to /etc/rc2.d
# 2) perform edits on the sript as required
# 3) chmod 744 /etc/rc2.d/S68net-tune
# 4) chown root:sys /etc/rc2.d/S68net-tune
# 5) ln /etc/rc2.d/S68net-tune /etc/init.d/net-tune

PATH=/usr/bin:/usr/sbin

case "$1" in
'start')
echo "Implementing Solaris Network Tuning."

# hme-Interfaces
# hme0
#ndd -set /dev/hme instance 0
#ndd -set /dev/hme adv_100T4_cap 0
#ndd -set /dev/hme adv_100fdx_cap 1
#ndd -set /dev/hme adv_100hdx_cap 0
#ndd -set /dev/hme adv_10fdx_cap 0
#ndd -set /dev/hme adv_10hdx_cap 0
#ndd -set /dev/hme adv_autoneg_cap 0
# hme1
#ndd -set /dev/hme instance 1
#ndd -set /dev/hme adv_100T4_cap 0
#ndd -set /dev/hme adv_100fdx_cap 1
#ndd -set /dev/hme adv_100hdx_cap 0
#ndd -set /dev/hme adv_10fdx_cap 0
#ndd -set /dev/hme adv_10hdx_cap 0
#ndd -set /dev/hme adv_autoneg_cap 0

# eri-Interfaces
# eri0
#ndd -set /dev/eri instance 0
#ndd -set /dev/eri adv_100T4_cap 0
#ndd -set /dev/eri adv_100fdx_cap 1
#ndd -set /dev/eri adv_100hdx_cap 0
#ndd -set /dev/eri adv_10fdx_cap 0
#ndd -set /dev/eri adv_10hdx_cap 0
#ndd -set /dev/eri adv_autoneg_cap 0

# qfe-Interfaces
# qfe0
ndd -set /dev/qfe instance 0
ndd -set /dev/qfe adv_100T4_cap 0
ndd -set /dev/qfe adv_100fdx_cap 1
ndd -set /dev/qfe adv_100hdx_cap 0
ndd -set /dev/qfe adv_10fdx_cap 0
ndd -set /dev/qfe adv_10hdx_cap 0
ndd -set /dev/qfe adv_autoneg_cap 0
# qfe3
ndd -set /dev/qfe instance 3
ndd -set /dev/qfe adv_100T4_cap 0
ndd -set /dev/qfe adv_100fdx_cap 1
ndd -set /dev/qfe adv_100hdx_cap 0
ndd -set /dev/qfe adv_10fdx_cap 0
ndd -set /dev/qfe adv_10hdx_cap 0
ndd -set /dev/qfe adv_autoneg_cap 0

# dmfe-Interfaces (Netra X1)
# dmfe0
#ndd -set /dev/dmfe0 adv_100fdx_cap 1
#ndd -set /dev/dmfe0 adv_100hdx_cap 0
#ndd -set /dev/dmfe0 adv_10fdx_cap 0
#ndd -set /dev/dmfe0 adv_10hdx_cap 0
#ndd -set /dev/dmfe0 adv_autoneg_cap 0
# dmfe1
#ndd -set /dev/dmfe1 adv_100fdx_cap 1
#ndd -set /dev/dmfe1 adv_100hdx_cap 0
#ndd -set /dev/dmfe1 adv_10fdx_cap 0
#ndd -set /dev/dmfe1 adv_10hdx_cap 0
#ndd -set /dev/dmfe1 adv_autoneg_cap 0

# vge-Interfaces (Gigabit 1.x)
# vge0
#ndd -set /dev/vge instance 0
#ndd -set /dev/vge fdr_filter 1
#ndd -set /dev/vge link_negotiation 0
# vge1
#ndd -set /dev/vge instance 1
#ndd -set /dev/vge fdr_filter 1
#ndd -set /dev/vge link_negotiation 0

# ge-Interfaces (Gigabit 2.x and 3.x)
# example: forced 1000 Mbit/s, 802.3x Flow Control send and receive
# check if your NIC is 802.3x capable (ndd parameter pause_cap, asm_dir_cap)
# ge0
#ndd -set /dev/ge instance 0
#ndd -set /dev/ge adv_1000fdx_cap 1
#ndd -set /dev/ge adv_1000hdx_cap 0
#ndd -set /dev/ge adv_pauseTX 1
#ndd -set /dev/ge adv_pauseRX 1
#ndd -set /dev/ge adv_1000autoneg_cap 0
# ge1
#ndd -set /dev/ge instance 1
#ndd -set /dev/ge adv_1000fdx_cap 1
#ndd -set /dev/ge adv_1000hdx_cap 0
#ndd -set /dev/ge adv_pauseTX 1
#ndd -set /dev/ge adv_pauseRX 1
#ndd -set /dev/ge adv_1000autoneg_cap 0

# ce-Interfaces (GigaSwift 1.0 UTP)
# example: forced 1000 Mbit/s, 802.3x Flow Control send and receive
# ce0
#ndd -set /dev/ce instance 0
# Master values, change in forced 1000 Mbit/s back-to-back config only:
#ndd -set /dev/ce link_master 0 # one link partner 1, the other 0 (ce <=1.118)
#ndd -set /dev/ce master_cfg_enable 1 # enable usage of master_cfg_value (ce >1.118)
#ndd -set /dev/ce master_cfg_value 0 # one link partner 1, the other 0 (ce >1.118)
# Speed/Mode values, set the desired to 1, all other to 0:
#ndd -set /dev/ce adv_1000fdx_cap 1
#ndd -set /dev/ce adv_1000hdx_cap 0
#ndd -set /dev/ce adv_100fdx_cap 0
#ndd -set /dev/ce adv_100hdx_cap 0
#ndd -set /dev/ce adv_10fdx_cap 0
#ndd -set /dev/ce adv_10hdx_cap 0
#ndd -set /dev/ce adv_asmpause_cap 0
#ndd -set /dev/ce adv_pause_cap 1
#ndd -set /dev/ce adv_autoneg_cap 0
# ce1
#ndd -set /dev/ce instance 1
# Master values, change in forced 1000 Mbit/s back-to-back config only:
#ndd -set /dev/ce link_master 0 # one link partner 1, the other 0 (ce <=1.118)
#ndd -set /dev/ce master_cfg_enable 1 # enable usage of master_cfg_value (ce >1.118)
#ndd -set /dev/ce master_cfg_value 0 # one link partner 1, the other 0 (ce >1.118)
# Speed/Mode values, set the desired to 1, all other to 0:
#ndd -set /dev/ce adv_1000fdx_cap 1
#ndd -set /dev/ce adv_1000hdx_cap 0
#ndd -set /dev/ce adv_100fdx_cap 0
#ndd -set /dev/ce adv_100hdx_cap 0
#ndd -set /dev/ce adv_10fdx_cap 0
#ndd -set /dev/ce adv_10hdx_cap 0
#ndd -set /dev/ce adv_asmpause_cap 0
#ndd -set /dev/ce adv_pause_cap 1
#ndd -set /dev/ce adv_autoneg_cap 0

# bge-Interfaces (SF-V210, SF-V240, SB-1500, ... on-board only)
# example: forced 1000 Mbit/s, 802.3x Flow Control send and receive
# bge0
# Speed/Mode values, set the desired to 1, all other to 0:
#ndd -set /dev/bge0 adv_1000fdx_cap 1
#ndd -set /dev/bge0 adv_1000hdx_cap 0
#ndd -set /dev/bge0 adv_100fdx_cap 0
#ndd -set /dev/bge0 adv_100hdx_cap 0
#ndd -set /dev/bge0 adv_10fdx_cap 0
#ndd -set /dev/bge0 adv_10hdx_cap 0
#ndd -set /dev/bge0 adv_asym_pause_cap 0
#ndd -set /dev/bge0 adv_pause_cap 1
#ndd -set /dev/bge0 adv_autoneg_cap 0
# bge1
# Speed/Mode values, set the desired to 1, all other to 0:
#ndd -set /dev/bge1 adv_1000fdx_cap 1
#ndd -set /dev/bge1 adv_1000hdx_cap 0
#ndd -set /dev/bge1 adv_100fdx_cap 0
#ndd -set /dev/bge1 adv_100hdx_cap 0
#ndd -set /dev/bge1 adv_10fdx_cap 0
#ndd -set /dev/bge1 adv_10hdx_cap 0
#ndd -set /dev/bge1 adv_asym_pause_cap 0
#ndd -set /dev/bge1 adv_pause_cap 1
#ndd -set /dev/bge1 adv_autoneg_cap 0

# switch MTU path discovery off
#ndd -set /dev/ip ip_path_mtu_discovery 0
# TCP/UDP buffer tunings
#ndd -set /dev/tcp tcp_xmit_hiwat 65536
#ndd -set /dev/tcp tcp_recv_hiwat 65536
#ndd -set /dev/udp udp_xmit_hiwat 65536
#ndd -set /dev/udp udp_recv_hiwat 65536
# TCP congestion window size, for Solaris <= 2.5, only
#ndd -set /dev/tcp tcp_cwnd_max 65535
# Change TCP maximum retransmission interval, for Solaris <= 7, only
#ndd -set /dev/tcp tcp_rexmit_interval_max 60000
# Change number of TCP slow start initial packets to work arround
# slow start bug in BSD stack and Windows. For Solaris <= 7, only
#ndd -set /dev/tcp tcp_slow_start_initial 2

;;

'stop')
echo "No kernel parameters changed."
;;

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

esac
exit 0

# 3  
Old 09-10-2009
Hi Bro,

Thanks for the scripts. So this mean I don't have any files inside Solaris 10 that can allow me to change those setting accept put this script into /etc/rc2.d? Can Iadd in any value I want into this script?

/dev/arp arp_cleanup_interval
/dev/ip ip_forward_directed_broadcasts
/dev/ip ip6_forward_src_routed
/dev/ip ip_ignore_redirect
/dev/ip ip6_ignore_redirect
/dev/ip ip_respond_to_address_mask_broadcast
/dev/ip ip_respond_to_echo_broadcast
/dev/ip ip6_respond_to_echo_multicast
/dev/ip ip_respond_to_timestamp
/dev/ip ip_respond_to_timestamp_broadcast
/dev/ip ip_send_redirects
/dev/ip ip6_send_redirects
/dev/ip ip_strict_dst_multihoming
/dev/ip ip6_strict_dst_multihoming
/dev/tcp tcp_conn_req_max_q0
/dev/tcp tcp_conn_req_max_q
/dev/udp udp_extra_priv_ports
/dev/tcp tcp_smallest_anon_port
/dev/tcp tcp_largest_anon_port
/dev/udp udp_smallest_anon_port
/dev/udp udp_largest_anon_port
/dev/tcp tcp_smallest_nonpriv_port
/dev/udp udp_smallest_nonpriv_port
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Copy files from one drive to another, keeping most recently modified files

Hi all, I am a bit of a beginner with shell scripting.. What I want to do is merge two drives, for example moving all data from X to Y. If a file in X doesn't exist in Y, it will be moved there. If a file in X also exists in Y, the most recently modified file will be moved to (or kept) in... (5 Replies)
Discussion started by: apocolapse
5 Replies

2. Shell Programming and Scripting

Trying to modified files using sed command

hi all, i will like to modified some files with the extension .gjf . All this files have in first line this #P PM3 Opt and i want to change that to this : %nproc=2 %chk=filename.chk #p B3LYP /6-31G** opt in order to do that i have try to do a script with the sed command but i... (4 Replies)
Discussion started by: juanchy
4 Replies

3. Shell Programming and Scripting

Delete all files except last modified

Hello All, I need to delete all the files with a particular naming format at a fixed path except the latest 1. Please help. example: At path /tmp, I have 3 files viz: log1, log2 and log3. file log2 was the one that was modified most recently. So I need to find and delete log1 and log3... (2 Replies)
Discussion started by: mystition
2 Replies

4. UNIX for Advanced & Expert Users

Back up of recent modified files

Hi, I want to identify the files that are recently modified or with in a specified period (15 Days) in UNIX box. After identifying the files should be transferred to windows machine through FTP. The files should be overwritten in windows if it is already available. Please help... (1 Reply)
Discussion started by: lathish
1 Replies

5. UNIX for Dummies Questions & Answers

how to find the modified files before 60 mins?

hi, I need to find all the modified files before 60 minutes in a folder. Is that possible to find using mtime in minutes? Suggestions please. Thanks for looking into it... Geetha (8 Replies)
Discussion started by: iamgeethuj
8 Replies

6. Shell Programming and Scripting

help: find and modified files script

hello all im a newbie in the linux world ..i have just started creating basic scripts in linux ..i am using rhel 5 ..the thing is i wanted to create a find script where i could find the last modified file and directory in the directory given as input by the user and storing the output in a file so... (6 Replies)
Discussion started by: tarunicon
6 Replies

7. Shell Programming and Scripting

Identifying New and Modified Files/Directories

Hi. Our shop is migrating to a new UNIX server and our hope is to do a full migration of all files to the new server weeks in advance of the final migration. As a result we want to identify files on our SOLARIS 8 UNIX server that have changed or that were created after a specific date & time... (2 Replies)
Discussion started by: buechler66
2 Replies

8. UNIX for Dummies Questions & Answers

how to retrieve original contents of a modified file (modified using vi)

Made changes to a file using vi editor and saved those changes now realised that the changes are not required How can I get the previous version of the file.i.e the one which was there on which I had made changes (3 Replies)
Discussion started by: novice100
3 Replies

9. UNIX for Dummies Questions & Answers

list last 10 days modified files

All, Is there is anyother single command that will handle ls -lrt | tail -10 Please let me know Thanks, Arun. (1 Reply)
Discussion started by: arunkumar_mca
1 Replies

10. UNIX for Dummies Questions & Answers

Finding modified files

Last week I was using the command: ' find /directory -mtime -2 -print' and it showed all the files modified within that period. However, now it only displays the directories and not the files modified. The only thing that changed is that I was granted access to some files. Thanks (2 Replies)
Discussion started by: rhayabusa
2 Replies
Login or Register to Ask a Question