성태의 닷넷 이야기
홈 주인
모아 놓은 자료
프로그래밍
질문/답변
사용자 관리
사용자
메뉴
아티클
외부 아티클
유용한 코드
온라인 기능
MathJax 입력기
최근 덧글
[정성태] The Windows Registry Adventure #1: ...
[정성태] systemd for Developers I ; https:/...
[정성태] 엄밀히 object 타입의 인스턴스가 다른 타입으로 형변환 가능...
[정성태] 아래의 글에서 나오는 "Windows Application Pa...
[정성태] The history of calling conventions,...
[정성태] Secure and Deploy .NET Windows Form...
[정성태] Get Started with Milvus Vector DB i...
[정성태] cyberark/PipeViewer - A tool that...
[정성태] WinForms in a 64-Bit world – our st...
[정성태] 예제에서 SELECT_SQL도 내부적으로는 SqlCommand/...
글쓰기
제목
이름
암호
전자우편
HTML
홈페이지
유형
제니퍼 .NET
닷넷
COM 개체 관련
스크립트
VC++
VS.NET IDE
Windows
Team Foundation Server
디버깅 기술
오류 유형
개발 환경 구성
웹
기타
Linux
Java
DDK
Math
Phone
Graphics
사물인터넷
부모글 보이기/감추기
내용
<div style='display: inline'> <h1 style='font-family: Malgun Gothic, Consolas; font-size: 20pt; color: #006699; text-align: center; font-weight: bold'>네트워크의 인터넷 접속 가능 여부에 대한 판단 기준</h1> <p> 작업 표시줄에 있는 네트워크 아이콘에 마우스를 갖다 대면 다음과 같이 풍선 도움말로 개별 네트워크의 인터넷 접속 가능 여부를 보여줍니다.<br /> <br /> <img alt='msft_connect_1.png' src='/SysWebRes/bbs/msft_connect_1.png' /><br /> <br /> 위의 경우 "Network 2"가 "Internet access"로 나오는데요, 이 기준이 뭘까요? ^^ 이에 대해 Raymond Chen은 다음과 같이 설명하고 있습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > How does Windows decide whether your computer has limited or full Internet access? ; <a target='tab' href='https://devblogs.microsoft.com/oldnewthing/20221115-00/?p=107399'>https://devblogs.microsoft.com/oldnewthing/20221115-00/?p=107399</a> </pre> <br /> 보다 자세한 설명은 아래의 공식 문서에 있는데,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > An Internet Explorer or Edge window opens when your computer connects to a corporate network or a public network ; <a target='tab' href='https://learn.microsoft.com/en-us/troubleshoot/windows-client/networking/internet-explorer-edge-open-connect-corporate-public-network'>https://learn.microsoft.com/en-us/troubleshoot/windows-client/networking/internet-explorer-edge-open-connect-corporate-public-network</a> </pre> <br /> 윈도우는 이를 위해 (서비스 관리자에 보면 "Manual"로 설정된) "NLA(Network Location Awareness)" 서비스를 운영하는데, 해당 서비스 내에서는 NCSI(Network Connectivity Status Indicator) 구성요소를 사용해 인터넷 연결 여부를 판정한다고 합니다.<br /> <br /> 그 판별 단계 중의 하나는 다음과 같은 절차를 따르는데요,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > 1.1 www.msftconnecttest.com에 대한 DNS 풀이 1.2 DNS 풀이가 되었다면 "http://www.msftconnecttest.com/connecttest.txt" 요청 결과가 "Microsoft Connect Test"인지 확인 2. dns.msftncsi.com으로의 DNS 조회 </pre> <br /> 혹시 일부러 위의 조건들을 실패하게 만들면 "No Internet access"를 재현할 수 있지 않을까요? ^^ 아쉽지만, 두 번째 단계가 단순히 DNS 조회 가능 여부이기 때문에 HOSTS 파일을 다음과 같이 변경하는 것만으로는,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > 127.0.0.1 www.msftconnecttest.com 127.0.0.1 dns.msftncsi.com </pre> <br /> 첫 번째 단계를 실패하게 만들 뿐, 2번 단계는 성공하므로 재현이 안 됩니다. 굳이 해야 한다면 ^^ 2번 단계 실패를 유도하기 위해 아예 DNS 서버를 잘못된 IP로 지정하는 식으로 설정해야 합니다.<br /> <br /> <img alt='msft_connect_2.png' src='/SysWebRes/bbs/msft_connect_2.png' /><br /> <br /> 이후 해당 네트워크를 "Disable", "Enable"로 재시작하면 "Connectivity" 상태가 "No Internet access"로 머무는 것을 확인할 수 있습니다.<br /> <br /> <img alt='msft_connect_3.png' src='/SysWebRes/bbs/msft_connect_3.png' /><br /> <br /> (달리 말하면, IP 통신은 가능해도 DNS 풀이가 안 되면 네트워크 상태가 "No Internet access"로 됩니다.)<br /> <br /> <hr style='width: 50%' /><br /> <br /> 참고로, 해외여행을 해보신 분들은 인터넷 접속 전에 경유되는 포탈 화면에 익숙하실 텐데요, 그런 것을 "captive portal"이라고 합니다. 그런 상태에서는 "captive portal"로는 접속이 되지만 아직 서비스 업체에서 요구하는 인증 등의 과정을 거치지 않았으므로 인터넷 접속은 안 됩니다.<br /> <br /> 바로 그런 상태인지 확인하는 방법을 아래의 글에서 설명하고 있습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > How should I interpret the various values of NLM_CONNECTIVITY? ; <a target='tab' href='https://devblogs.microsoft.com/oldnewthing/20230112-00/?p=107700'>https://devblogs.microsoft.com/oldnewthing/20230112-00/?p=107700</a> </pre> <br /> 나중에... 언젠가 출장 가게 되면 <a target='tab' href='https://learn.microsoft.com/en-us/windows/win32/api/netlistmgr/nn-netlistmgr-inetworklistmanager'>INetworkListManager</a>::<a target='tab' href='https://learn.microsoft.com/en-us/windows/win32/api/netlistmgr/nf-netlistmgr-inetworklistmanager-getnetworks'>GetNetworks</a> 코드가 작동하는지 확인해 봐야겠습니다. ^^<br /> </p><br /> <br /><hr /><span style='color: Maroon'>[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]</span> </div>
첨부파일
스팸 방지용 인증 번호
8170
(왼쪽의 숫자를 입력해야 합니다.)