---
name: "sfs_hosts"
section: "5"
platform: "linux"
package: "sfs-server"
version: "1:0.8-0+pre20060720.1-1"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/sfs_hosts"
---

# sfs\_hosts(5)

Host to address mapping overriding DNS

## NAME

sfs\_hosts - Host to address mapping overriding DNS

## DESCRIPTION

All SFS client software uses DNS to locate server names.  This is somewhat different from typical network utilities, which, often depending on a configuration file such as */etc/nsswitch.conf*, can sometimes combine DNS with other techniques, such as scanning the file */etc/hosts* or querying NIS (YP) servers.

SFS relies exclusively on DNS for several reasons.  First, the file system is designed to provide a global namespace.  Using */etc/hosts*, for example, it is common for a machine to have two names--for instance **hostname**, and **hostname.domain.com**. However, were the same file system to be available under two different self-certifying pathnames, several things would go wrong:  First, bookmarks to */sfs/@hostname,.../...* would only work on the local network.  Even worse, it might be possible to lose a file by accidentally copying it onto itself, e.g., from */sfs/@hostname,.../...* to */sfs/@hostname.domain.com,.../...*.  Finally, SFS allows one to specify a TCP port number other than the default (4) using DNS SRV records, while non-DNS mechanisms have no means of specifying port numbers.

Though DNS is fairly ubiquitous, there are situations in which one might like to have \`\`internal'' connections to SFS servers routed differently from \`\`external'' ones.  For example, when running SFS servers behind a NAT box, external connections would need to be directed to the external IP address of the NAT box, while it would be more efficient to route internal connections directly to the internal IP address, without going through the NAT.  In such situations, often the best solution is to set up a split DNS configuration.  When split DNS is not an option, however, the *sfs\_hosts* mechanism will come in handy.

*sfs\_hosts* is a superset of the standard */etc/hosts* file format, that additionally allows one to specify a port number by appending it with a **%** character at the end of the address.  By default, the port number is 4.  For example, the following two lines both specify that **server.domain.com** is running on port 4 of IP address **10.1.1.1**:

```
  10.1.1.1          server.domain.com
  10.1.1.1%4        server.domain.com
```

If you really want */etc/hosts* to override DNS with SFS, you can always run **ln -s ../hosts /etc/sfs/sfs\_hosts**, but this is not recommended.  Solutions involving DNS configuration will be much more scalable and flexible.

## FILES

- */etc/sfs/sfs\_hosts*

  - */usr/local/share/sfs/sfs\_hosts*

  Host to address mapping overriding DNS

(Files in */etc/sfs* supersede default versions in */usr/local/share/sfs*.)

## SEE ALSO

[*dirsearch*(1)](/dirsearch/1.md), [*newaid*(1)](/newaid/1.md), [*rex*(1)](/rex/1.md), [*sfsagent*(1)](/sfsagent/1.md), [*sfskey*(1)](/sfskey/1.md), [*ssu*(1)](/ssu/1.md), *sfs\_config*(5), [*sfs\_srp\_params*(5)](/sfs_srp_params/5.md), [*sfs\_users*(5)](/sfs_users/5.md), [*sfsauthd\_config*(5)](/sfsauthd_config/5.md), [*sfscd\_config*(5)](/sfscd_config/5.md), *sfsrosd\_config*(5), [*sfsrwsd\_config*(5)](/sfsrwsd_config/5.md), [*sfssd\_config*(5)](/sfssd_config/5.md), [*sfs\_environ*(7)](/sfs_environ/7.md), [*funmount*(8)](/funmount/8.md), *nfsmounter*(8), [*sfsauthd*(8)](/sfsauthd/8.md), [*sfscd*(8)](/sfscd/8.md), *sfsrosd*(8), *sfsrwcd*(8), [*sfsrwsd*(8)](/sfsrwsd/8.md), [*sfssd*(8)](/sfssd/8.md), [*vidb*(8)](/vidb/8.md)

The full documentation for **SFS** is maintained as a Texinfo manual.  If the **info** and **SFS** programs are properly installed at your site, the command **info SFS** should give you access to the complete manual.

For updates, documentation, and software distribution, please see the **SFS** website at *http://www.fs.net/*.

## AUTHOR

sfsdev@redlab.lcs.mit.edu
