互联网服务 网络

修改网络可调参数的作用?

今天看了份文档,关于oracle RAC的,其中说到以下设置,但是不理解是什么作用的,那位师兄知道,麻烦指点一二。。。修改文件/etc/rc.net,将如下几行加到文件的尾部:
#chmod 755 /etc/rc.net
#vi /etc/rc.net if [ -f /usr/sbin/no ] ; then
             /usr/sbin/no -o extendednetstats=0 >>/dev/null 2>&1
             /usr/sbin/no -p -o udp_sendspace=65536
             /usr/sbin/no -p -o udp_recvspace=262144
             /usr/sbin/no -p -o tcp_sendspace=262144
             /usr/sbin/no -p -o tcp_recvspace=262144
             /usr/sbin/no -p -o rfc1323=1
             /usr/sbin/no -p -o sb_max=1310720
             /usr/sbin/no -r -o ipqmaxlen=512
         fi
#chmod 554 /etc/rc.net

不知道这些时什么作用呢?
参与10

10 同行回答

zhanghaiyang zhanghaiyang 系统工程师 联合网讯
谢谢各位,我好好学习一下显示全部
谢谢各位,我好好学习一下 收起
互联网服务 · 2009-04-23
浏览2106
hbaiy hbaiy member link
学习了:victory: :victory: :victory:显示全部
学习了:victory: :victory: :victory: 收起
IT分销/经销 · 2009-04-23
浏览2069
dsmadmc dsmadmc 系统工程师 成都思瑞奇
不懂。。好好学习一下。显示全部
不懂。。好好学习一下。 收起
互联网服务 · 2009-04-23
浏览2174
happy1 happy1 系统架构师 git
no 即 network option,还有lvmovmo操作系统等等option可以用。。显示全部
no 即 network option,
还有
lvmo
vmo
操作系统等等option可以用。。 收起
互联网服务 · 2009-04-23
浏览2096
lzj65166 lzj65166 软件开发工程师 北京九合尚品科技有限公司
可以说是内核的优化吧。呵呵网络选项可调参数大多网络选项可调参数在手册页 no 中被详细介绍了。以下是几个其他的相关参数:   1. maxmbuf      用途:         用于 MBUFS 的实内存的最大千字节数。    ...显示全部
可以说是内核的优化吧。呵呵
网络选项可调参数

