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 allmulticast " { " 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 " [ "
188 .BR unicast " | " local " | " broadcast " | " multicast " | "\
189 throw " | " unreachable " | " prohibit " | " blackhole " | " nat " ]"
192 .IR TABLE_ID " := [ "
193 .BR local "| " main " | " default " | " all " |"
198 .BR host " | " link " | " global " |"
207 .BR onlink " | " pervasive " ]"
211 .BR kernel " | " boot " | " static " |"
216 .RB " [ " list " | " add " | " del " | " flush " ]"
220 .IR SELECTOR " := [ "
228 .IR FWMARK[/MASK] " ] [ "
240 .BR prohibit " | " reject " | " unreachable " ] [ " realms
241 .RI "[" SRCREALM "/]" DSTREALM " ]"
244 .IR TABLE_ID " := [ "
245 .BR local " | " main " | " default " |"
249 .BR "ip neigh" " { " add " | " del " | " change " | " replace " } { "
253 .BR nud " { " permanent " | " noarp " | " stale " | " reachable " } ] | " proxy
259 .BR "ip neigh" " { " show " | " flush " } [ " to
267 .BR "ip tunnel" " { " add " | " change " | " del " | " show " }"
270 .RB "[ " mode " { " ipip " | " gre " | " sit " } ]"
277 .RB "[ [" i "|" o "]" seq " ] [ [" i "|" o "]" key
279 .RB "[" i "|" o "]" csum " ] ]"
285 .RB "[" no "]" pmtudisc " ]"
291 .IR ADDR " := { " IP_ADDRESS " |"
295 .IR TOS " := { " NUMBER " |"
299 .IR TTL " := { " 1 ".." 255 " | "
303 .IR KEY " := { " DOTTED_QUAD " | " NUMBER " }"
306 .IR TIME " := " NUMBER "[s|ms|us|ns|j]"
309 .BR "ip maddr" " [ " add " | " del " ]"
310 .IB MULTIADDR " dev " STRING
313 .BR "ip maddr show" " [ " dev
317 .BR "ip mroute show" " ["
325 .BR "ip monitor" " [ " all " |"
326 .IR LISTofOBJECTS " ]"
333 .BR "\-V" , " -Version"
334 print the version of the
339 .BR "\-s" , " \-stats", " \-statistics"
340 output more information. If the option
341 appears twice or more, the amount of information increases.
342 As a rule, the information is statistics or some time values.
345 .BR "\-f" , " \-family"
346 followed by protocol family identifier:
347 .BR "inet" , " inet6"
350 ,enforce the protocol family to use. If the option is not present,
351 the protocol family is guessed from other arguments. If the rest
352 of the command line does not give enough information to guess the
355 falls back to the default one, usually
360 is a special family identifier meaning that no networking protocol
371 .BR "\-family inet6" .
376 .BR "\-family link" .
379 .BR "\-o" , " \-oneline"
380 output each record on a single line, replacing line feeds
383 character. This is convenient when you want to count records
391 .BR "\-r" , " \-resolve"
392 use the system's name resolver to print DNS names instead of
395 .SH IP - COMMAND SYNTAX
406 - protocol (IP or IPv6) address on a device.
409 - ARP or NDISC cache entry.
413 - routing table entry.
417 - rule in routing policy database.
425 - multicast routing cache entry.
432 The names of all objects may be written in full or
433 abbreviated form, f.e.
443 Specifies the action to perform on the object.
444 The set of possible actions depends on the object type.
445 As a rule, it is possible to
446 .BR "add" , " delete"
451 ) objects, but some objects do not allow all of these operations
452 or have some additional commands. The
454 command is available for all objects. It prints
455 out a list of available commands and argument syntax conventions.
457 If no command is given, some default command is assumed.
460 or, if the objects of this class cannot be listed,
463 .SH ip link - network device configuration
466 is a network device and the corresponding commands
467 display and change the state of devices.
469 .SS ip link set - change device attributes
472 .BI dev " NAME " (default)
474 specifies network device to operate on.
478 change the state of the device to
484 .BR "arp on " or " arp off"
490 .BR "multicast on " or " multicast off"
496 .BR "dynamic on " or " dynamic off"
503 change the name of the device. This operation is not
504 recommended if the device is running or has some addresses
508 .BI txqueuelen " NUMBER"
511 change the transmit queue length of the device.
520 .BI address " LLADDRESS"
521 change the station address of the interface.
524 .BI broadcast " LLADDRESS"
528 .BI peer " LLADDRESS"
529 change the link layer broadcast address or the peer address when
535 If multiple parameter changes are requested,
537 aborts immediately after any of the changes have failed.
538 This is the only case when
540 can move the system to an unpredictable state. The solution
541 is to avoid changing several parameters with one
545 .SS ip link show - display device attributes
548 .BI dev " NAME " (default)
550 specifies the network device to show.
551 If this argument is omitted all devices are listed.
555 only display running interfaces.
557 .SH ip address - protocol address management.
561 is a protocol (IP or IPv6) address attached
562 to a network device. Each device must have at least one address
563 to use the corresponding protocol. It is possible to have several
564 different addresses attached to one device. These addresses are not
565 discriminated, so that the term
567 is not quite appropriate for them and we do not use it in this document.
571 command displays addresses and their properties, adds new addresses
572 and deletes old ones.
574 .SS ip address add - add new protocol address.
578 the name of the device to add the address to.
581 .BI local " ADDRESS " (default)
582 the address of the interface. The format of the address depends
583 on the protocol. It is a dotted quad for IP and a sequence of
584 hexadecimal halfwords separated by colons for IPv6. The
586 may be followed by a slash and a decimal number which encodes
587 the network prefix length.
591 the address of the remote endpoint for pointopoint interfaces.
594 may be followed by a slash and a decimal number, encoding the network
595 prefix length. If a peer address is specified, the local address
596 cannot have a prefix length. The network prefix is associated
597 with the peer rather than with the local address.
600 .BI broadcast " ADDRESS"
601 the broadcast address on the interface.
603 It is possible to use the special symbols
607 instead of the broadcast address. In this case, the broadcast address
608 is derived by setting/resetting the host bits of the interface prefix.
612 Each address may be tagged with a label string.
613 In order to preserve compatibility with Linux-2.0 net aliases,
614 this string must coincide with the name of the device or must be prefixed
615 with the device name followed by colon.
618 .BI scope " SCOPE_VALUE"
619 the scope of the area where this address is valid.
620 The available scopes are listed in file
621 .BR "/etc/iproute2/rt_scopes" .
622 Predefined scope values are:
626 - the address is globally valid.
629 - (IPv6 only) the address is site local, i.e. it is
630 valid inside this site.
633 - the address is link local, i.e. it is valid only on this device.
636 - the address is valid only inside this host.
639 .SS ip address delete - delete protocol address
641 coincide with the arguments of
643 The device name is a required argument. The rest are optional.
644 If no arguments are given, the first address is deleted.
646 .SS ip address show - look at protocol addresses
649 .BI dev " NAME " (default)
653 .BI scope " SCOPE_VAL"
654 only list addresses with this scope.
658 only list addresses matching this prefix.
662 only list addresses with labels matching the
665 is a usual shell style pattern.
668 .BR dynamic " and " permanent
669 (IPv6 only) only list addresses installed due to stateless
670 address configuration or only list permanent (not dynamic)
675 (IPv6 only) only list addresses which did not pass duplicate
680 (IPv6 only) only list deprecated addresses.
683 .BR primary " and " secondary
684 only list primary (or secondary) addresses.
686 .SS ip address flush - flush protocol addresses
687 This command flushes the protocol addresses selected by some criteria.
690 This command has the same arguments as
692 The difference is that it does not run when no arguments are given.
696 This command (and other
698 commands described below) is pretty dangerous. If you make a mistake,
699 it will not forgive it, but will cruelly purge all the addresses.
704 option, the command becomes verbose. It prints out the number of deleted
705 addresses and the number of rounds made to flush the address list. If
706 this option is given twice,
708 also dumps all the deleted addresses in the format described in the
711 .SH ip neighbour - neighbour/arp tables management.
714 objects establish bindings between protocol addresses and
715 link layer addresses for hosts sharing the same link.
716 Neighbour entries are organized into tables. The IPv4 neighbour table
717 is known by another name - the ARP table.
720 The corresponding commands display neighbour bindings
721 and their properties, add new neighbour entries and delete old ones.
723 .SS ip neighbour add - add a new neighbour entry
724 .SS ip neighbour change - change an existing entry
725 .SS ip neighbour replace - add a new entry or change an existing one
727 These commands create new neighbour records or update existing ones.
730 .BI to " ADDRESS " (default)
731 the protocol address of the neighbour. It is either an IPv4 or IPv6 address.
735 the interface to which this neighbour is attached.
738 .BI lladdr " LLADDRESS"
739 the link layer address of the neighbour.
746 the state of the neighbour entry.
748 is an abbreviation for 'Neigh bour Unreachability Detection'.
749 The state can take one of the following values:
753 - the neighbour entry is valid forever and can be only
754 be removed administratively.
758 - the neighbour entry is valid. No attempts to validate
759 this entry will be made but it can be removed when its lifetime expires.
763 - the neighbour entry is valid until the reachability
768 - the neighbour entry is valid but suspicious.
771 does not change the neighbour state if it was valid and the address
772 is not changed by this command.
775 .SS ip neighbour delete - delete a neighbour entry
776 This command invalidates a neighbour entry.
779 The arguments are the same as with
789 Attempts to delete or manually change a
791 entry created by the kernel may result in unpredictable behaviour.
792 Particularly, the kernel may try to resolve this address even
795 interface or if the address is multicast or broadcast.
797 .SS ip neighbour show - list neighbour entries
799 This commands displays neighbour tables.
802 .BI to " ADDRESS " (default)
803 the prefix selecting the neighbours to list.
807 only list the neighbours attached to this device.
811 only list neighbours which are not currently in use.
815 only list neighbour entries in this state.
817 takes values listed below or the special value
819 which means all states. This option may occur more than once.
820 If this option is absent,
822 lists all entries except for
827 .SS ip neighbour flush - flush neighbour entries
828 This command flushes neighbour tables, selecting
829 entries to flush by some criteria.
832 This command has the same arguments as
834 The differences are that it does not run when no arguments are given,
835 and that the default neighbour states to be flushed do not include
843 option, the command becomes verbose. It prints out the number of
844 deleted neighbours and the number of rounds made to flush the
845 neighbour table. If the option is given
848 also dumps all the deleted neighbours.
850 .SH ip route - routing table management
851 Manipulate route entries in the kernel routing tables keep
852 information about paths to other networked nodes.
858 - the route entry describes real paths to the destinations covered
863 - these destinations are unreachable. Packets are discarded and the
867 The local senders get an
873 - these destinations are unreachable. Packets are discarded silently.
874 The local senders get an
880 - these destinations are unreachable. Packets are discarded and the
882 .I communication administratively prohibited
883 is generated. The local senders get an
889 - the destinations are assigned to this host. The packets are looped
890 back and delivered locally.
894 - the destinations are broadcast addresses. The packets are sent as
899 - a special control route used together with policy rules. If such a
900 route is selected, lookup in this table is terminated pretending that
901 no route was found. Without policy routing it is equivalent to the
902 absence of the route in the routing table. The packets are dropped
905 is generated. The local senders get an
911 - a special NAT route. Destinations covered by the prefix
912 are considered to be dummy (or external) addresses which require translation
913 to real (or internal) ones before forwarding. The addresses to translate to
914 are selected with the attribute
916 Route NAT is no longer supported in Linux 2.6.
922 .RI "- " "not implemented"
925 addresses assigned to this host. They are mainly equivalent
928 with one difference: such addresses are invalid when used
929 as the source address of any packet.
933 - a special type used for multicast routing. It is not present in
934 normal routing tables.
939 Linux-2.x can pack routes into several routing
940 tables identified by a number in the range from 1 to 255 or by
942 .B /etc/iproute2/rt_tables
943 . By default all normal routes are inserted into the
945 table (ID 254) and the kernel only uses this table when calculating routes.
948 Actually, one other table always exists, which is invisible but
949 even more important. It is the
951 table (ID 255). This table
952 consists of routes for local and broadcast addresses. The kernel maintains
953 this table automatically and the administrator usually need not modify it
956 The multiple routing tables enter the game when
960 .SS ip route add - add new route
961 .SS ip route change - change route
962 .SS ip route replace - change or add new one
965 .BI to " TYPE PREFIX " (default)
966 the destination prefix of the route. If
976 is an IP or IPv6 address optionally followed by a slash and the
977 prefix length. If the length of the prefix is missing,
979 assumes a full-length host route. There is also a special
982 - which is equivalent to IP
991 the Type Of Service (TOS) key. This key has no associated mask and
992 the longest match is understood as: First, compare the TOS
993 of the route and of the packet. If they are not equal, then the packet
994 may still match a route with a zero TOS.
996 is either an 8 bit hexadecimal number or an identifier
998 .BR "/etc/iproute2/rt_dsfield" .
1001 .BI metric " NUMBER"
1003 .BI preference " NUMBER"
1004 the preference value of the route.
1006 is an arbitrary 32bit number.
1009 .BI table " TABLEID"
1010 the table to add this route to.
1012 may be a number or a string from the file
1013 .BR "/etc/iproute2/rt_tables" .
1014 If this parameter is omitted,
1018 table, with the exception of
1019 .BR local " , " broadcast " and " nat
1020 routes, which are put into the
1026 the output device name.
1030 the address of the nexthop router. Actually, the sense of this field
1031 depends on the route type. For normal
1033 routes it is either the true next hop router or, if it is a direct
1034 route installed in BSD compatibility mode, it can be a local address
1035 of the interface. For NAT routes it is the first address of the block
1036 of translated IP destinations.
1040 the source address to prefer when sending to the destinations
1041 covered by the route prefix.
1044 .BI realm " REALMID"
1045 the realm to which this route is assigned.
1047 may be a number or a string from the file
1048 .BR "/etc/iproute2/rt_realms" .
1053 .BI "mtu lock" " MTU"
1054 the MTU along the path to the destination. If the modifier
1056 is not used, the MTU may be updated by the kernel due to
1057 Path MTU Discovery. If the modifier
1059 is used, no path MTU discovery will be tried, all packets
1060 will be sent without the DF bit in IPv4 case or fragmented
1064 .BI window " NUMBER"
1065 the maximal window for TCP to advertise to these destinations,
1066 measured in bytes. It limits maximal data bursts that our TCP
1067 peers are allowed to send to us.
1071 the initial RTT ('Round Trip Time') estimate. If no suffix is
1072 specified the units are raw values passed directly to the
1073 routing code to maintain compatability with previous releases.
1074 Otherwise if a suffix of s, sec or secs is used to specify
1075 seconds; ms, msec or msecs to specify milliseconds; us, usec
1076 or usecs to specify microseconds; ns, nsec or nsecs to specify
1077 nanoseconds; j, hz or jiffies to specify jiffies, the value is
1078 converted to what the routing code expects.
1082 .BI rttvar " TIME " "(2.3.15+ only)"
1083 the initial RTT variance estimate. Values are specified as with
1088 .BI rto_min " TIME " "(2.6.23+ only)"
1089 the minimum TCP Retransmission TimeOut to use when communicating with this
1090 destination. Values are specified as with
1095 .BI ssthresh " NUMBER " "(2.3.15+ only)"
1096 an estimate for the initial slow start threshold.
1099 .BI cwnd " NUMBER " "(2.3.15+ only)"
1100 the clamp for congestion window. It is ignored if the
1105 .BI advmss " NUMBER " "(2.3.15+ only)"
1106 the MSS ('Maximal Segment Size') to advertise to these
1107 destinations when establishing TCP connections. If it is not given,
1108 Linux uses a default value calculated from the first hop device MTU.
1109 (If the path to these destination is asymmetric, this guess may be wrong.)
1112 .BI reordering " NUMBER " "(2.3.15+ only)"
1113 Maximal reordering on the path to this destination.
1114 If it is not given, Linux uses the value selected with
1117 .BR "net/ipv4/tcp_reordering" .
1120 .BI nexthop " NEXTHOP"
1121 the nexthop of a multipath route.
1123 is a complex value with its own syntax similar to the top level
1128 - is the nexthop router.
1132 - is the output device.
1135 .BI weight " NUMBER"
1136 - is a weight for this element of a multipath
1137 route reflecting its relative bandwidth or quality.
1141 .BI scope " SCOPE_VAL"
1142 the scope of the destinations covered by the route prefix.
1144 may be a number or a string from the file
1145 .BR "/etc/iproute2/rt_scopes" .
1146 If this parameter is omitted,
1155 .BR unicast " and " broadcast
1157 .BR host " for " local
1161 .BI protocol " RTPROTO"
1162 the routing protocol identifier of this route.
1164 may be a number or a string from the file
1165 .BR "/etc/iproute2/rt_protos" .
1166 If the routing protocol ID is not given,
1167 .B ip assumes protocol
1169 (i.e. it assumes the route was added by someone who doesn't
1170 understand what they are doing). Several protocol values have
1171 a fixed interpretation.
1176 - the route was installed due to an ICMP redirect.
1180 - the route was installed by the kernel during autoconfiguration.
1184 - the route was installed during the bootup sequence.
1185 If a routing daemon starts, it will purge all of them.
1189 - the route was installed by the administrator
1190 to override dynamic routing. Routing daemon will respect them
1191 and, probably, even advertise them to its peers.
1195 - the route was installed by Router Discovery protocol.
1199 The rest of the values are not reserved and the administrator is free
1200 to assign (or not to assign) protocol tags.
1204 pretend that the nexthop is directly attached to this link,
1205 even if it does not match any interface prefix.
1209 allow packet by packet randomization on multipath routes.
1210 Without this modifier, the route will be frozen to one selected
1211 nexthop, so that load splitting will only occur on per-flow base.
1213 only works if the kernel is patched.
1215 .SS ip route delete - delete route
1218 has the same arguments as
1219 .BR "ip route add" ,
1220 but their semantics are a bit different.
1223 .RB "(" to ", " tos ", " preference " and " table ")"
1224 select the route to delete. If optional attributes are present,
1226 verifies that they coincide with the attributes of the route to delete.
1227 If no route with the given key and attributes was found,
1231 .SS ip route show - list routes
1232 the command displays the contents of the routing tables or the route(s)
1233 selected by some criteria.
1236 .BI to " SELECTOR " (default)
1237 only select routes from the given range of destinations.
1239 consists of an optional modifier
1240 .RB "(" root ", " match " or " exact ")"
1243 selects routes with prefixes not shorter than
1247 selects the entire routing table.
1249 selects routes with prefixes not longer than
1252 .BI match " 10.0/16"
1255 .IR 10/8 " and " 0/0 ,
1256 but it does not select
1257 .IR 10.1/16 " and " 10.0.0/24 .
1262 selects routes with this exact prefix. If neither of these options
1267 i.e. it lists the entire table.
1272 only select routes with the given TOS.
1275 .BI table " TABLEID"
1276 show the routes from this table(s). The default setting is to show
1279 may either be the ID of a real table or one of the special values:
1283 - list all of the tables.
1286 - dump the routing cache.
1293 list cloned routes i.e. routes which were dynamically forked from
1294 other routes because some route attribute (f.e. MTU) was updated.
1295 Actually, it is equivalent to
1296 .BR "table cache" "."
1299 .BI from " SELECTOR"
1300 the same syntax as for
1302 but it binds the source address range rather than destinations.
1305 option only works with cloned routes.
1308 .BI protocol " RTPROTO"
1309 only list routes of this protocol.
1312 .BI scope " SCOPE_VAL"
1313 only list routes with this scope.
1317 only list routes of this type.
1321 only list routes going via this device.
1325 only list routes going via the nexthop routers selected by
1330 only list routes with preferred source addresses selected
1335 .BI realm " REALMID"
1337 .BI realms " FROMREALM/TOREALM"
1338 only list routes with these realms.
1340 .SS ip route flush - flush routing tables
1341 this command flushes routes selected by some criteria.
1344 The arguments have the same syntax and semantics as the arguments of
1345 .BR "ip route show" ,
1346 but routing tables are not listed but purged. The only difference is
1349 dumps all the IP main routing table but
1351 prints the helper page.
1356 option, the command becomes verbose. It prints out the number of
1357 deleted routes and the number of rounds made to flush the routing
1358 table. If the option is given
1361 also dumps all the deleted routes in the format described in the
1362 previous subsection.
1364 .SS ip route get - get a single route
1365 this command gets a single route to a destination and prints its
1366 contents exactly as the kernel sees it.
1369 .BI to " ADDRESS " (default)
1370 the destination address.
1380 the Type Of Service.
1384 the device from which this packet is expected to arrive.
1388 force the output device on which this packet will be routed.
1392 if no source address
1393 .RB "(option " from ")"
1394 was given, relookup the route with the source set to the preferred
1395 address received from the first lookup.
1396 If policy routing is used, it may be a different route.
1399 Note that this operation is not equivalent to
1400 .BR "ip route show" .
1402 shows existing routes.
1404 resolves them and creates new clones if necessary. Essentially,
1406 is equivalent to sending a packet along this path.
1409 argument is not given, the kernel creates a route
1410 to output packets towards the requested destination.
1411 This is equivalent to pinging the destination
1413 .BR "ip route ls cache" ,
1414 however, no packets are actually sent. With the
1416 argument, the kernel pretends that a packet arrived from this interface
1417 and searches for a path to forward the packet.
1419 .SH ip rule - routing policy database management
1422 in the routing policy database control the route selection algorithm.
1425 Classic routing algorithms used in the Internet make routing decisions
1426 based only on the destination address of packets (and in theory,
1427 but not in practice, on the TOS field).
1430 In some circumstances we want to route packets differently depending not only
1431 on destination addresses, but also on other packet fields: source address,
1432 IP protocol, transport protocol ports or even packet payload.
1433 This task is called 'policy routing'.
1436 To solve this task, the conventional destination based routing table, ordered
1437 according to the longest match rule, is replaced with a 'routing policy
1438 database' (or RPDB), which selects routes by executing some set of rules.
1441 Each policy routing rule consists of a
1444 .B action predicate.
1445 The RPDB is scanned in the order of increasing priority. The selector
1446 of each rule is applied to {source address, destination address, incoming
1447 interface, tos, fwmark} and, if the selector matches the packet,
1448 the action is performed. The action predicate may return with success.
1449 In this case, it will either give a route or failure indication
1450 and the RPDB lookup is terminated. Otherwise, the RPDB program
1451 continues on the next rule.
1454 Semantically, natural action is to select the nexthop and the output device.
1457 At startup time the kernel configures the default RPDB consisting of three
1462 Priority: 0, Selector: match anything, Action: lookup routing
1468 table is a special routing table containing
1469 high priority control routes for local and broadcast addresses.
1471 Rule 0 is special. It cannot be deleted or overridden.
1475 Priority: 32766, Selector: match anything, Action: lookup routing
1481 table is the normal routing table containing all non-policy
1482 routes. This rule may be deleted and/or overridden with other
1483 ones by the administrator.
1487 Priority: 32767, Selector: match anything, Action: lookup routing
1493 table is empty. It is reserved for some post-processing if no previous
1494 default rules selected the packet.
1495 This rule may also be deleted.
1498 Each RPDB entry has additional
1499 attributes. F.e. each rule has a pointer to some routing
1500 table. NAT and masquerading rules have an attribute to select new IP
1501 address to translate/masquerade. Besides that, rules have some
1502 optional attributes, which routes have, namely
1504 These values do not override those contained in the routing tables. They
1505 are only used if the route did not select any attributes.
1508 The RPDB may contain rules of the following types:
1512 - the rule prescribes to return the route found
1513 in the routing table referenced by the rule.
1516 - the rule prescribes to silently drop the packet.
1519 - the rule prescribes to generate a 'Network is unreachable' error.
1522 - the rule prescribes to generate 'Communication is administratively
1526 - the rule prescribes to translate the source address
1527 of the IP packet into some other value.
1530 .SS ip rule add - insert a new rule
1531 .SS ip rule delete - delete a rule
1534 .BI type " TYPE " (default)
1535 the type of this rule. The list of valid types was given in the previous
1540 select the source prefix to match.
1544 select the destination prefix to match.
1548 select the incoming device to match. If the interface is loopback,
1549 the rule only matches packets originating from this host. This means
1550 that you may create separate routing tables for forwarded and local
1551 packets and, hence, completely segregate them.
1557 select the TOS value to match.
1566 .BI priority " PREFERENCE"
1567 the priority of this rule. Each rule should have an explicitly
1571 The options preference and order are synonyms with priority.
1574 .BI table " TABLEID"
1575 the routing table identifier to lookup if the rule selector matches.
1576 It is also possible to use lookup instead of table.
1579 .BI realms " FROM/TO"
1580 Realms to select if the rule matched and the routing table lookup
1583 is only used if the route did not select any realm.
1587 The base of the IP address block to translate (for source addresses).
1590 may be either the start of the block of NAT addresses (selected by NAT
1591 routes) or a local host address (or even zero).
1592 In the last case the router does not translate the packets, but
1593 masquerades them to this address.
1594 Using map-to instead of nat means the same thing.
1597 Changes to the RPDB made with these commands do not become active
1598 immediately. It is assumed that after a script finishes a batch of
1599 updates, it flushes the routing cache with
1600 .BR "ip route flush cache" .
1602 .SS ip rule flush - also dumps all the deleted rules.
1603 This command has no arguments.
1605 .SS ip rule show - list rules
1606 This command has no arguments.
1607 The options list or lst are synonyms with show.
1609 .SH ip maddress - multicast addresses management
1612 objects are multicast addresses.
1614 .SS ip maddress show - list multicast addresses
1617 .BI dev " NAME " (default)
1620 .SS ip maddress add - add a multicast address
1621 .SS ip maddress delete - delete a multicast address
1622 these commands attach/detach a static link layer multicast address
1623 to listen on the interface.
1624 Note that it is impossible to join protocol multicast groups
1625 statically. This command only manages link layer addresses.
1628 .BI address " LLADDRESS " (default)
1629 the link layer multicast address.
1633 the device to join/leave this multicast address.
1635 .SH ip mroute - multicast routing cache management
1637 objects are multicast routing cache entries created by a user level
1638 mrouting daemon (f.e.
1644 Due to the limitations of the current interface to the multicast routing
1645 engine, it is impossible to change
1647 objects administratively, so we may only display them. This limitation
1648 will be removed in the future.
1650 .SS ip mroute show - list mroute cache entries
1653 .BI to " PREFIX " (default)
1654 the prefix selecting the destination multicast addresses to list.
1658 the interface on which multicast packets are received.
1662 the prefix selecting the IP source addresses of the multicast route.
1664 .SH ip tunnel - tunnel configuration
1666 objects are tunnels, encapsulating packets in IPv4 packets and then
1667 sending them over the IP infrastructure.
1669 .SS ip tunnel add - add a new tunnel
1670 .SS ip tunnel change - change an existing tunnel
1671 .SS ip tunnel delete - destroy a tunnel
1674 .BI name " NAME " (default)
1675 select the tunnel device name.
1679 set the tunnel mode. Three modes are currently available:
1680 .BR ipip ", " sit " and " gre "."
1683 .BI remote " ADDRESS"
1684 set the remote endpoint of the tunnel.
1687 .BI local " ADDRESS"
1688 set the fixed local address for tunneled packets.
1689 It must be an address on another interface of this host.
1695 on tunneled packets.
1697 is a number in the range 1--255. 0 is a special value
1698 meaning that packets inherit the TTL value.
1699 The default value is:
1708 on tunneled packets.
1709 The default value is:
1714 bind the tunnel to the device
1716 so that tunneled packets will only be routed via this device and will
1717 not be able to escape to another device when the route to endpoint
1722 disable Path MTU Discovery on this tunnel.
1723 It is enabled by default. Note that a fixed ttl is incompatible
1724 with this option: tunnelling with a fixed ttl always makes pmtu
1733 .RB ( " only GRE tunnels " )
1734 use keyed GRE with key
1736 is either a number or an IP address-like dotted quad.
1739 parameter sets the key to use in both directions.
1741 .BR ikey " and " okey
1742 parameters set different keys for input and output.
1745 .BR csum ", " icsum ", " ocsum
1746 .RB ( " only GRE tunnels " )
1747 generate/require checksums for tunneled packets.
1750 flag calculates checksums for outgoing packets.
1753 flag requires that all input packets have the correct
1756 flag is equivalent to the combination
1760 .BR seq ", " iseq ", " oseq
1761 .RB ( " only GRE tunnels " )
1765 flag enables sequencing of outgoing packets.
1768 flag requires that all input packets are serialized.
1771 flag is equivalent to the combination
1773 .B It isn't work. Don't use it.
1775 .SS ip tunnel show - list tunnels
1776 This command has no arguments.
1778 .SH ip monitor and rtmon - state monitoring
1782 utility can monitor the state of devices, addresses
1783 and routes continuously. This option has a slightly different format.
1786 command is the first in the command line and then the object list follows:
1788 .BR "ip monitor" " [ " all " |"
1789 .IR LISTofOBJECTS " ]"
1792 is the list of object types that we want to monitor.
1794 .BR link ", " address " and " route "."
1799 opens RTNETLINK, listens on it and dumps state changes in the format
1800 described in previous sections.
1803 If a file name is given, it does not listen on RTNETLINK,
1804 but opens the file containing RTNETLINK messages saved in binary format
1805 and dumps them. Such a history file can be generated with the
1807 utility. This utility has a command line syntax similar to
1811 should be started before the first network configuration command
1812 is issued. F.e. if you insert:
1815 rtmon file /var/log/rtmon.log
1818 in a startup script, you will be able to view the full history
1822 Certainly, it is possible to start
1825 It prepends the history with the state snapshot dumped at the moment
1830 was written by Alexey N. Kuznetsov and added in Linux 2.2.
1834 .RB "IP Command reference " ip-cref.ps
1836 .RB "IP tunnels " ip-cref.ps
1838 .RB "User documentation at " http://lartc.org/ ", but please direct bugreports and patches to: " <netdev@vger.kernel.org>
1841 Original Manpage by Michail Litvak <mci@owl.openwall.com>