Debian logo [inetdoc.LINUX]




[inetdoc.LINUX]

http://www.linux-france.org/prj/inetdoc
Administration Système & Réseau

  • Étude de 2 systèmes de fichiers réseau
    • Système de fichiers virtuel
    • Services Internet & fichiers
    • Network File System (NFS)
    • Remote Procedure Call (RPC)
    • Common Internet File System (SMB|CIFS)
images/ups.png
Philippe Latu
philippe.latu(at)linux-france.org
IUT 'A' Paul Sabatier - IUP STRI

$Id: admin.reseau.fs.mgp 1617 2011-03-27 22:07:46Z latu $

(page 1)

(2/27)
Système de fichiers virtuel
(page 2)

(3/27)
Système de fichiers virtuel

images/vfs.png
(page 3)

(4/27)
Système de fichiers virtuel
(page 4)

(5/27)
Services Internet & fichiers
(page 5)

(6/27)
Services Internet & fichiers
(page 6)

(7/27)
Services Internet & fichiers
(page 7)

(8/27)
Network File System (NFS)
(page 8)

(9/27)
Network File System (NFS)
(page 9)

(10/27)
Network File System (NFS)
(page 10)

(11/27)
Network File System (NFS)
images/vfs-nfs.png
(page 11)

(12/27)
Network File System (NFS)
images/nfsv4-stack.png
(page 12)

(13/27)
Network File System (NFS)
(page 13)

(14/27)
Network File System (NFS)
images/nfs-export-mount.png
(page 14)

(15/27)
Network File System (NFS)
(page 15)

(16/27)
Network File System (NFS)
[192.168.1.1]:~# exportfs
/var/exports 192.168.1.4
^ ^
| `----- Désignation du client
`----- Répertoire exporté
  • Côté client : montage vers le répertoire /mnt
[192.168.1.4]:~# mount -t nfs -o nfsvers=3 \ 192.168.1.1:/var/exports /mnt
^ ^
| `----- Répertoire
| local client
`----- Désignation du serveur
[192.168.1.4]:~# ls /mnt
[192.168.1.4]:~# umount /mnt

(page 16)

(17/27)
Network File System (NFS)
192.168.1.4 -> 192.168.1.1 Portmap V2 DUMP Call 192.168.1.1 -> 192.168.1.4 Portmap V2 DUMP Reply (Call In 6) 192.168.1.4 -> 192.168.1.1 MOUNT V3 MNT Call <<- appel commande mount 192.168.1.1 -> 192.168.1.4 MOUNT V3 MNT Reply (Call In 14)
192.168.1.4 -> 192.168.1.1 Portmap V2 GETPORT Call 192.168.1.1 -> 192.168.1.4 Portmap V2 GETPORT Reply (Call In 17) 192.168.1.4 -> 192.168.1.1 NFS V3 FSINFO Call, FH:0xc4480c84 <<- appel commande ls 192.168.1.1 -> 192.168.1.4 NFS V3 FSINFO Reply (Call In 19)
192.168.1.4 -> 192.168.1.1 NFS V3 GETATTR Call, FH:0xc4480c84
192.168.1.1 -> 192.168.1.4 NFS V3 GETATTR Reply (Call In 21)
192.168.1.4 -> 192.168.1.1 NFS V3 ACCESS Call, FH:0xc4480c84
192.168.1.1 -> 192.168.1.4 NFS V3 ACCESS Reply (Call In 25)
192.168.1.4 -> 192.168.1.1 NFS V3 READDIRPLUS Call, FH:0xc4480c84
192.168.1.1 -> 192.168.1.4 NFS V3 READDIRPLUS Reply (Call In 27)
192.168.1.4 -> 192.168.1.1 Portmap V2 GETPORT Call 192.168.1.1 -> 192.168.1.4 Portmap V2 GETPORT Reply (Call In 29) 192.168.1.4 -> 192.168.1.1 MOUNT V1 UMNT Call <<- appel commande umount 192.168.1.1 -> 192.168.1.4 MOUNT V1 UMNT Reply (Call In 31)

(page 17)

(18/27)
Network File System (NFS)
(page 18)

(19/27)
Remote Procedure Calls (RPC)
(page 19)

(20/27)
Remote Procedure Calls (RPC)
images/rpc.png
(page 20)

(21/27)
Common Internet File System (CIFS)
(page 21)

(22/27)
Common Internet File System (CIFS)
images/ms-stack.png
(page 22)

