Hi Matus,
Yes. You are right. The root cause is the lack of IP address in nsh_tunnel1.
When I configured ip address for nsh_tunnel1, it works well.
DBGvpp# sh ip fib
ipv4-VRF:0, fib_index 0, flow hash: src dst sport dport proto
10.0.35.2/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:16 buckets:1 uRPF:17 to:[1:36]]
[0] [@5]: ipv4 via 0.0.0.0 nsh_tunnel1:
When no ip address is configured on nsh_tunnel1, it does not work.
DBGvpp# sh ip fib
ipv4-VRF:0, fib_index 0, flow hash: src dst sport dport proto
10.0.35.2/32
UNRESOLVED
Thank you so much,
Hongjun
From: Matus Fabian -X (matfabia - PANTHEON TECHNOLOGIES at Cisco)
[mailto:[email protected]]
Sent: Tuesday, April 25, 2017 7:02 PM
To: Ni, Hongjun <[email protected]>; [email protected]
Cc: [email protected]
Subject: RE: [vpp-dev] An issue about SNAT when using different in and out
interfaces
Hi Hongjun,
What is your full vpp config? There should be route or something like this, so
vpp knows where to destine 10.10.23.46 packets.
I've tried some older versions and without "ip route add 10.10.23.0/24 via
GigabitEthernet0/a/0" it doesn't work too.
Regards,
Matus
From: Ni, Hongjun [mailto:[email protected]]
Sent: Tuesday, April 25, 2017 7:51 AM
To: Matus Fabian -X (matfabia - PANTHEON TECHNOLOGIES at Cisco)
<[email protected]<mailto:[email protected]>>;
[email protected]<mailto:[email protected]>
Cc: [email protected]<mailto:[email protected]>
Subject: RE: [vpp-dev] An issue about SNAT when using different in and out
interfaces
Hi Matus,
Yes. When out interface is virtual tunnel interface and has no address, it does
not work.
Thanks a lot,
Hongjun
From: Matus Fabian -X (matfabia - PANTHEON TECHNOLOGIES at Cisco)
[mailto:[email protected]]
Sent: Tuesday, April 25, 2017 1:34 PM
To: Ni, Hongjun <[email protected]<mailto:[email protected]>>;
[email protected]<mailto:[email protected]>
Cc: [email protected]<mailto:[email protected]>
Subject: RE: [vpp-dev] An issue about SNAT when using different in and out
interfaces
Hi,
It looks like there is some bug when snat interface doesn't have address (if
snat interfaces have address it works fine). I will fix issue.
Regards,
Matus
From: [email protected]<mailto:[email protected]>
[mailto:[email protected]] On Behalf Of Ni, Hongjun
Sent: Tuesday, April 25, 2017 6:05 AM
To: [email protected]<mailto:[email protected]>
Cc: [email protected]<mailto:[email protected]>
Subject: [vpp-dev] An issue about SNAT when using different in and out
interfaces
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
[email protected]
https://lists.fd.io/mailman/listinfo/vpp-dev