Ervin Taufik

[basic-bgp] advertising & Filter prefix junOS

Posted in Cisco, General by ervin andriana taufik on April 2, 2009

Sebelumnya kita sudah coba config basic-bgp😉
sekarang kita coba advertise IP dari juniper.

kita bikin prefix-list IP yg akan kita advertise
=================================

ebenz@junOS# edit prefix-list export
ebenz@junOS# set 10.100.100.0/24
[edit policy-options prefix-list export]
ebenz@junOS# set 10.100.101.0/24
[edit policy-options prefix-list export]
ebenz@junOS# set 10.100.102.0/24
[edit policy-options prefix-list export]
ebenz@junOS# set 10.100.103.0/24
[edit policy-options prefix-list export]
ebenz@junOS# show
10.100.100.0/24;
10.100.101.0/24;
10.100.102.0/24;
10.100.103.0/24;
[edit policy-options prefix-list export]
ebenz@junOS#

kemudian kita null0 supaya IP tetep exist diluar (karena ini simulasi😀 )

ebenz@junOS# edit routing-options static
[edit routing-options static]
ebenz@junOS# set route 10.100.100.0/24 reject
[edit routing-options static]
ebenz@junOS# set route 10.100.101.0/24 reject
[edit routing-options static]
ebenz@junOS# set route 10.100.102.0/24 reject
[edit routing-options static]
ebenz@junOS# set route 10.100.103.0/24 reject
[edit routing-options static]
ebenz@junOS# set route 10.100.104.0/24 reject
[edit routing-options static]
ebenz@junOS#

kemudian kita bikin statment untuk prefix-list

ebenz@junOS# edit policy-options
ebenz@junOS# set policy-statement export-prefix term 1 from prefix-list export

[edit policy-options]
ebenz@junOS# show
prefix-list export {
10.100.100.0/24;
10.100.101.0/24;
10.100.102.0/24;
10.100.103.0/24;
}
policy-statement export-prefix {
term 1 {
from {
prefix-list export;
}
}
}

hemm.. belum ada filtering
===================

[edit policy-options policy-statement export-prefix term 1]
ebenz@junOS# set then accept
[edit policy-options policy-statement export-prefix term 1
ebenz@junOS# show
from {
prefix-list export;
}
then accept;

[edit policy-options]
ebenz@junOS# set policy-statement export-prefix term 2 then reject
[edit policy-options]
ebenz@junOS# commit
commit complete
ebenz@junOS# show
term export-list {
from {
prefix-list export;
}
then accept;
}
term 2 {
then reject;
}
[edit policy-options policy-statement export-prefix]
ebenz@junOS# top
[edit]
ebenz@junOS# commit
commit complete

kemudian kita pasang statment pada protocol bgp
====================================

[edit protocols bgp]
ebenz@NETSOFT# edit group ASN-3030

[edit protocols bgp group ASN-3030]
ebenz@NETSOFT# show
type external;
peer-as 3030;
neighbor 172.16.0.204;

[edit protocols bgp group ASN-3030]
ebenz@NETSOFT# set export ?
Possible completions:
Export policy
( Open an expression
[ Open a set of values
[edit protocols bgp group ASN-3030]
ebenz@NETSOFT# set export export-prefix
[edit protocols bgp group ASN-3030]
ebenz@NETSOFT# commit
commit complete

kita tengok di sebrangnya apakah sudah dapet😉
===================================

cisco#sh ip route bgp
10.0.0.0/24 is subnetted, 4 subnets
B 10.100.102.0 [20/0] via 172.16.0.202, 00:00:16
B 10.100.103.0 [20/0] via 172.16.0.202, 00:00:16
B 10.100.100.0 [20/0] via 172.16.0.202, 00:00:16
B 10.100.101.0 [20/0] via 172.16.0.202, 00:00:16

3 Responses

Subscribe to comments with RSS.

  1. Matt Hanson said, on April 2, 2009 at 11:32 am

    Good writing. Keep up the good work. I just added your RSS feed my Google News Reader..

    Matt Hanson

  2. iwan wibisana said, on April 16, 2009 at 11:47 am

    mantappppppppppp…..kang saya mau nanya..kenapa saya bikin filtering di ospf under routing instance gak jalan ya ?


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: