'네트워크 설정'에 해당되는 글 1건

  1. 2007.10.17 Ubuntu Server 네트워크 설정
2007. 10. 17. 19:57

Ubuntu Server 네트워크 설정


ubuntu 콘솔에서 네트워크 설정을 바꾸는 방법이다.

고정 ip를 사용하게 될 경우..
/etc/network/interfaces 라는 파일을 수정함으로 바꿀 수 있다.

neo@green:~$ sudo 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 eth1
# iface eth1 inet dhcp         # dhcp로 세팅 시 사용
iface eth1 inet static           # 고정 ip로 세팅할 시 사용
          address xxx.xxx.xxx.xxx
          netmask 255.255.255.xxx
          network  xxx.xxx.xxx.xxx
          broadcast xxx.xxx.xxx.xxx
          gateway  xxx.xxx.xxx.xxx

세팅이 완료되면 데몬을 재시작 함으로 적용시킬 수 있다.
neo@green:~$ sudo /etc/init.d/networking restart

적용된 세팅을 확인하기 위해서는 ifconfig 명령을 사용하면 확인할 수 있다.
neo@green:~$ ifconfig eth1
eth1      Link encap:Ethernet   HWaddr   xx:xx:xx:xx:xx:xx
            inet    addr:xxx.xxx.xxx.xxx    Bcast:xxx.xxx.xxx.xxx    Mask:255.255.255.xxx
            inet6 addr:xxxx::xxxx:xxxx:xxxx:xxxx/xx    Scope:Link
            UP BROADCAST RUNNING MULTICAST    MTU:1540    Metric:1
            RX    packets:62092    errors:0    dropped:0    overruns:0    frame:0
            TX    packets:39519    errors:0    dropped:0    overruns:0    carrier:0
            collisions:0    txqueuelen:1000
            RX bytes:8652169 (8.2 MiB)    TX bytes:44541558 (42.4 MiB)

neo@green:~$
                           

'Linux' 카테고리의 다른 글

Debian lenny - FlashPlayer 설치  (0) 2009.11.30
Linux에서 사용자 관리 명령어 사용시 변경되는 파일  (1) 2008.10.31
Linux 사용자 관리  (0) 2008.10.29