Description

This article explains why & when a ping can fail between P2P link without specifying the source address inside a routing-instance, Because it takes different interface as the source IP address in ICMP packet sent out.




Symptoms

When we can't ping direct connection without specifying source IP.

 

User@Router_A> ping 192.168.102.1 routing-instance INTERNET_VR rapid

PING 192.168.102.1 (192.168.102.1): 56 data bytes

.....

--- 192.168.102.1 ping statistics ---

5 packets transmitted, 0 packets received, 100% packet loss

 

User@Router_A> ping 192.168.102.1 routing-instance INTERNET_VR source 192.168.100.2

PING 192.168.102.1 (192.168.102.1): 56 data bytes

64 bytes from 192.168.102.1: icmp_seq=0 ttl=64 time=0.688 ms

64 bytes from 192.168.102.1: icmp_seq=1 ttl=64 time=0.736 ms

^C

--- 192.168.100.1 ping statistics ---

2 packets transmitted, 2 packets received, 0% packet loss

round-trip min/avg/max/stddev = 0.688/0.712/0.736/0.024 ms

 

Solution

Take a pcap for the outgoing interface when ping is initiated & see if correct source ip address is taken or not , when its taking the wrong soucre ip address in pcap then its expected that PING fails.

 

12:38:55.487896 Out IP truncated-ip - 34 bytes missing! 192.168.122.0 > 192.168.102.1: ICMP echo request, id 27770, seq 0, length 64

12:38:56.490395 Out IP truncated-ip - 34 bytes missing! 192.168.122.0 > 192.168.102.1: ICMP echo request, id 27770, seq 1, length 64

 

Later check & see if we have this knob enabled "default-address-selection" & can we remove it from default group & at system level hierarchy which would resolve the issue.

 

Analysis :The behaviour seen is because it is picking the default address of routing instance as per the code

 

User@Router_A# run show configuration | display set | grep default-address-selection

set groups BASE-CONFIG system default-address-selection

set system default-address-selection

 

With this config the default address for the routing instance is picked as the source -> which is 192.168.100.1 [ae0.100 s ip)

 

User@Router_A# run ping 192.168.102.2 routing-instance INTERNET_VR count 1

PING 192.168.102.2 (192.168.102.2): 56 data bytes

 

--- 192.168.102.2 ping statistics ---

1 packets transmitted, 0 packets received, 100% packet loss

 

Can remove this configs and check, ICMP packet will go with the correct source ip

 

# delete groups BASE-CONFIG system default-address-selection

# delete system default-address-selection

 

show | compare

[edit groups BASE-CONFIG system]

- default-address-selection;

[edit system]

- default-address-selection;

 

User@Router_A#run ping 192.168.102.2 routing-instance INTERNET_VR count 1

PING 192.168.102.2 (192.168.102.2): 56 data bytes

64 bytes from 192.168.102.2: icmp_seq=0 ttl=64 time=0.933 ms

 

--- 192.168.102.2 ping statistics ---

1 packets transmitted, 1 packets received, 0% packet loss

round-trip min/avg/max/stddev = 0.933/0.933/0.933/0.000 ms

 

16:42:31.024323 Out IP truncated-ip - 34 bytes missing! 192.168.102.1 > 192.168.102.2: ICMP echo request, id 21773, seq 0, length 64 ============> packet going with the correct source ip

16:42:31.025187 In IP 192.168.102.2 > 192.168.102.1: ICMP echo reply, id 21773, seq 0, length 64

 

Resolution: When With this config the default source address for the routing instance is picked with the highest ifd id value. So its expected for ping to fail without specifying source IP address as it will take some other IP based on the above configuration sample. 

 

Modification History

2025-02-20 : Article Created

2026-01/30 : Added SRX