command that can display routes containing AS loops

Hi everyone,

I am curious about the AS loops in the AS-path. I think there should be a very, very few received BGP routes that contain the local AS#. But because such routes will be dropped and not installed in Loc-RIB, I want to know if there is a command that can display the dropped routes containing AS loops (in cisco or juniper router). Does anybody know?

Thanks!

Best!

On a Juniper, you could do something like:

show route hidden aspath-regex .*<Target-AS>.*

Regards,
Dave

Hi Dave,

thanks! I tried the command and found that it works. Do you know the similar command on cisco?

Regards,

Song