본문 바로가기
Solaris

IP Address 변경 방법

by 레이루이 2008. 5. 5.
반응형

IP 변경.
  기존 IP: 100.100.100.1
  변경 IP: 100.100.100.2
 
  @ SYSTEM network 상태 check
  server#ifconfig -a
  lo0: flags=849 mtu 8232
   inet 127.0.0.1 netmask ff000000
  hme0: flags=863 mtu 1500
   inet 100.100.100.1 netmask ffffff00 broadcast 100.100.100.255
   ether 8:0:20:c9:b6:f4
  -- hme0로 시작되는 행의 <표시 안쪽에 up으로 되어 있어야 network이 가능하다.
  -- hme0가 le0로 표시되는 경우도 있다.
  (ethernet card가 10/100m auto면 hme0, 10m면 le0로 표시된다.
 
  @ SYSTEM의 IP를 임시로 변경하여 사용할 경우.
  server#ifconfig hme0 down
  -- down option을 사용하면 network이 안되므로 remote작업시 사용하면 안된다.
  server#ifconfig hme0 inet 100.100.100.2 netmask 255.255.255.2 up
 
  @ SYSTEM의 IP를 영구변경하는 경우.
  /etc/hosts file에서 IP를 변경해준다.
  server#vi /etc/hosts
  #
  # Internet host table
  #
  127.0.0.1 localhost
  100.100.100.2 server loghost
  -- /etc/hosts file의 IP를 변경하고 rebooting하면 변경된 IP가 적용된다.
반응형