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

NAT44: hairpinning cannot match NAT out2in session

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: High High
    • 20.09
    • None
    • nat
    • None

      If only hairpinning is enabled and an outside interface is specified, NAT session out2in.fib_index value is assigned to sm->outside_fibs[0].fib_index, which VRF, is outside interface is located.
      In function snat_icmp_hairpinning, use sm->outside_fib_index to find sm->per_thread_data[ti].out2in. In the restricted usage scenario, all the outside interfaces must belong to the unique outside VRF, otherwise the nat problem will occur.

       

      Configure CMDs

      ip table add 20000
      create sub-interfaces TenGigabitEthernet1a/0/1 1000
      set interface state TenGigabitEthernet1a/0/1.1000 up
      set interface ip table TenGigabitEthernet1a/0/1.1000 20000
      set interface nat44 out TenGigabitEthernet1a/0/1.1000

      ip table add 20001
      create host-interface name vpp-1001
      create sub-interfaces host-vpp-1001 1001
      set interface state host-vpp-1001 up
      set interface state host-vpp-1001.1001 up
      set interface ip table host-vpp-1001.1001 20001
      set interface l2 tag-rewrite host-vpp-1001.1001 push dot1q 1001
      set interface ip address host-vpp-1001.1001 169.254.191.2/30
      ip route add table 20001 192.168.101.0/24 via 169.254.191.1 host-vpp-1001.1001
      set interface nat44 in host-vpp-1001.1001 output-feature

      nat44 add address 211.1.1.216 tenant-vrf 20001
      nat44 add static mapping local 192.168.101.254 external 211.1.1.218 vrf 20001

            fivarga89 Filip Varga
            garychen0755 Gary Chen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: