next up previous contents
Next: Output format: Up: ip route show Previous: Arguments:   Contents

Examples:

Let us count routes of protocol gated/bgp on a router:
kuznet@amber:~ $ ip ro ls proto gated/bgp | wc
   1413    9891    79010
kuznet@amber:~ $
To count the size of the routing cache, we have to use the -o option because cached attributes can take more than one line of output:
kuznet@amber:~ $ ip -o ro ls cloned | wc
   159    2543    18707
kuznet@amber:~ $