System Story/Ubuntu

Ubuntu 네트워크 설정하기

helperchoi 2014. 9. 26. 16:07

CentOS 등의 Redhat 계열 리눅스와는 달리 Debian 계열의 Ubuntu 리눅스는 아래와 같은 설정을 통해 네트워크 설정을 수행 한다.

 

root@ubuntu01:~#
root@ubuntu01:~# vi /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 eth0
iface eth0 inet static
netmask 255.255.255.0
broadcast 192.168.137.255

address 192.168.137.10
gateway 192.168.137.1
dns-nameservers 168.126.63.1 168.126.63.2
root@ubuntu01:~#
root@ubuntu01:~#
root@ubuntu01:~#
root@ubuntu01:~# ifdown eth0 && ifup eth0

root@ubuntu01:~#

root@ubuntu01:~#
root@ubuntu01:~# ping olleh.com
PING olleh.com (183.110.184.90) 56(84) bytes of data.
64 bytes from 183.110.184.90: icmp_seq=1 ttl=249 time=0.740 ms
64 bytes from 183.110.184.90: icmp_seq=2 ttl=249 time=1.03 ms

--- olleh.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 0.740/0.885/1.030/0.145 ms
root@ubuntu01:~#

root@ubuntu01:~#

 

 

반응형