1. 현재 네트웍 인터 페이스를 출력
blue# ifconfig -a
lo0: flags=849 mtu 8232
inet 127.0.0.1 netmask ff000000
le0: flags=863 mtu 1500
inet 203.239.175.2 netmask ffffff00 broadcast 203.239.175.255
ether 8:0:20:82:bf:4f
2. 만약 IP address를 203.239.175.3으로 바꿀경우
blue# vi /etc/hosts
#
# Internet host table
#
127.0.0.1 localhost
203.239.175.2 blue.sjic.co.kr blue loghost
변경후
127.0.0.1 localhost
203,239,175,3 blue.sjic.co.kr blue loghost
# reboot
rebooting 후
blue# ifconfig -a
lo0: flags=849 mtu 8232
inet 127.0.0.1 netmask ff000000
le0: flags=863 mtu 1500
inet 203.239.175.3 netmask ffffff00 broadcast 203.239.175.255
ether 8:0:20:82:bf:4f
/etc/hostname.le0 (10 Mb) , /etc/hostname.hme0(100 Mb) 에있는 hostname과 /etc/hosts file에있는
hostname이 동일 해야함
# cat /etc/hostsname.le0
blue
3. defaultrouter의 IP address변경
# vi /etc/defaultrouter
203.239.175.1 -> 이어드레스를 변경
# reboot을 하거나
# route add net default 203.239.175.254 1
4. netmask 변경
# vi /etc/netmasks
128.253.0.0 255.255.255.0
158.233.0.0 255.255.255.192
5.nameserver 변경
blue# more /etc/resolv.conf
domain sjic.co.kr
nameserver 203.239.175.1 -> 이 IP address를 변경
blue# more /etc/nsswitch.conf
#
# /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
blue#
blue# ifconfig -a
lo0: flags=849 mtu 8232
inet 127.0.0.1 netmask ff000000
le0: flags=863 mtu 1500
inet 203.239.175.2 netmask ffffff00 broadcast 203.239.175.255
ether 8:0:20:82:bf:4f
2. 만약 IP address를 203.239.175.3으로 바꿀경우
blue# vi /etc/hosts
#
# Internet host table
#
127.0.0.1 localhost
203.239.175.2 blue.sjic.co.kr blue loghost
변경후
127.0.0.1 localhost
203,239,175,3 blue.sjic.co.kr blue loghost
# reboot
rebooting 후
blue# ifconfig -a
lo0: flags=849 mtu 8232
inet 127.0.0.1 netmask ff000000
le0: flags=863 mtu 1500
inet 203.239.175.3 netmask ffffff00 broadcast 203.239.175.255
ether 8:0:20:82:bf:4f
/etc/hostname.le0 (10 Mb) , /etc/hostname.hme0(100 Mb) 에있는 hostname과 /etc/hosts file에있는
hostname이 동일 해야함
# cat /etc/hostsname.le0
blue
3. defaultrouter의 IP address변경
# vi /etc/defaultrouter
203.239.175.1 -> 이어드레스를 변경
# reboot을 하거나
# route add net default 203.239.175.254 1
4. netmask 변경
# vi /etc/netmasks
128.253.0.0 255.255.255.0
158.233.0.0 255.255.255.192
5.nameserver 변경
blue# more /etc/resolv.conf
domain sjic.co.kr
nameserver 203.239.175.1 -> 이 IP address를 변경
blue# more /etc/nsswitch.conf
#
# /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
blue#