Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Designing and Developing Scalable IP Networks.pdf
Скачиваний:
36
Добавлен:
15.03.2015
Размер:
2.95 Mб
Скачать

 

6.3 HOW IS POLICY EVALUATED?

73

 

Table 6.1 Comparison of verbose and terse configuration style

 

 

 

 

Verbose Configuration

Terse Configuration

 

 

 

policy-options {

policy-options {

 

prefix-list customer-plus-internal-nets {

prefix-list pl1 {

10.0.0.0/8;

10.0.0.0/8;

192.168.0.0/16;

192.168.0.0/16;

}

}

 

policy-statement announce-cust-plus-int {

policy-statement ps1 {

 

term announce-prefixes {

term t1 {

 

from {

from {

 

protocol bgp;

protocol bgp;

 

prefix-list customer-plus-internal-nets;

prefix-list pl1;

}

}

 

then accept;

then accept;

}

}

 

term default-reject {

term t2 {

 

then reject;

then reject;

}

}

}

}

}

}

 

 

 

As you can see, even though the example is relatively simple and both configurations are clearly identical, it is much more obvious that one can understand what this policy does from reading the verbose configuration.

6.3HOW IS POLICY EVALUATED?

If you do not understand how policy is evaluated, it is impossible to write policy that you can be sure will accurately implement your business aims. Various aspects of policy evaluation are described below.

6.3.1AND OR OR?

This may seem like a trivial question (or even a nonsensical one if you are not sure where I am heading . . .) but in the design and implementation of policy, it is truly fundamental. The question refers to whether particular policy elements are evaluated with a logical AND between them or a logical OR. Unfortunately, the answer to this question is ‘it depends’. It depends upon the implementation, and it also depends upon the function within the policy. This may sound like a particularly opaque answer but, hopefully, I will bring a little clarity to the subject below.

6.3.2THE FLOW OF POLICY EVALUATION

The flow of policy evaluation is an implementation-specific feature. Policy is generally evaluated linearly from start to finish, with the first match causing the associated policy