1 .TH IP 8 "17 January 2002" "iproute2" "Linux"
3 ip \- show / manipulate routing, devices, policy routing and tunnels
10 .RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " | "
16 .BR link " | " addr " | " route " | " rule " | " neigh " | " tunnel " | "\
17 maddr " | " mroute " | " monitor " }"
22 \fB\-V\fR[\fIersion\fR] |
23 \fB\-s\fR[\fItatistics\fR] |
24 \fB\-r\fR[\fIesolve\fR] |
25 \fB\-f\fR[\fIamily\fR] {
26 .BR inet " | " inet6 " | " ipx " | " dnet " | " link " } | "
27 \fB\-o\fR[\fIneline\fR] }
30 .BI "ip link set " DEVICE
31 .RB "{ " up " | " down " | " arp " { " on " | " off " } |"
33 .BR promisc " { " on " | " off " } |"
35 .BR allmulti " { " on " | " off " } |"
37 .BR dynamic " { " on " | " off " } |"
39 .BR multicast " { " on " | " off " } |"
60 .BR "ip addr" " { " add " | " del " } "
61 .IB IFADDR " dev " STRING
64 .BR "ip addr" " { " show " | " flush " } [ " dev
69 .IR PREFIX " ] [ " FLAG-LIST " ] [ "
74 .IR IFADDR " := " PREFIX " | " ADDR
88 .RB "[ " host " | " link " | " global " | "
92 .IR FLAG-LIST " := [ " FLAG-LIST " ] " FLAG
96 .RB "[ " permanent " | " dynamic " | " secondary " | " primary " | "\
97 tentative " | " deprecated " ]"
101 .BR list " | " flush " } "
107 .BI from " ADDRESS " iif " STRING"
114 .BR "ip route" " { " add " | " del " | " change " | " append " | "\
115 replace " | " monitor " } "
136 .IR ROUTE " := " NODE_SPEC " [ " INFO_SPEC " ]"
139 .IR NODE_SPEC " := [ " TYPE " ] " PREFIX " ["
152 .IR INFO_SPEC " := " "NH OPTIONS FLAGS" " ["
163 .IR NUMBER " ] " NHFLAGS
166 .IR OPTIONS " := " FLAGS " [ "
186 .BR unicast " | " local " | " broadcast " | " multicast " | "\
187 throw " | " unreachable " | " prohibit " | " blackhole " | " nat " ]"
190 .IR TABLE_ID " := [ "
191 .BR local "| " main " | " default " | " all " |"
196 .BR host " | " link " | " global " |"
205 .BR onlink " | " pervasive " ]"
209 .BR kernel " | " boot " | " static " |"
214 .RB " [ " list " | " add " | " del " ]"
218 .IR SELECTOR " := [ "
238 .BR prohibit " | " reject " | " unreachable " ] [ " realms
239 .RI "[" SRCREALM "/]" DSTREALM " ]"
242 .IR TABLE_ID " := [ "
243 .BR local " | " main " | " default " |"
247 .BR "ip neigh" " { " add " | " del " | " change " | " replace " } { "
251 .BR nud " { " permanent " | " noarp " | " stale " | " reachable " } ] | " proxy
257 .BR "ip neigh" " { " show " | " flush " } [ " to
265 .BR "ip tunnel" " { " add " | " change " | " del " | " show " }"
268 .RB "[ " mode " { " ipip " | " gre " | " sit " } ]"
275 .RB "[ [" i "|" o "]" seq " ] [ [" i "|" o "]" key
277 .RB "[" i "|" o "]" csum " ] ]"
283 .RB "[" no "]" pmtudisc " ]"
289 .IR ADDR " := { " IP_ADDRESS " |"
293 .IR TOS " := { " NUMBER " |"
297 .IR TTL " := { " 1 ".." 255 " | "
301 .IR KEY " := { " DOTTED_QUAD " | " NUMBER " }"
304 .BR "ip maddr" " [ " add " | " del " ]"
305 .IB MULTIADDR " dev " STRING
308 .BR "ip maddr show" " [ " dev
312 .BR "ip mroute show" " ["
320 .BR "ip monitor" " [ " all " |"
321 .IR LISTofOBJECTS " ]"
328 .BR "\-V" , " -Version"
329 print the version of the
334 .BR "\-s" , " \-stats", " \-statistics"
335 output more information. If the option
336 appears twice or more, the amount of information increases.
337 As a rule, the information is statistics or some time values.
340 .BR "\-f" , " \-family"
341 followed by protocol family identifier:
342 .BR "inet" , " inet6"
345 ,enforce the protocol family to use. If the option is not present,
346 the protocol family is guessed from other arguments. If the rest
347 of the command line does not give enough information to guess the
350 falls back to the default one, usually
355 is a special family identifier meaning that no networking protocol
366 .BR "\-family inet6" .
371 .BR "\-family link" .
374 .BR "\-o" , " \-oneline"
375 output each record on a single line, replacing line feeds
378 character. This is convenient when you want to count records
386 .BR "\-r" , " \-resolve"
387 use the system's name resolver to print DNS names instead of
390 .SH IP - COMMAND SYNTAX
401 - protocol (IP or IPv6) address on a device.
404 - ARP or NDISC cache entry.
408 - routing table entry.
412 - rule in routing policy database.
420 - multicast routing cache entry.
427 The names of all objects may be written in full or
428 abbreviated form, f.e.
438 Specifies the action to perform on the object.
439 The set of possible actions depends on the object type.
440 As a rule, it is possible to
441 .BR "add" , " delete"
446 ) objects, but some objects do not allow all of these operations
447 or have some additional commands. The
449 command is available for all objects. It prints
450 out a list of available commands and argument syntax conventions.
452 If no command is given, some default command is assumed.
455 or, if the objects of this class cannot be listed,
458 .SH ip link - network device configuration
461 is a network device and the corresponding commands
462 display and change the state of devices.
464 .SS ip link set - change device attributes
467 .BI dev " NAME " (default)
469 specifies network device to operate on.
473 change the state of the device to
479 .BR "arp on " or " arp off"
485 .BR "multicast on " or " multicast off"
491 .BR "dynamic on " or " dynamic off"
498 change the name of the device. This operation is not
499 recommended if the device is running or has some addresses
503 .BI txqueuelen " NUMBER"
506 change the transmit queue length of the device.
515 .BI address " LLADDRESS"
516 change the station address of the interface.
519 .BI broadcast " LLADDRESS"
523 .BI peer " LLADDRESS"
524 change the link layer broadcast address or the peer address when
530 If multiple parameter changes are requested,
532 aborts immediately after any of the changes have failed.
533 This is the only case when
535 can move the system to an unpredictable state. The solution
536 is to avoid changing several parameters with one
540 .SS ip link show - display device attributes
543 .BI dev " NAME " (default)
545 specifies the network device to show.
546 If this argument is omitted all devices are listed.
550 only display running interfaces.
552 .SH ip address - protocol address management.
556 is a protocol (IP or IPv6) address attached
557 to a network device. Each device must have at least one address
558 to use the corresponding protocol. It is possible to have several
559 different addresses attached to one device. These addresses are not
560 discriminated, so that the term
562 is not quite appropriate for them and we do not use it in this document.
566 command displays addresses and their properties, adds new addresses
567 and deletes old ones.
569 .SS ip address add - add new protocol address.
573 the name of the device to add the address to.
576 .BI local " ADDRESS " (default)
577 the address of the interface. The format of the address depends
578 on the protocol. It is a dotted quad for IP and a sequence of
579 hexadecimal halfwords separated by colons for IPv6. The
581 may be followed by a slash and a decimal number which encodes
582 the network prefix length.
586 the address of the remote endpoint for pointopoint interfaces.
589 may be followed by a slash and a decimal number, encoding the network
590 prefix length. If a peer address is specified, the local address
591 cannot have a prefix length. The network prefix is associated
592 with the peer rather than with the local address.
595 .BI broadcast " ADDRESS"
596 the broadcast address on the interface.
598 It is possible to use the special symbols
602 instead of the broadcast address. In this case, the broadcast address
603 is derived by setting/resetting the host bits of the interface prefix.
607 Each address may be tagged with a label string.
608 In order to preserve compatibility with Linux-2.0 net aliases,
609 this string must coincide with the name of the device or must be prefixed
610 with the device name followed by colon.
613 .BI scope " SCOPE_VALUE"
614 the scope of the area where this address is valid.
615 The available scopes are listed in file
616 .BR "/etc/iproute2/rt_scopes" .
617 Predefined scope values are:
621 - the address is globally valid.
624 - (IPv6 only) the address is site local, i.e. it is
625 valid inside this site.
628 - the address is link local, i.e. it is valid only on this device.
631 - the address is valid only inside this host.
634 .SS ip address delete - delete protocol address
636 coincide with the arguments of
638 The device name is a required argument. The rest are optional.
639 If no arguments are given, the first address is deleted.
641 .SS ip address show - look at protocol addresses
644 .BI dev " NAME " (default)
648 .BI scope " SCOPE_VAL"
649 only list addresses with this scope.
653 only list addresses matching this prefix.
657 only list addresses with labels matching the
660 is a usual shell style pattern.
663 .BR dynamic " and " permanent
664 (IPv6 only) only list addresses installed due to stateless
665 address configuration or only list permanent (not dynamic)
670 (IPv6 only) only list addresses which did not pass duplicate
675 (IPv6 only) only list deprecated addresses.
678 .BR primary " and " secondary
679 only list primary (or secondary) addresses.
681 .SS ip address flush - flush protocol addresses
682 This command flushes the protocol addresses selected by some criteria.
685 This command has the same arguments as
687 The difference is that it does not run when no arguments are given.
691 This command (and other
693 commands described below) is pretty dangerous. If you make a mistake,
694 it will not forgive it, but will cruelly purge all the addresses.
699 option, the command becomes verbose. It prints out the number of deleted
700 addresses and the number of rounds made to flush the address list. If
701 this option is given twice,
703 also dumps all the deleted addresses in the format described in the
706 .SH ip neighbour - neighbour/arp tables management.
709 objects establish bindings between protocol addresses and
710 link layer addresses for hosts sharing the same link.
711 Neighbour entries are organized into tables. The IPv4 neighbour table
712 is known by another name - the ARP table.
715 The corresponding commands display neighbour bindings
716 and their properties, add new neighbour entries and delete old ones.
718 .SS ip neighbour add - add a new neighbour entry
719 .SS ip neighbour change - change an existing entry
720 .SS ip neighbour replace - add a new entry or change an existing one
722 These commands create new neighbour records or update existing ones.
725 .BI to " ADDRESS " (default)
726 the protocol address of the neighbour. It is either an IPv4 or IPv6 address.
730 the interface to which this neighbour is attached.
733 .BI lladdr " LLADDRESS"
734 the link layer address of the neighbour.
741 the state of the neighbour entry.
743 is an abbreviation for 'Neigh bour Unreachability Detection'.
744 The state can take one of the following values:
748 - the neighbour entry is valid forever and can be only
749 be removed administratively.
753 - the neighbour entry is valid. No attempts to validate
754 this entry will be made but it can be removed when its lifetime expires.
758 - the neighbour entry is valid until the reachability
763 - the neighbour entry is valid but suspicious.
766 does not change the neighbour state if it was valid and the address
767 is not changed by this command.
770 .SS ip neighbour delete - delete a neighbour entry
771 This command invalidates a neighbour entry.
774 The arguments are the same as with
784 Attempts to delete or manually change a
786 entry created by the kernel may result in unpredictable behaviour.
787 Particularly, the kernel may try to resolve this address even
790 interface or if the address is multicast or broadcast.
792 .SS ip neighbour show - list neighbour entries
794 This commands displays neighbour tables.
797 .BI to " ADDRESS " (default)
798 the prefix selecting the neighbours to list.
802 only list the neighbours attached to this device.
806 only list neighbours which are not currently in use.
810 only list neighbour entries in this state.
812 takes values listed below or the special value
814 which means all states. This option may occur more than once.
815 If this option is absent,
817 lists all entries except for
822 .SS ip neighbour flush - flush neighbour entries
823 This command flushes neighbour tables, selecting
824 entries to flush by some criteria.
827 This command has the same arguments as
829 The differences are that it does not run when no arguments are given,
830 and that the default neighbour states to be flushed do not include
838 option, the command becomes verbose. It prints out the number of
839 deleted neighbours and the number of rounds made to flush the
840 neighbour table. If the option is given
843 also dumps all the deleted neighbours.
845 .SH ip route - routing table management
846 Manipulate route entries in the kernel routing tables keep
847 information about paths to other networked nodes.
853 - the route entry describes real paths to the destinations covered
858 - these destinations are unreachable. Packets are discarded and the
862 The local senders get an
868 - these destinations are unreachable. Packets are discarded silently.
869 The local senders get an
875 - these destinations are unreachable. Packets are discarded and the
877 .I communication administratively prohibited
878 is generated. The local senders get an
884 - the destinations are assigned to this host. The packets are looped
885 back and delivered locally.
889 - the destinations are broadcast addresses. The packets are sent as
894 - a special control route used together with policy rules. If such a
895 route is selected, lookup in this table is terminated pretending that
896 no route was found. Without policy routing it is equivalent to the
897 absence of the route in the routing table. The packets are dropped
900 is generated. The local senders get an
906 - a special NAT route. Destinations covered by the prefix
907 are considered to be dummy (or external) addresses which require translation
908 to real (or internal) ones before forwarding. The addresses to translate to
909 are selected with the attribute
914 .RI "- " "not implemented"
917 addresses assigned to this host. They are mainly equivalent
920 with one difference: such addresses are invalid when used
921 as the source address of any packet.
925 - a special type used for multicast routing. It is not present in
926 normal routing tables.
931 Linux-2.x can pack routes into several routing
932 tables identified by a number in the range from 1 to 255 or by
934 .B /etc/iproute2/rt_tables
935 . By default all normal routes are inserted into the
937 table (ID 254) and the kernel only uses this table when calculating routes.
940 Actually, one other table always exists, which is invisible but
941 even more important. It is the
943 table (ID 255). This table
944 consists of routes for local and broadcast addresses. The kernel maintains
945 this table automatically and the administrator usually need not modify it
948 The multiple routing tables enter the game when
952 .SS ip route add - add new route
953 .SS ip route change - change route
954 .SS ip route replace - change or add new one
957 .BI to " TYPE PREFIX " (default)
958 the destination prefix of the route. If
968 is an IP or IPv6 address optionally followed by a slash and the
969 prefix length. If the length of the prefix is missing,
971 assumes a full-length host route. There is also a special
974 - which is equivalent to IP
983 the Type Of Service (TOS) key. This key has no associated mask and
984 the longest match is understood as: First, compare the TOS
985 of the route and of the packet. If they are not equal, then the packet
986 may still match a route with a zero TOS.
988 is either an 8 bit hexadecimal number or an identifier
990 .BR "/etc/iproute2/rt_dsfield" .
995 .BI preference " NUMBER"
996 the preference value of the route.
998 is an arbitrary 32bit number.
1001 .BI table " TABLEID"
1002 the table to add this route to.
1004 may be a number or a string from the file
1005 .BR "/etc/iproute2/rt_tables" .
1006 If this parameter is omitted,
1010 table, with the exception of
1011 .BR local " , " broadcast " and " nat
1012 routes, which are put into the
1018 the output device name.
1022 the address of the nexthop router. Actually, the sense of this field
1023 depends on the route type. For normal
1025 routes it is either the true next hop router or, if it is a direct
1026 route installed in BSD compatibility mode, it can be a local address
1027 of the interface. For NAT routes it is the first address of the block
1028 of translated IP destinations.
1032 the source address to prefer when sending to the destinations
1033 covered by the route prefix.
1036 .BI realm " REALMID"
1037 the realm to which this route is assigned.
1039 may be a number or a string from the file
1040 .BR "/etc/iproute2/rt_realms" .
1045 .BI "mtu lock" " MTU"
1046 the MTU along the path to the destination. If the modifier
1048 is not used, the MTU may be updated by the kernel due to
1049 Path MTU Discovery. If the modifier
1051 is used, no path MTU discovery will be tried, all packets
1052 will be sent without the DF bit in IPv4 case or fragmented
1056 .BI window " NUMBER"
1057 the maximal window for TCP to advertise to these destinations,
1058 measured in bytes. It limits maximal data bursts that our TCP
1059 peers are allowed to send to us.
1063 the initial RTT ('Round Trip Time') estimate.
1066 .BI rttvar " NUMBER " "(2.3.15+ only)"
1067 the initial RTT variance estimate.
1070 .BI ssthresh " NUMBER " "(2.3.15+ only)"
1071 an estimate for the initial slow start threshold.
1074 .BI cwnd " NUMBER " "(2.3.15+ only)"
1075 the clamp for congestion window. It is ignored if the
1080 .BI advmss " NUMBER " "(2.3.15+ only)"
1081 the MSS ('Maximal Segment Size') to advertise to these
1082 destinations when establishing TCP connections. If it is not given,
1083 Linux uses a default value calculated from the first hop device MTU.
1084 (If the path to these destination is asymmetric, this guess may be wrong.)
1087 .BI reordering " NUMBER " "(2.3.15+ only)"
1088 Maximal reordering on the path to this destination.
1089 If it is not given, Linux uses the value selected with
1092 .BR "net/ipv4/tcp_reordering" .
1095 .BI nexthop " NEXTHOP"
1096 the nexthop of a multipath route.
1098 is a complex value with its own syntax similar to the top level
1103 - is the nexthop router.
1107 - is the output device.
1110 .BI weight " NUMBER"
1111 - is a weight for this element of a multipath
1112 route reflecting its relative bandwidth or quality.
1116 .BI scope " SCOPE_VAL"
1117 the scope of the destinations covered by the route prefix.
1119 may be a number or a string from the file
1120 .BR "/etc/iproute2/rt_scopes" .
1121 If this parameter is omitted,
1130 .BR unicast " and " broadcast
1132 .BR host " for " local
1136 .BI protocol " RTPROTO"
1137 the routing protocol identifier of this route.
1139 may be a number or a string from the file
1140 .BR "/etc/iproute2/rt_protos" .
1141 If the routing protocol ID is not given,
1142 .B ip assumes protocol
1144 (i.e. it assumes the route was added by someone who doesn't
1145 understand what they are doing). Several protocol values have
1146 a fixed interpretation.
1151 - the route was installed due to an ICMP redirect.
1155 - the route was installed by the kernel during autoconfiguration.
1159 - the route was installed during the bootup sequence.
1160 If a routing daemon starts, it will purge all of them.
1164 - the route was installed by the administrator
1165 to override dynamic routing. Routing daemon will respect them
1166 and, probably, even advertise them to its peers.
1170 - the route was installed by Router Discovery protocol.
1174 The rest of the values are not reserved and the administrator is free
1175 to assign (or not to assign) protocol tags.
1179 pretend that the nexthop is directly attached to this link,
1180 even if it does not match any interface prefix.
1184 allow packet by packet randomization on multipath routes.
1185 Without this modifier, the route will be frozen to one selected
1186 nexthop, so that load splitting will only occur on per-flow base.
1188 only works if the kernel is patched.
1190 .SS ip route delete - delete route
1193 has the same arguments as
1194 .BR "ip route add" ,
1195 but their semantics are a bit different.
1198 .RB "(" to ", " tos ", " preference " and " table ")"
1199 select the route to delete. If optional attributes are present,
1201 verifies that they coincide with the attributes of the route to delete.
1202 If no route with the given key and attributes was found,
1206 .SS ip route show - list routes
1207 the command displays the contents of the routing tables or the route(s)
1208 selected by some criteria.
1211 .BI to " SELECTOR " (default)
1212 only select routes from the given range of destinations.
1214 consists of an optional modifier
1215 .RB "(" root ", " match " or " exact ")"
1218 selects routes with prefixes not shorter than
1222 selects the entire routing table.
1224 selects routes with prefixes not longer than
1227 .BI match " 10.0/16"
1230 .IR 10/8 " and " 0/0 ,
1231 but it does not select
1232 .IR 10.1/16 " and " 10.0.0/24 .
1237 selects routes with this exact prefix. If neither of these options
1242 i.e. it lists the entire table.
1247 only select routes with the given TOS.
1250 .BI table " TABLEID"
1251 show the routes from this table(s). The default setting is to show
1254 may either be the ID of a real table or one of the special values:
1258 - list all of the tables.
1261 - dump the routing cache.
1268 list cloned routes i.e. routes which were dynamically forked from
1269 other routes because some route attribute (f.e. MTU) was updated.
1270 Actually, it is equivalent to
1271 .BR "table cache" "."
1274 .BI from " SELECTOR"
1275 the same syntax as for
1277 but it binds the source address range rather than destinations.
1280 option only works with cloned routes.
1283 .BI protocol " RTPROTO"
1284 only list routes of this protocol.
1287 .BI scope " SCOPE_VAL"
1288 only list routes with this scope.
1292 only list routes of this type.
1296 only list routes going via this device.
1300 only list routes going via the nexthop routers selected by
1305 only list routes with preferred source addresses selected
1310 .BI realm " REALMID"
1312 .BI realms " FROMREALM/TOREALM"
1313 only list routes with these realms.
1315 .SS ip route flush - flush routing tables
1316 this command flushes routes selected by some criteria.
1319 The arguments have the same syntax and semantics as the arguments of
1320 .BR "ip route show" ,
1321 but routing tables are not listed but purged. The only difference is
1324 dumps all the IP main routing table but
1326 prints the helper page.
1331 option, the command becomes verbose. It prints out the number of
1332 deleted routes and the number of rounds made to flush the routing
1333 table. If the option is given
1336 also dumps all the deleted routes in the format described in the
1337 previous subsection.
1339 .SS ip route get - get a single route
1340 this command gets a single route to a destination and prints its
1341 contents exactly as the kernel sees it.
1344 .BI to " ADDRESS " (default)
1345 the destination address.
1355 the Type Of Service.
1359 the device from which this packet is expected to arrive.
1363 force the output device on which this packet will be routed.
1367 if no source address
1368 .RB "(option " from ")"
1369 was given, relookup the route with the source set to the preferred
1370 address received from the first lookup.
1371 If policy routing is used, it may be a different route.
1374 Note that this operation is not equivalent to
1375 .BR "ip route show" .
1377 shows existing routes.
1379 resolves them and creates new clones if necessary. Essentially,
1381 is equivalent to sending a packet along this path.
1384 argument is not given, the kernel creates a route
1385 to output packets towards the requested destination.
1386 This is equivalent to pinging the destination
1388 .BR "ip route ls cache" ,
1389 however, no packets are actually sent. With the
1391 argument, the kernel pretends that a packet arrived from this interface
1392 and searches for a path to forward the packet.
1394 .SH ip rule - routing policy database management
1397 in the routing policy database control the route selection algorithm.
1400 Classic routing algorithms used in the Internet make routing decisions
1401 based only on the destination address of packets (and in theory,
1402 but not in practice, on the TOS field).
1405 In some circumstances we want to route packets differently depending not only
1406 on destination addresses, but also on other packet fields: source address,
1407 IP protocol, transport protocol ports or even packet payload.
1408 This task is called 'policy routing'.
1411 To solve this task, the conventional destination based routing table, ordered
1412 according to the longest match rule, is replaced with a 'routing policy
1413 database' (or RPDB), which selects routes by executing some set of rules.
1416 Each policy routing rule consists of a
1419 .B action predicate.
1420 The RPDB is scanned in the order of increasing priority. The selector
1421 of each rule is applied to {source address, destination address, incoming
1422 interface, tos, fwmark} and, if the selector matches the packet,
1423 the action is performed. The action predicate may return with success.
1424 In this case, it will either give a route or failure indication
1425 and the RPDB lookup is terminated. Otherwise, the RPDB program
1426 continues on the next rule.
1429 Semantically, natural action is to select the nexthop and the output device.
1432 At startup time the kernel configures the default RPDB consisting of three
1437 Priority: 0, Selector: match anything, Action: lookup routing
1443 table is a special routing table containing
1444 high priority control routes for local and broadcast addresses.
1446 Rule 0 is special. It cannot be deleted or overridden.
1450 Priority: 32766, Selector: match anything, Action: lookup routing
1456 table is the normal routing table containing all non-policy
1457 routes. This rule may be deleted and/or overridden with other
1458 ones by the administrator.
1462 Priority: 32767, Selector: match anything, Action: lookup routing
1468 table is empty. It is reserved for some post-processing if no previous
1469 default rules selected the packet.
1470 This rule may also be deleted.
1473 Each RPDB entry has additional
1474 attributes. F.e. each rule has a pointer to some routing
1475 table. NAT and masquerading rules have an attribute to select new IP
1476 address to translate/masquerade. Besides that, rules have some
1477 optional attributes, which routes have, namely
1479 These values do not override those contained in the routing tables. They
1480 are only used if the route did not select any attributes.
1483 The RPDB may contain rules of the following types:
1487 - the rule prescribes to return the route found
1488 in the routing table referenced by the rule.
1491 - the rule prescribes to silently drop the packet.
1494 - the rule prescribes to generate a 'Network is unreachable' error.
1497 - the rule prescribes to generate 'Communication is administratively
1501 - the rule prescribes to translate the source address
1502 of the IP packet into some other value.
1505 .SS ip rule add - insert a new rule
1506 .SS ip rule delete - delete a rule
1509 .BI type " TYPE " (default)
1510 the type of this rule. The list of valid types was given in the previous
1515 select the source prefix to match.
1519 select the destination prefix to match.
1523 select the incoming device to match. If the interface is loopback,
1524 the rule only matches packets originating from this host. This means
1525 that you may create separate routing tables for forwarded and local
1526 packets and, hence, completely segregate them.
1532 select the TOS value to match.
1541 .BI priority " PREFERENCE"
1542 the priority of this rule. Each rule should have an explicitly
1548 .BI table " TABLEID"
1549 the routing table identifier to lookup if the rule selector matches.
1552 .BI realms " FROM/TO"
1553 Realms to select if the rule matched and the routing table lookup
1556 is only used if the route did not select any realm.
1560 The base of the IP address block to translate (for source addresses).
1563 may be either the start of the block of NAT addresses (selected by NAT
1564 routes) or a local host address (or even zero).
1565 In the last case the router does not translate the packets, but
1566 masquerades them to this address.
1569 Changes to the RPDB made with these commands do not become active
1570 immediately. It is assumed that after a script finishes a batch of
1571 updates, it flushes the routing cache with
1572 .BR "ip route flush cache" .
1574 .SS ip rule show - list rules
1575 This command has no arguments.
1577 .SH ip maddress - multicast addresses management
1580 objects are multicast addresses.
1582 .SS ip maddress show - list multicast addresses
1585 .BI dev " NAME " (default)
1588 .SS ip maddress add - add a multicast address
1589 .SS ip maddress delete - delete a multicast address
1590 these commands attach/detach a static link layer multicast address
1591 to listen on the interface.
1592 Note that it is impossible to join protocol multicast groups
1593 statically. This command only manages link layer addresses.
1596 .BI address " LLADDRESS " (default)
1597 the link layer multicast address.
1601 the device to join/leave this multicast address.
1603 .SH ip mroute - multicast routing cache management
1605 objects are multicast routing cache entries created by a user level
1606 mrouting daemon (f.e.
1612 Due to the limitations of the current interface to the multicast routing
1613 engine, it is impossible to change
1615 objects administratively, so we may only display them. This limitation
1616 will be removed in the future.
1618 .SS ip mroute show - list mroute cache entries
1621 .BI to " PREFIX " (default)
1622 the prefix selecting the destination multicast addresses to list.
1626 the interface on which multicast packets are received.
1630 the prefix selecting the IP source addresses of the multicast route.
1632 .SH ip tunnel - tunnel configuration
1634 objects are tunnels, encapsulating packets in IPv4 packets and then
1635 sending them over the IP infrastructure.
1637 .SS ip tunnel add - add a new tunnel
1638 .SS ip tunnel change - change an existing tunnel
1639 .SS ip tunnel delete - destroy a tunnel
1642 .BI name " NAME " (default)
1643 select the tunnel device name.
1647 set the tunnel mode. Three modes are currently available:
1648 .BR ipip ", " sit " and " gre "."
1651 .BI remote " ADDRESS"
1652 set the remote endpoint of the tunnel.
1655 .BI local " ADDRESS"
1656 set the fixed local address for tunneled packets.
1657 It must be an address on another interface of this host.
1663 on tunneled packets.
1665 is a number in the range 1--255. 0 is a special value
1666 meaning that packets inherit the TTL value.
1667 The default value is:
1676 on tunneled packets.
1677 The default value is:
1682 bind the tunnel to the device
1684 so that tunneled packets will only be routed via this device and will
1685 not be able to escape to another device when the route to endpoint
1690 disable Path MTU Discovery on this tunnel.
1691 It is enabled by default. Note that a fixed ttl is incompatible
1692 with this option: tunnelling with a fixed ttl always makes pmtu
1701 .RB ( " only GRE tunnels " )
1702 use keyed GRE with key
1704 is either a number or an IP address-like dotted quad.
1707 parameter sets the key to use in both directions.
1709 .BR ikey " and " okey
1710 parameters set different keys for input and output.
1713 .BR csum ", " icsum ", " ocsum
1714 .RB ( " only GRE tunnels " )
1715 generate/require checksums for tunneled packets.
1718 flag calculates checksums for outgoing packets.
1721 flag requires that all input packets have the correct
1724 flag is equivalent to the combination
1728 .BR seq ", " iseq ", " oseq
1729 .RB ( " only GRE tunnels " )
1733 flag enables sequencing of outgoing packets.
1736 flag requires that all input packets are serialized.
1739 flag is equivalent to the combination
1741 .B It isn't work. Don't use it.
1743 .SS ip tunnel show - list tunnels
1744 This command has no arguments.
1746 .SH ip monitor and rtmon - state monitoring
1750 utility can monitor the state of devices, addresses
1751 and routes continuously. This option has a slightly different format.
1754 command is the first in the command line and then the object list follows:
1756 .BR "ip monitor" " [ " all " |"
1757 .IR LISTofOBJECTS " ]"
1760 is the list of object types that we want to monitor.
1762 .BR link ", " address " and " route "."
1767 opens RTNETLINK, listens on it and dumps state changes in the format
1768 described in previous sections.
1771 If a file name is given, it does not listen on RTNETLINK,
1772 but opens the file containing RTNETLINK messages saved in binary format
1773 and dumps them. Such a history file can be generated with the
1775 utility. This utility has a command line syntax similar to
1779 should be started before the first network configuration command
1780 is issued. F.e. if you insert:
1783 rtmon file /var/log/rtmon.log
1786 in a startup script, you will be able to view the full history
1790 Certainly, it is possible to start
1793 It prepends the history with the state snapshot dumped at the moment
1799 was written by Alexey N. Kuznetsov and added in Linux 2.2.
1803 .RB "IP Command reference " ip-cref.ps
1805 .RB "IP tunnels " ip-cref.ps
1809 Manpage maintained by Michail Litvak <mci@owl.openwall.com>