127.0.0.1 localhost
xxx.xxx.xxx.xxx 서버이름
위와 같이 되어있으며 이곳에 라우터등의 정보를 추가할 수 있다. 즉
127.0.0.1 localhost
xxx.xxx.xxx.xxx 서버이름
xxx.xxx.xxx.xxx 라우터이름(정해주면 된다. ip는 사용하고 있는 라우터 ip를 주면 된다.)
xxx.xxx.xxx.xxx 도메인이름(위와 같다)
2. vi /etc/defaultrouter
xxx.xxx.xxx.xxx 이렇게 직접 ip를 줘도 되고
라우터이름 <- hosts파일에서 설정한 라우터 이름으로 줘도 된다
3. vi /etc/resolv.conf
nameserver xxx.xxx.xxx.xxx 이렇게 직접 ip를 줘도 되고
nameserver 도메인 이름 <- hosts파일에서 설정한 도메인 이름으로 줘도 된다.
4. /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 ~~~~~dns라는 말을 추가하여준다.
ipnodes: files
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
5. /etc/inet/netmasks file을 열고 맨밑부분에 netmask값을 넣어준다.
#
# 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. Currently this number is restricted to being a class
# A, B, or C network number. In the future we should be able to support
# arbitrary network numbers per the Classless Internet Domain Routing
# guidelines.
#
# Both the network-number and the netmasks are specified in
# \"decimal dot\" notation, e.g:
#
# 128.32.0.0 255.255.255.0
#
xxx.xxx.xxx.0 255.255.255.0
~~~~~~왼쪽은 IP에서 끝자리는 0으로 하고, 오른쪽은 Subnet값을 넣어준다.
6 /etc/hostname.hme0 혹은 /etc/hostname.fjgi0 파일에 서버이름을 적어준다.
7 마지막으로 시스템을 리부팅한다.