1 / 38

File and Disk Sharing Protocols April 2, 2008 Richard Sharpe

File and Disk Sharing Protocols April 2, 2008 Richard Sharpe Senior Software Engineer | Data Robotics Wireshark Contributor SHARK FEST '08 Foothill College March 31 - April 2, 2008. Agenda. Disk serving/sharing protocols File serving/sharing protocols Ethereal issues.

stoker
Download Presentation

File and Disk Sharing Protocols April 2, 2008 Richard Sharpe

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SHARKFEST '08 | Foothill College | March 31 - April 2, 2008 File and Disk Sharing Protocols April 2, 2008 Richard Sharpe Senior Software Engineer | Data Robotics Wireshark Contributor SHARKFEST '08 Foothill College March 31 - April 2, 2008

  2. SHARKFEST '08 | Foothill College | March 31 - April 2, 2008 Agenda • Disk serving/sharing protocols • File serving/sharing protocols • Ethereal issues

  3. File Sharing or Disk Sharing • Network Oriented • Disk or File blocks?

  4. Disk Sharing Basics

  5. Disk Sharing Dimensions • How many Logical Units (LUNs) • Size of each LUN • Does the protocol restrict LUN size • Management • Storage protection • Mirroring or striping or P+Q • Provisioning • Do you back all advertised blocks with real blocks? • When do you alert user more storage is needed? • Mixed LUN sizes? • Shared access?

  6. Disk Sharing/Serving Protocols • Protocol • SCSI • ATA • Proprietary • Transport • USB • FireWire (IEEE1394) • Ethernet • FibreChannel and FibreChannel over Ethernet (FCoE) • Point-to-point cable (SATA, SAS, PATA, Parallel SCSI)

  7. SCSI Introduction • Parallel • 8, 16, and 32-bit cables • Terminators, LVDS, etc • Serial Attached SCSI • USB and FireWire • TCP/IP – ie, iSCSI • SCSI over FibreChannel • SCSI over Ethernet - HyperSCSI

  8. SCSI Standards Architecture www.t10.org/scsi-3.htm

  9. Original SCSI Model • Eight Phases • Bus Free • Arbitration • Selection • Reselection • Command (CDB) • Data • Message • Status

  10. SCSI Data Phases COMMAND • Target requests Command Descriptor Block (CDB) • 6, 10, 12, 16 or variable byte CDBs

  11. SCSI Data Phases, Command 10-Byte CDBs

  12. SCSI Data Phases, Command • 12-Byte CDBs • Provides for 6-byte LBAs • 32-bit transfer sizes • 16-Byte CDBs • Provides for 8-byte LBAs • 32-bit transfer sizes

  13. SCSI Data Phases • Data Transfer • Target requests transfer to or from initiator • Status • Target requests transfer of status to initiator • Message • Target can request transfer of messages • See www.t10.org, eg http://www.t10.org/ftp/t10/drafts/spc2/spc2r20.pdf

  14. USB Storage Details • SCSI over USB Bulk Only Transport • Command Block Wrapper • Wraps CDB (max 16-bytes) • Data in (to host) or data out (from host) • Command Status Wrapper • Wraps the status and residue • No sense data • See: http://www.usb.org/developers/devclass_docs/usbmassbulk_10.pdf

  15. Command Block Wrapper • Sent to Bulk endpoint by the host

  16. Command Status Wrapper • Sent on a Bulk In endpoint by the device

  17. Protocol Dissection Issues • Capture files? • Wireshark understands Linux usbmon captures • Request and response matching • Match data in or data out to requests • Conversations • Using the existing SCSI dissector

  18. Use the source • epan/dissectors/packet-usb-masstorage.c

  19. USB Storage Details

  20. ATA • Serial ATA • ATA over Ethernet (ATAoE) • SATA over FibreChannel • ATA over FireWire? • Why not, given Firewire extension to 3+Gbps?

  21. File Sharing Basics

  22. Create a file Delete a file Rename a file Open a file Read/write a file Lock portions of a file Change permissions Read/write file attributes Extend/truncate a file File Operations

  23. Further File Sharing Dimensions • One tree of files per server or a forest • Namespaces • Single network-wide namespace or one (or more) per server • Stateless vs Stateful • Access permission model • Sharing model • Locking • Caching mechanisms • Performance

  24. File Serving/Sharing Protocols • NFS • NFS v3 • NFS v4 • CIFS/SMB • NetWare • Parallel NFS • Andrew File System • PanFS

  25. NFS v3 • RFC1813 (http://www.faqs.org/rfcs/rfc1813.html) • Improvement of NFS v2 • Stateless • Operates over UDP and TCP • Server does not need to keep client-related state • File handles encapsulate state • Based on XDR and SunRPC • File attributes returned with most calls • Reduces number of calls and round trips

  26. NFS v3 continued • Locking protocol external to NFS v3 • NFS lock manager • Mount protocol separate

  27. NFS v4 • RFC3010 (http://www.faqs.org/rfcs/rfc3010.html) • Servers keep state • Operates over TCP and UDP • Open request establishes state • Lease based, with release on timeout • Compound operations • Locking • Caching and delegation

  28. CIFS/SMB • Originally NetBEUI • Over Ethernet Frame Protocol • Server Message Block protocol • Renamed CIFS in 1996 • State based • TCP connection oriented • NetBIOS header • Forest of trees • Shares are the point of access

  29. CIFS/SMB continued • Sharing defined in the protocol • Read/Write/Delete specified at file open time • Locking part of the protocol • Ranges of bytes can be locked for reading/writing • Client caching protocol part of the protocol • OpLock based (callbacks)

  30. CIFS/SMB Packets Request/Response Protocol • Basic Header fields repeated in request and response • Makes response matching relatively simple

  31. CIFS/SMB Header

  32. packet-smb.c • Now look at the source code • epan/dissectors/packet-smb.c

  33. NetWare • Based on XNS • Internet Packet Exchange Protocol – IPX • Network layer - connectionless • Sequenced Packet Exchange – SPX • Transport protocol – connection oriented • Service Advertisement Protocol • Very popular at one time

  34. Parallel NFS • Extension to NFSv4 (http://www.pnfs.com/) • Allows direct, parallel, access to storage devices • Provides clients with layout information

  35. Andrew File System

  36. PanFS

  37. These Protocols and Ethereal • Protocol dissectors reusable • Capture formats can inject any packet types • Eg, SCSI over FC over Ethernet • State keeping

  38. Problems • More capture file format need to be included • Especially for proprietary tools • USB sniffers • FireWire sniffers • Other sniffer products

More Related