본문 바로가기

나는개발자다/기타

우분투 11.04 서버 network ip 및 nameserver 설정.



network 정보 보기 :
sudo lshw - class network
 
*-network
       description: Ethernet interface
       product: BCM4401-B0 100Base-TX
       vendor: Broadcom Corporation
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: eth0
       version: 02
       serial: 00:15:c5:4a:16:5a
       size: 10MB/s
       capacity: 100MB/s
       width: 32 bits
       clock: 33MHz
       capabilities: (snipped for brevity)
       configuration: (snipped for brevity)
       resources: irq:17 memory:ef9fe000-ef9fffff 

 




1. IP 확인하기.
ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:15:c5:4a:16:5a  
          inet addr:10.0.0.100  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::215:c5ff:fe4a:165a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:466475604 errors:0 dropped:0 overruns:0 frame:0
          TX packets:403172654 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2574778386 (2.5 GB)  TX bytes:1618367329 (1.6 GB)
          Interrupt:16 






2. 고정 ip 설정하기

/etc/network/interfaces 파일이다.

vi interfaces 입력

---------------------------------------------------------------
#This file describes the network interfaces available on your system
# and how to activate them. For more information, see inferfaces(5)

# The loopback network interface
auto lo
iface lo inet loopback
----------------------------------------------------------------

위 하면이 나올것이다.
dbcp로 설정하였으면 
iface eth0 inet dhcp 라는 문장도 있을것이다.
#This file describes the network interfaces available on your system
# and how to activate them. For more information, see inferfaces(5)

# The loopback network interface
auto lo
iface lo inet loopback

auto eth0 iface eth0 inet static address 10.0.0.100 netmask 255.255.255.0 gateway 10.0.0.1
----------------------------------------------------------------
 
/etc/init.d/networking restart  
 *Running ./init/d/networking restart is deprecated because it may not enable again some interface
* Reconfiguring network interfacs...

완료.....




3. DNS 셋팅

etc/reslov.conf 파일에서 설정한다.

reslov.conf 파일이 존재 하지 않으면 만들면 된다.
어떻게?
vi reslov.conf

vi 창이 열리면
nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.xxx