This document describes the Troubleshoot ICMP source address selection exception caused by interaction between no ip classless and the default route.
Cisco recommends that you have knowledge of these topics:
The information in this document is based on these software and hardware versions:
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.
Note: Cisco recommends maintaining the default ip classless configuration to avoid unexpected impacts on route lookup and local traffic source address selection caused by no ip classless.
On C8500L Router, the default route is learned through BGP, and the next hop of the default route points to the public network exit.
When the command is executed directly:
C8500L# ping 8.8.8.8
The device does not select the public network exit interface address as the source address for the ICMP Echo, but instead selects the internal interface address (such as 192.168.72.208). Since this internal address cannot correctly return via the public network, the Ping fails.
However, for another public address that also relies on the default route, such as:
C8500L# ping 10.10.10.10
The device can correctly select the public network exit interface address as the source address, and the Ping is successful.

C8500L Configuration:
interface TenGigabitEthernet0/1/0
no ip address
!
interface TenGigabitEthernet0/1/0.490
encapsulation dot1Q 490
ip address 172.16.119.30 255.255.255.252
!
interface TenGigabitEthernet0/1/0.2190
encapsulation dot1Q 2190
ip address 172.16.0.58 255.255.255.252
ip nat outside
!
interface TenGigabitEthernet0/1/1
no ip address
!
interface TenGigabitEthernet0/1/1.5
encapsulation dot1Q 5
ip address 192.168.72.208 255.255.255.192
!
interface TenGigabitEthernet0/1/1.1011
encapsulation dot1Q 1011
ip address 192.168.197.184 255.255.255.0
no ip proxy-arp
ip nat inside
ip tcp adjust-mss 1300
!
!
no ip classless
ip forward-protocol nd
!
router bgp 65001
bgp log-neighbor-changes
neighbor 10.1.1.2 remote-as 65002
C8500L#show ip route bgp
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, m - OMP
n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
H - NHRP, G - NHRP registered, g - NHRP registration summary
o - ODR, P - periodic downloaded static route, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
& - replicated local route overrides by connected
Gateway of last resort is 172.28.0.57 to network 0.0.0.0
B* 0.0.0.0/0 [20/0] via 172.28.0.57, 6d22h
8.0.0.0/8 is variably subnetted, 5 subnets, 3 masks
B 8.x.203.0/24 [20/0] via 10.1.1.2, 3d17h
B 8.x.0.0/16 [20/0] via 10.1.1.2, 6d22h
B 8.x.0.0/17 [20/0] via 10.1.1.2, 6d22h
B 8.x.0.0/17 [20/0] via 10.1.1.2, 6d22h
B 8.x.0.0/16 [20/0] via 10.1.1.2, 6d22h
C8500L#show ip route 8.8.8.8
% Subnet not in table
C8500L#show ip route 10.10.10.10
% Network not in table
C8500L#show ip cef 0.0.0.0/0 detail
0.0.0.0/0, epoch 2, flags [rib only nolabel, rib defined all labels, default route]
recursive via 172.16.0.57
attached to TenGigabitEthernet0/1/0.2190
C8500L#show ip cef 8.8.8.8 detail
0.0.0.0/0, epoch 2, flags [rib only nolabel, rib defined all labels, default route]
recursive via 172.16.0.57
attached to TenGigabitEthernet0/1/0.2190
C8500L#show ip cef 10.10.10.10 detail
0.0.0.0/0, epoch 2, flags [rib only nolabel, rib defined all labels, default route]
recursive via 172.16.0.57
attached to TenGigabitEthernet0/1/0.2190
C8500L#show ip cef exact-route 172.16.0.54 8.8.8.8
172.28.0.54 -> 8.8.8.8 =>IP adj out of TenGigabitEthernet0/1/0.2190, addr 172.16.0.57
C8500L#show ip cef exact-route 172.16.0.54 10.10.10.10
172.28.0.54 -> 10.10.10.10 =>IP adj out of TenGigabitEthernet0/1/0.2190, addr 172.16.0.57
C8500L#show ip cef exact-route 192.168.72.208 8.8.8.8
10.0.72.208 -> 8.8.8.8 =>IP adj out of TenGigabitEthernet0/1/0.2190, addr 172.16.0.57
C8500L#show ip cef exact-route 192.168.72.208 10.10.10.10
10.0.72.208 -> 10.10.10.10 =>IP adj out of TenGigabitEthernet0/1/0.2190, addr 172.16.0.57
Example:
C8500L# ping 8.8.8.8
Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 8.8.8.8, timeout is 2 seconds: ..... Success rate is 0 percent (0/5)
debug ip packet output:
IP: s=192.168.72.208 (local), d=8.8.8.8 (WAN-interface)
Expected normal behavior:
Actual behavior:
Example:
C8500L# ping 10.10.10.10
Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.10.10.10, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 62/62/63 ms
debug ip packet output:
IP: s=172.16.0.58 (local), d=10.10.10.10 (WAN-interface)
Normal performance:
For 8.8.8.8, since there is major network information of 8.0.0.0/8 in the RIB, after enabling no ip classless, the router first performs a classful lookup:
In the no ip classless scenario, although the router can identify the default route, the subsequent verification of RIB first-hop lookup cannot normally return the interface information associated with the forwarding path. The internal lookup process ultimately returns an empty result (NULL).
When the local-generated traffic cannot obtain the correct outgoing interface association information from the RIB first-hop lookup, the source address selection logic revert to the default interface selection mechanism.
This fallback mechanism does not guarantee that the selected address is consistent with the actual FIB outgoing interface. Therefore, it can choose any available local interface address, such as an internal LAN interface address.
As a result, the seemingly contradictory outcome occurs:
This is the direct cause of the Ping failure.
C8500L#show ip route 8.0.0.0 255.0.0.0 longer-prefixes
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, m - OMP
n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
H - NHRP, G - NHRP registered, g - NHRP registration summary
o - ODR, P - periodic downloaded static route, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
& - replicated local route overrides by connected
Gateway of last resort is 172.16.0.57 to network 0.0.0.08.0.0.0/8 is variably subnetted, 5 subnets, 3 masks
B 8.x.203.0/24 [20/0] via 10.1.1.2, 3d17h
B 8.x.0.0/16 [20/0] via 10.1.1.2, 6d22h
B 8.x.0.0/17 [20/0] via 10.1.1.2, 6d22h
B 8.x.0.0/17 [20/0] via 10.1.1.2, 6d22h
B 8.x.0.0/16 [20/0] via 10.1.1.2, 6d22h
C8500L#show ip route 10.0.0.0 255.0.0.0 longer-prefixes
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, m - OMP
n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
H - NHRP, G - NHRP registered, g - NHRP registration summary
o - ODR, P - periodic downloaded static route, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
& - replicated local route overrides by connected
Gateway of last resort is 172.16.0.57 to network 0.0.0.0
Therefore, the occurrence of the problem is not random. Instead, it depends on whether the classful major network corresponding to the destination address exists in the routing table, and whether there is a matching more specific subnet route.
Remove no ip classless and restore the classless route lookup:
C8500L#configure terminal
C8500L(config)#ip classless
C8500L(config)#end
Note: On Cisco IOS XE, ip classless is usually the default behavior. If no ip classless is explicitly present in the running configuration, executing ip classless can restore the recommendation behavior.
If it is not possible to immediately modify no ip classless, you can explicitly specify the source interface for a specific local application, for example:
C8500L(config)#ip domain lookup source-interface <interface>
C8500L(config)#ip http client source-interface <interface>
For Ping tests, the source address can be manually specified:
C8500L#ping 8.8.8.8 source <wan-interface-or-wan-ip>
Or Configure static routes for specific addresses represents a temporary/directive bypass solution for a specific destination address.
C8500L(config)#ip route 8.8.8.8 255.255.255.255 TenGigabitEthernet0/1/0.2190 172.16.0.57
These methods only solve the source address issue for specific applications or single tests and cannot replace the removal of no ip classless.
show tech-support routing detail
The main impact is on local generated traffic that does not explicitly specify the source address, such as:
Usually does not directly affect:
However, the exact impact still depends on the network backhaul path, NAT policies, ACLs and security policies. Therefore, it is recommended to fully verify the critical management plane and control plane communications in the production network.
In a network with default routes and multiple interface addresses, the no ip classless command can prevent the correct retrieval of interface information associated with the actual forwarding path for classful routing of specific destination addresses.
When this occurs, the source address selection for locally generated traffic on the device can revert to the non-path-dependent interface selection logic, resulting in local traffic such as Ping using incorrect source IPs. If the source IP does not have public reachability or a correct backhaul path, communication can fail.
| Revision | Publish Date | Comments |
|---|---|---|
1.0 |
04-Sep-2026
|
Initial Release |