Description

This article describes a method to check if apply-path is working as expected, and a method to check which scenario apply-path matches (normally this is the IP address).

Symptoms

  • How can user discover whether the apply-path function is working as expected?

  • How can user check which scenario the apply-path function is matching?

Solution

 

Customers use the apply-path feature to secure and simplify their configurations. This article gives you a method to check if the apply-path is working as expected. We are using following configuration as an example:

lab@router>show configuration interfaces lo0 
unit 0 {
    family inet {
        address 10.100.100.1/32;
    }
}
unit 12 {
    family inet {
        address 166.105.236.12/32 {
            primary;
        }
    }
}

Then we use the apply-path feature to match all IP addresses that configured under lo0:

lab@router# show policy-options prefix-list test 
apply-path "interfaces lo0 unit <*> family inet address <*>";

The goal is to match all IPv4 address under lo0 interface. We can use the following command to see if this apply-path is working as expected:

lab@router#show policy-options prefix-list test | display inheritance 
##
## apply-path was expanded to:
##     10.100.100.1/32; 
##     166.105.236.12/32; 
##
apply-path "interfaces lo0 unit <*> family inet address <*>";

As you can see, the system resolved this apply-path and was expanded to 10.100.100.1 and 166.105.236.12, which are the IPv4 addresses under lo0. This indicates that apply-path is working as expected

Related Information