Solaris/기술과 팁

Solaris 네트워크 설정 방법

[건희아빠] 2009. 4. 20. 15:31


network setting
글쓴이 : yhkim (2001년 08월 14일 오후 04:12) 읽은수: 8,282 [ 네트워크 ] 
* 모든 file은 vi 편집기를 사용하여 수정한다.

1. /etc/hosts file을 열고

127.0.0.1 localhost
xxx.xxx.xxx.xxx hostname loghost
(자신의 ip 주소) (system이름)

와 같이 수정해준다


2. /etc/defaultrouter file을 만들고

xxx.xxx.xxx.xxx (gateway 주소값을 넣는다.)
그 다음 아래 명령 실행
# route add default xxx.xxx.xxx.xxx

3. /etc/resolv.conf file을 만들고 다음과 같이 만든다.

domain xxxxxxx
(domain name)
nameserver xxx.xxx.xxx.xxx
(네임 서버의 ip주소)


4. /etc/nsswitch.conf file을 열고


#
# /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
ipnodes: 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


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.xxx
~~~~~~~~~~~~~~~~ 이부분에 netmask값을 넣어준다.

6 /etc/hostname.hme0 file을 만들고 hostname을 넣어준다.

7 마지막으로 시스템을 리부팅한다.
 

===========================================================================

또다른 강의 자료는 아래와 같다.
기본 네트워크 설정하기
글쓴이 : 권세종 (2001년 11월 28일 오후 02:33) 읽은수: 9,432 [ 네트워크 ] 
솔라리스 설치가 완료 되었다면.아래 파일을 수정하여 네트워크를 연결해 보자. (각 파일들에 대한 세부사항은 항목 별로 나열 하겠습니다.)

1. etc/hosts
=>hostname 이란 자신의 시스템에 IP주소와 컴퓨터 이름(hostname)을 설정하는 파일이다. 편집은 vi editer로 함
=> ex) vi /etc/hosts (ip 주소와 hostname은 순서대로 입력해야 하며,순서가 바뀌면 안되며.또한 둘 사이에 공백이 반드시 있어야 합니다.)


2. etc/defaultrouter
=>기본 Gateway를 지정하는 파일이며, 기본적으로 생성되어 있지 않기 때문에 vi editer를 이용해서 만들어 주면 된다. 절대적으로 중요한 파일이다.
=> vi etc/defaultrouter

3. etc/nsswitch.conf
=>네임 서버를 지정하는 파일이다.대부분 domain name service를 많이 사용하므로 DNS를 입력하면 된다.
=>vi etc/nsswitch.conf
passwd: files
group: files
hosts: files <---요부분을 hosts : dns files 바꿔 주면 됨. 그럼 hosts에 파일을 먼저 참조하는것이 아니라..dns를 먼저 참조한다는 뜻이다.


4. etc/resolv.conf
=>3번에서 지정한 네임버서를 실직적으로 지정해주는 파일이다.이 파일 역 시 없을수 있으므로 vi editer를 이용해서 새로 만들어 주면 된다.
없다고 긴장하지 말자...안되면 새로 인스톨 하면 되지 않겠냐...
zola 열심히 하구 삼세판 더해 마스터 하지 못하면 그때 포기하자.
자신이 속한 도메인이 hof500cc.co.kr이고, nameserver가 70.3.73.33 이라면 아래과 같은 내용을 적어주면된다.

domain hof500cc.co.kr
nameserver 70.3.73.33

=>유닉스는 그래픽 환경이 아닌 텍스트 환경이라 설명이 되어 있지 않은 부분이 너무 많다...
낙담 하지 말구...따라 해라...아니 꼬우면...OS를 새로 만들면 되잖아..그지


5. 네트워크 연결
=>1번 부터 4번까지 재대로 수정했다면...이제 리부팅만 하면 된다. (왜 재부팅을 하냐구 물어보면 난 이렇게 말을 하겠죠...
방금 입력한 사항을 시스템에 인식 시켜 줘야 되잖아...라구..
만약 리부팅 하지 않구 인식 시켜주려면 이렇게 해라. =># route add default 70.3.73.33 1
무슨 말인지 잘 모를꺼다...2번에서 우린 defaultrouter를 지정해 줬다...
그건 vi editer로 파일에 입력을 시켰을 것이다. 그건 단지 입력일 뿐이다.
시스템을 재부팅하면....인식 하고 올라 오지만...route add는 강제로 시스템에 인식 시켜
 주는 명령어다. 그럼 2가지의 차이점은 멀까...route add 만 할 경우는 지금 현재 재부팅을 하지 않고..
인터넷을 사용할 수 있지만. 재부팅을 한다면 강제로 입력한 사항임으로 사라진다.
영구적으로 인식 시키려면...2번에서처럼 vi editer를 이용해서 삽입해야 둬야 한다.
=>reboot

이상 오늘 강의 끝