Hi all. I'm having a problem connecting to a Windows share from an
MS-DOS client. This may not even be possible due to restriction in
the NetBIOS / SMB protocols, however here is my goal: I want to
connect to the Windows machine via an LMHOSTS alias instead of using
the Windows box's actual hostname.

To give some context, I am developing a self-contained demo
environment for my employer's software product using VMware. To this
end, I've created a virtual network which works quite nicely. VMware
was kind enough to include PXE boot functionality in the latest
release of VMware Workstation (4.5), so we can now demonstrate our
bare-metal provisioning solution using a single laptop. This is where
DOS (MS-DOS 6.22) comes into play.

At this point, everything is working beautifully, including PXE boot,
OS provisioning, VMware, DOS-to-Windows networking, etc. However, we
are unable to rename our demo laptops after burning an image. Doing
so (changing the laptop's hostname, that is) requires that we also
reconfigure our provisioning solution to use the new hostname. This
is not fantastically difficult, however I do not particularly like the
inflexibility it introduces. Additionally, maintenance becomes
difficult in that we are not consistent.

My question, then, is as follows: Is it possible to access a remote
Windows share from a LANMAN 2.0 client (such as MS-DOS 6.22) using an
alias which is NOT the target host's actual hostname? I've added an
entry to the local LMHOSTS file which does get me to the point of
opening a socket and attempting communication. However, I then get a
"called name not present" from the server.

Does anyone have ideas or suggestions? Is there some special way I
can construct the "net use" command to get around this? Or perhaps a
server setting (Windows 2003) which will tell it to respond to the
alias I've created?

Here is a very brief network capture from Ethereal:

--

No. Time Source Destination
Protocol Info
12 5.746180 192.168.65.101 192.168.65.1 TCP
38700 > netbios-ssn [SYN] Seq=0 Ack=0 Win=1450 Len=0 MSS=1450
13 5.746211 192.168.65.1 192.168.65.101 TCP
netbios-ssn > 38700 [SYN, ACK] Seq=0 Ack=1 Win=17640 Len=0 MSS=1260
14 5.750980 192.168.65.101 192.168.65.1 TCP
38700 > netbios-ssn [ACK] Seq=1 Ack=1 Win=1450 Len=0
16 5.753518 192.168.65.101 192.168.65.1 NBSS
Session request, to R51-VMNET<20> from INSTALL-10161<00>
17 5.753576 192.168.65.1 192.168.65.101 NBSS
Negative session response, Called name not present
18 5.755810 192.168.65.101 192.168.65.1 TCP
38700 > netbios-ssn [ACK] Seq=73 Ack=7 Win=1445 Len=0

--

I've weeded out domain browser announcements, etc., and have shown
only the connection and session setup attempt from the LANMAN 2.0
client (MS-DOS 6.22). It does not need nameservice, as its local
LMHOSTS file has the IP. So, it opens a socket and requests a
session, but the server returns a negative response because "Called
name not present".

--

Thanks for any help,

Damon