Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Set LANA Number

979 views
Skip to first unread message

Roland Schoetzau

unread,
Apr 13, 2000, 3:00:00 AM4/13/00
to
Hi
Recently I installed Windows 2000. Now I want to configure my Network.
In WinNT it was possible to set the LANA Number in NetBIOS Interface for
the several Protocols. In Win95 it was possible to set one Protocol as
Default Protocol. Now I want to set the NetBEUI Protocol as Default
Protocol or the LANA Number to O.
Is this possible in Win2000 and if yes where?

Thanks in advance
Roland

Nick Gage

unread,
Apr 13, 2000, 3:00:00 AM4/13/00
to
How to Configure NetBios LANA Numbers in Windows 2000
ID: Q247064
======================================================================
----------------------------------------------------------------------------

The information in this article applies to:

- Microsoft Windows 2000 Professional
- Microsoft Windows 2000 Server
- Microsoft Windows 2000 Advanced Server
- Microsoft Windows 2000 Datacenter Server
----------------------------------------------------------------------------

SUMMARY
=======

In Microsoft Windows NT 4.0, LANA numbers could be configured by using the
Network tool in the Control Panel, and then changing the properties of the
NetBios Interface on the Services tab. In Windows 2000, a command line tool
named Lanacfg.exe is provided to configure LANA numbers. This article
describes how to use the Lanacfg.exe tool. To download the Lanacfg.exe tool
from the
Microsoft Windows Update Web site:

1. Connect to the following Microsoft Web site:

http://corporate.windowsupdate.microsoft.com

2. Click the Product Updates link, and then click Continue.

3. Choose "Windows 2000" in the "Operating Systems" section, and then click
Continue.

4. In the Specific Search Item box, type "Lana Configuration Tool", and then
click Continue.

5. Follow the instructions on the screen to finish downloading the tool.

MORE INFORMATION
================

The available options in the Lanacfg.exe tool are:

H:\>lanacfg

Network Configuration Diagnostic
View, manipulate, or test network configuration.

lanacfg [options]
showlanapaths - Show bind paths and component descriptions for each
exported lana
setlananumber - Change the LANA number of a bind path
rewritelanainfo - Verify and write out LANA information to the registry
showlanadiag - Show LANA diagnostic information

This is a sample output for a list of LANA numbers:

H:\>lanacfg showlanapaths
Lana: 4
-->NetBEUI Protocol-->3Com 3C918 Integrated Fast Ethernet Controller
(3C905B-TX Compatible)

Lana: 0
-->NetBEUI Protocol-->Intel 8255x-based PCI Ethernet Adapter (10/100)

Lana: 8
-->NetBEUI Protocol-->WAN Miniport (NetBEUI, Dial Out)

Lana: 5
-->WINS Client(TCP/IP) Protocol-->Internet Protocol (TCP/IP)-->3Com 3C918
Integrated Fast Ethernet Controller (3C905B-TX Compatible)

Lana: 1
-->WINS Client(TCP/IP) Protocol-->Internet Protocol (TCP/IP)-->Intel
8255x-based PCI Ethernet Adapter (10/100)

This is a sample output for changing a LANA number:

H:\>lanacfg setlananumber 1 2

Lana changed.

Automating the process of changing the LANA number is difficult as the old
LANA
number needs to be specified. Here is an example script that changes the
LANA
number of the NetBios protocol to network card binding to zero:

' lana0.vbs
' Sets LANA number for NetBEUI to 0
' Requires Windows 2000 lanacfg.exe in path
' Version 1.01 November 25th, 1999

sCommandShow = "lanacfg showlanapaths"
sCommandSet = "lanacfg setlananumber"
sWarning = "WARNING - NetBEUI is bound to more than one network card." &
VbCRLF & "WARNING - LANA 0 will be set for the last binding found!"
sNoCards = "No network cards bound to NetBEUI found."
sSearchLana = "Lana:"
sSearchNetBEUI = "-->NetBEUI Protocol-->"
sSearchWAN = "WAN"

' Should use a dynamic array
dim sOutput(30)

RunAndCaptureOutput sCommandShow
nLana = -1
For i = 0 to UBound(sOutput,1)-1
nPos = InStr(sOutput(i), sSearchLana)
If nPos > 0 Then
nTempLana = Mid(sOutput(i), nPos+8)
nPos2 = InStr(sOutput(i+1), sSearchNetBEUI)
If nPos2 > 0 Then
nPos3 = InStr(sOutput(i+1), sSearchWAN)
If nPos3 = 0 Then
If nLana >= 0 Then
WScript.Echo sWarning
End If
nLana = nTempLana
sCardName = Mid(sOutput(i+1), nPos3+23)
End If
End If
i=i+1
End If
Next

If nLana >= 0 Then
' Found at least one card
WScript.Echo "Setting " & sCardName & " from LANA " & nLana & " to 0."
sCommandLine = sCommandSet & " " & nLana & " 0"
WScript.Echo "Running '" & sCommandLine & "'"
RunAndCaptureOutput sCommandLine
else
WScript.Echo sNoCards
End If
WScript.Echo "Finshed."

'Build the full path name to a temp file
Function GetTempFileName
set WSHShell = WScript.CreateObject("Wscript.Shell")
set WSHSysEnv = WSHShell.Environment("Process")
sTempDir = WSHSysEnv("TEMP")
Set oFS = CreateObject("Scripting.FileSystemObject")
GetTempFileName = sTempDir & "\" & oFS.GetTempName
End Function

' Run a command and capture its output to an array
Function RunAndCaptureOutput(Cmd)
sTempFileName = GetTempFileName
set oShell = CreateObject("Wscript.Shell")
set oFS = CreateObject("Scripting.FileSystemObject")

'Run the command and pipe output to the temp file
sCommandline = "cmd /c " & Cmd & " >" & sTempFileName
WScript.Echo "Running '" & sCommandline & "'"
Run = oShell.Run(sCommandline, 0, True)

'Read the output into an array
i=0
Set oTempFile = oFS.OpenTextFile(sTempFileName)
While Not oTempFile.AtEndOfStream
'Should not modify global variable from subfunction
sOutput(i) = oTempFile.ReadLine
i=i+1
Wend
oTempFile.Close
oFS.DeleteFile sTempFileName
End Function

Additional query words:

======================================================================

James-Patrick Devitt

unread,
Apr 19, 2000, 3:00:00 AM4/19/00
to
thank you both. for asking the question correctly and now for providing the
answer!!!

"Nick Gage" <ni...@NOSPAM.COM> wrote in message
news:ONUu1UZp$GA....@cppssbbsa02.microsoft.com...

0 new messages