@ChoWZa
I did test this in a lab environment. I pinged from D6 to 192.168.0.5 (which is configured on R1, passing through both D2 (where the `receive` route is configured) and D1. I only meant that I have not tested a setup like this in a production environment (and have no plans to as I have no need for it:)).
D6
root@D6> show route 192.168.0.5/32 terse | find next
A V Destination P Prf Metric 1 Metric 2 Next hop AS path
* ? 192.168.0.5/32 B 170 100 65000 I
unverified >172.16.0.0
root@D6> ping 192.168.0.5 count 1
PING 192.168.0.5 (192.168.0.5): 56 data bytes
64 bytes from 192.168.0.5: icmp_seq=0 ttl=64 time=14.275 ms
--- 192.168.0.5 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max/stddev = 14.275/14.275/14.275/0.000 ms
root@D6>
D2
root@D2> show route 192.168.0.5/32 terse | find next
A V Destination P Prf Metric 1 Metric 2 Next hop AS path
* ? 192.168.0.5/32 S 5 Receive
R1
root@R1> show route 192.168.0.5/32 terse | find next
A V Destination P Prf Metric 1 Metric 2 Next hop AS path
* ? 192.168.0.5/32 L 0 Local
Now, I show disabling the interface with the /24 route on D1 (it's an OSPF interface, so disabling from R1 is no good--this is simply because of the way I did this. If I had configured it as loopback on R1, I could just disable the loopback on R1.) and the effect is has elsewhere
D1
root@D1# deactivate interfaces ge-0/0/1
[edit]
root@D1# commit
commit complete
[edit]
R2
root@D2> show route 192.168.0.5/32 terse | find next
A V Destination P Prf Metric 1 Metric 2 Next hop AS path
* ? 192.168.0.5/32 S 5 Receive
D6
root@D6> show route 192.168.0.5/32 terse
root@D6>
As you can see, this has the effect you were looking for. Note that D2 maintains the receive route, but since you shouldn't be exporting this policy in any other manner, it won't affect the rest of your topology.
[edit]
Regarding the actual function of `receive`, it is (unfortunately) very poorly documented. It might get processed by the RE when locally generated but not when the flow is transit traffic. This is somewhat supported by the fact that transit traffic passes without an issue, but locally-generated traffic fails, even when specifying a source:
root@D2> ping 192.168.0.5 source 10.1.2.2
PING 192.168.0.5 (192.168.0.5): 56 data bytes
ping: sendto: Can't assign requested address
ping: sendto: Can't assign requested address
^C
--- 192.168.0.5 ping statistics ---
2 packets transmitted, 0 packets received, 100% packet loss
root@D2>
Again, this shouldn't have an impact if this is the way it works. You should, however, thoroughly test this and possibly even open a JTAC case to determine the exact operation of the `receive` knob.
[/edit]
[edit 2]
Further digging is, unfortunately, not very fruitful. The index of the next hop is `33`, but I can't find anything with an index of `33`. I'm sure it's hiding somewhere, but I can't find it. Maybe someone more knowledgeable than I will be able to help demystify the `receive` knob.
root@D2> show route forwarding-table destination 192.168.0.5
Routing table: default.inet
Internet:
Destination Type RtRef Next hop Type Index NhRef Netif
192.168.0.5/32 user 0 recv 33 1
Routing table: __master.anon__.inet
Internet:
Destination Type RtRef Next hop Type Index NhRef Netif
default perm 0 rjct 523 1
root@D2> show interfaces lo0 | match index
Interface index: 6, SNMP ifIndex: 6
Logical interface lo0.16384 (Index 64) (SNMP ifIndex 21)
Logical interface lo0.16385 (Index 65) (SNMP ifIndex 22)
Logical interface lo0.32768 (Index 66) (SNMP ifIndex 250)
root@D2> show snmp mib walk ifName | match 33
root@D2>
[/edit 2]