Gaiseric Vandal
2011-Mar-02 20:30 UTC
[Samba] can connect to 2 samba servers by name but to one by IP only
(This is a follow up on an earlier post but I have tried to summarize a little better.) I am having problems connecting to one samba server by host name (e.g "net use \\servername" or via windows explorer) over IPSec VPN. I can connect via "net use \\IPADDRESS." For every other Samba or Windows server I can connect via host name. The problem host is the Samba PDC running Samba 3.4.7 on Solaris 10. I use sonicwall VPN client which has a "virtual" nic, which gets an IP address (including DNS and wins server info) from the company DHCP server, and on the same subnet as the servers and other machines on the network. All servers are listed in DNS- I can resolve them with ping and nslookup. If I update lmhosts on my PC, I can use "net use \\pdc1." This suggests that XP is NOT using DNS to resolve host name for this host. But that doesn't make sense, since every other host can be accessed by name. "nbtstat -r" ("Lists names resolved by broadcast and via WINS") only shows the other xp machine on my home network, not any of the machines on the company network, so I am pretty sure I am not resolving server names via broadcast or wins. Updating hosts file on my XP machine doesn't help either. WINS does not seem to work over the VPN if if a WINS server IP address to assigned to the client (I submitted a separated post on this.) It also should not matter how the server resolves hostnames. However, that is the only variable I can think of at this point. Maybe for most client-to-server name lookups DNS works fine (and therefore works whether the client is on the LAN or connecting via VPN.) However, maybe for this one server only WINS or LMHOSTS works, and since WINS traffic seems to be blocked by the VPN I am left with LMHOSTS as the only option. I ran snoop on my samba servers to capture Ethernet packets between the remote XP machine and the samba servers. It does show that the With a successful connection: The client sends what appears to be an empty SMB packet to the server on port 445 SMB: ----- SMB: ----- SMB: SMB: "" SMB: The server responds with a similar packet, then the client starts sending more information to the server e.g. NBT: ----- NBT Header ----- NBT: NBT: Type = SESSION MESSAGE NBT: Length = 133 bytes NBT: SMB: ----- SMB Header ----- SMB: SMB: CLIENT REQUEST SMB: Command code = 0x72 SMB: Command name = SMBnegprot SMB: SMB: SMB Status: SMB: - Error class = No error SMB: - Error code = No error SMB: SMB: Header: SMB: - Tree ID (TID) = 0x0000 SMB: - Process ID (PID) = 0xfeff SMB: - User ID (UID) = 0x0000 SMB: - Multiplex ID (MID) = 0x0000 SMB: - Flags summary = 0x18 SMB: - Flags2 summary = 0xc853 SMB: SMB: ByteCount = 98 SMB: Dialect String = PC NETWORK PROGRAM 1.0 SMB: Dialect String = LANMAN1.0 SMB: Dialect String = Windows for Workgroups 3.1a SMB: Dialect String = LM1.2X002 SMB: Dialect String = LANMAN2.1 SMB: Dialect String = NT LM 0.12 SMB: However which a failed connection, it looks like the client sends the empty SMB packet, the server does respond with an empty SMB packet, but then the client just sends another empty SMB packet. I am stumped. I appreciate any advice.