(23/27)
Common Internet File System (CIFS)
phil@[192.168.1.1]:~$ rpcclient -U phil 192.168.1.6
Password:
rpcclient $> enumprivs
found 5 privileges
SeMachineAccountPrivilege 0:6 (0x0:0x6)
SeSecurityPrivilege 0:8 (0x0:0x8)
SeTakeOwnershipPrivilege 0:9 (0x0:0x9)
SaAddUsers 0:65281 (0x0:0xff01)
SaPrintOp 0:65283 (0x0:0xff03)
rpcclient $> exit

(page 23)

(24/27)
Common Internet File System (CIFS)
192.168.1.1 -> 192.168.1.6 TCP 58296 > microsoft-ds [SYN] ...
192.168.1.6 -> 192.168.1.1 TCP microsoft-ds > 58296 [SYN, ACK] ...
192.168.1.1 -> 192.168.1.6 TCP 58296 > microsoft-ds [ACK] ...
192.168.1.1 -> 192.168.1.6 SMB Negotiate Protocol Request
192.168.1.6 -> 192.168.1.1 TCP microsoft-ds > 58296 [ACK] ...
192.168.1.6 -> 192.168.1.1 SMB Negotiate Protocol Response
192.168.1.1 -> 192.168.1.6 TCP 58296 > microsoft-ds [ACK] ...
192.168.1.1 -> 192.168.1.6 SMB Session Setup AndX Request, User: \\phil
192.168.1.6 -> 192.168.1.1 TCP microsoft-ds > 58296 [ACK] ... <- authentification OK192.168.1.6 -> 192.168.1.1 SMB Session Setup AndX Response
192.168.1.1 -> 192.168.1.6 SMB Tree Connect AndX Request, Path: \\\\192.168.1.6\\IPC$
192.168.1.6 -> 192.168.1.1 SMB Tree Connect AndX Response
192.168.1.1 -> 192.168.1.6 SMB NT Create AndX Request, Path: \\lsarpc
192.168.1.6 -> 192.168.1.1 SMB NT Create AndX Response, FID: 0x76b2

(page 24)

(25/27)
Common Internet File System (CIFS)
192.168.1.1 -> 192.168.1.6 DCERPC Bind: call_id: 1 UUID: LSA
192.168.1.6 -> 192.168.1.1 DCERPC Bind_ack: call_id:
1 accept max_xmit: 4280 max_recv: 4280
192.168.1.1 -> 192.168.1.6 LSA LsarOpenPolicy request
192.168.1.6 -> 192.168.1.1 LSA LsarOpenPolicy response
192.168.1.1 -> 192.168.1.6 LSA LsarQueryInformationPolicy request,
Account Domain Information
192.168.1.6 -> 192.168.1.1 LSA LsarQueryInformationPolicy response
192.168.1.1 -> 192.168.1.6 LSA LsarClose request
192.168.1.6 -> 192.168.1.1 LSA LsarClose response
192.168.1.1 -> 192.168.1.6 SMB Close Request, FID: 0x76b2
192.168.1.6 -> 192.168.1.1 SMB Close Response
192.168.1.1 -> 192.168.1.6 TCP 58296 > microsoft-ds [ACK] ...
192.168.1.1 -> 192.168.1.6 SMB NT Create AndX Request, Path: \\lsarpc
192.168.1.6 -> 192.168.1.1 SMB NT Create AndX Response, FID: 0x76b3
192.168.1.1 -> 192.168.1.6 TCP 58296 > microsoft-ds [ACK] ...

(page 25)

(26/27)
Common Internet File System (CIFS)
192.168.1.1 -> 192.168.1.6 DCERPC Bind: call_id: 5 UUID: LSA
192.168.1.6 -> 192.168.1.1 DCERPC Bind_ack: call_id:
5 accept max_xmit: 4280 max_recv: 4280
192.168.1.1 -> 192.168.1.6 LSA LsarOpenPolicy request
192.168.1.6 -> 192.168.1.1 LSA LsarOpenPolicy response
192.168.1.1 -> 192.168.1.6 LSA LsarEnumeratePrivileges request
192.168.1.6 -> 192.168.1.1 LSA LsarEnumeratePrivileges response
192.168.1.1 -> 192.168.1.6 TCP 58296 > microsoft-ds [ACK] ...
192.168.1.1 -> 192.168.1.6 TCP 58296 > microsoft-ds [FIN, ACK] ...
192.168.1.6 -> 192.168.1.1 TCP microsoft-ds > 58296 [FIN, ACK] ...
192.168.1.1 -> 192.168.1.6 TCP 58296 > microsoft-ds [ACK] ...

(page 26)

(27/27)
Synthèse NFS vs. CIFS
(page 27)