Hi David,

Yes and no.

No, because there is [today] no way to change *the* IP lookup to use the 
packet’s source address.

Yes, because VPP does support a source based lookup, but this would happen 
after *the* destination based lookup. So, the trick would be to configure a 
second IP table with routes for your source addresses, i.e:
  ip table add 1
  ip route add table 1 10.0.0.0/8 via 192.168.1.1 GigEthernet0/0/0/0
and then configure *the* destination based lookup to use this table for a 
second source based lookup
  ip route 0.0.0.0/0 via ip4-lookup-in-table 1 src-lookup
using the default route points all packets to the second lookup.

I just did:
  https://gerrit.fd.io/r/#/c/13337/
To accept the ‘src-lookup’ keyword for ip route configuration (which is today 
only available via the API).

Hth,
/neale


From: <vpp-dev@lists.fd.io> on behalf of david zhang 
<zhangwenhaoda...@outlook.com>
Date: Tuesday, 3 July 2018 at 15:39
To: "vpp-dev@lists.fd.io" <vpp-dev@lists.fd.io>
Subject: [vpp-dev] Does VPP support source base route?


Hi,



My application situation needs to route packet based on source ip address, but 
can it be implemented through some simple commands in VPP? such as "ip route".

I have try to read the related source code and find it really difficult.

I really hope I can get some advice.



Thanks in advance!



Regards,

David

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#9773): https://lists.fd.io/g/vpp-dev/message/9773
Mute This Topic: https://lists.fd.io/mt/23024219/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to