IP Stories

“A Written IP Related Activities”

[Juniper] Route Map Sequences – Term Policy-Statement Insert Command

Posted by a. Rahman Isnaini r. Sutan on August 19, 2008


1. Create New Term
(192.168.104.0/24 will be prepended):

term network-24 {
from {
prefix-list NETWORK-24;
}
then {
as-path-prepend “5656 5656 5656 5656″;
accept;
}
}

Done configuration after adding new term at edit>policy-options>policy-statement bla-bla will be :

You@JunOS# show
term 1 {
from as-path MY-AS;
then accept;
}
term 2 {
from as-path [ CUST-M CUST-N CUST-O ];
then accept;
}
term 3 {
from {
prefix-list NETWORK-22;
}
then accept;
}
term 5 {
from {
prefix-list CUST-B;
}
then accept;
}
term 6 {
from as-path CUST-A;
then {
as-path-prepend “525 525 525″;
accept;
}
}
term 8 {
then reject;
}
term network-24 {
from {
prefix-list NETWORK-24;
}
then {
as-path-prepend “5656 5656 5656 5656″;
accept;
}
}


[edit policy-options policy-statement UPSTREAM-EXPORT]


2. Insert New Term
which has been created.

You@JunOS# insert term network-24 before term 1
[edit policy-options policy-statement UPSTREAM-EXPORT]

You@JunOS# show
term network-24 {
from {
prefix-list NETWORK-24;
}
then {
as-path-prepend “5656 5656 5656 5656″;
accept;
}
}

term 1 {
from as-path MY-AS;
then accept;
}
term 2 {
from as-path [ CUST-M CUST-N CUST-O ];
then accept;
}
term 3 {
from {
prefix-list NETWORK-22;
}
then accept;
}
term 5 {
from {
prefix-list CUST-B;
}
then accept;
}
term 6 {
from as-path CUST-A;
then {
as-path-prepend “525 525 525″;
accept;
}
}
term 8 {
then reject;
}

[edit policy-options policy-statement UPSTREAM-EXPORT]
You@JunOS# commit
commit complete

[edit policy-options policy-statement UPSTREAM-EXPORT]
You@JunoS#sh route advertised-protocol bgp 172.16.17.1


192.168.104.0/24   Self     5656 5656 5656 5656 I

a. rahman isnaini rangkayo sutan

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>