Configuración de un servicio de vínculo IPDLC

  1. Recupere las instrucciones del símbolo del sistema.

  2. Si es necesario, recupere el nombre del adaptador.

  3. Cree el servicio de vínculo.

  4. Cree la sesión independiente.

    En el ejemplo de código siguiente se describe cómo configurar un servicio de vínculo IPDLC. En la tabla siguiente se describen los modificadores del símbolo del sistema pertinentes:

Modificador de la línea de comandos Descripción
-p PrimaryNNS: el servidor de nodo de red principal
-b (Opcional) BackupNNS: Servidor de nodos de red de copia de seguridad
-d (Opcional) dispositivo: invalida el nombre del adaptador detectado.
-l (Opcional) LenNode: se usa para configurar el nodo LEN (el valor predeterminado es 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