Windows NT Networking

dingdongboomΔίκτυα και Επικοινωνίες

27 Οκτ 2013 (πριν από 3 χρόνια και 9 μήνες)

67 εμφανίσεις

Windows NT
Networking

Bruno Sinkovic

5 October 99

© Copyright 1998 Objectivity, Inc., All Rights Reserved






Windows NT Networking


Problems that affect Objectivity

© Copyright 1998 Objectivity, Inc., All Rights Reserved

Windows NT Architecture


Object
-
Based Computing


process, threads, devices, access rights, ..


Component
-
Based Architecture


modular design


Kernel and User Mode


Protected Subsystems


Executive Services

© Copyright 1998 Objectivity, Inc., All Rights Reserved

Windows NT Architecture


Example of NT Executive components


I/O Manager
( cache manager, file system drivers, network drivers, hardware device drivers)


Object Manager


Security Monitor


Process Manager


Virtual Memory Manager


Window Manager


Graphics Device Interface & Drivers


Hal …..

© Copyright 1998 Objectivity, Inc., All Rights Reserved

Windows NT Architecture


Protected Subsystems :


win32 (native)


posix


os/2


win16 (Ms
-
Dos + NTVDM)

© Copyright 1998 Objectivity, Inc., All Rights Reserved

Winnt Networking


Layered Network Architecture



Peer Relationships



Protocols



Vertical Relationships

Interfaces

© Copyright 1998 Objectivity, Inc., All Rights Reserved

Winnt Networking : Layered Architecture


Applications
(User Mode)


I/O Manager


TDI Transport Driver Interface

(Boundary Layer)


Transport Protocols
(tcp/ip, netbeui, ipx/spx, …)


NDIS
(Boundary Layer)


Network Adapter Card Drivers


Network Interface Cards
(NIC)



© Copyright 1998 Objectivity, Inc., All Rights Reserved

Layered Network Architecture

NetBIOS Driver

Redirectors

Servers

Winsock Driver

Kernel Mode

User Mode

TDI
(Transport Driver Interface)

Transport Protocols

NDIS Interface

Network Adapter Card Driver

Network Inteface Card

Hardware

© Copyright 1998 Objectivity, Inc., All Rights Reserved

Winnt Networking : Boundary Layers (1)


TDI : Transport Driver Interface


Common interface for a driver (such as NT Redirector or NT
Server for example) to communicate with the various
network transports (tcp/ip, ipx/spx, netbeui, …)


TDI allows user applications and file systems to remain
independent of transports


TDI is a standard for passing messages between 2 layers

© Copyright 1998 Objectivity, Inc., All Rights Reserved

Winnt Networking : Boundary Layers (2)


NDIS : Network Driver Interface (3.0)


Allow multiple network adapters and multiple protocols to
coexist


Enables the high level component (transport protocol) to be
independent of the Network Interface Card (NIC)

© Copyright 1998 Objectivity, Inc., All Rights Reserved

Windows NT Network Protocols


TCP/IP


Netbeui


Lan, broadcast based


Not routable


IPX/SPX


Novell Proprietary


Poor performance across Wan


Others
(DecNet, Streams, ….)

© Copyright 1998 Objectivity, Inc., All Rights Reserved

IPC
(Inter
-
Process
-
Communications)



Named Pipes (NPFS)


Mail Slots (MSFS)


Windows Sockets


NetBIOS


RPC


NetDDE (network dynamic data exchange)


SMBs (Server Messages Blocks)


DCOM


© Copyright 1998 Objectivity, Inc., All Rights Reserved

WINNT Networking Services


Server Service


Workstation Service (
Redirector
)


Protocols
(TCP/IP, NetBeui, IPX/SPX, ..)



Network Resource Access


Multiple Universal Naming Convention Provider (MUP)


Universal Naming Convention Names (
UNC
)


Multi
-
Provider Router


RPC, DNS, WINS, DHCP , …


© Copyright 1998 Objectivity, Inc., All Rights Reserved

Accessing Remote Files


Workstation Service



I/O Manager



RDR File System (NT Redirector)




SRV Server Driver (NT Server Service)

Remote Machine

© Copyright 1998 Objectivity, Inc., All Rights Reserved

NT Redirector


Part of I/O Manager. Resides above TDI


