04-06-2023 09:56 AM
Hello,
I'm working to configure a simple Dynamic NAT setup to allow inside hosts to reach the internet.
When I apply the config, the host1 from inside the network gets 1 ping response, then it stops receiving responses. I'm pinging a host (host2) that I control on the internet, and using tcpdump on host2 I can see that icmp requests are coming in from the correct IP and then host2 is sending its response to the correct IP.
Using ethanalyzer i can see that the reply packets hit Et 1/48 from host2, but they don't seem to get any further.
Full config file is attached. Here is the basic NAT setup:
version 10.3(1) Bios:version 05.47
feature nat
ip nat inside source list mgmt-nat interface Ethernet1/48 overload add-route
interface Vlan200
ip nat inside
interface Ethernet1/48
ip nat outside
switch-01(config)# sh ip access-lists mgmt-nat
IP access list mgmt-nat
10 permit ip any any
20 permit icmp any any
30 permit tcp any any
Software
BIOS: version 05.47
NXOS: version 10.3(1) [Feature Release]
BIOS compile time: 04/28/2022
NXOS image file is: bootflash:///nxos64-cs.10.3.1.F.binq
NXOS compile time: 8/18/2022 15:00:00 [08/19/2022 02:44:02]
Hardware
cisco Nexus9000 C93180YC-FX Chassis
Intel(R) Xeon(R) CPU D-1528 @ 1.90GHz with 32802108 kB of memory.
Processor Board ID FLM26400J37
Does anyone have any insight into what may be happening?
P.S. The license smart license registration has not completed. Is a license required for this to work?
switch-01# sh license sum
License Usage:
License Entitlement tag Count Status
-------------------------------------------------------------------------
LAN license for Nexus 9... (LAN_ENTERPRISE_SERVICES_PKG) 1 IN USE
thanks in advance
04-06-2023 10:12 AM
Can I see ethanylzer of 10 packet when you ping from host1 to host2
04-06-2023 11:27 AM
Thanks for taking the time. Here is the ethanalyzer output for the ping from host1 => host2
You can see that the first icmp request gets sent and the reply makes its way back to host1. The rest do not
04-06-2023 09:48 PM
The original post says full config is attached but I do not see any attachment. Seeing the full config would be very helpful.
The very partial config in the post shows several permit any any statements. I have seen situations where permit any any has caused issues. I do not think that is necessarily the issue here, but strongly suggest revising the nat acl. In my experience where you have an inside network(s) access the Internet the nat can usually be worked out using standard acl rather than extended. And with standard acl it is easier to avoid permit any.
04-07-2023 04:43 AM
04-07-2023 02:00 AM
Hello
change your nat acl to be specific to the network your wish to translate- using any any isnt recommended as such cannot be deterministic in the results of the translation.
04-07-2023 06:36 AM
Thank you all for the suggestions. I added a more specific ACL and adjust the ip nat command
ip nat inside source list internet-access interface Ethernet1/48 overload add-route
ip access-list internet-access
10 permit ip 172.36.0.0/16 any
20 permit tcp 172.36.0.0/16 any
30 permit udp 172.36.0.0/16 any
Ive also attached the switch config (hopefully)
I will follow up with the ping repeat 100 results shortly
04-07-2023 06:43 AM
04-13-2023 03:02 AM
So sorry I see you post now
I see one request and many many reply!!
what is success rate of this ping
I think there is asymmetric traffic here
04-13-2023 08:01 AM
It is odd that ethanalyzer doesnt show the outbound ping request from hostA => hostB
attached is a tcpdump from hostB where we can see new requests coming in
When i ping with -c 100, its 99% packet drop. only the first request gets a reply
[root@host-A ~]$ ping 162.xxx.xxx.4 -c 100
PING 162.xxx.xxx.4 (162.xxx.xxx.4) 56(84) bytes of data.
64 bytes from 162.xxx.xxx.4: icmp_seq=1 ttl=55 time=178 ms
--- 162.142.125.4 ping statistics ---
100 packets transmitted, 1 received, 99% packet loss, time 101381ms
rtt min/avg/max/mdev = 177.608/177.608/177.608/0.000 ms
Here is another oddity, when I decrease the ping interval, the first several requests get replies. It's like after 1s, something happens that drops in the incoming reply
Thanks, again, for the help!When creating a new translation on a Cisco Nexus 9000 Series switch, the flow is software forwarded until the translation is programmed in the hardware, which might take a few seconds. During this period, there is no translation entry for the inside global address. Therefore, returning traffic is dropped
04-13-2023 08:16 AM - edited 04-13-2023 08:19 AM
show policy-map interface control-plane <<- please share this
Understanding Control Plane Packet Loss due to CoPP | Christopher Hart (chrisjhart.com)
04-13-2023 08:57 PM
04-14-2023 01:48 AM
show policy-map was a good suggestion and does show that some nat traffic is being dropped.
I am interested in this statement "when I decrease the ping interval, the first several requests get replies" That would be consistent with the understanding that when you run the ping full bore it exceeds the permitted rate and when you slow the ping down then more pings are permitted.
04-14-2023 07:30 AM
The issue I'm seeing is that when I use the default interval (1/s) for pings, I only see 1 single ping request get a reply, the rest seem to get dropped
When I do a lower interval, i.e: .2 (5 pings/s) i see the first 5 pings get replies, then the rest get dropped
04-14-2023 08:03 AM
It seem that NSK assume the reply direct to it not to host behind NAT.
So packet
Frrist packet Request send to control plane
Second packet request pass through data plane not via control plane and hence not appear in ethanalyzer.
Now reply retrun always pass through control not data plane and this make CoPP drop any traffic higher than specific rate.
So we now test NAT with icmp please try use other traffic I think it ok
OR
use NATing to other IP other than NSK interface IP.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide