'ndd'에 해당되는 글 1건

  1. 2008.08.29 ref_ndd
2008. 8. 29. 16:39

ref_ndd

 

                                         

 

                     ndd CMD

 

 

 

 

 

1. ndd Overview

__________________

 

get and set driver configuration parameters

 

     ndd gets and sets selected configuration parameters in  some

     kernel  drivers.  Currently,  ndd  only supports the drivers

     that implement the TCP/IP  Internet  protocol  family. Each

     driver  chooses  which parameters to make visible using ndd.

     Since these parameters are usually tightly  coupled  to  the

     implementation,  they  are  likely to change from release to

     release. Some parameters may be read-only.cl

 

     If the -set option is omitted, ndd queries the named driver,

     retrieves the value associated with the specified parameter,

     and prints it. If the  -set  option  is  given,  ndd  passes

     value,  which  must  be  specified, down to the named driver

     which assigns it to the named parameter.

 

     By convention, drivers that support ndd also support a  spe-

     cial  read-only  parameter  named ``?'' which can be used to

     list the parameters supported by the driver.

 

ndd 명령어를 통해 많은 네트워크 설정값을 설정할 수 있다. 하지만 ndd 명령어로 설정한

값은 부팅시에는 적용되지 않고 현재 적용만된다. 부팅시에도 적용하도록 설정하기 위해

서는 /etc/init.d/inetinit 시작 스크립트를 사용해도 되고 또는 /etc/rc2.d 디렉토리에

개인적인 시작 스크립트를 생성하여 기능을 추가해도 된다.

 

 

 

 

 

2. 네트워크 장치 & 프로토콜

 

(1). 네트워크 프로토콜

 

/dev/arp

/dev/rarp

/dev/icmp

/dev/tcp

/dev/ip

 

 

(2). 네트워크 장치

 

/dev/hme

/dev/qfe

 

 

(3). 사용예

 

# ndd /dev/arp \?

# ndd /dev/rarp \?

# ndd /dev/icmp \?

# ndd /dev/tcp \?

# ndd /dev/ip \?

 

 

 

 

 

3. ndd 명령어

___________________

 

(3.1) 기본사용법

 

ndd [ -get | -set ] /dev/ip [ \? | ip_forwarding ]

                      /dev/arp

 

# ndd /dev/ip \?

# ndd -get /dev/ip \?

 

# ndd /dev/ip ip_forwarding

# ndd -get /dev/ip ip_forwarding

 

# ndd -set /dev/ip ip_forwarding 1

 

 

 

(3.2) 대표적인 인자(Driver Parameter)

 

# ndd -get /dev/ip ip_forwarding

0                    IP Forwarding : Off

1                    IP Forwarding : On

 

# ndd -get /dev/hme link_speed

0                    NIC Link Speed : 10Mbps

1                    NIC Link Speed : 100Mbps

 

# ndd -get /dev/hme link_mode

0                    NIC Link Mode : Half Duplex

1                    NIC Link Mode : Full Duplex

 

# ndd –get /dev/hme link_status

0                    NIC is down

1                    NIC is up

 

# ndd –get /dev/hme instance

0                    NIC 1st

1                    NIC 2nd

2                    NIC 3rd

...

 

Instance NIC카드 넘버

 

[참고] Virtual Interface Number

To set more than 256 virtual ip addresses. By default solaris can have 256 virtual

ip addresses per interface. This default can be be change using this command.

 

# ndd -get /dev/ip ip_addrs_per_if

256

 

# ndd -set /dev/ip ip_addrs_per_if <Number>    (Number 1 ~ 8192)