next up previous contents
Next: ip rule save - Up: ip rule show Previous: Arguments:   Contents

Output format:

kuznet@amber:~ $ ip ru ls
0:	from all lookup local 
200:	from to lookup main
210:	from to lookup main
220:	from lookup inr.ruhep realms inr.ruhep/radio-msu
300:	from to lookup main
310:	from to lookup main
320:	from lookup inr.ruhep map-to
32766:	from all lookup main 
kuznet@amber:~ $

In the first column is the rule priority value followed by a colon. Then the selectors follow. Each key is prefixed with the same keyword that was used to create the rule.

The keyword lookup is followed by a routing table identifier, as it is recorded in the file /etc/iproute2/rt_tables.

If the rule does NAT (f.e. rule #320), it is shown by the keyword map-to followed by the start of the block of addresses to map.

The sense of this example is pretty simple. The prefixes and form the internal network, but they are routed differently when the packets leave it. Besides that, the host is translated into another prefix to look like when talking to the outer world.