Hey,

When I applied SNAT in different in and out interfaces, I run into an issue:

My configuration:
    set interface snat in TenGigabitEthernet5/0/0 out TenGigabitEthernet5/0/1
    snat add static mapping local 192.168.50.76 external 10.10.23.45

I sent packets from TenGigabitEthernet5/0/0.
In previous code about a month ago, the packets are sent to  
TenGigabitEthernet5/0/1 as expected.

But in current 17.04 code, packets are sent to TenGigabitEthernet5/0/0, which 
is not expected.
Could you give some advice on how to fix this issue?

Below is the interface and snat detail:
DBGvpp# sh int
              Name               Idx       State          Counter          Count
TenGigabitEthernet5/0/0           1         up       rx packets                 
    1
                                                     rx bytes                   
   60
                                                     tx packets                 
    1
                                                     tx bytes                   
   60
                                                     ip4                        
    1
TenGigabitEthernet5/0/1           2         up
local0                            0        down
DBGvpp#
DBGvpp# sh snat detail
SNAT mode: dynamic translations enabled
TenGigabitEthernet5/0/0 in
TenGigabitEthernet5/0/1 out
0 users, 0 outside addresses, 0 active sessions, 1 static mappings
Hash table in2out
    0 active elements
    0 free lists
    0 linear search buckets
Hash table out2in
    0 active elements
    0 free lists
    0 linear search buckets
Hash table worker-by-in
    0 active elements
    0 free lists
    0 linear search buckets
Hash table worker-by-out
    0 active elements
    0 free lists
    0 linear search buckets
static mappings:
local 192.168.50.76 external 10.10.23.45 vrf 0


Below is the packet trace:

00:02:16:415613: dpdk-input
  TenGigabitEthernet5/0/0 rx queue 0
  buffer 0xbf9c22: current data 14, length 46, free-list 0, clone-count 0, 
totlen-nifb 0, trace 0x0
  PKT MBUF: port 0, nb_segs 1, pkt_len 60
    buf_len 2176, data_len 60, ol_flags 0x180, data_off 128, phys_addr 
0x28e6c780
    packet_type 0x0
    Packet Offload Flags
      PKT_RX_IP_CKSUM_GOOD (0x0080) IP cksum of RX pkt. is valid
      PKT_RX_L4_CKSUM_GOOD (0x0100) L4 cksum of RX pkt. is valid
  IP4: 08:00:27:61:07:05 -> 90:e2:ba:48:7a:80
  UDP: 192.168.50.76 -> 10.10.23.46
    tos 0x00, ttl 64, length 46, checksum 0x6693
    fragment id 0x0000
  UDP: 63 -> 63
    length 26, checksum 0xa2be
00:02:16:415653: ip4-input-no-checksum
  UDP: 192.168.50.76 -> 10.10.23.46
    tos 0x00, ttl 64, length 46, checksum 0x6693
    fragment id 0x0000
  UDP: 63 -> 63
    length 26, checksum 0xa2be
00:02:16:415668: snat-in2out
  SNAT_IN2OUT_FAST_PATH: sw_if_index 1, next index 2, session -1
00:02:16:415685: snat-in2out-slowpath
  SNAT_IN2OUT_SLOW_PATH: sw_if_index 1, next index 0, session -1
00:02:16:415695: ip4-lookup
  fib 0 dpo-idx 3 flow hash: 0x00000000
  UDP: 192.168.50.76 -> 10.10.23.46
    tos 0x00, ttl 64, length 46, checksum 0x6693
    fragment id 0x0000
  UDP: 63 -> 63
    length 26, checksum 0xa2be
00:02:16:415703: ip4-rewrite
  tx_sw_if_index 1 dpo-idx 3 : ipv4 via 10.10.23.46 TenGigabitEthernet5/0/0: 
90e2ba48234590e2ba487a800800 flow hash: 0x00000000
  00000000: 90e2ba48234590e2ba487a8008004500002e000000003f116793c0a8324c0a0a
  00000020: 172e003f003f001aa2be000102030405060708090a0b0c0d0e0f1011
00:02:16:415709: TenGigabitEthernet5/0/0-output
  TenGigabitEthernet5/0/0
  IP4: 90:e2:ba:48:7a:80 -> 90:e2:ba:48:23:45
  UDP: 192.168.50.76 -> 10.10.23.46
    tos 0x00, ttl 63, length 46, checksum 0x6793
    fragment id 0x0000
  UDP: 63 -> 63
    length 26, checksum 0xa2be
00:02:16:415718: TenGigabitEthernet5/0/0-tx
  TenGigabitEthernet5/0/0 tx queue 0
  buffer 0xbf9c22: current data 0, length 60, free-list 0, clone-count 0, 
totlen-nifb 0, trace 0x0
  IP4: 90:e2:ba:48:7a:80 -> 90:e2:ba:48:23:45
  UDP: 192.168.50.76 -> 10.10.23.46
    tos 0x00, ttl 63, length 46, checksum 0x6793
    fragment id 0x0000
  UDP: 63 -> 63
    length 26, checksum 0xa2be

Thanks,
Hongjun
_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev
  • [vpp-dev] An i... Ni, Hongjun
    • Re: [vpp-... Matus Fabian -X (matfabia - PANTHEON TECHNOLOGIES at Cisco)
      • Re: [... Ni, Hongjun
        • R... Matus Fabian -X (matfabia - PANTHEON TECHNOLOGIES at Cisco)
          • ... Ni, Hongjun

Reply via email to