iprouteSection: Linux iproute manual (8)Updated: Sat Mar 22 13:02:26 GMT 1997 |
iprouteSection: Linux iproute manual (8)Updated: Sat Mar 22 13:02:26 GMT 1997 |
iproute
[ add | del ] [ PREFIX | NET mask MASK ] [ tos TOS ]
[ nat NET ] [ class CLASS ] INFO
iproute
[ addrule | delrule ] [ from PREFIX ] [ to PREFIX ] [ tos TOS ]
[ dev DEVICE ] [ masq | drop | reject | prohibit | nat NET ]
[ pref PREFERENCE ] [ class CLASS | INFO ]
PREFIX
can be a net number, or net number and prefix length, e.g.
192.168.0.0
or
192.168.0.0/24
INFO
references any combination of the routing parameters "gw [gateway]",
"dev [device]", "metric [metric]", "mtu [mtu]", "irtt [rtt]",
"window [window]", and any of
FLAGS
FLAGS can be any of "static", "reject", "throw", "nopmtudisc", "noforward", "local", "interface", and "broadcast" (reject and throw cannot be specified together, however, as with interface and broadcast).
iproute will modify or show the current policy-based routing tables. These are held in kernel space, so iproute requires root permissions to run. Note that policy based routing tables are a feature of kernels 2.1.16 and above, so you will not be able to use this program unless you have a specific patch with an earlier kernel.
Invoking the program with no command-line will produce a simple list of current routes.
The policy-based routing system is documented fully in the file Documentation/networking/policy-routing.txt which can be found in kernels 2.1.16 and above.