370 likes | 463 Views
Lecture 16 Networking. xlanchen@06/10/2005. Content. The OSI Reference Model Networking APIs Network-Resource Name Resolution Protocol Drivers NDIS Drivers Binding Layered Network Services. The OSI Reference Model. Open Systems Interconnection (OSI) reference model 7 layers
E N D
Lecture 16 Networking xlanchen@06/10/2005
Content • The OSI Reference Model • Networking APIs • Network-Resource Name Resolution • Protocol Drivers • NDIS Drivers • Binding • Layered Network Services Understanding the Inside of Windows2000
The OSI Reference Model • Open Systems Interconnection (OSI) reference model • 7 layers • An idealized scheme Understanding the Inside of Windows2000
2K Networking Components • Networking APIs • protocol-independent • Transport Driver Interface (TDI) clients • kernel-mode device drivers • TDI transports • kernel-mode protocol drivers • NDIS library • Ndis.sys • NDIS miniport drivers Understanding the Inside of Windows2000
Networking APIs • Named pipes and mailslots • Windows Sockets (Winsock) • Remote procedure call (RPC) • Common Internet File System (CIFS) • NetBIOS Understanding the Inside of Windows2000
Named Pipes and Mailslots • Named pipes • Provide reliable bidirectional communications • Mailslots • Provide unreliable unidirectional data transmission • Support broadcast capability Understanding the Inside of Windows2000
Named pipe communications • \\Server\Pipe\PipeName | | | a unique name | | | (can include subdirectories) | | “Pipe” | the computer • Example: \\MyComputer\Pipe\MyServerApp\ConnectionPipe Understanding the Inside of Windows2000
Named Pipe Operation • CreateNamedPipe • A pope operates in byte mode or message mode • ConnectNamedPipe • synchronously or asynchronously • CreateFile or CallNamedPipe • ReadFile and WriteFile (Win32 Func) Establish the connection Understanding the Inside of Windows2000
Mailslot Operation • Name: \\Server\MailSlot\MailSlotName • Func: CreateMailSlot, ReadFile; CreateFile, WriteFile • Message size < 425 Bytes Understanding the Inside of Windows2000
Named Pipe and Mailslot Implementation • Name resolution: \\.\Pipe\PipeName Symbolic link: \\?\Pipe; \\?\MailSlot Npfs.sys Msfs.sys Understanding the Inside of Windows2000
EXPERIMENT • Listing the Named Pipe Namespace and Watching Named Pipe Activity Understanding the Inside of Windows2000
Windows Sockets • Microsoft's implementation of BSD Sockets • 2K: Winsock 2.2 • features • scatter-gather and asynchronous I/O • QoS conventions • Extensibility • integrated namespaces • multipoint messages Understanding the Inside of Windows2000
Winsock Operation • Support protocols • NetBEUI, TCP/IP, IPX • After initilization: • socket; bound; listen/connect/accept; recv/send Understanding the Inside of Windows2000
Winsock Implementation Understanding the Inside of Windows2000
Remote Procedure Call • Compatible with the OSF/DCE standard • procedural view VS. transport-centered view • Remote I/O request • OS : redirector |remote system, execute and return |local: interrupt, & return to caller Understanding the Inside of Windows2000
RPC Operation Understanding the Inside of Windows2000
RPC Implementation Understanding the Inside of Windows2000
Common Internet File System (CIFS) • A published Microsoft standard • An enhanced form of the Server Message Block (SMB) protocol • allows third parties to interoperate with 2K file servers and with 2K file sharing clients • E.g. Samba shareware • Redirector FSD • executes on a client machine & communicates with a server FSD Understanding the Inside of Windows2000
CIFS Understanding the Inside of Windows2000
Distributed File Caching • To provide a consistent view of shared remote file • 2K solution: distributed cache coherency • Mechanism: oplock • Three main types of oplock • Level I oplock • Level II oplock • Batch oplock Understanding the Inside of Windows2000
Oplock example Understanding the Inside of Windows2000
NetBIOS • Network Basic Input/Output System • NetBIOS Names • 16byte • 2K: first 15 bytes of DNS name + modifier • LANA number • WINS • NetBIOS Names TCP/IP addresses • NetBIOS API • Listen, … unique group Understanding the Inside of Windows2000
EXPERIMENT • Using Nbtstat to See NetBIOS Names Understanding the Inside of Windows2000
NetBIOS API Implementation Understanding the Inside of Windows2000
Other Networking APIs • Telephony API (TAPI) • DCOM • Message Queuing Understanding the Inside of Windows2000
Network-Resource Name Resolution • Multiple Provider Router • Multiple UNC Provider Understanding the Inside of Windows2000
Multiple Provider Router Understanding the Inside of Windows2000
Multiple UNC Provider Understanding the Inside of Windows2000
Domain Name System Understanding the Inside of Windows2000
Protocol Drivers Understanding the Inside of Windows2000
NDIS Drivers Understanding the Inside of Windows2000
Binding Understanding the Inside of Windows2000
Layered Network Services • Remote access • Active Directory • Network Load Balancing • File Replication service (FRS) • Distributed File System (DFS) • TCP/IP Extensions • Network Address Translation • Internet Protocol Security • Quality of Service Understanding the Inside of Windows2000
Active Directory architecture Understanding the Inside of Windows2000
Network Load Balancing operation Understanding the Inside of Windows2000
DFS components Understanding the Inside of Windows2000
QoS architecture Understanding the Inside of Windows2000