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

NAT44: snat_interface_add_del enable nat44-hairpinning node in deterministic mode

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • 18.07
    • 18.07
    • S-NAT
    • None

      Hi,

      I am using 1807 build in CentOS 7.5 and am facing a crash in VPP while using the CGNAT plugin. When using the deterministic CGN and using nat

      {deterministic} option in the startup.conf, VPP crashes when VM (with vhost-user interface) starts and all the configurations of VPP are removed. If I remove nat {deterministic}

      from startup.conf NAT works perfectly fine. Following are the commands I am using for deterministic NAT in VPP:

      Loop0 and Loop1 have been configured.
      Vhost-user interface is connected to the VM in client mode and placed in bridge 1 with loop0.

      sudo vppctl create vhost-user socket /tmp/sock-server2.sock server
      . . .
      sudo vppctl set interface l2 bridge VirtualEthernet0/0/0 1
      . . .
      sudo vppctl set interface nat44 in loop0 out loop1
      sudo vppctl nat44 deterministic add in 192.168.120.0/24 out 192.168.220.128/25

      When VM is booted, VPP crashes. Following is an exempt from journalctl:

      [root@ares ~]# journalctl -xe
      . . .
      Aug 09 13:28:07 ares NetworkManager[2810]: <info> [1533803287.8500] device (virbr0): carrier: link connected
      Aug 09 13:28:11 ares kernel: kvm [11235]: vcpu0 disabled perfctr wrmsr: 0xc2 data 0xffff
      Aug 09 13:28:14 ares vnet[8055]: received signal SIGSEGV, PC 0x7f838e214d70, faulting address 0x5cfd07c78
      Aug 09 13:28:14 ares vnet[8055]: #0 0x00007f838eb006a5 0x7f838eb006a5
      Aug 09 13:28:14 ares vnet[8055]: #1 0x00007f838ceb26d0 0x7f838ceb26d0
      Aug 09 13:28:14 ares vnet[8055]: #2 0x00007f838e214d70 clib_bihash_search_8_8 + 0x20
      Aug 09 13:28:14 ares vnet[8055]: #3 0x00007f8348fb4bea snat_static_mapping_match + 0x8a
      Aug 09 13:28:14 ares vnet[8055]: #4 0x00007f8348fc4f05 nat44_hairpinning_fn_avx2 + 0x395
      Aug 09 13:28:14 ares vnet[8055]: #5 0x00007f838eac7424 0x7f838eac7424
      Aug 09 13:28:14 ares vnet[8055]: #6 0x00007f838eac82ef vlib_worker_loop + 0x56f
      Aug 09 13:28:14 ares vnet[8055]: #7 0x00007f838d5f3068 0x7f838d5f3068
      Aug 09 13:28:14 ares systemd[1]: vpp.service: main process exited, code=killed, status=6/ABRT
      Aug 09 13:28:14 ares systemd[1]: Unit vpp.service entered failed state.
      . . .

      When the 'nat

      { deterministic }

      ' statement is removed from the startup.conf, the issue is resolved and the setup behaves as intended.
      Kindly guide me on how to use deterministic NAT in this configuration.

      Best Regards,
      Mr. Arsalan Saghir

            matfabia Matus Fabian
            matfabia Matus Fabian
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: