-o
option was given, then line feeds separating lines inside
records are replaced with the backslash sign.
The output has the same syntax as arguments given to ip route add, so that it can be understood easily. F.e.
kuznet@amber:~ $ ip ro ls 193.233.7/24 193.233.7.0/24 dev eth0 proto gated/conn scope link \ src 193.233.7.65 realms inr.ac kuznet@amber:~ $
If you list cloned entries, the output contains other attributes which are evaluated during route calculation and updated during route lifetime. An example of the output is:
kuznet@amber:~ $ ip ro ls 193.233.7.82 tab cache 193.233.7.82 from 193.233.7.82 dev eth0 src 193.233.7.65 \ realms inr.ac/inr.ac cache <src-direct,redirect> mtu 1500 rtt 300 iif eth0 193.233.7.82 dev eth0 src 193.233.7.65 realms inr.ac cache mtu 1500 rtt 300 kuznet@amber:~ $1cm NB. The route looks a bit strange, doesn't it? Did you notice that it is a path from 193.233.7.82 back to 193.233.82? Well, you will see in the section on
ip route get
(p.)
how it appeared.
The second line, starting with the word cache
, shows
additional attributes which normal routes do not possess.
Cached flags are summarized in angle brackets:
local
-- packets are delivered locally.
It stands for loopback unicast routes, for broadcast routes
and for multicast routes, if this host is a member of the corresponding
group.
reject
-- the path is bad. Any attempt to use it results
in an error. See attribute error
below (p.).
mc
-- the destination is multicast.
brd
-- the destination is broadcast.
src-direct
-- the source is on a directly connected
interface.
redirected
-- the route was created by an ICMP Redirect.
redirect
-- packets going via this route will
trigger an ICMP redirect.
fastroute
-- the route is eligible to be used for fastroute.
equalize
-- make packet by packet randomization
along this path.
dst-nat
-- the destination address requires translation.
src-nat
-- the source address requires translation.
masq
-- the source address requires masquerading.
This feature disappeared in linux-2.4.
notify
-- (not implemented) change/deletion
of this route will trigger RTNETLINK notification.
Then some optional attributes follow:
error
-- on reject
routes it is error code
returned to local senders when they try to use this route.
These error codes are translated into ICMP error codes, sent to remote
senders, according to the rules described above in the subsection
devoted to route types (p.).
expires
-- this entry will expire after this timeout.
iif
-- the packets for this path are expected to arrive
on this interface.