|
When you migrate Samba from NT4 to Windows 2000 (W2K) you may encounter some problems.
Windows 2000 Setup Requirements for Samba
Before Windovks 2000 can interact with Samba or any other client or server that uses
the NetBIOS protocol, it must be configured to run in compatibility mode. To do this,
vou must make sure your Windows 2000 system (server or workstation) has NetBIOS over
TCP/IP enabled. To enable this, log into the Windows 2000 system as an
administrator and follow these steps:
-
Right-Click My Network Places and select Properties. The Network and Dial-Up
Connections window will appear.
-
Select the local area connection for the Ethernet network that your Samba server
is
connected to. Right-Click and select Properties. The Local Area Connection
Properties dialog box will appear. Note that if you only have one local area
con-
nection, select it.
-
Highlight Internet Protocol (TCP/IP) and click Properties. The Internet Protocol
(TCP/IP) Properties dialog box will appear.
-
Click the Advanced button in this dialog box. The Advanced TCP/IP Settings
diadialog box will appear. Select the WINS tab.
-
Make sure that the Enable NetBIOS over TCP/IP radio button is selected and
click
OK. Close all other dialog boxes.
Commandline Tools to debug Samba and W2K
NBTSTAT
NBTSTAT displays protocol statistics and current TCP/IP
connections using NBT (NetBIOS over TCP/IP).
NBTSTAT [-a RemoteName] [-A IP address] [-c] [-n]
[-r] [-R] [-RR] [-s] [-S] [interval] ]
-a (adapter status) Lists the remote machine's name
table given its name
-A (Adapter status) Lists the remote machine's name
table given its IP address.
-c (cache)
Lists the global remote name cache
including the IP address
-C (cache)
Lists the remote name cache with
IP addresses on a per-devi
-n (names)
Lists local NetBIOS names.
-r (resolved) Lists names
resolved by broadcast and
via WINS
-R (Reload) Purges
and reloads the remote cache
name table
-S (Sessions) Lists sessions
table with the destination
IP addresses
-s (sessions) Lists sessions
table converting
destination IP addresses to host names
via the hosts file.
-RR (ReleaseRefresh) Sends Name Release packets to WINs
and then, starts Refresh
RemoteName Remote host machine name.
IP address Dotted decimal representation of the IP address.
interval Redisplays selected statistics, pausing
interval
seconds between each display. Press Ctrl+C to stop
redisplaying statistics.
C:\> nbtstat -r
NetBIOS Names Resolution and Registration Statistics
----------------------------------------------------
Resolved By Broadcast = 6
Resolved By Name Server = 0
Registered By Broadcast = 10
Registered By Name Server = 0
In this example, netbios name registration and resolution are performed by means of
broadcasts rather than by use of the name server (WINS).
C:\> nbtstat -n -A 193.247.121.196
NetBIOS Remote Machine Name Table
Name
Type Status
---------------------------------------------
RABBIT <00>
UNIQUE Registered
RABBIT <03>
UNIQUE Registered
RABBIT <20>
UNIQUE Registered
..__MSBROWSE__.<01> GROUP
Registered
AKADIA <00>
GROUP Registered
AKADIA <1B>
UNIQUE Registered
AKADIA <1D>
UNIQUE Registered
AKADIA <1E>
GROUP Registered
<00> Netbios name (RABBIT) on the Samba Server
<03> Messenger Service Name (RABBIT) on the Samba Server
<20> Name of the Server Service (RABBIT) on the Samba Server
<1B> RABBIT is a domain master browser for Subnet
193.247.121.240
<1D> RABBIT is a local master browser for Subnet 193.247.121.240
C:\> nbtstat -n -A 192.168.138.10
NetBIOS Remote Machine Name Table
Name
Type Status
---------------------------------------------
DORINT <00>
UNIQUE Registered
DORINT <20>
UNIQUE Registered
AKADIA <00>
GROUP Registered
INet~Services <1C> GROUP
Registered
DORINT <03>
UNIQUE Registered
AKADIA <1E>
GROUP Registered
IS~DORINT......<00> UNIQUE Registered
AKADIA <1D>
UNIQUE Registered
..__MSBROWSE__.<01> GROUP Registered
MAC Address = 00-10-5A-1D-A9-05
You can see, that the NT Server is a local master browser for Subnet 192.168.138.0.
C:\> nbtstat -n -A 192.168.138.17
NetBIOS Remote Machine Name Table
Name
Type Status
---------------------------------------------
SAPHIR <20>
UNIQUE Registered
SAPHIR <00>
UNIQUE Registered
AKADIA <00>
GROUP Registered
SAPHIR <03>
UNIQUE Registered
AKADIA <1E>
GROUP Registered
MAC Address = 00-50-DA-E0-04-74
C:\> nbtstat -S
NetBIOS Connection Table
Local Name State In/Out Remote
Host Input Output
-------------------------------------------------------------------
ARKUM <00> Connected Out
193.247.121.196 332KB 586KB
ARKUM <00> Connected Out
192.168.138.10
2KB 1KB
ARKUM <00> Connected Out
192.168.138.10 553KB 765KB
NETSTAT
The NETSTAT command can be used to diagnose the types of network connections made
between a Windows 2000 server and other clients on the network.
C:\> netstat
Active Connections
Proto Local Address Foreign
Address State
TCP
arkum:1025
localhost:1028 ESTABLISHED
TCP
arkum:1028
localhost:1025 ESTABLISHED
TCP
arkum:1371
localhost:1521 ESTABLISHED
TCP
arkum:1521
localhost:1371 ESTABLISHED
TCP
arkum:4457
rabbit.akadia.ch:22 ESTABLISHED
TCP
arkum:4465
rabbit.akadia.ch:80 CLOSE_WAIT
TCP
arkum:4579
rabbit.akadia.ch:143 ESTABLISHED
TCP
arkum:4586
rabbit.akadia.ch:nbsession ESTABLISHED
TCP
arkum:4590
dorint.akadia.ch:nbsession TIME_WAIT
TCP
arkum:4591
dorint.akadia.ch:nbsession ESTABLISHED
NET USE
The NET USE command can be used to connect to an disconnect from network resources.
C:\> net use p: \\193.247.121.196\homes /persistent:yes /yes
C:\> net use * \\192.168.138.10\mysource
C:\> net use
New connections will be remembered.
Status Local
Remote
Network
-----------------------------------------------------------------
OK G:
\\192.168.138.10\mysource Microsoft Windows Network
OK P:
\\193.247.121.196\homes Microsoft Windows Network
NET VIEW
The NET VIEW command can be used to display information about the NetBIOS servers and
services available on the network. For example, in its most basic form, this command
produces a list of all servers available
C:\> net view \\193.247.121.198
Shared resources at \\193.247.121.198
Samba 2.0.7 on opal
Share name Type Used
as Comment
-----------------------------------------------------------------
homes
Disk
Home Directory of zahn
printers
Print
All Printers
tmp
Disk
Temporary file space
zahn
Disk
Home Directory of zahn
There's another browseability test that looks for the browseable shares by workgroup
instead of by server. This command has the side effect of sometimes starting a Samba
browser election, which often enables Network Neighborhood browseability after 30
seconds. Here's the command, assuming the Samba server's workgroup is AKADIA.
C:\> net view /domain:AKADIA
Server Name
Remark
-----------------------------------------
\\ARKUM
|