Uploaded image for project: 'vpp'
  1. vpp
  2. VPP-1732

NAT doesn't work if output-feature on interfaces (in/out) is set and VRF on interfaces has been changed.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • None
    • None
    • nat
    • None
    • x64/Virtual Box

      NAT is configurating in endpoint-dependent mode.

      I've configured 2xNAT interfaces as in and out with output-feature.

      Added NAT pool address as independent.

      >> NAT is worked, tested by simple ping.

      After that, I've changed the VRFs on interfaces (switch from 0 (default) to 1 on both interfaces).

      >> Now NAT stop working.

      >>>> But if I have the same command sequence, but without output-feature, all works fine.

      While debugging, I found that hash key for out2in_ed table when creates and when receives has different fib_table id's, therefore NAT don't pass ping response back.

      So, I did a little patch (attached: patch.diff) to check this, and ping response begins passed back.

       

      P.S.

      attached: patch.diff - test patch for checking the wrong fib_index.

      attached: nat_test.diff - improvements for better testing API.

      attached: Squesnce of commands.txt - vat/vpp command sequences for setting up the VPP.

       

      Topology:

      on interface 2 (in) - host 1

      on interface 3 (out)  - host 2

      host1# ping host2

        1. nat_test.diff
          4 kB
        2. patch.diff
          1 kB
        3. Sequence of commands.txt
          1 kB

            vdmitry Dmitry Vakhrushev
            vdmitry Dmitry Vakhrushev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: