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 xlanchen@06/10/2005 Understanding the Inside of Windows2000 计算机系 2 信息处理实验室 The OSI Reference Model Open.

Download Report

Transcript 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 xlanchen@06/10/2005 Understanding the Inside of Windows2000 计算机系 2 信息处理实验室 The OSI Reference Model Open.

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
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 2
信息处理实验室
The OSI Reference Model
Open Systems Interconnection (OSI) reference
model
7 layers
An idealized scheme
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 3
信息处理实验室
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
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 4
信息处理实验室
Networking APIs
Named pipes and mailslots
Windows Sockets (Winsock)
Remote procedure call (RPC)
Common Internet File System (CIFS)
NetBIOS
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 5
信息处理实验室
Named Pipes and Mailslots
Named pipes
Provide reliable bidirectional communications
Mailslots
Provide unreliable unidirectional data transmission
Support broadcast capability
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 6
信息处理实验室
Named pipe communications
\\Server\Pipe\PipeName
|
|
| a unique name
|
|
| (can include subdirectories)
|
| “Pipe”
| the computer
Example:
\\MyComputer\Pipe\MyServerApp\ConnectionPipe
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 7
信息处理实验室
Named Pipe Operation
CreateNamedPipe
A pope operates in byte mode or message mode
ConnectNamedPipe
synchronously or asynchronously
CreateFile or CallNamedPipe
Establish
the connection
ReadFile and WriteFile (Win32 Func)
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 8
信息处理实验室
Mailslot Operation
Name: \\Server\MailSlot\MailSlotName
Func: CreateMailSlot, ReadFile; CreateFile,
WriteFile
Message size < 425 Bytes
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 9
信息处理实验室
Named Pipe and Mailslot Implementation
Symbolic link:
\\?\Pipe;
\\?\MailSlot
Npfs.sys
Msfs.sys
Name resolution: \\.\Pipe\PipeName
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 10
信息处理实验室
EXPERIMENT
Listing the Named Pipe Namespace and Watching
Named Pipe Activity
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 11
信息处理实验室
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
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 12
信息处理实验室
Winsock Operation
Support protocols
NetBEUI, TCP/IP, IPX
After initilization:
socket; bound; listen/connect/accept; recv/send
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 13
信息处理实验室
Winsock Implementation
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 14
信息处理实验室
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
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 15
信息处理实验室
RPC Operation
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 16
信息处理实验室
RPC Implementation
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 17
信息处理实验室
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
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 18
信息处理实验室
CIFS
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 19
信息处理实验室
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
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 20
信息处理实验室
Oplock example
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 21
信息处理实验室
NetBIOS
Network Basic Input/Output System
NetBIOS Names
16byte
2K: first 15 bytes of DNS name + modifier
LANA number
unique
group
WINS
NetBIOS Names  TCP/IP addresses
NetBIOS API
Listen, …
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 22
信息处理实验室
EXPERIMENT
Using Nbtstat to See NetBIOS Names
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 23
信息处理实验室
NetBIOS API Implementation
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 24
信息处理实验室
Other Networking APIs
Telephony API (TAPI)
DCOM
Message Queuing
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 25
信息处理实验室
Network-Resource Name Resolution
Multiple Provider Router
Multiple UNC Provider
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 26
信息处理实验室
Multiple Provider Router
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 27
信息处理实验室
Multiple UNC Provider
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 28
信息处理实验室
Domain Name System
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 29
信息处理实验室
Protocol Drivers
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 30
信息处理实验室
NDIS Drivers
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 31
信息处理实验室
Binding
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 32
信息处理实验室
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
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 33
信息处理实验室
Active
Directory
architecture
xlanchen@06/10/2005
Understanding
the Inside of
Windows2000
计算机系 34
信息处理实验室
Network Load Balancing operation
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 35
信息处理实验室
DFS components
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 36
信息处理实验室
QoS architecture
xlanchen@06/10/2005
Understanding the Inside of
Windows2000
计算机系 37
信息处理实验室