---
name: "gateways"
section: "5"
platform: "linux"
package: "netbase"
version: "4.07"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/gateways"
---

# gateways(5)

File which lists gateways for routed

## NAME

gateways - File which lists gateways for routed

## DESCRIPTION

**/etc/gateways** is used by [**routed**(8)](/routed/8.md); the file contains a list of gateways which may not be located by using only information from the SIOGIFCONF [**ioctl**(2)](/ioctl/2.md) when  [**routed**(8)](/routed/8.md) is started.

Gateways specified in **/etc/gateways** should be marked passive if they are not expected to exchange routing information, while gateways marked active should be willing to exchange routing information (i.e. they should have a [**routed**(8)](/routed/8.md) process running on the machine). Routes through passive gateways are installed in the kernel's routing tables once upon startup. Such routes are not included in any routing information transmitted. Active gateways are treated equally to network interfaces.  Routing information is distributed to the gateway and if no routing information is received for a period of time, the associated route is deleted. Gateways marked *external* are also passive, but are not placed in the kernel routing table nor are they included in routing updates. The function of external entries is to inform [**routed**(8)](/routed/8.md) that another routing process will install such a route, and that alternate routes to that destination should not be installed. Such entries are only required when both routers may learn of routes to the same destination.

**/etc/gateways** is comprised of a series of lines, each in the following format:

\[ **net** \| **host** \] *name1* **gateway** *name2* **metric** *value* \[ **passive** \| **active** \| **external** \]

The  **net** or **host** keyword indicates if the route is to a network or specific host.

*Name1* is the name of the destination network or host.  This may be a symbolic name located in */etc/networks* or */etc/hosts* (or, if started after [**named**(8)](/named/8.md), known to the name server),  or an Internet address specified in \`\`dot'' notation; see [**inet**(3)](/inet/3.md).

*Name2* is the name or address of the gateway to which messages should be forwarded.

*Value* is a metric indicating the hop count to the destination host or network.

One of the keywords **passive,** **active** or **external** indicates if the gateway should be treated as  *passive* or *active* (as described above), or whether the gateway is *external* to the scope of the [**routed**(8)](/routed/8.md) protocol.

Internetwork routers that are directly attached to the Arpanet or Milnet should use the Exterior Gateway Protocol EGP to gather routing information rather then using a static routing table of passive gateways. EGP is required in order to provide routes for local networks to the rest of the Internet system.

## FILES

*/etc/gateways*

## SEE ALSO

*Internet Transport Protocols*, XSIS 028112, Xerox System Integration Standard, [**routed**(8)](/routed/8.md).

## HISTORY

The [**routed**(8)](/routed/8.md) command appeared in 4.2BSD.

## AUTHOR

This manpage was extracted from  [**routed**(8)](/routed/8.md) by Steve Kostecke, \<steve@debian.org\>, for the Debian GNU/Linux system.