大多网络选项可调参数在手册页 no 中被详细介绍了。以下是几个其他的相关参数:

   1. maxmbuf
      用途:         用于 MBUFS 的实内存的最大千字节数。
      值:         缺省值:0,范围:x 到 y
      显示:         lsattr -E -l sys0 -a maxmbuf
      更改:         chdev -l sys0 -a maxmbuf=NewValue
      更改立即有效,而且是永久有效。如果使用了 -T 标志,更改会立即有效,而且持续到下次引导时。如果使用了 -P 标志,更改会推迟到下次引导时才生效,而且此更改是永久性的。
      诊断:         N/A
      调整:         如果 maxmbuf 大于 0,maxmbuf 值将被使用,无论 thewall 的值为多少。mbufs 的上限是 maxmbuf 和 thewall 中的较大值。
      参考:         Tuning Network Memory
   2. MTU
      用途:         限制网络上传输的包的大小.
      值:         缺省值:configuration-dependent
      显示:         lsattr -E -l interface_name
      更改:         chdev -l interface_name -a mtu=NewValue
      使用命令 chdev,接口在使用时不能被更改。重新引导后更改才生效。
      一种备用的方法如下:
      ifconfig interface_name mtu NewValue
      这方法在一个运行的系统中更改 MTU 大小,但在系统重启后不保留这个值。
      诊断:         包碎片统计.
      调整:         增加网络接口的 MTU 的大小。对于 Gigabit Ethernet 适配器使用设备属性 jumbo_frames=yes 来启用巨大的帧(仅设接口上的 MTU 值为 9000 是不够的)。
      参考:         调节 TCP 和 UDP 性能
   3. rfc1323
      用途:         启用 TCP 优化,设定 RFC 为 1323(TCP 扩展到高性能)。值为 1 表示 tcp_sendspace and tcp_recvspace 可以超过 64 KB。
      值:         缺省值:0;范围:0 到 1
      显示:         lsattr -El interface or ifconfig interface
      更改:         ifconfig interface rfc1323 NewValue
      OR
      chdev -l interface -a rfc1323=NewValue
      命令 ifconfig 临时设值,使它可用于测试。命令 chdev 更改 ODM,使系统启动后定制值返回。
      诊断:         N/A
      调整:         缺省值为 0 表示在系统折扣率上禁用 RFC 优化。值为 1 表示所有 TCP 连接要协商解决 RFC 优化。使用子例程 setsockopt(),SOCKETS 应用程序可以覆盖单个 TCP 链接的缺省行为。这是一个运行时间属性。需要设置 tcp_sendspace 和 tcp_recvspace 到大于 64 KB 之前更改它。
      参考:         『TCP 套接字缓冲区调优』
   4. tcp_mssdflt
      用途:         用于远程网络通信的缺省的段最大值。
      值:         缺省值:512 字节
      显示:         lsattr -El interface or ifconfig interface
      更改:         ifconfig interface tcp_mssdflt NewValue
      OR
      chdev -l interface -a tcp_mssdflt=NewValue
      命令 ifconfig 临时设值,使它可用于测试。命令 chdev 更改 ODM,使系统启动后定制值返回。
      诊断:         N/A
      调整:         对于 AIX 4.2.1 或更近的版本,tcp_mssdflt 仅用于路径 MTU 搜索被禁用或不能发现路径 MTU 的情况。限制数据为(MTU - 52)字节可以保证在可能的情况下仅传送满的包。这是一个运行时间属性。
      参考:         『TCP 最大段大小调优』
   5. tcp_nodelay
      用途:         设定:当发送数据时使用这个接口 TCP 的套接字遵循 Nagle 算法。缺省情况下,TCP 遵循 Nagle 算法。
      值:         缺省值:0;范围:0 或 1
      显示:         lsattr -El interface or ifconfig interface
      更改:         ifconfig interface tcp_nodelay NewValue
      OR
      chdev -l interface -a tcp_nodelay=NewValue
      命令 ifconfig 临时设值,使它可用于测试。命令 chdev 更改 ODM,使系统启动后定制值返回。
      诊断:         N/A
      调整:         这是选项 Interface-Specific Network Option(ISNO)。
      参考:         特定于接口的网络选项(ISNO)
   6. tcp_recvspace
      用途:         接收数据时设定系统缺省套接字缓冲区大小。这影响 TCP 使用的窗口大小。
      值:         缺省值:16384 字节
      显示:         lsattr -El interface or ifconfig interface
      更改:         ifconfig interface tcp_recvspace NewValue
      OR
      chdev -l interface -a tcp_recvspace=NewValue
      命令 ifconfig 临时设值,使它可用于测试。命令 chdev 更改 ODM,使系统启动后定制值返回。
      诊断:         N/A
      调整:         设置套接字缓冲区大小为 16 KB(16,384)会改善在标准 Ethernet 和 Token-Ring 网络上的性能。缺省值是 16384。
      低带宽网络如 Serial Line Internet Protocol(SLIP)或高带宽网络如 Serial Optical Link 应该会有不同的最佳缓冲区大小。这个最佳缓冲区大小是由介质带宽和包平均来回时间确定。

      

      tcp_recvspace 属性必须设定套接字缓冲区大小小于或等于 sb_max 设置的属性。这是个动态属性,但对于由 inetd 启动的守护程序,执行下列命令:stopsrc -s inetd ; startsrc -s inetd
      参考:         『TCP 套接字缓冲区调优』
   7. tcp_sendspace
      用途:         发送数据时设定系统缺省套接字缓冲区大小。
      值:         缺省值:16384 字节
      显示:         lsattr -El interface or ifconfig interface
      更改:         ifconfig interface tcp_sendspace NewValue
      OR
      chdev -l interface -a tcp_sendspace=NewValue
      命令 ifconfig 临时设值,使它可用于测试。命令 chdev 更改 ODM,使系统启动后定制值返回。
      诊断:         N/A
      调整:         这影响 TCP 使用的窗口大小。设置套接字缓冲区大小为 16 KB(16,384)会改善在标准 Ethernet 和 Token-Ring 网络上的性能。缺省值是 16,384。
      低带宽网络如 Serial Line Internet Protocol(SLIP)或高带宽网络如 Serial Optical Link 应该会有不同的最佳缓冲区大小。这个最佳缓冲区大小是由介质带宽和包平均来回时间确定。
      optimum_window=bandwidth * average_round_trip_time
      tcp_sendspace 属性必须设定套接字缓冲区大小小于或等于 sb_max 设置的属性。tcp_sendspace 参数有动态属性,但是对于由 inetd 启动的守护程序,执行下列命令:stopsrc -s inetd ; startsrc -s inetd
      参考:         『TCP 套接字缓冲区调优』
   8. use_sndbufpool
      用途:         指定发送缓冲池是否应该用于套接字。
      值:         缺省值:1
      显示:         netstat -m
      更改:         可以通过将值设置为 1 来启用该选项,或者设置为 0 来禁用该选项。
      诊断:         N/A
      调整:         它是装入时间,布尔选项。
   9. xmt_que_size
      用途:         设定在接口处排队等候的发送缓冲区的最多数。
      值:         缺省值:configuration-dependent
      显示:         lsattr -E -l interface_name
      更改:         ifconfig interface_name detach
      chdev -l interface_name -aque_size_name=NewValue
      ifconfig interface_name hostname up
      接口在使用时不能更改。重新引导后更改才生效。
      诊断:         netstat -i (Oerr > 0)
      调整:         增加大小。
      参考:         『netstat 命令』 收起
