Hi,

Default assignment algorithm support address per fib (tenant) 
https://wiki.fd.io/view/VPP/NAT#NAT44_add_pool_address_for_specific_tenant
It just pick random port (per protocol) from first address with some available 
ports. In case of multithread ports a divided between worker threads.

Matus


From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of JB
Sent: Wednesday, February 6, 2019 8:19 AM
To: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] [NAT] Assign same external IP

Hi Ole!

Thanks for the response!

I've followed the code you mentioned which has lead me to the default address 
and port assignment algorithm. I can see how we can easily plug our own, but 
I'm trying to first break down the code for the default one in order to 
understand how exactly the algorithm works right now. Is the default algorithm 
also responsible for the endpoint independent logic?

It's a bit lost on me as to why the default one checks against the fib_index 
(the other ones do not).
The second time we check if it's a bitwise all 1 (~0), before then running the 
exact same code. Is this a hack for a previous issue?
else if (a->fib_index == ~0)






{





ga = a;





}




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

View/Reply Online (#12184): https://lists.fd.io/g/vpp-dev/message/12184
Mute This Topic: https://lists.fd.io/mt/29639823/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-
  • [... JB
    • ... Ole Troan
      • ... JB
        • ... Matus Fabian -X (matfabia - PANTHEON TECHNOLOGIES@Cisco) via Lists.Fd.Io
          • ... JB
            • ... Matus Fabian -X (matfabia - PANTHEON TECHNOLOGIES@Cisco) via Lists.Fd.Io
              • ... JB
                • ... Matus Fabian -X (matfabia - PANTHEON TECHNOLOGIES@Cisco) via Lists.Fd.Io
                • ... JB
                • ... JB

Reply via email to