Common p o ocol o dis ibu ed ne wo k ile sysy em 231
COMMON PROTOCOL FOR DISTRIBUTED NETWORK FILE SYSTEM
P. Peniak
1)
, F., Kallay
2)
1),
IT se ice cen e o Eas e Eu ope (SCEE) Con inen al AG, Con inen al Ma ado T uck Ti es s. .o
T.Vanso ej 1054/45, 020 01 Púcho , el.: +421 42 4613479,e- mail: pe e .peniak@con i.sk
2),
Facul y o Elec ical Enginee ing, Uni e si y o Žilina,
Uni e zi ná 8251/1, 010 26 Žilina, e- mail: edo .[email p o ec ed]za.sk
Summa y Pape deals wi h common p o ocol o dis ibu ed ne wo k ile sys em. Focus is on CIFS p o ocol om Mic oso ,
he enhanced e sion o Mic oso Se e Message Block (SMB), ha is p oposed as possible common solu ion
o ile sha ing among dis ibu ed sys ems. The e a e new equi emen s included as well, ha a e o be
implemen ed due o ecen changes in applica ions and de ices and has been add essed in new gene a ion o
dis ibu ed ile sys em p o ocols such as AFS2, CODA and WebDAV.
1. INTRODUCTION
A ne wo k ile sys em is de ined as any
compu e ile sys em ha suppo s sha ing o iles,
p in e s o e a compu e ne wo k. Ne wo k ile
se ices enable compu e s a ached o he ne wo k o
access iles s o ed on o he compu e s in he same
way ha hey access iles on hei own disks. Tha
is, he clien in e ace used by p og ams should no
dis inguish be ween local and emo e iles. I is up o
he ne wo k ile sys em o loca e he iles and o
a ange o he anspo o he da a [1], [2].
The compu e which p o ides access o i s iles
and di ec o ies is called ile se e , and he compu e
using hese iles and di ec o ies is he clien . A
compu e can be clien and se e a he same ime.
Fo communica ion be ween se e s and clien s, he
speci ic ne wo k p o ocols a e used. The mos
popula a e he ollowing p o ocols, see Tab.1:
Tab.1 Ne wo k ile sys em p o ocols
– No ell
Ne Wa e DoD
TCP/IP Mic oso Ne wo k
7
6 NCP FTP, HTTP, NFS SMB, RPC
5 Ne BIOS
4 SPX TCP/UDP
3 IPX IP
Ne BEUI
NFS(Ne wo k File Sys em) –SunSys ems, IETF
NCP (Ne Wa e Co e P o ocol) -No ell
Se e Message Block (SMB) –IBM, Mic oso
File T ans e P o ocol (FTP) -IETF
Hype ex T ans e P o ocol (HTTP) -IETF
These p o ocols we e implemen ed in he
di e en ope a ion sys ems such as Mic oso
Windows (SMB) and UNIX/LINUX (NFS) [3].
The e o e, hei clien s canno use he di e en
ne wo k ilese e s by de aul , as shown in Fig.1a).
The e a e mul i-clien solu ions applied, wi h se e al
implemen ed ne wo k ile sys em p o ocols wi hin
gi en ope a ion sys em. Fig.1b) shows mul iclien
con igu a ion, wi h he p o ocol s acks o NFS and
SMB (SAMBA implemen a ion o SMB se e in
LINUX) so use s who wo k wi h UNIX o Mic oso
ope a ion sys ems, a e able o use he bo h ne wo k
ile sys ems. Ano he op ion is o de elop and
implemen a common ne wo k ile sys em ha
would be suppo ed by all pla o ms and supplie s.
Then, jus one p o ocol s ack could be used o
access and sha ing iles ia In e na . This op ion is
shown in Fig.1c.
a)
b)
c)
Fig.1 Possible access o ne wo k ile sys ems
232 Ad ances in Elec ical and Elec onic Enginee ing
Due o Mic oso supe io i y in numbe o ins alled
nodes in In e ne , he in oduc ion o common
ne wo k ile sys em p o ocol will equi e i s s ong
suppo and accep ance. Mic oso is cu en ly ying
o es ablish i s p o ocols as he o icial s anda d o
he In e ne . I could pe spec i e eplace he
cu en ly used FTP p o ocols and ile ans e s
h ough he HTTP p o ocol, which ep esen s
subs an ially he e ogeneous en i onmen wi h
p oblema ic secu i y. Mic oso has been ying o
push Common In e ne File Sys em (CIFS),
p o ocol h ough s anda diza ion p ocess since 1996
[4]. CIFS d a s we e e en p o ided o IETF so ha
i could be app o ed among In e ne s ada d
p o ocols.
2. COMMON INTERNET FILE SYSTEMS
Common In e ne File Sys ems (CIFS) is he
enhanced e sion o Mic oso Se e Message
Block (SMB) p o ocol ha de ines a emo e ile-
access o sha e da a on local disks and ne wo k ile
se e s, among dis ibu ed sys ems ac oss in ane s
and he In e ne . In addi ion o SMB, which was
de eloped on he op o NETBIOS-API, CIFS is
able o un o e TCP/IP and u ilizes he Domain
Naming Se ice (DNS). I is op imized o suppo
communica ion ia In e ne wi h a ious speed
le els. CIFS complemen s Hype ex T ans e
P o ocol (HTTP) while p o iding mo e sophis ica ed
ile sha ing han adi ional p o ocols, such as FTP.
The CIFS p o ocol is no only a ailable o
se e s and PCs, bu also o embedded de ices and
dis ibu ed sys ems. I had o be scaled down in size
and ewo ked o mul i asking ea u es o mee he
needs o embedded de ices such as eal- ime,
de e minis ic esponse imes, small memo y, and a
a ie y o mic op ocesso – ile sys em combina ions.
The using o CIFS o se e s and embedded de ices
is shown in Fig.2. The ile sha ing is independen
on hos ing pla o m and embedded ope a ion
sys em/ ile sys em.
Fig. 2 CIFS p o ocol in se e s and embedded de ices
CIFS p o ides he ollowing unc ions:
File Access
Suppo o basic ile ope a ions (open, close,
ead, w i e and seek).
Reco d lock and unlocking o mul iple clien s
access and ile sha ing and locking.
Pe o mance and po abili y
Highly in eg a ed wi hin he ope a ing sys em.
Suppo o all ecen Mic oso pla o ms and
o he ope a ion sys ems such as Unix, VMS,
IBM, Macin osh
Secu i y
Suppo o anonymous access(no au ho iza ion).
Enhanced secu i y and au hen ica ed access
Op imiza ion
Imp o ed p o ocol pe o mance
Reduc ion o o e head in SMB p o ocol
Global File Names
No need o moun emo e ile sys ems,
Access based on globally signi ican names
Unicode File Names
Because CIFS is mainly based on SMB p o ocol we
will explain below i s co e unc ions.
3. SMB PROTOCOL
The SMB (Se e Message Block) p o ocol
was o iginally de eloped by he company IBM in
co-ope a ion wi h he company Mic oso o one o
he i s ne wo k ope a ing sys ems, he PC Ne wo k
P og am .1.0. Today, his p o ocol is he mos
equen ly used one in he ield o pee - o-pee
communica ion o LAN ne wo k ile se e s and
clien s. The SMB p o ocol is cu en ly used by ile
and p in se e s IBM, Mic oso ’s ne wo k
ope a ing sys ems (Lan Manage , Windows NT, XP,
Vis a). The p o ocol heade and basic se ices a e
shown in Tab. 2 and Tab. 3.
Tab. 2 Heade o SMB p o ocol
SI D S C
R
C A
H RC RS NI
D PI
D UID MI
D P PC
d BL B
1 3 1
1 1 2 15 2 2 2 2 1 2 2 1
Σ 38 B
MARKING MEANING
SID SMB
Iden i ica io
n
Iden i ica ion o SMB p o ocol (0xFF)
S Se e Iden i ica ion o SMB se e ’s dialec
C Command Func ional code o called SMB se ice
R Re u n Class SMB unc ion e u n code class
AH P ocesso
AH egis e Resul o ope a ion in egis e o AH
p ocesso
RC Re u n Code
Re u n code o ope a ion
RS Rese e Rese e o u u e ex ension
NID Ne Pa h ID Iden i ie alloca ed o sha ed means
PID P ocess ID Iden i ie o clien ’s p ocess
UID Use ID Iden i ie o use
MID Mul iplex ID Mul iplex iden i ie o clien p ocess
P mc Pa ame e
Coun Numbe o op ional pa ame e s o called
unc ion
Common p o ocol o dis ibu ed ne wo k ile sysy em 233
PC Pa ame e
Code Called unc ion pa ame e code
BL Bu e
Leng h Leng h o da a pa o SMB block
B Bu e Fi s oc e o da a pa o SMB block
Tab.3 Example o SMB se ices
The SMB block wi h a clien ’s eques and a
se e ’s answe a e p ac ically iden ical, hey jus
di e in he da a pa and he leng h o he da a
bu e . An example o communica ion o a clien
wi h an SMB se e can be seen in Fig. 3.
Fig.3 Example o clien communica ion wi h SMB se e
The p o ocol wo ks on he basis o he clien /se e
model. A se e p o ides o ne wo k clien s he co-
called sha ed esou ces, usually sha ed disks,
di ec o ies, p in iles and named pipes. Sha ed
esou ces a e iden i ied h ough an uni e sal
ne wo k add ess called UNC
se e _name esou ce_name.
A clien secu es he o mula ion o equi emen s o
sha ed se e esou ces. The SMB se e analyses
equi emen s sen by a clien in he o m o an SMB
block (packe ), i checks an access pe mission, and
based on ha i ca ies ou a equi ed ope a ion ( ile
opening, w i ing in o p in ile, c ea ion o a
di ec o y, e c.) The eply, oge he wi h he esul , is
sen o he clien in an iden ical SMB block. In he
implemen a ion o SMB se e s, wo di e en
me hods o secu ing access o sha ed means o he
se e a e o e ed h ough:
con ol o access a he sha e le el
con ol o access a he use le el
In he i s case he access o sha ed esou ces
is allowed o all ne wo k nodes ha ha e a alid
passwo d alloca ed o a esou ce o a se e . Du ing
an a emp o access any se e esou ce, a passwo d
is equi ed om he clien .
A e i s success ul en e ing, an NID
(Ne wo k ID) esou ce iden i ie is alloca ed o he
clien , h ough which i accesses he esou ce. Thus
a numbe o passwo ds wi h di e en access le els
can be alloca ed o each sha ed se e esou ce. In
he o he case, he clien is e i ied hough a name
and a passwo d immedia ely a e he connec ion o
he se e , and in he e en o hei co ec ness, he
se e alloca es o he clien i s use iden i ie UID
(Use ID), h ough which he se e de i es access
igh s o indi idual sha ed esou ces. In a mul i-use
en i onmen , when se e al p ocesses can
communica e simul aneously wi h he se e , a
couple o PID (P ocess ID) and MID (Mul iple ID)
iden i ie s can se e o hei dis inguishing.
The clien sends he se e an
SMB_COM_NEGOTIATE eques , h ough which
he se e and he clien nego ia e connec ion
pa ame e s and a suppo ed p o ocol e sion.
Subsequen ly, he clien sends o he se e a
SMB_COM_SETUP eques , in which he e is he
use ’s name and passwo d. I he se e wo ks in he
use -le el mode, i alloca es an UID iden i ie o he
clien . Th ough he SMB_TREE_CONNECT
message he clien connec s o a sha ed di ec o y
wi h a TID iden i ie alloca ed by he se e . Then
he c ea ion o a ( x) FID subdi ec o y and he
disconnec ion o he se e ollows.
SMB BLOCK
CODE
SERVICE
SMB_COM_CREATE_DIRECTORY 0x00 C ea ion o di ec o y
SMB_COM_DELETE_DIRECTORY 0x01 Dele ion o di ec o y
SMB_COM_OPEN 0x02 Opening o ile
SMB_COM_CREATE 0x03 C ea ion o di ec o y
SMB_COM_CLOSE 0x04 Closing opened ile
SMB_COM_DELETE 0x06 Dele ion o ile
SMB_COM_RENAME 0x07 Renaming o ile
SMB_COM_READ 0x0A Reading om an
opened ile
SMB_COM_WRITE 0x0B W i ing in o opened
ile
SMB_COM_LOCK_BYTE_RANGE 0x0C Locking ile by e
ange
SMB_COM_UNLOCK_BYTE_RANGE 0x0D Unlocking ile by e
ange
SMB_COM_CHECK_DIRECTORY 0x10 Sea ching h ough
di ec o y
SMB_COM_SEEK 0x12 T ans e in open ile
SMB_COM_TREE_CONNECT 0x70 Connec ion o sha ed
means
SMB_COM_TREE_DISCONNECT 0x71 Disconnec ion om
sha ed means
SMB_COM_NEGOTIATE 0x72 Nego ia ion o SMB
pa ame e s
SMB_COM_SESSION_SETUP_ANDX 0x73 Connec ion o SMB
se e
SMB_COM_LOGOFF_ANDX 0x74 Disconnec ion om
SMB se e
SMB_COM_OPEN_PRINT_FILE 0xC0 Opening p in ile
SMB_COM_WRITE_PRINT_FILE 0xC1 W i ing o p in ile
SMB_COM_CLOSE_PRINT_FILE 0xC2 Closing p in ile
SMB_COM_NEGOTIATE
NID:0,UID:0,PID:53
SMB
se e
SMB
clien
139
1029
SMB_COM_SETUP
NID:0,UID:1,PID:53
SMB_COM_TREE_CONNECT
NID:10,UID:1,PID:53
SMB_COM_CREATE_DIRECTORY
NID:10,UID:1,PID:53,FID:1 „ x“
SMB_COM_TREE_DISCONECT
NID:100,UID:1,PID:53
SMB_COM_TREE_DISCONECT
NID:0,UID:0,PID:53
234 Ad ances in Elec ical and Elec onic Enginee ing
Fig.3: Example o SMB packe
4. CONCLUSION
T adi ional ne wo k ile sys ems we e c ea ed in
a wo ld whe e he dominan ne wo k pa adigm was
he LAN/WAN. Lack o s anda diza ion caused ha
common s anda d has no been selec ed and
app o ed ye , despi e o ISO s anda d FTAM (File
T ans e and Access P o ocol) and ecen Mic oso
ac i i ies wi h i s p oposed solu ion -CIFS.
In addi ion he ne wo k ile sys em challenge has
become he dis ibu ed ile sys em and connec ions
ia In e ne /WAN, as he e is mo e om sel -
con ained LAN en i onmen s o a wo ld o
dis ibu ed sys em and e en a ely connec ed
de ices. This kind o ne wo k en i onmen
in oduces a leas h ee main challenges:
Au hen ica ion
Da a T anspo
Synch oniza ion
Some o hese issues could be sol ed a he
applica ion le el a he han he ile sys em le el.
Fo ins ance, Rsync, a powe ul p og am ha came
ou o he Samba p ojec p o ides emo e ile
synch oniza ion o e he ne wo k. Ano he
al e na i e o adi ional p o ocol is o example,
AFS (And ew File Sys em) and CODA. Coda is
a dis ibu ed ile sys em de eloped om AFS2.
Coda is designed o mobile compu ing in an
occasionally connec ed en i onmen . Coda clien s
main ain a pe sis en cache o copies o iles om
he se e . Coda checks he ne wo k bo h o he
a ailabili y o connec ions be ween clien and
se e , and o he app oxima e bandwid h o he
connec ion.
As explained he e a e s ill he di e en solu ions in
place, such as NFS in Unix and CIFS/SMB in
Mic oso wo ld. The u u e de elopmen mus
conside no only equi emen o common ile
sys em and p o ocol, bu also o include he new
equi emen s ega ding dis ibu ed sys ems,
eplica ions, caching, which ha e no been aken in o
conside a ion ye .
The e o e he nex de elopmen will ha e o
sol e he men ioned challanges and o come wi h a
p oposal o new solu ion, which will enable
implemen a ion o dis ibu ed ile sys em o open
and embedded sys ems as well.
REFERENCES
[1] FRANEKOVÁ, M., KÁLLAY, F., PENIAK, P.
VESTENICKÝ, P.: Komunikaná bezpenos
p iemyselných sie í. ŽU Žilina, 2007, ISBN
978-80-8070-715-6.
[2] KÁLLAY, F., PENIAK, P.: Poí ao é si
LAN/MAN/WAN a jejich aplikace, G ada,
2003, ISBN 80-247-0545-1.
[3] PUŽMANOVÁ, R.: Mode ní komunikaní sí
os A do Z, Compu e p ess 2002, ISBN 80-
7226-098-7.
[4] i m documen a ion