0

I've got a basic network setup, just doing NAT to a single public address to an internal /24 without any VLAN's or fancy routing.

Both my router and switch are running Cisco IOS 12.x. My configuration is very minimal. Here is the problem:

From the router, I can successfully ping any device on the local network or internet without any loss.

However from the switch, or any device connected to the switch, the first external ping will always fail.

Any suggestions?

Below are some examples of what is driving my curiosity.

From a Linux host on this network:

#ping -c 5 4.2.2.1
PING 4.2.2.1 (4.2.2.1) 56(84) bytes of data.
64 bytes from 4.2.2.1: icmp_seq=2 ttl=55 time=9.11 ms
64 bytes from 4.2.2.1: icmp_seq=3 ttl=55 time=10.1 ms
64 bytes from 4.2.2.1: icmp_seq=4 ttl=55 time=10.8 ms
64 bytes from 4.2.2.1: icmp_seq=5 ttl=55 time=9.80 ms

--- 4.2.2.1 ping statistics ---
5 packets transmitted, 4 received, 20% packet loss, time 3998ms
rtt min/avg/max/mdev = 9.115/9.981/10.831/0.625 ms

From a Linux host not on this network, not using Cisco gear, but with a similar network topology:

#ping -c 5 4.2.2.1
PING 4.2.2.1 (4.2.2.1) 56(84) bytes of data.
64 bytes from 4.2.2.1: icmp_seq=1 ttl=59 time=6.16 ms
64 bytes from 4.2.2.1: icmp_seq=2 ttl=59 time=3.56 ms
64 bytes from 4.2.2.1: icmp_seq=3 ttl=59 time=5.45 ms
64 bytes from 4.2.2.1: icmp_seq=4 ttl=59 time=3.24 ms
64 bytes from 4.2.2.1: icmp_seq=5 ttl=59 time=4.22 ms

--- 4.2.2.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3999ms
rtt min/avg/max/mdev = 3.242/4.529/6.160/1.115 ms
user98651
  • 95
  • 1
  • 2
  • 11
  • What do you mean the first ping fails? Can you post the output of your ping? It sounds pretty normal to me. Ping from the switch or from a host has to use ARP to find the MAC address of the default gateway as the first step. The router on the other hand, most likely already has the destination MAC address of the next hop (the ISP side router for your internet connection) and therefore doesn't need to perform ARP and therefore doesn't exhibit this behavior. – joeqwerty Jan 31 '16 at 17:24
  • I just added more detail, with two ping outputs. Every time I ping from the network in question the first ping is lost. – user98651 Jan 31 '16 at 17:34

1 Answers1

2

The first icmp packet is fail because host sends ARP request. If the destination host MAC is already in ARP cahce the device is not send this request.

Dmitry
  • 21
  • 2