Menu
Is free
registration
home  /  Installation and configuration/ What is the networks file for in windows. What is Networks and how to fix it? Versions and variations

What is the networks file for windows. What is Networks and how to fix it? Versions and variations

Etc folder is the folder which contains the following text files hosts, lmhosts.sam, networks, protocol, services are the standard contents of the etc folder for Windows XP and Windows 7.

Everything about the etc folder

It's easy to find where the etc folder is, click "Start" - "Computer" - " Local diskС "-" Windows "-" System32 "-" drivers "-" etc ".

What files are in the etc folder

If you have lost the etc folder, you can download the etc folder for Windows 7 and for Windows 8.

Now I will describe how to restore the etc folder by downloading the archive of the etc folder and unzip it. Copy only etc, find where it should be and paste. The etc folder for Windows 7 is no different from the etc folder for Windows XP. The contents of the etc folder in Windows 7 are different from Windows 8. In Windows 8, there are two more files in the etc folder: hosts.backup and hosts.rollback. The complete contents of the etc Windows 8 hosts, lmhosts.sam, networks, protocol, services, hosts.backup and hosts.rollback folder. Viruses usually change the contents of two files: hosts file in the etc folder and the services file in the etc. folder. You can open files in the etc folder using notepad.

Good time, dear readers. I am publishing the second part. In the current part, the main emphasis is on Linux networking(how to set up a network in Linux, how to diagnose a network in Linux and keep the network subsystem in working order in Linux).

Configuring TCP / IP on Linux for Ethernet

To work with network protocols TCP / IP in Linux is enough to have only loopback interface, but if you need to combine hosts with each other, of course, you need a network interface, data transmission channels (for example, twisted pair), possibly some kind of network equipment. Also, you need to have installed (, etc.), usually supplied in. It also requires network availability (eg / etc / hosts) and network support.

Network parameters

Let's start understanding Linux networking mechanisms with manual network configuration, that is, with the case when IP address network interface static... So, when setting up a network, you need to take into account and configure the following parameters:

IP address- as already mentioned in the first part of the article - this is a unique address of the machine, in the format of four decimal numbers, separated by dots. Usually, when working in local network, is selected from private ranges, for example: 192.168.0.1

Subnet mask- also, 4 decimal numbers that determine which part of the address belongs to the network / subnet address, and which part to the host address. A subnet mask is a number that is logical AND added (in binary) to an IP address to find out which subnet the address belongs to. For example, the address 192.168.0.2 with a mask of 255.255.255.0 belongs to the subnet 192.168.0.

Subnet address- determined by the subnet mask. However, there are no subnets for loopback interfaces.

Broadcast address is the address used to send broadcast packets that will be received by all hosts on the subnet. Usually, it is equal to the subnet address with a host value of 255, that is, for the 192.168.0 subnet, the broadcast will be 192.168.0.255, similarly, for the 192.168 subnet, the broadcast will be 192.168.255.255. There is no broadcast address for loopback interfaces.

Gateway IP address is the address of the machine that is the default gateway for communication with outside world... There can be several gateways if the computer is connected to several networks at the same time. The gateway address is not used on isolated networks (not connected to global network) because these networks have nowhere to send packets outside of the network, the same applies to loopback interfaces.

Name server (DNS) IP address- the address of the server that converts hostnames to IP addresses. Usually provided by your ISP.

Linux network configuration files (configuration files)

To understand networking in Linux, I would definitely advise you to read the article "". In general, all the work of Linux is based on, which is born when the OS boots and procreates its descendants, who, in turn, perform all necessary work, whether it's starting bash or a daemon. Yes, that's all Linux boot based on, in which the entire sequence of launching small utilities with various parameters is written, which are sequentially started / stopped when the system starts / stops. The Linux networking subsystem starts in the same way.

Every Linux distribution has a slightly different network initialization mechanism, but the general picture, I think, after reading it will be clear. If you look at the startup scripts of the network subsystem of any Linux distribution, then how to configure the network configuration using config files, it will become more or less clear, for example, in Debian (we will take this distribution as a basis), the script is responsible for initializing the network /etc/init.d/networking by looking at which:

Net-server: ~ # cat /etc/init.d/networking #! / Bin / sh -e ### BEGIN INIT INFO # Provides: networking # Required-Start: mountkernfs $ local_fs # Required-Stop: $ local_fs # Should -Start: ifupdown # Should-Stop: ifupdown # Default-Start: S # Default-Stop: 0 6 # Short-Description: Raise network interfaces. ### END INIT INFO PATH = "/ usr / local / sbin: / usr / local / bin: / sbin: / bin: / usr / sbin: / usr / bin" [-x / sbin / ifup] || exit 0. / lib / lsb / init-functions process_options () ([-e / etc / network / options] || return 0 log_warning_msg "/ etc / network / options still exists and it will be IGNORED! Read README.Debian of netbase." ) check_network_file_systems () ([-e / proc / mounts] || return 0 if [-e /etc/iscsi/iscsi.initramfs]; then log_warning_msg "not deconfiguring network interfaces: iSCSI root is mounted." exit 0 fi exec 9<&0 < /proc/mounts while read DEV MTPT FSTYPE REST; do case $DEV in /dev/nbd*|/dev/nd*|/dev/etherd/e*) log_warning_msg "not deconfiguring network interfaces: network devices still mounted." exit 0 ;; esac case $FSTYPE in nfs|nfs4|smbfs|ncp|ncpfs|cifs|coda|ocfs2|gfs|pvfs|pvfs2|fuse.httpfs|fuse.curlftpfs) log_warning_msg "not deconfiguring network interfaces: network file systems still mounted." exit 0 ;; esac done exec 0<&9 9<&- } check_network_swap() { [ -e /proc/swaps ] || return 0 exec 9<&0 < /proc/swaps while read DEV MTPT FSTYPE REST; do case $DEV in /dev/nbd*|/dev/nd*|/dev/etherd/e*) log_warning_msg "not deconfiguring network interfaces: network swap still mounted." exit 0 ;; esac done exec 0<&9 9<&- } case "$1" in start) process_options log_action_begin_msg "Configuring network interfaces" if ifup -a; then log_action_end_msg $? else log_action_end_msg $? fi ;; stop) check_network_file_systems check_network_swap log_action_begin_msg "Deconfiguring network interfaces" if ifdown -a --exclude=lo; then log_action_end_msg $? else log_action_end_msg $? fi ;; force-reload|restart) process_options log_warning_msg "Running $0 $1 is deprecated because it may not enable again some interfaces" log_action_begin_msg "Reconfiguring network interfaces" ifdown -a --exclude=lo || true if ifup -a --exclude=lo; then log_action_end_msg $? else log_action_end_msg $? fi ;; *) echo "Usage: /etc/init.d/networking {start|stop}" exit 1 ;; esac exit 0

you can find several functions that check for mapped network filesystems ( check_network_file_systems (), check_network_swap ()), as well as checking the existence of some still incomprehensible config / etc / network / options ( function process_options ()), and at the very bottom, with the construction case "$ 1" in and in accordance with the entered parameter (start / stop / force-reload | restart or any other) performs certain actions. Of these " certain actions", the example of the start argument shows that the function is started first process_options, then the phrase is sent to the log Configuring network interfaces, and the command is run ifup -a... If you look at man ifup, you can see that this command reads the config from the file / etc / network / interfaces and according to the key -a starts all interfaces that have a parameter auto.

The ifup and ifdown commands may be used to configure (or, respectively, deconfigure) network interfaces based on interface definitions in the file / etc / network / interfaces.

-a, --all
If given to ifup, affect all interfaces marked auto. Interfaces are brought up in the order in which they are defined in / etc / network / interfaces. If given to ifdown, affect all defined interfaces. Interfaces are brought down in the order in which they are currently listed in the state file. Only interfaces defined in / etc / network / interfaces will be brought down.

ip-server: ~ # cat / etc / network / interfaces # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces (5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface allow-hotplug eth0 iface eth0 inet dhcp allow-hotplug eth2 iface eth2 inet static address 192.168.1.1 netmask 255.255.255.0 gateway 192.168.1.254 broadcast 192.168.1.255