Component through which one computer gain access to another
computer


The workstation Service receives a request from a user
application, passes it to the kernel
-
mode Redirector


Allows connection to MS
-
Net based computers

© Copyright 1998 Objectivity, Inc., All Rights Reserved

NT Redirector (2)


Implemented as a winnt file System Drivers (such as FAT, NTFS,
HPFS, …)


Applications use a single API ( I/O API)


Can Coexist with Other Redirectors (Netware, NFS, etc …)

© Copyright 1998 Objectivity, Inc., All Rights Reserved

The Server Service


Implemented above TDI, as a File System Driver


Server supplies the connection requested by client
-
side
redirectors

© Copyright 1998 Objectivity, Inc., All Rights Reserved

More Networking Options


Binding Options


Bind network components to Network Adapters


Binding can be ordered


Remote Access Services (RAS)


RAS Client


RAS Server


Point
-
to
-
point Protocol

© Copyright 1998 Objectivity, Inc., All Rights Reserved

UNC : Network Resource Access


UNC : Universal Naming Code


unc requests are passed to the Multiple Universal Naming
Convention Provider (MUP)


MUP selects the appropriate UNC provider (redirector) to
handle the I/O Request


\
\
Server
\
share
\
subdirectory
\
filename


Use Dos command : “net share”


© Copyright 1998 Objectivity, Inc., All Rights Reserved

Security & Authentication


NT Domains Vs Local Domain


Domain Controllers (PDC, BDC)


Trust Relationships


Logon Processes (netlogon)


Interactive and Remote Logon


Dialog box displayed or not


User Manager for Domains


domain
\
username

© Copyright 1998 Objectivity, Inc., All Rights Reserved

NT Server Domains


Single logon procedure


Universal Resource Access


Centralized Network Administration


Directory Database (SAM)


Local Database for Local Computer


Domain Controllers


primary (PDC)


secondary (BDC)

© Copyright 1998 Objectivity, Inc., All Rights Reserved

NT Server Domains (2)


Computer Accounts


each computer has an account in the Directory Database


Secure Communication Channels


used during authentication

© Copyright 1998 Objectivity, Inc., All Rights Reserved

NT / UNIX Interoperability


Using 3rd Party Products
(
Netmanage
,
Hummingbird
, …)


Using NFS Server and Redirector


Requires Unix Client Authenticating to NT Servers


Requires NT Clients Authenticating on UNIX Servers


© Copyright 1998 Objectivity, Inc., All Rights Reserved

Host/Computer Name Resolution


Browser Services


WINS


DNS


DHCP


/etc/hosts File


NetBios Names


© Copyright 1998 Objectivity, Inc., All Rights Reserved

Name And Address


Understanding Address and Name Resolution



IP Address


Host Name


NetBios Name

© Copyright 1998 Objectivity, Inc., All Rights Reserved

Netbios Names


Flat Name


Is also known as “Computer Name”


Can be different from hostnames !

© Copyright 1998 Objectivity, Inc., All Rights Reserved

NT Browser Service


Maintain a “Browse list” of all available domains and
servers on the network


Provides this information to programs that require it


Displayed in


Network Neighborhood


Net View



Map Network Drive

© Copyright 1998 Objectivity, Inc., All Rights Reserved

Dynamic IP Addressing :
DHCP


DHCP Client and DHCP Server


DHCP Server maintains a Database of IP Addresses


DHCP Server is assigned a “Range” of IP Addresses

© Copyright 1998 Objectivity, Inc., All Rights Reserved

DNS

(
Domain Name Services
)


Resolve
Hostname <
--
> IP Address


Global Distributed Database on a hierarchical naming
system


Depends on Static File for name resolution


Static

Configuration of IP Addresses to perform name
-
to
-
IP
-
address mapping


© Copyright 1998 Objectivity, Inc., All Rights Reserved

WINS



Resolve
NetBIOS Name <
--
> IP Address


WINS provide a
dynamic
, distributed database for registering
and querying dynamic NetBios computer names to IP
-
Address


Supports DHCP dynamic allocation of IP Addresses and can
resolve a NetBIOS computer Name to a dynamic IP Address
mapping


© Copyright 1998 Objectivity, Inc., All Rights Reserved

WINS and DNS Interaction


NT DNS server “talks” to WINS Server



