Solaris10でIPアドレス(非DHCP)/ホスト名を変更する¶
以下のファイルを変更する。¶
- /etc/dhcp.[IF] の削除
rm -i /etc/dhcp.[IF]
- /etc/hostname.[IF] と hosts の内容を合わせる
- /etc/netmasks の編集
bash-3.2# cat /etc/netmasks
#
# The netmasks file associates Internet Protocol (IP) address
# masks with IP network numbers.
#
# network-number netmask
#
# The term network-number refers to a number obtained from the Internet Network
# Information Center.
#
# Both the network-number and the netmasks are specified in
# "decimal dot" notation, e.g:
#
# 128.32.0.0 255.255.255.0
#
192.168.XXX.0 255.255.255.0 <---- 修正
- 設定反映のために再起動する
bash-3.2# reboot
以下の方法でも変更可能(基本的には上記のファイル修正で対応するようだ。)¶
ifconfig [IF-name] plumb
ifconfig [IF-name] 192.168.XXX.XXX netmask 255.255.255.0
ifconfig [IF-name] up
戻る