Linux FTP NFS recognition and distinction

Source: Internet
Author: User
Tags file transfer protocol filezilla ftp protocol

FTP (file Transfer Protocol, Files Transfer Protocol), Application layer protocol, cross-platform. As its name, can only implement file transfer function, can not implement some other functions, such as file system mount and other functions.

NFS (Network File system, network filesystem), which works in kernel mode, makes it difficult to achieve cross-platform. Because of the file system implementation, the use of mounts can be implemented under Linux.

Win7 already has NFS capability

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6D/15/wKioL1VcM9aTPT23AAHkHs9JEck519.jpg "title=" Win.png "alt=" Wkiol1vcm9atpt23aahkhs9jeck519.jpg "/>

Win10 not yet.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6D/1A/wKiom1VcMmnQiVZsAAHyAVXxLdo608.jpg "title=" Win10.png "alt=" Wkiom1vcmmnqivzsaahyavxxldo608.jpg "/>

The SMB (Service Message Block Protocol), which enables file sharing between Windows and Linux hosts, enables cross-platform implementation of CIFS on Linux (Common Internet file System) protocol.

    1. FTP protocol

        1. Working mode

Active mode:

    1. 21 ports on the client Request server first establish a command connection

    2. The server responds to the client and establishes a data connection to the client with the 5000+ random port

    3. start data transfer

    1. belongs to the C/s (client/server) architecture, based on socket communication.

    2. The FTP protocol uses 2 different TCP connections: One is the command connection, the server communicates with the client command, listens on the TCP/21 port, and the other is the data connection, which is used to transmit the data, and the listening port is random.


Note: Considering that the client firewall is likely to connect the server to create a random port to shut out, the passive mode has produced a passive mode:
    1. 21 ports on the client Request server first establish a command connection

    2. when the server receives the request, it randomly generates the port and feeds back to the client. P1 p2

    3. The client transmits data between the 5000+ port and the server-side random port (p1*256+p2)

    1. Note: There is a firewall problem with passive mode, but the server-side firewall has a connection tracking feature to resolve this issue. Therefore, the passive mode uses more

    2. User authentication

    1. Anonymous User: The login name is anonymous and no password is required

    2. System User: FTP server local user and password, default access is the user home directory

    3. Virtual User: Used only to access specific resources on the server. You can specify user files or databases to use. The virtual user will eventually be mapped to a system user, so the default access is for the system user home directory

Common FTP Tools
      1. Service side

        1. Linux side: Vsftpd,pureftp ....

        2. Windows side: Seru,filezilla-server ...

      2. Client

        1. Linux side: Ftp,lftp,lftpget,wget,curl ...

        2. Windows side: FileZilla

NFS Protocol
  1. RPC (remote Procedure call Protocol) Remoting procedure Invocation protocol

    1. Part of the functionality is done by a local program that completes another part of the function by a function on the remote host. Some operations are performed when the client mounts the file system of the NFS server. However, the Protocol is a protocol implemented at the kernel level, and RPC is the protocol that handles the problem by sending a function call to the server side of the client's operation, which is performed by the server side.

  2. Idmapd

    1. In this case, after the NFS client mounts the file system, it creates a file locally as a user, which user is the owner of the file on the server side? This was addressed early through NIS (Network information Services), but when transferring accounts and passwords, the use of plaintext is now implemented using Ldap+clbbler. However, NFS uses the IDMAPD service, which has RPC provided to map all the users back to Nfsnobody, but when accessed, it is used by local users corresponding to the local UID.

  3. Mounted

    1. NFS do to control which clients can access, and those that are not accessible? NFS only supports the control of clients via IP, which is implemented by the daemon mounted, and the ports it listens to are semi-random. The so-called semi-random refers to that this random port is determined by the RPC service, and RPC is a random way. function is equivalent to the role of community door security.

  4. NFS Request Process

    1. Request process: When the client tries this to mount a file system that uses NFS sharing, the client first goes back with the Postmapper (tcp/111) port to register the use, at which point Postmapper randomly assigns a port to mounted, Then mounted this daemon will be to verify the legitimacy of the client, after verification, the request will be submitted to the NFS service, the client can mount the use, the user when creating the file, will use the IDMAPD daemon to map the owner. In fact, IDMAPD is also provided by the RPC service, but here, the NFS service uses the user mapping function, will automatically call this daemon.

Samba protocol
  1. Smb:service Message Block

  2. Cifs:common the Internet File System Universal Network filesystem, the protocol shared between Windows systems, and Samba implements the protocol, enabling file sharing between Windows and Linux

  3. Port to listen on:

    1. tcp/137 udp/137 tcp/139 udp/139

    2. 137: Is the implementation of the NetBIOS Protocol, to resolve the resolution of the host name between Windows, the implementation of the WINDWOS network neighbor can see the name of the Linux hostname

    3. 139: The CIFS protocol is implemented

  4. Interactive data access;

    1. Smbclient-l Host-u USERNAME

  5. After you get the shared information:

    1. Smbclient//server/shared_name-u USERNAME

  6. Mount-based access;

    1. Mount-t CIFS//server/shared_name/mount_point-o Uername=username,pasword=password


This article is from the "Ops Dog" blog, make sure to keep this source http://yunweigou.blog.51cto.com/6299641/1653362

Linux FTP NFS recognition and distinction

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.