Windows NT based DNS Server provides connectivity between
WINS and DNS.



DNS Server can pass through an unresolved DNS name query to
a WINS Server for final name resolution

© Copyright 1998 Objectivity, Inc., All Rights Reserved

Name Resolution


Network Application Interfaces



Winsock interface


NetBios over TCP/IP (NetBT)

© Copyright 1998 Objectivity, Inc., All Rights Reserved

Netbios and Winsock Interfaces

NetBIOS

Application

NETAPI32.dll

NetBIOS Emulator

NetBEUI

TCP/IP

IPX/SPX

Netbios API

User Mode

Kernel Mode

TDI

NDIS

Winsock

Application

WSOCK32.dll

Winsock Emulator

TCP/IP

IPX/SPX

Winsock API

User Mode

Kernel Mode

TDI

NDIS

© Copyright 1998 Objectivity, Inc., All Rights Reserved

Name Resolution (1) : Winsock


Steps for Winsock Name & Address Resolution


Ex: gethostbyname() , gethostbyaddr(), ping


1. Check local computer host name


2. Check the Hosts file for a matching name entry


3. If a DNS server is configured, query it


4. If not match found, try the Netbios name resolution


© Copyright 1998 Objectivity, Inc., All Rights Reserved

Name Resolution (2) : netbios


Steps for Netbios Name resolution


if hostname > 15, query DNS


query Netbios Cache Name


Local Broadcast for resolution


Query WINS Server (Netbios Name Server)


Query LMHOSTS (Netbios hosts name on another
segment)


Query local HOSTS file


Query DNS


© Copyright 1998 Objectivity, Inc., All Rights Reserved

NT Networking Configuration and Tools


Tools & Utilities


Control Panel


ipconfig


netstat, nbstat


net

command


nslookup


tracert


hostname



ping




© Copyright 1998 Objectivity, Inc., All Rights Reserved

How UNC Paths are Resolved

Application Using I/O Call

with UNC name

(
\
\
server
\
share)

MUP

Windows NT

Redirector

Other

Redirectors

( NFS, Netware, ..)

User Mode

Kernel Mode

TDI

MUP = Multiple Universal Naming
Convention Provider

© Copyright 1998 Objectivity, Inc., All Rights Reserved

More Information ?



Windows NT Resource Kit


winnt Server


winnt Workstation

© Copyright 1998 Objectivity, Inc., All Rights Reserved

Objectivity and NT Networking

Deploying a WINNT
-
Based

Objectivity Application

© Copyright 1998 Objectivity, Inc., All Rights Reserved

NT + Objy : Possibles issues ….


Name resolution


File Access Security & Permissions


UNC names


Virtual Mapped Drives


DHCP
-

DNS
-

WINS


…..



© Copyright 1998 Objectivity, Inc., All Rights Reserved

Deploying : Things to consider (1)


Which Domains Participate in the Deployed Application ?


Verify Access rights
(domains, users, computers, files, …)


UNC
or

AMS ?


Defining and using Mapped Drives
(ex : r:
\
)

© Copyright 1998 Objectivity, Inc., All Rights Reserved

Deploying : Things to consider (2)


Is WINS running ?


Is DNS configured ?


Do hosts use DHCP ?


Set Hostname and/or Computername

© Copyright 1998 Objectivity, Inc., All Rights Reserved

NT / UNIX Interoperability


NFS or Samba will enable File Sharing between Unix and
NT hosts


FD or DB created using UNC or Virtual mapped drives
can not be accessed by Unix based application

© Copyright 1998 Objectivity, Inc., All Rights Reserved

NT Domains and File access

Domain1

PDC

Domain1

WS

Domain2

WS

Domain2

PDC

Win95/98

© Copyright 1998 Objectivity, Inc., All Rights Reserved

Using UNC


Objectivity will automatically use oo_local_host::


DB name : oo_local_host::
\
\
server
\
dir
\
file.db


UNC
or

AMS , not both

© Copyright 1998 Objectivity, Inc., All Rights Reserved

Using Virtual Drive Mapping


Mapping Shares , ex : r:
\


Make sure the same letter is mapped to the same shared
directory on every possible Objy client machine


Verify that the mapped drive is accessible from all
possible Objy Clients


© Copyright 1998 Objectivity, Inc., All Rights Reserved

