Microsoft MVP성태의 닷넷 이야기
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 

(시리즈 글이 3개 있습니다.)
Windows: 131. 윈도우 10에서 사라진 "Adapters and Bindings" 네트워크 우선 순위 조정 기능
; https://www.sysnet.pe.kr/2/0/11083

Windows: 152. 윈도우 10에서 사라진 "Adapters and Bindings" 네트워크 우선순위 조정 기능 - 두 번째 이야기
; https://www.sysnet.pe.kr/2/0/11782

개발 환경 구성: 505. 윈도우 - (네트워크 어댑터의 우선순위로 인한) 열거되는 IP 주소 순서를 조정하는 방법
; https://www.sysnet.pe.kr/2/0/12304




윈도우 10에서 사라진 "Adapters and Bindings" 네트워크 우선순위 조정 기능

예전에 네트워크 우선순위 조정에 대해 설명한 적이 있는데요.

다중 LAN 카드 환경에서 Dns.GetHostAddresses(local)가 반환해 주는 IP의 우선순위는 어떻게 될까요?
; https://www.sysnet.pe.kr/2/0/1169

아쉽게도, Windows 10부터는 네트워크 설정의 "Advanced" / "Advanced Settings..." 메뉴로 뜨는 창에서 "Adapters and Bindings" 탭이 없어졌습니다.

Windows 10 Network adapter order doesn't "stick". 
; https://social.technet.microsoft.com/Forums/windows/en-US/e4ffec8c-0a2d-4858-b379-da1c2270d60a/windows-10-network-adapter-order-doesnt-stick?forum=win10itpronetworking

Cannot change Network Binding Order in Windows 10 
; http://answers.microsoft.com/en-us/insider/forum/insider_wintp-insider_web/cannot-change-network-binding-order-in-windows-10/08d775da-24d6-4b26-96fe-355920e879a0?page=2

위의 글에 보면 아쉬운 대로 해법이 나오는 데, InterfaceMetric 수치를 조정하라는 것입니다. (낮을수록 우선순위가 높습니다.)

따라서, 현재 여러분들이 컴퓨터에 바인딩 순서가 높은 순서를 보고 싶다면 다음과 같이 명령을 내리면 됩니다.

PS C:\> Get-NetIPInterface | where {$_.ConnectionState -eq "Connected"} | select ifIndex,InterfaceAlias,InterfaceMetric,AddressFamily,ConnectionState | sort InterfaceMetric | FT


ifIndex InterfaceAlias                                                            InterfaceMetric AddressFamily ConnectionState
------- --------------                                                            --------------- ------------- ----
      4 Ethernet                                                                               15          IPv4 ...d
     11 WiFi 3                                                                                 55          IPv4 ...d
      1 Loopback Pseudo-Interface 1                                                            75          IPv4 ...d

위의 경우 유선 Ethernet이 1순위이고, 이어서 무선 랜이 2순위입니다.

우선순위를 조정하고 싶다면 InterfaceMetric 수치를 변경해야 하는데, 아래의 코드는 이를 쉽게 해주는 PowerShell 스크립트입니다.

##############################################################################################################
#
# Purpose: Manually set the Binding Order (order of preference) for a specified Network Interface
#
# Written by: Joshua D. True
#
# Notes:  This script has been set to only show interfaces with an active connection (to avoid confusion dealing with unused virtual interfaces)
#         To change the script to show all interfaces, remove the following ### | where {$_.ConnectionState -eq "Connected"} ### from both lines
#         of code that begin with "Get-NetIPInterface"
#         This script requires Admin elevation!
#
##############################################################################################################

# Display active interfaces to be changed
Write-Host -ForegroundColor Red "Below is of network conenctions (with an active connection) sorted in order of highest priority first (BEFORE CHANGES)"
Get-NetIPInterface | where {$_.ConnectionState -eq "Connected"} | select ifIndex,InterfaceAlias,InterfaceMetric,AddressFamily,ConnectionState | sort InterfaceMetric | FT

# Prompt user for index and new metric value of an interface
$nicIndex=Read-Host "Enter the Index of the network connection that you would like to change"
$nicIMetric=Read-Host "Enter the new Interface Metric value to be assigned to the Index you just selected (lower number means higher priority)"
If (($nicIndex -ne $null) -and ($nicIMetric -ne $null)) {
    Set-NetIPInterface -InterfaceIndex $nicIndex -InterfaceMetric $nicIMetric
}

# Display active interfaces after change has been made (just for confirmation that change you made was entered correctly)
Write-Host -ForegroundColor Green "Below is of network conenctions (with an active connection) sorted in order of highest priority first (AFTER CHANGES)"
Get-NetIPInterface | where {$_.ConnectionState -eq "Connected"} | select ifIndex,InterfaceAlias,InterfaceMetric,AddressFamily,ConnectionState | sort InterfaceMetric | FT

# END




[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]







[최초 등록일: ]
[최종 수정일: 3/1/2024]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 



