Before we close this chapter, let's take a look at a simple SMB connection. This is some pretty technical data - which isn't really necessary to administer Samba - so you can skip over it if you like. We present this information largely as a way to help you get familiar with how the SMB protocol negotiates connections with other computers on the network.
There are four steps that the client and server must complete in order to establish a connection to a resource:
-
Establish a virtual connection.
-
Negotiate the protocol variant to speak.
-
Set session parameters.
-
Make a tree connection to a resource.
We will examine each of these steps through the eyes of a useful tool that we mentioned earlier: the modified
tcpdump that is available from the Samba web site.
You can download this program at
samba.org in the
samba/ftp/tcpdump-smb directory; the latest version as of this writing is 3.4-5. Use this program as you would use the standard
tcpdump application, but add the
-s 1500
switch to ensure that you get the whole packet and not just the first few bytes.