1. IP 설정 하기

whitelife@miniserver$ sudo vim /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto wlan0
iface wlan0 inet static
        # wireless-* options are implemented by the wireless-tools package
        wireless-mode managed
        wireless-essid xxxxx
        wireless-key1 s:xxxxxxxxxxxxx
        address xxx.xxx.xxx.xxx
        netmask xxx.xxx.xxx.xxx
        gateway xxx.xxx.xxx.xxx

2. DNS 설정 하기

whitelife@miniserver:~$ sudo vim /etc/resolv.conf
Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.xxx

3. Networking Restart

whitelife@miniserver:~$ sudo /etc/init.d/networking restart


참고 사이트


'Linux' 카테고리의 다른 글

Ubuntu root 비밀번호 설정 하기  (0) 2014.09.21
Ubuntu rar 압축 풀기  (0) 2014.09.21
vim 문자열 replace 하기  (0) 2013.11.10
gcc 컴파일 시 pcap.h no such file and directory 해결 방법  (0) 2013.11.08
find 명령어 사용하기  (0) 2013.11.07


/etc/sysconfig/network-scripts/ifcfg-Auto_eth0 파일을 수정 한다.



HWADDR=00:00:00:00:00:00
TYPE=Ethernet
BOOTPROTO=static
BROADCAST=192.168.0.255
IPADDR=192.168.0.78
NETMASK=255.255.255.0
NETWORK=192.168.0.0
GATEWAY=192.168.0.1
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="Auto eth0"
UUID=eba6c4c3-c3a6-4e93-abdf-b5f211c423fc
ONBOOT=yes
LAST_CONNECT=1353766285


BOOTPROTO=static

  • static: 고정 IP 방식
  • dhcp: 유동 IP 방식


ONBOOT=yes

부팅 시에 자동으로 활성화 된다. no로 설정하면 수동으로 해줘야 한다.


최종 적으로 수정이 끈나면 /etc/rc.d/init.d/network restart 를 실행 한다.



[root@whitelife etc]# /etc/rc.d/init.d/network restart
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface Auto_eth0:  Active connection state: activated
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/27
                                                           [  OK  ]
[root@whitelife etc]#


성공 적으로 적용 되는 모습을 볼 수 있다.


+ Recent posts