配置 IPDLC 链路服务
获取命令提示符说明。
如有必要,请检索适配器名称。
创建链接服务。
创建独立会话。
以下代码示例介绍如何配置 IPDLC 链接服务。 下表描述了相关的命令提示符开关:
命令行开关 | DESCRIPTION |
---|---|
-p | PrimaryNNS:主网络节点服务器 |
-b | (可选)BackupNNS:备份网络节点服务器 |
-d | (可选)设备:替代发现的适配器名称 |
-l | (可选)LenNode:用于配置 LEN 节点(默认值为 1st) |
On Error Resume Next
'Declarations and Constants
Dim strPrimaryNNS
Dim strBackupNNS
Dim strLocalAddress
Dim strLenNode
Dim strComputerName
Dim wshEnvProc
'Defaults
strPrimaryNNS = ""
strBackupNNS = ""
strLocalAddress = ""
strLenNode = "SNA Service"
'Get the command line
Set objArgs = WScript.Arguments
For I = 0 to objArgs.Count - 1
select case objArgs(I)
Case "-p"
I = I + 1
strPrimaryNNS = objArgs(I)
case "-b"
I = I + 1
strBackupNNS = objArgs(I)
case "-d"
I = I + 1
strLocalAddress = objArgs(I)
case "-l"
I = I + 1
strLenNode = objArgs(I)
case else
Wscript.Echo "Script Usage: "
Wscript.Echo " -p Primary NNS (Required)"
Wscript.Echo " -b Backup NNS (Optional)"
wscript.echo " -d Device Name (Optional)"
wscript.echo " -l Len Node (Optional)"
return
end select
Next
'NNS parameter is required
if strPrimaryNNS = "" then
Wscript.Echo "Please supply the -p (PrimaryNNS) parameter"
return
end if
'See if we need to get a device
if strLocalAddress = "" then
GetAdapterName()
end if
' Two methods for creating the link service and independent session connection
CreateIPDLCLinkService
CreateIndependentSession