
我使用的是 Windows 7 64 位拉斯迪爾命令以連接到 vpn pptp 連接。
我使用的命令是:
rasdial "connection" user pass
但是,當我輸入該命令時,會自動取得 IP。
當我右鍵單擊連接設定時,我可以選擇手動設定 IP 位址和 DNS 伺服器。
我希望使用命令提示字元並指定 IP 位址,而無需在 GUI 選單中手動編輯 IP 位址。
我怎麼做?謝謝
答案1
也許這會有所幫助:
netsh interface ipv4 add address
One or more essential parameters were not entered.
Verify the required parameters, and reenter them.
The syntax supplied for this command is not valid. Check help for the correct syntax.
Usage: add address [name=]<string>
[[address=]<IPv4 address>[/<integer> [[mask=]<IPv4 mask>]]
[[type=]unicast|anycast]]
[[gateway=]<IPv4 address> [gwmetric=]<integer>]
[[validlifetime=]<integer>|infinite]
[[preferredlifetime=]<integer>|infinite]
[[subinterface=]<string>]
[[store=]active|persistent]
[[skipassource=]true|false]