互联网服务 · 2009-04-23
浏览2334
happy1 happy1 系统架构师 git
修改了默认的网络参数,变的更适合应用了,比如tcp和udp的发送和接受的缓冲区等。简单说,就是为了优化网络应用。显示全部
修改了默认的网络参数,变的更适合应用了,比如tcp和udp的发送和接受的缓冲区等。

简单说,就是为了优化网络应用。 收起
互联网服务 · 2009-04-23
浏览2036
hello_unix hello_unix 信息技术经理 西安
参考一下这个吧http://www.kuqin.com/aixcmds/aixcmds4/no.htm显示全部
互联网服务 · 2009-04-23
浏览2090
lwb_aix lwb_aix 系统工程师 重庆南华中天技术有限公司
你可以看看这个,具体我就不是很清楚了rc.net File Format for TCP/IPPurposeDefines host configuration for network interfaces, host name, default gateway, and static routes.DescriptionThe /etc/rc.net file is a shell script that contains configuration infor...显示全部
你可以看看这个,具体我就不是很清楚了
rc.net File Format for TCP/IP
Purpose
Defines host configuration for network interfaces, host name, default gateway, and static routes.

Description
The /etc/rc.net file is a shell script that contains configuration information. The stanzas allow you to enable the network interfaces and set the host name, the default gateway, and any static routes for the current host. This file can be used as a one-step configuration alternative to using individually the set of commands and files necessary to configure a host.

The rc.net shell script is run by the configuration manager program during the second phase of configuration. If TCP/IP is installed, a second script, rc.tcpip, is run from the init command after the second phase of configuration has completed and after the init command has started the SRC master.

Stanzas in the file should appear in the order in which they are presented here.

The rc.net shell script may also be run by the configuration manager program (cfgmgr) if cfgmgr is run after system configuration is completed. It is often run at other times to configure new devices that have been added to the system since boot time. If cfgmgr runs rc.net, both the configuration methods and rc.net itself check to see if networking devices are already in the Available state. If so, the values of device attributes are not changed to avoid overwriting any configuration changes that have been made since boot time.

If /etc/rc.net is run without cfgmgr, device attributes will be reset to the values in the ODM database regardless of the states of the devices. This allows a system's configuration to be restored to the values specified in the ODM database.

Using the Configuration Methods
These stanzas use the configuration methods for TCP/IP to manipulate the ODM database.

Configuring Network Interfaces
For each network adapter that has been previously configured, a set of stanzas is required. The following stanzas define, load, and configure the appropriate network interfaces for every configured network adapter. These configuration methods require that the interface and protocol information be entered in the ODM database, using either SMIT or high-level configuration commands such as the mkdev command. The network interface configuration information is held in the running system only and must be reset at each system restart.


/usr/lib/methods/defif >>
$LOGFILE   2>&1
/usr/lib/methods/cfgif    $* >> $LOGFILE
  2>&1
The defif method defines the network interfaces. The cfgif method configures the network interfaces in the configuration database.

The second part of the stanzas indicates that output should be sent to a log file. The log file must include the full path name. If no log file is specified, the default log file is /dev/null.

Along with the network interface configuration, additional commands must be executed for X.25 and SLIP interfaces: the x25ip command for X.25 interfaces and the slattach command for SLIP connections. The x25ip command loads the X.25 translation table into the kernel and the slattach command is used to assign a TTY line to an interface for SLIP. For each SLIP interface, the slattach command must be executed for the appropriate TTY.

At times, when diskless clients reboot using these configuration methods they hang on LED 581. This happens because diskless clients use server disk space to store the logging information. To get the client to reboot when this happens, execute the /usr/lib/methods/cgfig configuration method in the client rc.net file that resides on the server without message logging as follows:


/usr/lib/methods/cfgif   $*
Setting the Host Name, Default Gateway, and Any Static Routes
The following stanzas set the host name, default gateway, and static routes, using the definet and cfginet subroutines to alter the ODM database for the inet0 object.