In this config, the lines allow-hotplug and auto- these are synonyms and interfaces will be raised on command ifup -a... That, in fact, is the whole chain of work of the network subsystem. Similarly, in other distributions: in RedHat and SUSE, the network is started by a script /etc/init.d/network... Having examined it, you can similarly find where the network configuration lies.

/ etc / hosts

This file stores a list IP addresses and corresponding hostnames (addresses) The file format is no different from the mastday one:

Ip-server: ~ # cat / etc / hosts # ip host.in.domain host 127.0.0.1 localhost 127.0.1.1 ip-server.domain.local ip-server 192.168.1.1 ip-server.domain.local ip-server

Historically, this file has been used instead of the DNS service. Currently, the file can also be used instead of the DNS service, but only on condition that the number of machines in your network is measured in units, and not in tens or hundreds, because in this case, you will have to control the correctness of this file on each machine.

/ etc / hostname

This file contains NetBIOS hostname:

Ip-server: ~ # cat / etc / hostname ip-server

This file stores the names and addresses of local and other networks. Example:

Ip-server: ~ # cat / etc / networks default 0.0.0.0 loopback 127.0.0.0 link-local 169.254.0.0 home-network 192.168.1.0

When using this file, networks can be controlled by name. For example add a route not route add 192.168.1.12 , a route add.

/etc/nsswitch.conf

The file defines hostname lookup order/ networks, the following lines are responsible for this setting:

For hosts: hosts: files dns For networks: networks: files

Parameter files specifies to use the specified files (/ etc / hosts and / etc / networks respectively), parameter dns specifies to use the service dns.

/etc/host.conf

The file sets the name resolution options for the resolver

Ip-server: ~ # cat /etc/host.conf multi on

This file tells the resolv library to return all valid host addresses that appear in the / etc / hosts file, not just the first one.

/etc/resolv.conf

This file defines the parameters of the mechanism for converting network names to IP addresses. In simple language, defines DNS settings... Example:

Ip-server: ~ # cat /etc/resolv.conf nameserver 10.0.0.4 nameserver 10.0.0.1 search domain.local

First 2 lines indicate DNS servers... The third line indicates the search domains. If, when resolving a name, the name will not be an FQDN-name, then this domain will be substituted in the form of "ending". For example, when you run the ping host command, the ping address is converted to host.domain.local. The rest of the parameters can be read in man resolv.conf. Very often, in Linux, dynamic generation of this file is used, using the so-called. programs / sbin / resolvconf. This program mediates between services that dynamically provide nameservers (for example DHCP client) and services using nameserver data. To use a dynamically generated file /etc/resolv.conf, you need to make this file a symbolic link to /etc/resolvconf/run/resolv.conf... In some distributions, the path may be different, this will definitely be written in man resolvconf.

Network configuration

After familiarizing yourself with the main configuration files, you can look at. It was already mentioned above about the command ifup, ifdown, but these tools are not quite universal, let's say there are no such commands by default in RH distributions. In addition, new distributions have a new high-level network management tool - which belongs to the iproute package. I will dedicate to him (the iproute packet). And in the current post I will not consider it. The commands below are owned by.