What is oo_local_host :: ?


Always been resolved as the machine from where the
Objy client runs


Automatically set by oonewfd and oonewdb when using
UNC and Virtual Drive mapping


Thus, bare this in mind when creating federations or
databases files

© Copyright 1998 Objectivity, Inc., All Rights Reserved

Objectivity Tools Involved



Lockserver


oonewfd


oonewdb


Client (C++, Java)


AMS


© Copyright 1998 Objectivity, Inc., All Rights Reserved

Objy Files


Where to place them ?


How to share them ?


FDB


DB


JNL


Boot


© Copyright 1998 Objectivity, Inc., All Rights Reserved

Boot File

: where to place it ?


Use AMS (recommended)


Put the boot file on a Windows NT node and share the file
using virtual drive mappings


Put the boot file on a Windows 95 node and share the file
using UNC names instead of virtual drive mappings

© Copyright 1998 Objectivity, Inc., All Rights Reserved

Accessing a DB on a remote machine


UNC Name


Virtual Drive Mapping (ex: f:
\
data
\
data.fdb)


NFS


AMS

© Copyright 1998 Objectivity, Inc., All Rights Reserved

DHCP


IP address dynamically assigned at machine startup


IP address renewed after a certain interval


Command :
”ipconfig /release“

is equivalent to a
network disconnection


Command :
”ipconfig /renew“

is equivalent to an IP
address renewal


© Copyright 1998 Objectivity, Inc., All Rights Reserved

DHCP
-

DNS
-
WINS


DNS is static


WINS is Dynamic


DHCP Server use a range of IP
-
addresses


DHCP Client is assigned an IP address :


WINS maps IP Address to Computername
(ex : albona)


DNS maps IP Address to an entry in DNS file
(ex : dhcp
-
22)


© Copyright 1998 Objectivity, Inc., All Rights Reserved

DHCP
-

DNS
-

WINS : example


If : NT Network using DHCP with DNS


If : Objectivity application using a mix of hostname and
computername


Then : Make sure that you are using WINS and that it is
automatically feeding DNS !

© Copyright 1998 Objectivity, Inc., All Rights Reserved

Computername Vs Hostname


Computername is the netbios name


DOS : “set computername”


Hostname is the IP name, and is used for Winsock
resolution
(ie : ping, getHostByName(), … )


DOS : “hostname”


They can be different !!

© Copyright 1998 Objectivity, Inc., All Rights Reserved

Common Connection Tests


ping

<computername>


ping

<hostname>


oocheckls


oochange


winnt/system32/drivers/etc/hosts


nslookup

© Copyright 1998 Objectivity, Inc., All Rights Reserved

Tests
-

ooNewFd


What is the output of “oochange <bootfile> in the
following cases
(*)

:


[1] cd d:
\
projects
\
tests
\

oonewfd
-
lock albona
-
fdfilepath test
-
D.fdb test
-
D.boot


[2]cd p:
\
tests

oonewfd
-
lock albona
-
fdfilepath test
-
P.fdb test
-
P.boot


[3]cd p:
\
tests

oonewfd
-
lock albona
-
fdfilepath p:
\
tests
\
test
-
map.fdb p:
\
tests
\
test
-
map.boot


[4]cd p:
\
tests

oonewfd
-
lock albona
-
fdfilepath
\
\
albona
\
Projects
\
tests
\
test
-
UNC.fdb
\
\
albona
\
projects
\
tests
\
test
-
unc.boot


[5]cd d:
\
projects
\
tests

oonewfd
-
lock albona
-
fdfilepath
\
\
albona
\
Projects
\
tests
\
test
-
UNC
-
noBoot.fdb
test
-
UNC
-
noBoot.boot


[6]cd p:
\
tests

oonewfd
-
lock albona
-
fdfilepath
\
\
albona
\
Projects
\
tests
\
test
-
UNC
-
P
-
noBoot.fdb
test
-
UNC
-
P
-
noBoot.boot


(*) (hostname and computername is albona


p:
\

is mapped to
\
\
albona
\
projects )





© Copyright 1998 Objectivity, Inc., All Rights Reserved

Tests
-

Creating Databases


Try to create new Database in the previous
federations, using


oonewdb


C++ or Java APIs



What is the output of “oodumpcatalog” ?