Hi Jon, My bad I use wrong interface, so issue is something different. Issue fixed https://gerrit.fd.io/r/#/c/11503/ DBGvpp# show interface GigabitEthernet0/8/0 addr GigabitEthernet0/8/0 (dn): L3 172.16.2.1/24 DBGvpp# show nat44 static mappings NAT44 static mappings: DBGvpp# nat44 add static mapping local 10.0.0.3 external GigabitEthernet0/8/0 DBGvpp# show nat44 static mappings NAT44 static mappings: local 10.0.0.3 external 172.16.2.1 vrf 0 local 10.0.0.3 external GigabitEthernet0/8/0 vrf -1 DBGvpp# nat44 add static mapping local 10.0.0.3 external GigabitEthernet0/8/0 del DBGvpp# show nat44 static mappings NAT44 static mappings: DBGvpp#
Matus From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of Matus Fabian -X (matfabia - PANTHEON TECHNOLOGIES at Cisco) Sent: Wednesday, April 4, 2018 7:21 AM To: vpp-dev@lists.fd.io Subject: Re: [vpp-dev] Removing a NAT static mapping Hi Jon, For static mapping without port(icmp id) protocol should be ignored, but looks like there is some bug. I will fix issue. When I don’t specify protocol it works: DBGvpp# sh interface GigabitEthernet0/8/0 addr GigabitEthernet0/8/0 (dn): L3 10.0.0.1/24 DBGvpp# sh nat44 static mappings NAT44 static mappings: DBGvpp# nat44 add static mapping local 10.0.0.3 external GigabitEthernet0/a/0 DBGvpp# sh nat44 static mappings NAT44 static mappings: local 10.0.0.3 external GigabitEthernet0/a/0 vrf -1 DBGvpp# nat44 add static mapping local 10.0.0.3 external GigabitEthernet0/a/0 del DBGvpp# sh nat44 static mappings NAT44 static mappings: DBGvpp# Matus From: Jon Loeliger <j...@netgate.com<mailto:j...@netgate.com>> Sent: Tuesday, April 3, 2018 6:46 PM To: vpp-dev <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>>; Matus Fabian -X (matfabia - PANTHEON TECHNOLOGIES at Cisco) <matfa...@cisco.com<mailto:matfa...@cisco.com>> Subject: Removing a NAT static mapping Matus, I have a question about the expected behavior for removing a static mapping on an external interface address. vpp# show int TenGigabitEthernet6/0/0 addr TenGigabitEthernet6/0/0 (dn): L3 200.0.0.1/24<http://200.0.0.1/24> vpp# show nat44 static mappings NAT44 static mappings: And add a static mapping: vpp# nat44 add static mapping icmp local 10.10.10.100 external TenGigabitEthernet6/0/0 vpp# show nat44 static mappings NAT44 static mappings: local 10.10.10.100 external 200.0.0.1 vrf 0 Now, I tried to delete it: vpp# nat44 add static mapping icmp local 10.10.10.100 del nat44 add static mapping: Mapping not exist. vpp# nat44 add static mapping icmp local 10.10.10.100 external TenGigabitEthernet6/0/0 del nat44 add static mapping: Mapping not exist. I would have expected either of those two commands to have removed the static mapping, but they do not. This command, with an explicit external address does work: vpp# nat44 add static mapping icmp local 10.10.10.100 external 200.0.0.1 del vpp# show nat44 static mappings NAT44 static mappings: vpp# Is this the expected behavior here? It seems to me that the mapping should be able to be removed based on the (protocol, local-ip, local-port) triplet and a little help from addr_only. When it is not an interface address, that does seem to be sufficient: vpp# nat44 add static mapping icmp local 10.10.10.100 vpp# show nat44 static mapping NAT44 static mappings: local 10.10.10.100 external 208.174.80.178 vrf 0 vpp# nat44 add static mapping icmp local 10.10.10.100 del vpp# Furthermore, there apparently can not be multiple static mappings for the same local-address: vpp# nat44 add static mapping icmp local 10.10.10.100 external TenGigabitEthernet6/0/0 vpp# nat44 add static mapping icmp local 10.10.10.100 external TenGigabitEthernet6/0/0 nat44 add static mapping: Mapping already exist. vpp# So that triplet should make it a unique key for deletion, right? Thanks, jdl