/usr/lib/methods/definet >>
$LOGFILE 2>&1/usr/lib/methods/cfginet >> $LOGFILE
2>&1
The second part of the stanzas indicates that output should be sent to a log file. The log file must include the full path name. If no log file is specified, the default log file is /dev/null.

Using Traditional Configuration Commands
These stanzas use configuration commands for TCP/IP to set configuration values.

Configuring Network Interfaces
The following stanza defines, loads, and configures the specified network interface:


/usr/sbin/ifconfig Interface inet
InternetAddress up>>$LOGFILE 2 &1
The Interface parameter should specify the type and number of the interface, for example, tr0. The InternetAddress parameter should specify the Internet address of the interface, for example, 192.1.8.0.

The last part of the stanza indicates that output should be sent to a log file. The log file must include the full path name. If no log file is specified, the default log file is /dev/null.

Setting the Host Name, Default Gateway, and Any Static Routes
These stanzas should follow any stanzas for the network interfaces. These stanzas use the hostname command to set the host name and the route command to define the default gateway and any static routes. The static route information is held in the running system only and must be reset at each system restart.


/usr/bin/hostname  Hostname >>
$LOGFILE 2>&1/usr/sbin/route  add  0
Gateway >> $LOGFILE 2>&1
/usr/sbin/route  add  DestinationAddress  
Gateway >>$LOGFILE 2>&1
The add variable for the route command adds a static route to the host. This route can be to the default gateway (by specifying a hop count, or metric, of 0), or to another host through a gateway.

The last part of the stanzas indicates that output should be sent to a log file. The log file must include the full path name. If no log file is specified, the default log file is /dev/null.

Miscellaneous Functions
Use these stanzas to set the host ID and user name. By default, the host ID and user name are set to the host name. However, these stanzas can be altered to customize the host ID and user name.


/usr/sbin/hostid `hostname'
/usr/bin/uname -s `hostname | sed -e 's/\..*$//'`
>> $LOGFILE 2>&1
To customize these stanzas, replace the hostname entry in single quotation marks with the desired host ID or user name.

The second part of the user name stanza indicates that output should be sent to a log file. The log file must include the full path name. If no log file is specified, the default log file is /dev/null.

Load Network File System (NFS)
If you have the Network File System (NFS) installed on the current host, the following stanza loads and configures the NFS kernel extension:


if [ -x /usr/sbin/gfsinstall -a
-x /usr/lib/drivers/nfs.ext ] ; then
    /usr/sbin/gfsinstall -a /usr/lib/drivers/
nfs.ext >>$LOGFILE 2>&1fi
The last part of the NFS stanza indicates that output should be sent to a log file. The log file must include the full path name. If no log file is specified, the default log file is /dev/null.

Examples
To set up a Token-Ring interface, using the ifconfig command, include the following stanza:

/usr/sbin/ifconfig tr0 inet
192.1.8.0 up >>$LOGFILE 2>&1
This stanza defines Token-Ring interface tr0, with the Internet address 192.1.8.0.

To set the host name, using the hostname command, include the following stanza:

/usr/bin/hostname robo.austin.century.com
   >>$LOGFILE 2>&1
This stanza sets host name robo.austin.century.com. The host name in this example includes domain and subdomain information, which is necessary if the host is using the domain naming system.

To set up a default gateway, using the route command, include the following stanza:

/usr/sbin/route add 0
192.100.13.7    >>$LOGFILE 2>&1
The value 0 for the Metric parameter means that any packets sent to destinations not previously defined and not on a directly connected network go through the default gateway. The 192.100.13.7 address is the default gateway.

To set up a static route, using the route command, include the following stanza:

/usr/sbin/route add net
192.100.201.7 192.100.13.7>>$LOGFILE 2>&1
The 192.100.201.7 address is the receiving computer (the Destination parameter). The 192.100.13.7 address is the routing computer (the Gateway parameter). 收起
系统集成 · 2009-04-23
浏览2326
happy1 happy1 系统架构师 git
no参数都 -p了,还要写到启动脚本里,有病。去查查这个-p参数是什么意思。显示全部
no参数都 -p了,还要写到启动脚本里,有病。去查查这个-p参数是什么意思。 收起
互联网服务 · 2009-04-23
浏览2088
hualala1981 hualala1981 工程师 东软集团股份有限公司
我也有同样的问题,等!显示全部
我也有同样的问题,等! 收起
IT分销/经销 · 2009-04-23
浏览2077

提问者

zhanghaiyang
系统工程师 联合网讯
评论268

相关问题

相关资料

相关文章

问题状态

  • 发布时间:2009-04-23
  • 关注会员:0 人
  • 问题浏览:9946
  • 最近回答:2009-04-23
  • X社区推广