Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is default routing table database in any linux system;

[kumar]$ ip rule list
0:  from all lookup local 
32766:  from all lookup main 
32767:  from all lookup default

I understand about 'main' routing tables , any route added without mentioning table gets added to 'main' routing table. But whats the point in having 'default' routing table? Even if I add a 'default' route, it gets added to 'main' routing table, in which case I see no point in having 'default' table. Any idea why is this useful?

share|improve this question
up vote 2 down vote accepted

ip rule outputs the routing policy. See below link:

if you want routing table, use ip route

hvn@hvnatvcc: ~ $ ip route
default via dev eth0  proto static dev eth0  scope link  metric 1000 dev eth0  proto kernel  scope link  src  metric 1 dev virbr0  proto kernel  scope link  src

About default table:

  1. Priority 0: Selector = match anything

Action = lookup routing table local (ID 255).

The table local is the special routing table containing high priority control routes for local and broadcast addresses.

Rule 0 is special, it cannot be deleted or overridden.

  1. Priority 32766: Selector = match anything

Action = lookup routing table main (ID 254)

The table main is the normal routing table containing all non-policy routes. This rule may be deleted or overridden with other rules.

  1. Priority 32767: Selector = match anything

Action = lookup routing table default (ID 253).

The table default is empty and reserved for post-processing if previous default rules did not select the packet. This rule also may be deleted.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .