2008. 9. 23. 15:55

VirtualNetworkSetting

 


  NIC Configuration (Solaris 10 x86 on VMWare)

 

    작성자: 백승찬
    작성일: 2008.05.07(수)
    참  고: http://cafe.daum.net/bscsolaris

 


(작업상태)
(1). 운영체제는 새로 설치된것으로 가정한다.
(2). NIC는 1개를 설정하고 Bridge로 선택한것으로 가정한다.
(3). 네트워크 구성은 다음 그림을 참고한다.

       [ MS Windows ]
              +------------+
              |                  |
 ----------- NIC1        VMnet0 -----------+-
              |                  |                          |
              |                  VMnet1                 |           
              |                  |                          |
              |          VMnet8 ----------| ----+-
              |            |                       |       | 
              |            |                       +       + 
              +------------+        +----NIC2--NIC3--+ 
                                           |      pcn0  pcn1    |
                                           |                         | 
                                           |                         | 
                                           +----------------+
                                                 solarisXXX  

     [그림] VMWare Bridge + NAT Network Configuration

 

  -------------- VMnet8 --------------------+--------
              (NAT Device)            192.168.10.XXX
       192.168.10.1  192.168.10.2     solarisXXX


(예) 강사용 컴퓨터
NIC1 : 121.160.70.121
NIC2 : 172.16.8.254
NIC3 : 192.168.10.250


■ (작업1) NIC2(pcn0) 정상 동작 유무 확인
■ (작업2) NAT 네트워크 대역 조정(192.168.10.0)
■ (작업3) NIC3(pcn1) 설정

 

(작업1) NIC2 정상 동작 유무 확인
# ping -s 172.16.8.254

 

(작업 2) NAT 네트워크 대역 조정(192.168.10.0)
# sync
# poweroff
VMWare "Power Off" 아이콘 클릭

VMWare > Edit > Virtual Network Setting
> Host Virtual Network Mapping
> VMWare Network Adapter VMnet8
> Subnet
IP Address   : 192.168.10.0
Subnet Mask  : 255.255.255.0

> NAT Setting
기본라우터: 192.168.10.2 (정보 확인)
            -> 자동으로 설정 되어 있다.

 

(작업 3) NIC3(pcn1) 설정
■ NIC3(pcn1) 추가
■ Device Reconfiguration
■ NIC3 IP 설정
   IP : 192.168.10.XXX / 255.255.255.0
   /etc/hosts, /etc/hostname.pcn1, /etc/netmasks


(1). NIC 추가 작업
VMWare > VM > Setting > Add > Ethernet Adapter > NAT 선택 > Finish
VMWare PowerON

 
(2). 디바이스 재인식(Device Reconfiguration)
# cat /etc/path_to_inst | grep pcn
# devfsadm -v
# cat /etc/path_to_inst | grep pcn


(3). IP 설정 작업
■ /etc/hosts
■ /etc/hostname.pcn1
■ /etc/netmasks
■ /etc/defaulrouter
■ /etc/nsswitch.conf
■ /etc/resolv.conf

# vi /etc/hosts
......
[수정전]
127.0.0.1  localhost
172.16.8.XXX solarisXXX loghost
[수정후]
127.0.0.1  localhost
172.16.8.XXX solarisXXX   solarisXXX.example.com  loghost   <-----  정보 수정
192.168.10.XXX nic2            <----- 라인 추가

# cat > /etc/hostname.pcn1  (# echo "nic2" > /etc/hostname.pcn1)
nic2
<Ctrl + D>
# cat /etc/hostname.pcn1

# vi /etc/netmasks
.....
[수정전]
172.16.0.0  255.255.0.0
[수정후]
172.16.0.0  255.255.0.0
192.168.10.0 255.255.255.0   <----- 라인 추가

# ifconfig pcn1 plumb up
# ifconfig pcn1 192.168.10.XXX netmask 255.255.255.0 broadcast +
# ifconfig -a


(4). Defaultrouter 설정 작업
# cat /etc/defaultrouter
172.16.0.1

# cat > /etc/defaultrouter
192.168.10.2
<Ctrl + D>

# route flush
# route add default 192.168.10.2
# netstat -nr


(5). DNS Client 설정 작업
# cp /etc/nsswitch.dns /etc/nsswitch.conf

# cat > /etc/resolv.conf
nameserver 168.126.63.1
<Ctrl + D >


(6). 확인 작업
# reboot
(부팅 이후에 정보 확인)
# nslookup www.daum.net

 

(작업 4) Port Forwarding 설정
VMWare > Edit > Virtual Network Setting > NAT Tab


Client --------> Window(VMWare) -------> Solaris
# telnet S       23 ---> 192.168.253.254 23

 

(작업 5) 환경작업
 - korn shell 변경
 - ENV_main.sh

(1). korn shell 변경
# passwd -e
Old shell: /sbin/sh
New shell: /bin/ksh    <----- '/bin/ksh' 입력

(2). ENV_main.sh 실행
# dfshares 172.16.8.254
# mkdir /mnt/server
# mount 172.16.8.254:/root/shell /mnt/server
# cd /mnt/server
# ls
# ./ENV_main.sh

# cat /.profile
# cat /.kshrc
# cat /.exrc
# cat /.rhosts
# cat /etc/default/login
# cat /etc/ssh/sshd_config
# cat /etc/ftpd/ftpusers

# ksh
# . /.profile  (csh # source /.cshrc)
# . /.kshrc