언덕에 누워 생각하기

Raspbian Jessie 에서 DHCP 유동 IP 고정 본문

Linux

Raspbian Jessie 에서 DHCP 유동 IP 고정

생각하기 2015. 11. 22. 12:10
반응형

정확한 내용은 이렇습니다...

http://askubuntu.com/questions/645000/what-is-the-difference-between-iface-eth0-inet-manual-and-iface-eth0-inet-static

제목 : What is the difference between iface eth0 inet manual and iface eth0 inet static?

답 :

iface eth0 inet static: Defines a static IP address for eth0

iface eth0 inet manual :To create a network interface without an IP address at all. Usually used by interfaces that are bridge or aggregation members, or have a VLAN device configured on them

For more information read:

링크된 데비안 위키에 가보니...

https://wiki.debian.org/NetworkConfiguration#Using_DHCP_to_automatically_configure_the_interface

 

아래 내용을 지우지 않았었는데, 잘못된 것 같네요.

allow-hotplug eth0

 

이렇게 하랍니다... 그러면, 다른 블로그에 있는 내용과 다를게 없는데, 왜 네트웤이 먹통이었던걸까요? 집에 가서 다시 해봐야겠네요.

auto eth0
    iface eth0 inet static
        address 192.0.2.7
        netmask 255.255.255.0
        gateway 192.0.2.254

 

 

다른 곳에 있는 내용으로는 Wheezy까지만 되는지(라즈베리를 이제야 접해서 저는 Jessie를 깔았어요)

설명대로 하면 네트워크가 먹통되는 일이 발생하네요. 그래서 시행착오 방법으로 알아 낸 내용입니다.


sudo nano /etc/network/interfaces


보통 다음과 같이 되어 있는 것을

auto eth0

allow-hotplug eth0

iface eth0 inet dhcp


다음과 같이 고치라고 합니다.

auto eth0

allow-hotplug eth0

#IP 고정하기

iface eth0 inet static

address 192.168.xxx.xxx             <-- xxx는 주소...

netmask 255.255.255.0

gateway 192.168.xxx.xxx

여기서 iface eth0 inet dhcp에서 마지막 dhcp를 static으로 고치라고 하는데, 이게 Jessie부터 안되는건지

아무튼 안됩니다.


dhcp를 manual로 해야 합니다. 결론은...

auto eth0

allow-hotplug eth0

#IP 고정하기

#iface eth0 inet static

iface eth0 inet manual

address 192.168.xxx.xxx

netmask 255.255.255.0

gateway 192.168.xxx.xxx


반응형