고정 IP로 실행되는 두 개의 게스트 (Debian 사용)가있는 VM 서버를 상속했습니다 (잘 작동 함).
새 게스트 (Debian 8.5)를 만들고 /etc/network/interfaces
다른 게스트와 동일한 방식 (표준 iface eth0 inet static
등)을 통해 고정 IP로 구성했습니다 .
이 게스트에서 24 시간 IP가 DHCP 구성으로 되 돌리면 다시 시작 eth0
하면 고정 IP로 다시 작동합니다.
모든 게스트는 동일한 vSwitch 및 동일한 가상 네트워크 (동일한 물리적 어댑터에 연결됨)에 있습니다.
vSphere Client 5.5로 VM을 관리하고 있습니다.
/etc/network/interfaces
손님 :
이것은 올바르게 작동합니다.
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 192.168.1.40
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 8.8.8.8
이것은 계속 dhcp로 돌아갑니다.
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 192.168.1.10
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 8.8.8.8 4.4.4.4
이 질문에 대한 토론과 답변을 보십시오 . 이 질문은 Raspbian (Rasperry Pi OS)에 관한 것이지만 일반적인 문제는 동일하게 들립니다. 해결책은 DHCP를 비활성화하거나 DHCP 구성을 조정하여 고정 IP를 설정하는 것 같습니다.
고정 값을 DHCP로 설정하려면이 파일을 편집 /etc/dhcpcd.conf
하고이 예제와 같이 구성을 조정하여 고정 IP를 지정된 인터페이스에 강제로 적용하십시오. 이 경우 eth0
:
static <value>
Configures a static <value>. If you set ip_address then dhcpcd
will not attempt to obtain a lease and just use the value for the
address with an infinite lease time.
Here is an example which configures a static address, routes and
dns.
interface eth0
static ip_address=192.168.0.10/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
특정 인터페이스 (예 : eth0
—)에 대해 DHCP를 비활성화하려면 /etc/dhcpcd.conf
다음 행을 편집 하고 구성에 추가하여 DHCP가 신경 쓰지 않도록합니다 eth0
.
denyinterfaces eth0
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다