I found a lot of messages in the topic of "how to configurate the
NetBIOS LANA assigment under Win XP". Usually you need this for old
DOS programs, becouse they use LANA 0 as default. And it seems that
nobody can give a good answare.
The background of the problem
-----------------------------
From this article: NetBIOS LANA Numbers
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netbios/netbios_91mb.asp
Many MS-DOS – based applications sent all their requests to LANA 0
The NetBIOS LANA number identifies the transport driver, network
interface card (NIC) driver, and adapter that will be used to send and
receive NetBIOS packets. This is known as the network route.
The IBM NetBIOS 3.0 specification supports only two LANA numbers,
because NetBEUI was originally the only protocol that supported
NetBIOS, and a computer could contain only two network adapters at
that time. Specifying LANA 0 directed a command to the first adapter,
and specifying LANA 1 directed a command to the second adapter.
Windows NT/Windows 2000/Windows XP enables NetBIOS to use transport
protocols other than NetBEUI. Therefore, Microsoft has extended the
meaning of a LANA number to indicate a specific transport protocol on
a specific adapter. For example, if you have two network adapters, and
have three transport protocols installed, you have six LANA numbers.
The LANA numbers are not necessarily sequential.
Zero might map to IPX/SPX on the first adapter, three might map to a
different protocol on a second adapter, and so on.
Windows 2000/XP: You cannot configure LANA numbers on these platforms.
!!!
--
So, Microsoft says it is imposible, but that's not true ;)
We had a problem, when we want to use the NetBIOS over IPX/SPX on XP
that assigned to LANA 0.
We discover two method, to how to do this ANYWAY.
1) I found that the XP use some "autoconfig algorithm" to assign the
LANA numbers. When you add/remove protocols and enable/disable netbios
(maybe the order is the important thing) that could force the XP to go
over the assignments. I had attached a little program, and with that
you can checking the living LANA numbers after every trying. And when
you have NetBIOS over IPX/SPX assigned to LANA 0 then stop, and bingo.
This state is stay permanent after reboot too !
2) In the Windows registry there are entries called LanaMap ,here
stores the XP the LANA assigments.
here is a solution from Taki to our problem:
1. Run the regedit.
2. Find the LanaMap entries 3 or 4
3. Change the value to this:
0000 01 00 01 01 00 02 00 03
0008
4. Restart the XP.
5. Tha LANA 0 changed to the desired Netbios.
--
//
// This is a small C program to check the living/binded LANA number
assigments
//
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
#include <Nb30.h>
BOOL NBReset (int, int, int);
void main ()
{
printf("\nTesting LANA from 0-6, (return code 0 means success)\n\n");
NBReset (0, 20, 30);
NBReset (1, 20, 30);
NBReset (2, 20, 30);
NBReset (3, 20, 30);
NBReset (4, 20, 30);
NBReset (5, 20, 30);
NBReset (6, 20, 30);
}
BOOL NBReset (int nLana, int nSessions, int nNames)
{
NCB ncb;
memset (&ncb, 0, sizeof (ncb));
ncb.ncb_command = NCBRESET;
ncb.ncb_lsn = 0; // Allocate new lana_num resources
ncb.ncb_lana_num = nLana;
ncb.ncb_callname[0] = nSessions; // maximum sessions
ncb.ncb_callname[2] = nNames; // maximum names
Netbios (&ncb);
printf(". LANA:%d status = %d \n\n",nLana,ncb.ncb_retcode);
return (NRC_GOODRET == ncb.ncb_retcode);
}
>>> peter
--
"No trees were killed in the sending of this message.
However a large number of electrons were terribly inconvenienced."
C:\>cl /TcLanaLook.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.00.9466 for 80x86
Copyright (C) Microsoft Corporation 1984-2001. All rights reserved.
LanaLook.c
Microsoft (R) Incremental Linker Version 7.00.9466
Copyright (C) Microsoft Corporation. All rights reserved.
/out:LanaLook.exe
LanaLook.obj
LanaLook.obj : error LNK2019: unresolved external symbol _Netbios@4
referenced in function _NBReset
LanaLook.exe : fatal error LNK1120: 1 unresolved externals
Any ideas?
"Peter Balla" <bal...@ibcnet.hu> wrote in message
news:c731af9b.02101...@posting.google.com...
> hello,
>
> I found a lot of messages in the topic of "how to configurate the
> NetBIOS LANA assigment under Win XP". Usually you need this for old
> DOS programs, becouse they use LANA 0 as default. And it seems that
> nobody can give a good answare.
>
> The background of the problem
> -----------------------------
>
> From this article: NetBIOS LANA Numbers
>
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netbios/net
bios_91mb.asp
>
> Many MS-DOS - based applications sent all their requests to LANA 0
#pragma comment(lib, "Netapi32.lib")
Steve
"Steve Walcher" <stevew...@hotmail.com> wrote in message
news:#7AVh$FhCHA.2672@tkmsftngp09...