월요일, 10월 30, 2006

솔라리스 아이피 변경시 확인

솔라리스를 아이피 변경시 확인해야하는 내용.

* Solaris 에서 변경해야 될 파일들
/etc/nodename # if you need to change the name of the machine
/etc/hostname.interface # eg. hostname.hme0
/etc/hosts # Update to reflect new name
/etc/nsswitch.conf # Update if your name resolution
/etc/resolv.conf

# Update if your name servers/domain changed (DNS only)
/etc/defaultdomain # set you default domain
/etc/defaultrouter # Set the default router's IP
/etc/inet/networks # Set your network name
/etc/inet/netmasks # Set your network number
/etc/n/etc/net/ticots/hosts # For the streams-level loopback
/etc/ticlts/hosts # For the streams-level loopback
/etc/net/ticotsord/hosts # For the streams-level loopback

* Solaris 에서 IP 변경 작업

/etc/hosts 파일을 수정함.
/etc/hostname.hme0 랜카드에 적용되는 호스명을 명시

$ ifconfig hme0 [ip] netmask 0xffffff00 broadcast + up

ex)
--- 영구적인 변경
$vi /etc/hostname.hme0
xxxx

$ vi /etc/hosts
127.0.0.1 localhost
xxx.xxx.xxx.xxx xxxx xxxx

--- 임시변경시 (컴퓨터가 켜져있는 동안, 리부팅되면 정보가 사라짐)
$ ifconfig -a
lo0: flags=1000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843 mtu 1500 index 2
inet xxx.xxx.xxx.xxx netmask ffffff00 broadcast xxx.xxx.xxx.xxx

$ ifconfig hme0 xxx.xxx.xxx.xxx netmask 0xffffff00 broadcast + up

* Solaris 에서 GATEWAY 변경 작업

$ netstat -rn
$ route add default [gateway ip]
$ vi /etc/defaultrouter
[gateway ip]

ex)
--- 영구적인 변경
$ vi /etc/defaultrouter
xxx.xxx.xxx.1

--- 임시적인 변경
route add default xxx.xxx.xxx.1


* Solaris 에서 DNS 변경 작업

ex)
$ vi /etc/resolv.conf
nameserver xxx.xxx.xxx.1
nameserver xxx.xxx.xxx.2

$ vi nsswitch.conf
# hosts: 부분을 수정한다.
# consult /etc "files" only if nis is down.
hosts: files dns

* 설정 변경 후 reboot , 시스템에 관한 내용이 변경된경우
reboot

댓글 없음: