Routing
Highlighted
Routing

Why cannot I delete existing command "policy-options policy-statement ......" ?

‎01-06-2017 09:57 AM

 

Hi

 

Why cannot I delete the below command?  

 

AC1#delete policy-options policy-statement IN term 85 from route-filter 1.4.13.52/30 orlonger

 

After I use the above command, the below command is used. Please see its output:

 

AC1# show | compare
[edit policy-options policy-statement IN term 85 from route-filter 1.4.13.52/30 orlonger]- accept;

2 REPLIES 2
Highlighted
Routing
Solution
Accepted by topic author eesunj
‎01-07-2017 11:52 AM

Re: Why cannot I delete existing command "policy-options policy-statement ......" ?

‎01-06-2017 05:03 PM

Hi eesunj,

Actually I got this, you are trying to do delete operation under policy-options configuration hierarchy . I assume that there are two or more configuration parameters under the < policy-options policy-statement IN term 85 from route-filter 1.4.13.52/30 orlonger >  policy-options configuration hierarchy  level.

 

lab# show policy-options policy-statement IN term 85 from route-filter 1.4.13.52/30 orlonger                   

local-preference 200;

accept;

 

As you are specifically deleting the only one parameter in the level “delete policy-options policy-statement IN term 85 from route-filter 1.4.13.52/30 orlonger accept”; it will not delete the entire policy or the entire term IN or the entire “from route-filter 1.4.13.52/30 orlonger” configuration hierarchy .

 

Example:

Current Configuration [Assumtions with 2 or more config parameters]:

[edit]

lab# show policy-options policy-statement IN                                                          

Jan 07 00:33:30

term 85 {

    from {

        route-filter 1.4.13.52/30 orlonger {

            local-preference 200;

            accept;

        }

    }

}

 

[edit]

lab# commit                                                                                          

Jan 07 00:33:34

commit complete

 

[edit]

lab# show policy-options policy-statement IN   

Jan 07 00:33:58

term 85 {

    from {

        route-filter 1.4.13.52/30 orlonger {

            local-preference 200;

            accept;

        }

    }

}

 

This is expected <<<

[edit]

lab# delete policy-options policy-statement IN term 85 from route-filter 1.4.13.52/30 orlonger accept          

Jan 07 00:34:08

 

[edit]

lab# show | compare                                                                                            

Jan 07 00:34:14

[edit policy-options policy-statement IN term 85 from route-filter 1.4.13.52/30 orlonger]

-      accept;

 

Since we have one more configuration parameter in the same hierarchy  “policy-options policy-statement IN term 85 from route-filter 1.4.13.52/30 orlonger”

 

[edit]

lab# show policy-options policy-statement IN                                                            

Jan 07 00:34:29

term 85 {

    from {

        route-filter 1.4.13.52/30 orlonger {

            local-preference 200;

        }

    }

}

 

Other OPTIONs:

Alternatively based on your requirement you can also delete at different configuration hierarchy  as below to the config below the hierarchy ,

 

[edit]

lab# delete policy-options policy-statement IN term 85                                                  

 

or

 

[edit]

lab# delete policy-options policy-statement IN

 

or

 

[edit]

lab# delete policy-options policy-statement IN term 85 from

 

-Python

#Please mark my solution as accepted if it helped, Kudos are appreciated as well.

-Python JNCIE 3X [SP|DC|ENT] JNCIP-SEC JNCDS 3X [ WAN | DC|SEC] JNCIS-Cloud JNCIS-DevOps CCIP ITIL
#Please mark my solution as accepted if it helped, Kudos are appreciated as well.
Highlighted
Routing

Re: Why cannot I delete existing command "policy-options policy-statement ......" ?

‎01-07-2017 11:52 AM

Right, Thank you!