So, to be sure that the command works in any Linux distribution, you need to use two basic old-man commands. This, and arp. The first team (responsible for configuring network interfaces(ip, mask, gateway), the second () - configuring routing, third (arp) - arp table management... I would like to note that executing these commands without disabling the standard SystemV startup script of the network subsystem will make changes only before the first reboot / restart of the network service, since if you use your brains, you can understand that the script /etc/init.d/networking at the next start, it will re-read the above configs and apply the old settings. Accordingly, the output for permanently setting the settings - either the ifconfig command with the appropriate parameters - is entered into, or manually correct the corresponding configs of the network interfaces.

Likewise, if the command is executed ifconfig with missing parameters(for example, only the IP address), then the rest are added automatically (for example, the broadcast address is added by default with a host address ending in 255 and the default subnet mask is 255.255.255.0).

Routing for existing interfaces in modern kernels it is always raised automatically by the kernel. Rather, direct routes to the network according to the IP settings and the subnet into which the raised interface looks are formed automatically by the forces of the kernel. The gateway field for such entries shows the address of the outgoing interface or *. In older versions of the kernel (the number of the kernel from which routes began to be ascended automatically - I will not prompt), it was necessary to add a route manually.

If there is a need to organize your routes then you need to use. With this command, you can add and remove routes, but again, this will only help until you restart /etc/init.d/networking (or another script responsible for the network in your distribution). In order for routes to be added automatically, it is necessary in the same way as with the ifconfig command - add commands for adding routes to rc.local, or manually correct the corresponding configs of network interfaces (for example, in Deb - / etc / network / options).

What are the rules routes to networks are formed, I'm in

Linux Network Diagnostics

There are a large number of Linux network diagnostic tools, often very similar to those from Microsoft. I will cover 3 basic network diagnostic utilities, without which it will be problematic to troubleshoot problems.

I think that this utility is familiar to almost everyone. The work of this utility is dispatch so-called ICMP packets to the remote server, which will be specified in the command parameters, the server returns the sent commands, and pingcounts the time required for the sent packet to reach the server and return. For example:

# ping ya.ru PING ya.ru (87.250.251.3) 56 (84) bytes of data. 64 bytes from www.yandex.ru (87.250.251.3): icmp_seq = 1 ttl = 57 time = 42.7 ms 64 bytes from www.yandex.ru (87.250.251.3): icmp_seq = 2 ttl = 57 time = 43.2 ms 64 bytes from www.yandex.ru (87.250.251.3): icmp_seq = 3 ttl = 57 time = 42.5 ms 64 bytes from www.yandex.ru (87.250.251.3): icmp_seq = 4 ttl = 57 time = 42.5 ms 64 bytes from www .yandex.ru (87.250.251.3): icmp_seq = 5 ttl = 57 time = 41.9 ms ^ C --- ya.ru ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4012ms rtt min / avg / max / mdev = 41.922 / 42.588 / 43.255 / 0.500 ms

As you can see from the above example, ping gives us a lot of useful information. First of all, we found out that we can establish a connection with the host ya.ru(sometimes they say that "the host ya.ru is available to us"). Secondly, we see that DNS is working correctly, because the "pinged" name was correctly translated into an IP address (PING ya.ru (87.250.251.3)). Further, in field icmp_seq = numbering of sent packets is specified... Each sent packet is sequentially assigned a number, and if there are "gaps" in this numbering, then this will tell us that the connection with the "pinged" is unstable, and may also mean that the server to which the packets are sent is overloaded. By value time = we see, how long did the package travel to 87.250.251.3 and back. You can stop the ping utility by pressing Ctrl + C.

Same way, ping utility interesting in that it can allow you to see exactly where the problem occurred. Let's say ping utility displays a message network not reachable, or another similar message. This most likely indicates an incorrect configuration of your system. In this case, you can send packets to the provider's IP address in order to understand where the problem occurs (between the local PC or "further"). If you are connected to the Internet through a router, you can send packets over its IP. Accordingly, if the problem manifests itself already at this stage, it means that the local system is incorrectly configured, or that the cable is damaged, if the router responds, but the provider's server does not, then the problem is in the provider's communication channel, etc. Finally, if the conversion of the name to IP failed, then you can check the connection by IP, if the answers come correctly, then you can guess that the problem is in DNS.

It should be noted that this utility is not always a reliable diagnostic tool. The remote server can block replies to ICMP requests.

traceroute

In simple terms, the command is called route trace... As the name implies, this utility will show which route the packets took to the host. Traceroute utility somewhat similar to ping but displays more interesting information. Example:

# traceroute ya.ru traceroute to ya.ru (213.180.204.3), 30 hops max, 60 byte packets 1 243-083-free.kubtelecom.ru (213.132.83.243) 6.408 ms 6.306 ms 6.193 ms 2 065-064-free .kubtelecom.ru (213.132.64.65) 2.761 ms 5.787 ms 5.777 ms 3 lgw.kubtelecom.ru (213.132.75.54) 5.713 ms 5.701 ms 5.636 ms 4 KubTelecom-lgw.Krasnodar.gldn.net (194.186.6.177) 81.430 ms 81.581 ms 81.687 ms 5 cat26.Moscow.gldn.net (194.186.10.118) 47.789 ms 47.888 ms 48.011 ms 6 213.33.201.230 (213.33.201.230) 43.322 ms 41.783 ms 41.106 ms 7 carmine-red-vlan602.yandex.net (87.250. 242.206) 41.199 ms 42.578 ms 42.610 ms 8 www.yandex.ru (213.180.204.3) 43.185 ms 42.126 ms 42.679 ms

As you can see, you can trace the route from the provider's router 243-083-free.kubtelecom.ru (213.132.83.243) (South of Russia) to the final host at www.yandex.ru (213.180.204.3) in Moscow.

dig

This utility sends queries to DNS servers and returns information about the specified domain. Example:

# dig @ ns.kuban.ru roboti.ru;<<>> DiG 9.3.6-P1<<>> @ ns.kuban.ru roboti.ru; (1 server found) ;; global options: printcmd ;; Got answer: ;; - >> HEADER<<- opcode: QUERY, status: NOERROR, id: 64412 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 0 ;; QUESTION SECTION: ;roboti.ru. IN A ;; ANSWER SECTION: roboti.ru. 448 IN A 72.52.4.90 ;; AUTHORITY SECTION: roboti.ru. 345448 IN NS ns1.sedoparking.com. roboti.ru. 345448 IN NS ns2.sedoparking.com. ;; Query time: 102 msec ;; SERVER: 62.183.1.244#53(62.183.1.244) ;; WHEN: Thu Feb 17 19:44:59 2011 ;; MSG SIZE rcvd: 94

Dig command sent a request DNS server - ns.kuban.ru (@ ns.kuban.ru- this parameter is optional, in which case the server from the settings of your system will be taken as the source of information about DNS) about the domain name roboti.ru... As a result, I received an answer, in which we can see in the section ANSWER SECTION information about the IP addresses of the domain, in the section AUTHORITY SECTION information about the so-called authoritative DNS servers. The third line from the bottom tells us which server provided the response.

Other diagnostic utilities

ping, dig and other diagnostic utilities with parameters can be found in the post.

Connecting a new network card

Connecting and launching a new network card comes down to performing several steps:

1. Physical connection of the card

3. Viewing the output for detection by the system of a new network card:

Let's see the output BEFORE connecting a new card:

Server: ~ # dmesg | grep eth [4.720550] e1000: eth0: e1000_probe: Intel (R) PRO / 1000 Network Connection [5.130191] e1000: eth1: e1000_probe: Intel (R) PRO / 1000 Network Connection [15.285527] e1000: eth2: e1000_watchdog: NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX [15.681056] e1000: eth0: e1000_watchdog: NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX

the output shows that the system has 2 network cards eth1 and eth2. We connect the third and see the output:

Server: ~ # dmesg | grep eth [4.720513] e1000: eth0: e1000_probe: Intel (R) PRO / 1000 Network Connection [5.132029] e1000: eth1: e1000_probe: Intel (R) PRO / 1000 Network Connection [5.534684] e1000: eth2: e1000_probe: Intel (R ) PRO / 1000 Network Connection [39.274875] udev: renamed network interface eth2 to eth3 [39.287661] udev: renamed network interface eth1_rename_ren to eth2 [45.670744] e1000: eth2: e1000_watchdog: NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX [46.237232] e1000: eth0: e1000_watchdog: NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX [96.977468] e1000: eth3: e1000_watchdog: NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX

V dmesg we see that there is a new network girl - eth3, which is actually eth2, but renamed by the udev device manager to eth3, and eth2 is actually a renamed eth1 (we will talk about udev in a separate post). The appearance of our new network in dmesg tells us that the network card supported by kernel and correctly decided... The only thing left to do is to customize the new interface in / etc / network / interfaces(Debian) because the given map was not initialized by the startup script /etc/init.d/network. ifconfig this card is seen by:

Server: ~ # ifconfig eth3 eth3 Link encap: Ethernet HWaddr 08: 00: 27: 5f: 34: ad inet6 addr: fe80 :: a00: 27ff: fe5f: 34ad / 64 Scope: Link UP BROADCAST RUNNING MULTICAST MTU: 1500 Metric: 1 RX packets: 311847 errors: 0 dropped: 0 overruns: 0 frame: 0 TX packets: 126 errors: 0 dropped: 0 overruns: 0 carrier: 0 collisions: 0 txqueuelen: 1000 RX bytes: 104670651 (99.8 MiB) TX bytes: 16184 (15.8 KiB)

but again - it does not configure. How to configure the network card was discussed above.

Summary

I think that's all for today. When I started writing this article, I thought that I would fit into one post, but it turned out to be huge. Therefore, it was decided to split the article into two. In total, I tried to outline, not a step-by-step haut for setting up a network, but to outline the principle and explain the understanding of how a network starts and works in Linux. I really hope that I succeeded. I would be glad to receive your comments and additions. Over time, I will supplement the article.

When it comes to computer networks, you can often hear the mention of NFS. What does this acronym mean?

It is a distributed file system protocol originally developed by Sun Microsystems in 1984 that allows a user on a client computer to access files over a network similar to accessing local storage. NFS, like many other protocols, is based on the Open Network Computing Remote Procedure Call (ONC RPC) system.

In other words, what is NFS? It is an open standard, defined in the Request for Comments (RFC), that allows anyone to implement the protocol.

Versions and variations

The inventor used only the first version for his own experimental purposes. When the development team added significant changes to the original NFS and released it outside of Sun's ownership, they designated the new version as v2 so that interoperability between distributions could be tested and a fallback could be made.

NFS v2

Version 2 originally worked only over the User Datagram Protocol (UDP). Its developers wanted to keep the server side without blocking outside the main protocol.

The virtual file system interface allows for modular implementation reflected in a simple protocol. By February 1986, solutions were demonstrated for operating systems such as System V release 2, DOS, and VAX / VMS using Eunice. NFS v2 only allowed the first 2 GB of a file to be read due to 32-bit limitations.

NFS v3

The first proposal to develop NFS version 3 at Sun Microsystems was announced shortly after the release of the second distribution. The main motivation was to try to mitigate the problem of synchronous write performance. By July 1992, practical improvements had resolved many of the shortcomings of NFS version 2, while leaving only inadequate file support (64-bit file sizes and offsets).

  • Support for 64-bit file sizes and offsets for processing data larger than 2 gigabytes (GB);
  • support for asynchronous recording on the server to improve performance;
  • additional file attributes in many responses to avoid having to retrieve them again;
  • a READDIRPLUS operation to get data and attributes along with filenames when scanning a directory;
  • many other improvements.

During the introduction of version 3, support for TCP as a transport layer protocol began to increase. The use of TCP as a means of transferring data, performed using NFS over the WAN, began to allow large file sizes to be transferred for viewing and writing. This allowed developers to overcome the 8K limit imposed by the User Datagram Protocol (UDP).

What is NFS v4?

Version 4, influenced by the Andrew File System (AFS) and Server Message Block (SMB, also called CIFS), includes performance improvements, better security, and a conditional protocol.

Version 4 was the first distribution developed by the Internet Engineering Task Force (IETF) after Sun Microsystems outsourced protocol development.

NFS version 4.1 aims to provide protocol support for leveraging clustered server deployments, including the ability to provide scalable concurrent file access across multiple servers (pNFS extension).

The newest file system protocol, NFS 4.2 (RFC 7862), was officially released in November 2016.

Other extensions

With the development of the standard, appropriate tools have appeared for working with it. For example, WebNFS, an extension for versions 2 and 3, allows the Network File System Access Protocol to more easily integrate into web browsers and enable work through firewalls.

Various third-party protocols have become associated with NFS as well. The most famous of them are:

  • Network Lock Manager (NLM) with byte protocol support (added to support UNIX System V file locking API);
  • remote quota (RQUOTAD), which allows NFS users to view storage quotas on NFS servers;
  • NFS over RDMA - an adaptation of NFS that uses remote direct memory access (RDMA) as the transmission medium;
  • NFS-Ganesha is a user-space NFS server that supports CephFS FSAL (Filesystem Abstraction Layer) using libcephfs.

Platforms

The Network File System is often used with Unix operating systems (such as Solaris, AIX, HP-UX), Apple's macOS, and Unix-like operating systems (such as Linux and FreeBSD).

It is also available for platforms such as Acorn RISC OS, OpenVMS, MS-DOS, Microsoft Windows, Novell NetWare, and IBM AS / 400.

Alternative remote file access protocols include Server Message Block (SMB, also called CIFS), Apple Transfer Protocol (AFP), NetWare Core Protocol (NCP), and OS / 400 Server File System (QFileSvr.400).

This is due to the requirements of NFS, which are oriented mostly towards Unix-like "shells".

At the same time, SMB and NetWare (NCP) protocols are used more often than NFS on systems running Microsoft Windows. AFP is most common on Apple Macintosh platforms, and QFileSvr.400 is most common on OS / 400.

Typical implementation

Assuming a typical Unix-style scenario where one computer (client) needs access to data stored on another (NFS server):

  • The server implements Network File System processes, started by default as nfsd, to make its data publicly available to clients. The server administrator determines how to export directory names and options, usually using the / etc / exports configuration file and the exportfs command.
  • Administering server security ensures that it can recognize and approve a verified client. Its network configuration ensures that appropriate clients can negotiate with it through any firewall system.
  • The client machine requests access to the exported data, usually by issuing the appropriate command. It queries the server (rpcbind) that is using the NFS port and subsequently connects to it.
  • If all goes well, users on the client machine will be able to view and interact with the installed file systems on the server within the allowed options.

It should be noted that the automation of the Network File System process can also take place - perhaps using etc / fstab and / or other similar means.

Development to date

By the 21st century, rival protocols DFS and AFS have not achieved any major commercial success over the Network File System. IBM, which previously acquired all of the commercial rights to the above technologies, donated most of the AFS source code to the free software community in 2000. The Open AFS project still exists today. In early 2005, IBM announced the completion of AFS and DFS sales.

In turn, in January 2010, Panasas introduced NFS v 4.1, a technology that improves concurrent data access capabilities. Network File System v 4.1 protocol defines a method for separating file system metadata from the location of specific files. So it goes beyond simple name / data separation.

What is NFS of this version in practice? The above feature distinguishes it from the traditional protocol, which contains the names of files and their data under the same binding to the server. With Network File System v 4.1, some files can be distributed across multisite servers, but client participation in separating metadata and data is limited.

In the implementation of the fourth distribution kit of the NFS protocol, the server is a set of server resources or components; they are assumed to be controlled by the metadata server.

The client still contacts the same MDS server to crawl or interact with the namespace. When it moves files to and from the server, it can directly interact with the dataset belonging to the NFS group.

After you have subnetted your network, you should prepare for a simple address lookup using the / etc / hosts file. If you are not going to use DNS or NIS for this, you must put all hosts in the hosts file.

Even if you want to use DNS or NIS, you can have a subset of names in / etc / hosts as well. For example, if you want to have some kind of name lookup even when the network interfaces are not running, for example at boot time. This is not only a matter of convenience, but also allows you to use symbolic hostnames in rc scripts. Thus, when changing IP addresses, you only need to copy the updated hosts file to all machines instead of editing a lot of rc files. Typically you will put all local names and addresses in hosts by adding them to any gateway and NIS server if used.

Also, when checking, you must make sure that the name server only uses information from the hosts file. DNS or NIS software may have sample files that can give strange results when used. To force all applications to exclusively use / etc / hosts when looking up the IP address of a host, you must edit the /etc/host.conf file. Comment out all lines starting with the order keyword and insert the line:

order hosts

The name server library configuration will be detailed in Chapter 6.

The hosts file contains one entry per line, consisting of an IP address, hostname, and an optional list of aliases. Fields are separated by spaces or tabs, the address field must start in the first column. Anything after the # character is treated as a comment and ignored.

The hostname can be fully qualified or specified relative to the local domain. For vale, you would enter the fully qualified name in hosts, vale.vbrew.com, as well as vale itself so that both the official name and the shorter local name are known.

An example hosts file for Virtual Brewery is given below. Two special names, vlager-if1 and vlager-if2, define the addresses for both interfaces used on vlager.