How to use command line for configuring Routing and Remote Access Server
Netsh is a command line tool to configure and administer Windows based computers. Netsh can be used extensively for Routing and remote access configurations. Some of the netsh commands in RAS context are -
-
Command – Netsh ras add authtype add authtype [type = ] PAP|SPAP|MD5CHAP|MSCHAP|MSCHAPv2|EAP
-
Command – Netsh ras add registeredserver
-
Command – Netsh ras add link [type = ] SWC|LCP
-
Command – Netsh ras add multilink [type = ] MULTI|BACP
-
Command – Netsh ras set authmode [mode = ] STANDARD|NODCC|BYPASS
-
Command – Netsh ras set user
-
Command – Netsh ras set tracing
-
Command – Netsh ras aaaa set accounting [provider =] WINDOWS|RADIUS|NONE
-
Command – Netsh ras aaaa set acctserver
-
Command – Netsh ras aaaa set authentication [provider =] WINDOWS|RADIUS
-
Command – Netsh ras aaaa set authserver
Examples for configuring Remote access server using netsh -
Scenario – Preserve the Ras Server configuration on a machine
- Netsh ras dump > “<filename>”
Scenario – Restore the preserved Ras Server configuration on a machine
Scenario – Set the authentication and accounting provider of Ras Server to Windows
- Netsh ras aaaa set acco windows
- Netsh ras aaaa set authe windows
Scenario – Add all authentication types on the Remote Access Server
- Netsh ras add authtype pap
- Netsh ras add authtype spap
- Netsh ras add authtype md5chap
- Netsh ras add authtype mschap
- Netsh ras add authtype mschapv2
- Netsh ras add authtype eap
Scenario – Set the dialin permissions of a user “Test” to “Allow access”
- Netsh ras set user test permit
Scenario – Enable tracing logs for RAS connections
- Netsh ras set tracing * en
Puja Pandey
Software Design Engineer/Test
Windows Networking Group
[This posting is provided "AS IS" with no warranties, and confers no rights.]