Wi-Fi 관련 VirtualBox 네트워크 어댑터/DNS 문제

Wi-Fi 관련 VirtualBox 네트워크 어댑터/DNS 문제

VirtualBox에서 매우 이상한 문제가 발생했습니다.

대부분의 경우 내 노트북은 이더넷 연결에 고정되어 있습니다. 가끔 책상 밖에 있을 때 Wi-Fi 외에 다른 옵션이 없는 경우가 있습니다. Wi-Fi에 연결할 때 내 호스트 컴퓨터(Windows 10)는 문제 없이 몇 초 안에 네트워크에 액세스할 수 있습니다. 그러나 게스트(Windows XP SP3)는 여전히 오프라인인 것처럼 작동합니다.

VirtualBox의 내 네트워크 구성은 입니다 NAT.

이상한 점은 이것이 무선에서만 발생한다는 것입니다. 컴퓨터를 배선할 때마다 호스트 OS는절대가지다어느네트워크 연결을 얻는 데 문제가 있습니다. 인터넷에 접속하려면 게스트 OS가 필요하지만 호스트 외부의 클라이언트가 연결하는 것을 원하지 않기 때문에 NAT로 설정했습니다. 또한 게스트 컴퓨터를 유선 네트워크 카드나 무선 네트워크 카드에 연결하고 싶지 않았습니다. 왜냐하면 무선 네트워크 카드는 둘 중 하나만 작동하기 때문입니다.

반면에 Wi-Fi에 연결할 때마다언제나게스트로부터 인터넷 연결을 얻는 데 문제가 있습니다.

한번은 문제가 생겼을 때 타이핑을 했는데 ipconfig /flushdns갑자기 모든 것이 작동했습니다. 그 이후로는 충분하지 않았습니다. DNS를 플러시하는 것만으로는 Wi-Fi에서 작동하는 데 충분하지 않습니다.

강제로 작동시키는 유일한 방법은 게스트에 대한 VirtualBox 설정으로 이동하여 네트워크 어댑터를 NAT에서 Bridged. 이 시점에서는 여전히 작동하지 않습니다. 하지만,지금ipconfig /flushdns(게스트에서) 입력하면 모든 것이 갑자기 작동합니다. 네트워크에 액세스할 수 있습니다. 더 기괴한 점은 이제 다시 NAT. 갑자기 작동이 멈추겠지만, 만약 그렇다면ipconfig /flushdns 다시, 작동합니다.

즉, 나는 완전한 원을 그리며 NAT마침내 작동하는 연결로 돌아왔습니다. 시작 및 종료 상태는 다음과 같습니다.똑같다, 그래서 게스트가 스스로 네트워크 연결을 얻을 수 없는 이유가 무엇인지 혼란스럽습니다. Wi-Fi에 연결할 때 마다 입력만 하면 되지만 , 게스트를 종료하고 어댑터를 에서 으로 변경 한 다음 다시 로 변경 하고 명령을 입력해야 ipconfig /flushdns하는 것은 정말 고통스럽습니다 .NATBridgedNAT

왜 이런 일이 발생하며, 더 중요한 것은 유선으로 연결했을 때처럼 원활하게 작동하도록 이 문제를 어떻게 해결할 수 있습니까? ( ipconfig /flushdns예를 들어 Wi-Fi에서 이더넷으로 다시 전환하거나 어댑터 설정을 망칠 때 입력할 필요가 없습니다 .)

다음은 최근 문제 해결 세션의 명령 프롬프트 출력입니다.

Wi-Fi에만 연결되어 있고 네트워크에 액세스할 수 없습니다.

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\InterLinked>ping google.com
Ping request could not find host google.com. Please check the name and try again
.

C:\Documents and Settings\InterLinked>ping google.com
^C
C:\Documents and Settings\InterLinked>ipconfig /flushdns

Windows IP Configuration

Successfully flushed the DNS Resolver Cache.

C:\Documents and Settings\InterLinked>ping google.com
Ping request could not find host google.com. Please check the name and try again
.

NAT다음으로 변경 Bridged하고 다시 시도하세요.

C:\Documents and Settings\InterLinked>

C:\Documents and Settings\InterLinked>ping google.com

일찍 종료하여 출력이 누락되었지만 DNS를 플러시할 때까지 ping이 실패합니다.

^C
C:\Documents and Settings\InterLinked>ipconfig /flushdns

Windows IP Configuration

Successfully flushed the DNS Resolver Cache.

C:\Documents and Settings\InterLinked>ping google.com

Pinging google.com [172.217.7.14] with 32 bytes of data:

Reply from 172.217.7.14: bytes=32 time=15ms TTL=48
Reply from 172.217.7.14: bytes=32 time=13ms TTL=48
Reply from 172.217.7.14: bytes=32 time=15ms TTL=48
Reply from 172.217.7.14: bytes=32 time=20ms TTL=48

Ping statistics for 172.217.7.14:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 13ms, Maximum = 20ms, Average = 15ms

C:\Documents and Settings\InterLinked>

나는 Bridged다음으로 다시 변경합니다 NAT:

C:\Documents and Settings\InterLinked>ping google.com

Pinging google.com [172.217.7.14] with 32 bytes of data:

Reply from 172.217.7.14: bytes=32 time=15ms TTL=47
Destination host unreachable.
Destination host unreachable.
Destination host unreachable.

Ping statistics for 172.217.7.14:
    Packets: Sent = 4, Received = 1, Lost = 3 (75% loss),
Approximate round trip times in milli-seconds:
    Minimum = 15ms, Maximum = 15ms, Average = 15ms

C:\Documents and Settings\InterLinked>ipconfig /flushdns

Windows IP Configuration

Successfully flushed the DNS Resolver Cache.

C:\Documents and Settings\InterLinked>ping google.com

Pinging google.com [172.217.7.14] with 32 bytes of data:

Reply from 172.217.7.14: bytes=32 time=12ms TTL=47
Reply from 172.217.7.14: bytes=32 time=6ms TTL=47
Reply from 172.217.7.14: bytes=32 time=188ms TTL=47
Reply from 172.217.7.14: bytes=32 time=14ms TTL=47

Ping statistics for 172.217.7.14:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 6ms, Maximum = 188ms, Average = 55ms

C:\Documents and Settings\InterLinked>

답변1

힌트에서 알 수 있듯이 VirtualBox DNS 확인자를 활성화하는 것이 해결책입니다.

정확한 단계는 다음과 같습니다.

  1. VM을 종료합니다. 기기가 켜져 있으면 DNS 확인자를 켤 수 없습니다.
  2. VirtualBox 디렉터리로 이동합니다.주인명령 프롬프트에서:cd C:\Program Files\Oracle\VirtualBox
  3. 다음 명령을 실행하십시오.VBoxManage modifyvm "<VM name>" --natdnshostresolver1 on

<VM name>는 실행을 통해 찾을 수 있는 VM의 이름일 뿐입니다 VBoxManage list runningvms.

관련 정보