Explain to me Net Bios Names!
-
I need to understand Net Bios Names please. A static NetBIOS name mapping consists of a NetBIOS name from 1 - 15 characters, a name type from 0 - 255, and a corresponding IP address. TAS resolves a NetBIOS name by first searching the list of static NetBIOS names and, failing that, broadcasting a query for the desired name. Augment name resolution to effectively cross routers by using the Enterprise Name Service or Windows Internet Naming Service. Best Wishes, ez_way
-
I need to understand Net Bios Names please. A static NetBIOS name mapping consists of a NetBIOS name from 1 - 15 characters, a name type from 0 - 255, and a corresponding IP address. TAS resolves a NetBIOS name by first searching the list of static NetBIOS names and, failing that, broadcasting a query for the desired name. Augment name resolution to effectively cross routers by using the Enterprise Name Service or Windows Internet Naming Service. Best Wishes, ez_way
Hi Look at this http://www.microsoft.com/windows2000/en/server/help/default.asp?url=/windows2000/en/server/help/sag\_TCPIP\_und\_nr\_NetBIOS.htm and http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q163/4/09.asp&NoWebContent=1 It will say the story. Best Regards, A.Ilamparithi
-
Hi Look at this http://www.microsoft.com/windows2000/en/server/help/default.asp?url=/windows2000/en/server/help/sag\_TCPIP\_und\_nr\_NetBIOS.htm and http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q163/4/09.asp&NoWebContent=1 It will say the story. Best Regards, A.Ilamparithi
Thanks will seek the url's now! Here what I have so far from an article in 1995 for the last two digit sufix. Thanks again Name Number(h) Type Usage -------------------------------------------------------------------------- 00 U Workstation Service 01 U Messenger Service <\\--__MSBROWSE__> 01 G Master Browser 03 U Messenger Service 06 U RAS Server Service 1F U NetDDE Service 20 U File Server Service 21 U RAS Client Service 22 U Microsoft Exchange Interchange(MSMail Connector) 23 U Microsoft Exchange Store 24 U Microsoft Exchange Directory 30 U Modem Sharing Server Service 31 U Modem Sharing Client Service 43 U SMS Clients Remote Control 44 U SMS Administrators Remote Control Tool 45 U SMS Clients Remote Chat 46 U SMS Clients Remote Transfer 4C U DEC Pathworks TCPIP service on Windows NT 42 U mccaffee anti-virus 52 U DEC Pathworks TCPIP service on Windows NT 87 U Microsoft Exchange MTA 6A U Microsoft Exchange IMC BE U Network Monitor Agent BF U Network Monitor Application 03 U Messenger Service 00 G Domain Name 1B U Domain Master Browser 1C G Domain Controllers 1D U Master Browser 1E G Browser Service Elections 1C G IIS 00 U IIS [2B] U Lotus Notes Server Service IRISMULTICAST [2F] G Lotus Notes IRISNAMESERVER [33] G Lotus Notes Forte_$ND800ZA [20] U
-
Hi Look at this http://www.microsoft.com/windows2000/en/server/help/default.asp?url=/windows2000/en/server/help/sag\_TCPIP\_und\_nr\_NetBIOS.htm and http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q163/4/09.asp&NoWebContent=1 It will say the story. Best Regards, A.Ilamparithi
Good information now may I ask a few question please. In the following URL http://www.microsoft.com/windows2000/en/server/help/default.asp?url=/windows2000/en/server/help/sag\_TCPIP\_und\_nr\_NetBIOS.htm I found in part the following> Gateway Server Service Computers running Windows 2000 are B-node by default and become H-node when they are configured with a WINS server. Windows 2000 can also use a local database file called Lmhosts to resolve remote NetBIOS names. The Lmhosts file is stored in the systemroot\System32\Drivers\Etc folder. For more information, see TCP/IP database files I am running XP Home and have found the following information. Under windows/system32/drivers/etc file name type host file host.ics ics file imhost.sam sam networks file quotes file services file protocols file I am not using wins server so I might assume I am running in B-Mode. How does one know which mode one is running in? How does one retrieve the type of protocol any computer might be running? How do I retrieve the netbios name for any computer. Once this is done may I get the MAC address by polling with the netbios name? Best Wishes, ez_way
-
Good information now may I ask a few question please. In the following URL http://www.microsoft.com/windows2000/en/server/help/default.asp?url=/windows2000/en/server/help/sag\_TCPIP\_und\_nr\_NetBIOS.htm I found in part the following> Gateway Server Service Computers running Windows 2000 are B-node by default and become H-node when they are configured with a WINS server. Windows 2000 can also use a local database file called Lmhosts to resolve remote NetBIOS names. The Lmhosts file is stored in the systemroot\System32\Drivers\Etc folder. For more information, see TCP/IP database files I am running XP Home and have found the following information. Under windows/system32/drivers/etc file name type host file host.ics ics file imhost.sam sam networks file quotes file services file protocols file I am not using wins server so I might assume I am running in B-Mode. How does one know which mode one is running in? How does one retrieve the type of protocol any computer might be running? How do I retrieve the netbios name for any computer. Once this is done may I get the MAC address by polling with the netbios name? Best Wishes, ez_way
Hi, Have a look at this site... http://www.inetcat.org/software/nbtscan.html I think it will answer ur questions. Best Regards, A.Ilamparithi
-
Hi, Have a look at this site... http://www.inetcat.org/software/nbtscan.html I think it will answer ur questions. Best Regards, A.Ilamparithi
Will using UuidCreateSequential_t return the correct MAC address? GUID uuid; typedef RPC_STATUS (CALLBACK* UuidCreateSequential_t)(UUID*);
-
Will using UuidCreateSequential_t return the correct MAC address? GUID uuid; typedef RPC_STATUS (CALLBACK* UuidCreateSequential_t)(UUID*);
hi check this one out.... // GetMACUuid.cpp : Defines the entry point for the console application. // // Author: Khalid Shaikh [Shake@ShakeNet.com] // Date: April 5th, 2002 // // This program fetches the MAC address of the localhost by creating a UUID // and obtaining the IP address through that // // Prewindows 2000 one should replace the function below // UuidCreateSequential with UuidCreate // Microsoft decided that it was not wise to put the MAC address in the UUID // hence changed the algorithm in Windows 2000 and later to not include it. // // Supported in Windows NT/2000/XP // Supported in Windows 95/98/Me // // Supports single NIC card. #include "stdafx.h" #include #include #include #pragma comment(lib, "rpcrt4.lib") // Prints the MAC address stored in a 6 byte array to stdout static void PrintMACaddress(unsigned char MACData[]) { printf("MAC Address: %02X-%02X-%02X-%02X-%02X-%02X\n", MACData[0], MACData[1], MACData[2], MACData[3], MACData[4], MACData[5]); } // Fetches the MAC address and prints it static void GetMACaddress(void) { unsigned char MACData[6]; UUID uuid; UuidCreateSequential( &uuid ); // Ask OS to create UUID for (int i=2; i<8; i++) // Bytes 2 through 7 inclusive are MAC address MACData[i - 2] = uuid.Data4[i]; PrintMACaddress(MACData); // Print MAC address } int _tmain(int argc, _TCHAR* argv[]) { GetMACaddress(); // Obtain MAC address of adapters return 0; } Best Regards, A.Ilamparithi
-
I need to understand Net Bios Names please. A static NetBIOS name mapping consists of a NetBIOS name from 1 - 15 characters, a name type from 0 - 255, and a corresponding IP address. TAS resolves a NetBIOS name by first searching the list of static NetBIOS names and, failing that, broadcasting a query for the desired name. Augment name resolution to effectively cross routers by using the Enterprise Name Service or Windows Internet Naming Service. Best Wishes, ez_way
I'm not sure exactly what you're trying to accomplish but I'm familiar with NetBios names. It sounds like you're overcomplicating it! But isn't that usually the case? ;) A Netbios name is basically just the short name of a computer, whereas the DNS name includes the short name plus the domain suffix's. For example, if your computer name is BOB and you're in the Microsoft domain, then your Netbios name is "BOB" and your fully qualified DNS hostname would be bob.microsoft.com. If you go to a command prompt and enter "hostname", it will return your NetBios name. You can use "nbtstat -c" to view a list of Netbios names that are in your local cache. Throw a "/?" switch to see how to refresh, clear, and reload your Netbios cache. When a computer starts up, it will typically attempt to fill your cache with netbios names that is needed to map drives, log into domains, run login scripts, locate exchange servers on the LAN etc., first through your local cache (LMHOST), then WINS (which is nothing more than a Netbios to IP name resolver), router tables if they're set up for it, and then by broadcasting. This is how networks are usually set up by default and where the node types come into play. You can modify the node type (broadcast, hybrid, etc.) to tell your computer in which order you'd like to resolve Netbios names and/or whether or not you want to use those various methods of resolution. As long as DNS is set up properly, there should be no need to modify the LMHOST file on a workstation. The only time you should need to modify this file is in cases between two domain controllers where you've established a trust relationship, or for "tricking" a workstation into locating specific domain controllers for authentication to an NT domain (or Active Directory" by hardcoding it into the local cache for purposes of load balancing. Or if WINS is hosed, or your router tables are refreshing too quickly, etc., but again, on a well-planned network, you shouldn't need to make adjustments to the LMHOST file and doing so can result in an maintenance nightmare for network administrators. They'll sometimes use this file to get someone connected to a network resource as a quick-fix, rather than correcting the source of the problem, which will usually lead to even more problems later. Hope that helps. If I can answer anything more specific, let me know. Cheers, Don
-
I'm not sure exactly what you're trying to accomplish but I'm familiar with NetBios names. It sounds like you're overcomplicating it! But isn't that usually the case? ;) A Netbios name is basically just the short name of a computer, whereas the DNS name includes the short name plus the domain suffix's. For example, if your computer name is BOB and you're in the Microsoft domain, then your Netbios name is "BOB" and your fully qualified DNS hostname would be bob.microsoft.com. If you go to a command prompt and enter "hostname", it will return your NetBios name. You can use "nbtstat -c" to view a list of Netbios names that are in your local cache. Throw a "/?" switch to see how to refresh, clear, and reload your Netbios cache. When a computer starts up, it will typically attempt to fill your cache with netbios names that is needed to map drives, log into domains, run login scripts, locate exchange servers on the LAN etc., first through your local cache (LMHOST), then WINS (which is nothing more than a Netbios to IP name resolver), router tables if they're set up for it, and then by broadcasting. This is how networks are usually set up by default and where the node types come into play. You can modify the node type (broadcast, hybrid, etc.) to tell your computer in which order you'd like to resolve Netbios names and/or whether or not you want to use those various methods of resolution. As long as DNS is set up properly, there should be no need to modify the LMHOST file on a workstation. The only time you should need to modify this file is in cases between two domain controllers where you've established a trust relationship, or for "tricking" a workstation into locating specific domain controllers for authentication to an NT domain (or Active Directory" by hardcoding it into the local cache for purposes of load balancing. Or if WINS is hosed, or your router tables are refreshing too quickly, etc., but again, on a well-planned network, you shouldn't need to make adjustments to the LMHOST file and doing so can result in an maintenance nightmare for network administrators. They'll sometimes use this file to get someone connected to a network resource as a quick-fix, rather than correcting the source of the problem, which will usually lead to even more problems later. Hope that helps. If I can answer anything more specific, let me know. Cheers, Don
Wow! Great information! Thank is just what I needed. Microsoft White Paper 1999 shows that you must pad the NetBiosName to length of 20 excluding a \0 Show I ran nbtstat -n on my new HP and it returned the following. Local Area Connection: Node IpAddress: [68.116.126.8] Scope Id: [] NetBIOS Local Name Table Name Type Status --------------------------------------------- HP2003 <00> UNIQUE Registered HP2003 <20> UNIQUE Registered WORKGROUP <00> GROUP Registered WORKGROUP <1E> GROUP Registered WORKGROUP <1D> UNIQUE Registered ..__MSBROWSE__.<01> GROUP Registered So what is the proper way to obtain the MAC address of a system? may I get the MAC address by?: In the fine codeproject article "Get MAC Address" by Ryszard Krakowiak http://www.codeproject.com/internet/getmac.asp?target=MAC shows in part: typedef struct _ASTAT_ { ADAPTER_STATUS adapt; NAME_BUFFER NameBuff[30]; } ASTAT, * PASTAT; CString GetMacAddress(CString sNetBiosName) { ASTAT Adapter; NCB ncb; UCHAR uRetCode; memset(&ncb, 0, sizeof(ncb)); ncb.ncb_command = NCBRESET; ncb.ncb_lana_num = 0; uRetCode = Netbios(&ncb); memset(&ncb, 0, sizeof(ncb)); ncb.ncb_command = NCBASTAT; ncb.ncb_lana_num = 0; sNetBiosName.MakeUpper(); FillMemory(ncb.ncb_callname, NCBNAMSZ - 1, 0x20); strcpy((char *)ncb.ncb_callname, (LPCTSTR) sNetBiosName); ncb.ncb_callname[sNetBiosName.GetLength()] = 0x20; ncb.ncb_callname[NCBNAMSZ] = 0x0; ncb.ncb_buffer = (unsigned char *) &Adapter; ncb.ncb_length = sizeof(Adapter); uRetCode = Netbios(&ncb); CString sMacAddress; if (uRetCode == 0) { sMacAddress.Format(_T("%02x%02x%02x%02x%02x%02x"), Adapter.adapt.adapter_address[0], Adapter.adapt.adapter_address[1], Adapter.adapt.adapter_address[2], Adapter.adapt.adapter_address[3], Adapter.adapt.adapter_address[4], Adapter.adapt.adapter_address[5]); } return sMacAddress; } where another fine article uses the GUID for obtaining the MAC address. CString CTinyMacDlg::TryMac() { CString strReturn; GUID uuid; // In Win2k or higher, CoCreateGuid no longer returns a mac address, but UuidCreate // Sequential does. typedef RPC_STATUS (CALLBACK* Uuid
-
Wow! Great information! Thank is just what I needed. Microsoft White Paper 1999 shows that you must pad the NetBiosName to length of 20 excluding a \0 Show I ran nbtstat -n on my new HP and it returned the following. Local Area Connection: Node IpAddress: [68.116.126.8] Scope Id: [] NetBIOS Local Name Table Name Type Status --------------------------------------------- HP2003 <00> UNIQUE Registered HP2003 <20> UNIQUE Registered WORKGROUP <00> GROUP Registered WORKGROUP <1E> GROUP Registered WORKGROUP <1D> UNIQUE Registered ..__MSBROWSE__.<01> GROUP Registered So what is the proper way to obtain the MAC address of a system? may I get the MAC address by?: In the fine codeproject article "Get MAC Address" by Ryszard Krakowiak http://www.codeproject.com/internet/getmac.asp?target=MAC shows in part: typedef struct _ASTAT_ { ADAPTER_STATUS adapt; NAME_BUFFER NameBuff[30]; } ASTAT, * PASTAT; CString GetMacAddress(CString sNetBiosName) { ASTAT Adapter; NCB ncb; UCHAR uRetCode; memset(&ncb, 0, sizeof(ncb)); ncb.ncb_command = NCBRESET; ncb.ncb_lana_num = 0; uRetCode = Netbios(&ncb); memset(&ncb, 0, sizeof(ncb)); ncb.ncb_command = NCBASTAT; ncb.ncb_lana_num = 0; sNetBiosName.MakeUpper(); FillMemory(ncb.ncb_callname, NCBNAMSZ - 1, 0x20); strcpy((char *)ncb.ncb_callname, (LPCTSTR) sNetBiosName); ncb.ncb_callname[sNetBiosName.GetLength()] = 0x20; ncb.ncb_callname[NCBNAMSZ] = 0x0; ncb.ncb_buffer = (unsigned char *) &Adapter; ncb.ncb_length = sizeof(Adapter); uRetCode = Netbios(&ncb); CString sMacAddress; if (uRetCode == 0) { sMacAddress.Format(_T("%02x%02x%02x%02x%02x%02x"), Adapter.adapt.adapter_address[0], Adapter.adapt.adapter_address[1], Adapter.adapt.adapter_address[2], Adapter.adapt.adapter_address[3], Adapter.adapt.adapter_address[4], Adapter.adapt.adapter_address[5]); } return sMacAddress; } where another fine article uses the GUID for obtaining the MAC address. CString CTinyMacDlg::TryMac() { CString strReturn; GUID uuid; // In Win2k or higher, CoCreateGuid no longer returns a mac address, but UuidCreate // Sequential does. typedef RPC_STATUS (CALLBACK* Uuid
Are you trying to do this programmatically or do you just want to find out the MAC address of your network adapter? I haven't done this programmatically but the first one looks like the best solution, which was basically just copied from this Microsoft link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netbios/netbios_8d82.asp[^] Note that a MAC address is specific to a network adapter and not the system itself, so if you have more than one NIC, you'll have more than one MAC address, so you'll want to make sure that you're obtaining the correct one and it could change should someone replace the NIC. If you're just looking for a MAC address on your computer, from a command prompt, type "ipconfig /all" and it will list information for all of your NIC's. The MAC address is the "Physical Address". Cheers, Don
-
Are you trying to do this programmatically or do you just want to find out the MAC address of your network adapter? I haven't done this programmatically but the first one looks like the best solution, which was basically just copied from this Microsoft link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netbios/netbios_8d82.asp[^] Note that a MAC address is specific to a network adapter and not the system itself, so if you have more than one NIC, you'll have more than one MAC address, so you'll want to make sure that you're obtaining the correct one and it could change should someone replace the NIC. If you're just looking for a MAC address on your computer, from a command prompt, type "ipconfig /all" and it will list information for all of your NIC's. The MAC address is the "Physical Address". Cheers, Don
Ok great I am trying to do it programmatically so I will continue with your great advice. Thanks for helping me, I thank you so much! Marty Best Wishes and Happy Turkey Day, ez_way