If a more specific static discard route is configured when one subnet has been configured on an interface, traffic might still follow the interface next hop when there is still an ARP record for some hosts inside the smaller subnet.
When configuring one broadcast interface with an IP address, all the hosts inside this subnet will be forwarded to this interface because this interface has the most specific route to this subnet:
test@m7i-b> show route 1.1.1.10 inet.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 1.1.1.0/24 *[Direct/0] 00:01:20 > via fe-0/1/0.0
When a more specific "discard" static route (inside this subnet) has been configured, the next hop will point to this more specific discard route for the hosts inside this smaller subnet:
test@m7i-b> show route 1.1.1.10 inet.0: 10 destinations, 10 routes (10 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 1.1.1.0/25 *[Static/5] 00:00:02 Discard
And the hosts inside this smaller subnet will be unreachable:
test@m7i-b> ping 1.1.1.10 PING 1.1.1.10 (1.1.1.10): 56 data bytes ^C --- 1.1.1.10 ping statistics --- 3 packets transmitted, 0 packets received, 100% packet loss
However, when there is a valid ARP record for any host inside this smaller subnet (maybe it exists before configuring and committing the static discard route), the ping will be passed successfully even if a static discard route is configured:
test@m7i-b> show arp interface fe-0/1/0 MAC Address Address Name Interface Flags 00:05:85:f6:78:20 1.1.1.10 1.1.1.10 fe-0/1/0.0 none test@m7i-b> show route 1.1.1.10 inet.0: 10 destinations, 10 routes (10 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 1.1.1.0/25 *[Static/5] 00:00:06 Discard test@m7i-b> ping 1.1.1.10 PING 1.1.1.10 (1.1.1.10): 56 data bytes 64 bytes from 1.1.1.10: icmp_seq=0 ttl=64 time=0.443 ms 64 bytes from 1.1.1.10: icmp_seq=1 ttl=64 time=0.594 ms 64 bytes from 1.1.1.10: icmp_seq=2 ttl=64 time=0.580 ms 64 bytes from 1.1.1.10: icmp_seq=3 ttl=64 time=0.582 ms ^C --- 1.1.1.10 ping statistics --- 4 packets transmitted, 4 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.443/0.550/0.594/0.062 ms
This is expected behavior. When the ARP entry exists for any host, there will be a /32 unicast next hop on the PFE pointing to the interface that will become the most specific route for this host next hop. All traffic will still follow this forwarding path until the ARP record is flushed.