On 9/5/25 9:16 AM, Surya Seetharaman via dev wrote:
> 
> Also a side question for anyone who can answer (no need to derail the
> original intent
> of the thread), in real world routers how do things work? Is there a
> reliable link someone
> can provide pointing to a correct source page around this that I can read
> just for my own understanding?

I'm not an expert on how router appliances work, but I know a bit how routing
works in linux and so in linux-based routers.  From my understanding, all
routing in linux is pretty much policy-based routing.  There is a set of
policy rules (ip rule) that performs packet matching using different criteria
including the input port or source address.  And this is pretty much the
only place where you can do source based decision.  Rules have priorities
and the actions.  Priorities make the logic transparent, i.e. it's obvious
which rule will be evaluated first.  Typical action is 'lookup ID' that
performs a route lookup in the corresponding routing table.  If there is no
route, then the next priority policy rule is evaluated.  Inside the routing
table, the match is dst-only, so there is no problem there.

And there are sane defaults for the policy rules:

  $ ip rule
  0:      from all lookup local
  32766:  from all lookup main
  32767:  from all lookup default

AFAIU, every router appliance manufacturer has their own logic on how policy
based routing interacts with routing tables and in which order the source
and destination matches are evaluated, so there is no standard there.
But mixing the source and the destination during the prefix-based lookup
seems unique to OVN and kind of strange indeed.

For me it seems like what the linux kernel does is fairly flexible and less
ambiguous.  There is single entry point (policy rules), clear priorities
and no mixing of src and dst during prefix lookups, as there is just no
prefix lookup for src.  So, maybe that's the architecture OVN should consider
moving towards.

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to