Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Include Page
_IW Academy
_IW Academy

Hide_comments

Scroll Ignore

Table of Contents

...

Center
ParametersDescription

add NET[/MASK] GATEWAY

Adds a route to a table.

  • "NET[/MASK]" – destination network/host IP-address. The parameter can be specified in the following formats:
    • network-address/mask length;
    • network-address:mask;
    • network-address;
    • default.
  • "GATEWAY" – IP-address of a router through which a destination network/host is attainable.
delete NET[/MASK]

Deletes a route from a table.

[-iface]Routing through the network interface. An IP-address of the interface through which routing is assigned becomes a gateway IP-address.
[-nostatic]

All routes that are described using the "route add" command have absolute priority. No dynamic routing protocols including DHCP can replace the static route in the routing table. "nostatic" option deny that.

E.g. DHCP may place a new default route in the table, after it disappears a static route will be restored to the previous value.

Examples

Add the route to the table.

Code Block
languagetext
themeEmacs
route add default 195.38.44.129
route add 193.124.189.0/27 195.38.44.108
route add 193.124.189.0:255.255.255.224 195.38.44.108.