R&D/OS

솔라리스 network card인식하기

sunshout 2006. 9. 19. 10:51
시스템에 새로운 ethernet interface(le, hme, qfe, qe)를 추가하고 시스템이 이를
인식하게 하려면 아래와 같이 /etc directory 밑에 hostname.xxN 화일을 만든 후
시스템을 reconfigure 하도록 rebooting 한다.

1. 각 ethernet interface 이름은 network card에 따라 아래와 같이 지정된다.

lance Ethernet : le
Fast Ethernet v1.0 : be
Fast Ethernet v2.0 : hme
Quard Ethernet : qe
Quard fast Ethernet : qfe

2. /etc/hostname.xxN 화일

  시스템이 rebooting되는 동안에 /etc/rcS.d/S30rootusr.sh 화일이 실행 되면서
  /etc/hostname.*의 화일의 내용을 읽어 이 화일 안에 들어있는 IP address 혹은
  hostname으로 각 network interface를 enable 시킨다.
 
  /etc/hostname.xxN은 아래와 같이 형태로 화일 이름을 만들면 된다.
 
  xx : network interface의 이름을 나타낸다.
  N : 몇번째 network interface인지를 나타낸다.
    
  예) 1. hme interface를 2개 설치 했을때;
 
         /etc/hostname.hme0와 /etc.hostname.hme1 화일을 만든다.
    
     2. le interface 1개를 사용하다가 qe interface를 2개 추가했을때;
    
         /etc/hostname.le0 는 기존에 만들어져 있을 것이며
         /etc/hostname.qe0와 /etc.hostname.qe1 화일을 만든다.
        
  /etc/hostname.xxN 화일 안에는 "xxN" interface 에서 사용할 IP address나 이에
  해당하는 hostname(/etc/hosts 화일에 등록된 이름)을 넣어 놓는다.
 
3. 시스템 rebooting

  위와 같이 /etc/hostname.xxN 화일은 만든후 시스템을 reconfigure 하도록 rebooting
  한다.
 
  # reboot -- -r
 
 
4. 시스템에 이미 network interface가 인식되어 있는 경우, rebooting하지 않고
  새로 설치한 network interface가 enable되도록 하려면 아래와 같이 ifconfig
  명령을 사용한다.
 
  # ifconfig "interface-name" plumb
  # ifconfig "interface-name" "ip-address" netmask "netmask-value" broadcast + up
 
  예) 새로 추가한 network interface가 "hme1"이고 IP address는 129.100.1.1이며
     netmask 값이 ffffff00(255.255.255.0)인 경우
    
     # ifconfig hme1 plumb
     # ifconfig hme1 129.100.1.1 netmask 0xffffff00 broadcast + up