Re: computer name length issue

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



George wrote:
Hello everyone,

Any macro used to represent computer name max length (just host name max length itself, not full-qualified with domain suffix, for example, I just want host name "somehost" in example.com domain, but not "somehost.example.com")?

http://msdn.microsoft.com/en-us/library/ms724301(VS.85).aspx

MAX_COMPUTERNAME_LENGTH is too small and just 15 characters.

thanks in avdance,
George

This length is reflective of the old NETBIOS computer name which was 8 characters, 15 on then newer Windows OSes.

Anything beyond that is using internet domains and the netbios name is not necessarily the subdomain.

For example I can have a computer name as XYZ. That doesn't mean the computer automatically has domain name as xyz.example.com. That is established by DNS A/PTR/CNAME records.

However, what Microsoft did a long time ago when they finally added Internet (TCP/IP networking) support over its NETBIOS based LAN support, was WINS (Windows Internet Names Server) which ties the IP address of the machine with the netbios computer name.

Anyway, you have to live with the fact that Computer Names are historically limited, 8 to true "All safe" limit. Not all software will support more than that. To expect more, you can get into bugse. But I think today, using 15 is pretty safe. Just don't be surprise if you use 15 or more that OTHER software will work.

Alsoremember, NETBIOS names are not the same as internet sub-domains. That is only TRUE when the network administrator has made it that way via DNS and WINS.

For example, suppose you have a computer called MYCOMPUTER123, in DNS, you can create a A record for the same computer

123.123.123.123 A ThisIsMyComputer123.example.com

and its a sub-domain of a real internet subdomain, however, MYCOMPUTER123.example.com is not, unless your network person adds an A record too for it:

123.123.123.123 A MyComputer123.example.com

In short, if you want the real sub-domain, you need to

A) Get the IP address for the machine
B) Perform a PTR record lookup to obtain all the A records

Help this provides such insight into this.

Windows Socket layer, if I remember off hand, will return the computer name if there are not domain names for it. But that logic has changed over the the years depending on what OS you have. Windows also characters depending on how the network is setup.

This is why, IMO, it is safer to use DNS (be a DNS client) to resolve IP and domains names on a machine.

--

.



Relevant Pages

  • Re: Non-domain connection problem
    ... For some reason the DNS is persistent. ... connect new PC to the internet from the non-domain network: ... In server 2000 gpoedit.msc showed them but in SBS it is different. ...
    (microsoft.public.windows.server.sbs)
  • Re: How do my server 2003 (DNS) know the Internet?
    ... The Multihomed function is not for Internet access. ... has an ip of 156.40.10.10 for that network. ... It is due to a number of reasons, mainly DNS registration of both NICs, whereas you do not want that. ... It's highly recommended to single home all DCs and use a non-DC for the multihoming purposes. ...
    (microsoft.public.windows.server.dns)
  • Re: Non-domain connection problem
    ... You said that you "hard coded the DNS server to a known DNS on the internet: ... Connect to Internet from Internal Network ... NSLOOKUP always looks for the SBS as the default gateway. ...
    (microsoft.public.windows.server.sbs)
  • Re: ISA 2006 Basic Configuration
    ... Why would we point Preferred DNS to itself? ... Configuring the Internal Network Interface ... In the Internet Protocol Properties dialog box, ... Select the Use the following DNS server addresses option. ...
    (microsoft.public.isa.configuration)
  • Re: IE cant connect to any sites
    ... On the General tab in the Temporary Internet Files Folder, ... Click on "LAN Settings" and make sure everything is blank, ... Network settings ... IP address automatically", click on the DNS tab, disable DNS here, click ...
    (microsoft.public.windows.inetexplorer.ie6.browser)