2018-11-18 10시23분
윈도우 10에서 사라진 "Adapters and Bindings" 네트워크 우선순위 조정 기능 - 두 번째 이야기
; http://www.sysnet.pe.kr/2/0/11782
정성태

... 31  32  33  34  35  36  37  38  39  [40]  41  42  43  44  45  ...
NoWriterDateCnt.TitleFile(s)
12620정성태4/29/202111923.NET Framework: 1052. C# - 왜 구조체는 16 바이트의 크기가 적합한가? [1]파일 다운로드1
12619정성태4/28/202112425.NET Framework: 1051. C# - 구조체의 크기가 16바이트가 넘어가면 힙에 할당된다? [2]파일 다운로드1
12618정성태4/27/202110986사물인터넷: 58. NodeMCU v1 ESP8266 CP2102 Module을 이용한 WiFi UDP 통신 [1]파일 다운로드1
12617정성태4/26/20218644.NET Framework: 1050. C# - ETW EventListener의 Keywords별 EventId에 따른 필터링 방법파일 다운로드1
12616정성태4/26/20218617.NET Framework: 1049. C# - ETW EventListener를 상속받았을 때 초기화 순서파일 다운로드1
12615정성태4/26/20216788오류 유형: 712. Microsoft Live 로그인 - 계정을 선택하는(Pick an account) 화면에서 진행이 안 되는 문제
12614정성태4/24/20219464개발 환경 구성: 570. C# - Azure AD 인증을 지원하는 ASP.NET Core/5+ 웹 애플리케이션 예제 구성 [4]파일 다운로드1
12613정성태4/23/20218542.NET Framework: 1048. C# - ETW 이벤트의 Keywords에 속한 EventId 구하는 방법 (2) 관리 코드파일 다운로드1
12612정성태4/23/20218636.NET Framework: 1047. C# - ETW 이벤트의 Keywords에 속한 EventId 구하는 방법 (1) PInvoke파일 다운로드1
12611정성태4/22/20217941오류 유형: 711. 닷넷 EXE 실행 오류 - Mixed mode assembly is build against version 'v2.0.50727' of the runtime
12610정성태4/22/20217741.NET Framework: 1046. C# - 컴파일 시점에 참조할 수 없는 타입을 포함한 이벤트 핸들러를 Reflection을 이용해 구독하는 방법파일 다운로드1
12609정성태4/22/20219019.NET Framework: 1045. C# - 런타임 시점에 이벤트 핸들러를 만들어 Reflection을 이용해 구독하는 방법파일 다운로드1
12608정성태4/21/202110044.NET Framework: 1044. C# - Generic Host를 이용해 .NET 5로 리눅스 daemon 프로그램 만드는 방법 [9]파일 다운로드1
12607정성태4/21/20218572.NET Framework: 1043. C# - 실행 시점에 동적으로 Delegate 타입을 만드는 방법파일 다운로드1
12606정성태4/21/202112462.NET Framework: 1042. C# - enum 값을 int로 암시적(implicit) 형변환하는 방법? [2]파일 다운로드1
12605정성태4/18/20218534.NET Framework: 1041. C# - AssemblyID, ModuleID를 관리 코드에서 구하는 방법파일 다운로드1
12604정성태4/18/20217314VS.NET IDE: 163. 비주얼 스튜디오 속성 창의 "Build(빌드)" / "Configuration(구성)"에서의 "활성" 의미
12603정성태4/16/20218156VS.NET IDE: 162. 비주얼 스튜디오 - 상속받은 컨트롤이 디자인 창에서 지원되지 않는 문제
12602정성태4/16/20219352VS.NET IDE: 161. x64 DLL 프로젝트의 컨트롤이 Visual Studio의 Designer에서 보이지 않는 문제 [1]
12601정성태4/15/20218456.NET Framework: 1040. C# - REST API 대신 github 클라이언트 라이브러리를 통해 프로그래밍으로 접근
12600정성태4/15/20218639.NET Framework: 1039. C# - Kubeconfig의 token 설정 및 인증서 구성을 자동화하는 프로그램
12599정성태4/14/20219339.NET Framework: 1038. C# - 인증서 및 키 파일로부터 pfx/p12 파일을 생성하는 방법파일 다운로드1
12598정성태4/14/20219483.NET Framework: 1037. openssl의 PEM 개인키 파일을 .NET RSACryptoServiceProvider에서 사용하는 방법 (2)파일 다운로드1
12597정성태4/13/20219497개발 환경 구성: 569. csproj의 내용을 공통 설정할 수 있는 Directory.Build.targets / Directory.Build.props 파일
12596정성태4/12/20219291개발 환경 구성: 568. Windows의 80 포트 점유를 해제하는 방법
12595정성태4/12/20218695.NET Framework: 1036. SQL 서버 - varbinary 타입에 대한 문자열의 CAST, CONVERT 변환을 C# 코드로 구현
... 31  32  33  34  35  36  37  38  39  [40]  41  42  43  44  45  ...