SolarisTips / Network


Solaris Network の設定

ネットワークインターフェースの設定

/etc/nodename

このファイルは起動時に /etc/rcS.d/S30rootusr.sh 内で読み込まれ、マシンのホスト名として使用される。

# cat /etc/nodename 
princess.iis.u-tokyo.ac.jp

/etc/defaultrouter

staticなルーティングの場合ここにデフォルトのルータ(ゲートウェイ)を記述する。 このファイルは起動時に /etc/rcS.d/S30rootusr.sh 内で読み込まれ、route の引数として渡される。

# cat /etc/defaultrouter 
192.168.0.254

/etc/netmask

ここにネットマスクを記述する。

# cat /etc/netmasks 
192.168.0.0 255.255.255.0

リゾルバの設定

/etc/resolv.conf

domainname      your.domain.com
nameserver      xxx.xxx.xxx.xxx
nameserver      xxx.xxx.xxx.xxx

/etc/nsswitch.conf

ここには, 各種データベースの検索順序を指定します. ホスト名検索 "hosts" の欄に "dns" を追加します.

#
# /etc/nsswitch.files:
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# does not use any naming service.
#
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.

passwd:     files
group:      files
hosts:      files dns
networks:   files
protocols:  files
rpc:        files
ethers:     files
netmasks:   files       
bootparams: files
publickey:  files
# At present there isn't a 'files' backend for netgroup;  the system will 
#   figure it out pretty quickly, and won't use netgroups at all.
netgroup:   files
automount:  files
aliases:    files
services:   files
sendmailvars:   files