Vous êtes sur la page 1sur 6

Simple BGP 2 (dengan statik route)

root# show
## Last changed: 2011-02-22 16:30:51 UTC
version 8.3R2.8;
system {
root-authentication {
encrypted-password "$1$jiSoPIwl$5aV1FrrD9/yYGTheeQVtn1"; ## SECRET-DATA
}
}
logical-routers {
R0 {
interfaces {
fxp0 {
unit 0 {
vlan-id 10;
family inet {
address 192.168.0.2/30;
}
}
unit 1 {
vlan-id 88;
family inet {
address 88.88.88.1/24;
}
}
}
}
routing-options {
static {
route 0.0.0.0/0 next-hop 192.168.0.1;
}
}
}
R1 {
interfaces {
fxp1 {
unit 0 {
vlan-id 10;
family inet {
address 192.168.0.1/30;
}
}
unit 1 {
vlan-id 100;
family inet {
address 100.100.100.1/24;
}
}
}
fxp2 {

healinlodge@yahoo.co.id

unit 0 {
vlan-id 20;
family inet {
address 192.168.1.2/30;
}
}
unit 1 {
vlan-id 101;
family inet {
address 101.101.101.1/24;
}
}
}
}
protocols {
bgp {
group group1 {
type external;
import prefix-masuk;
export prefix-keluar;
peer-as 200;
neighbor 192.168.1.1;
}
}
}
policy-options {
prefix-list subnet1 {
100.100.100.0/24;
}
prefix-list subnet2 {
101.101.101.0/24;
}
prefix-list subnet3 {
192.168.0.0/30;
}
policy-statement prefix-keluar {
term 1 {
from {
prefix-list subnet1;
}
then accept;
}
term 2 {
from {
prefix-list subnet2;
}
then accept;
}
term 3 {
from {
prefix-list subnet3;
}
then accept;
}
term 4 {
from protocol static;
then accept;
}
term 5 {
then reject;
}
}
policy-statement prefix-masuk {
term 1 {
from as-path ALL;
then accept;
}
}
as-path ALL .*;
}
routing-options {

healinlodge@yahoo.co.id

static {
route 88.88.88.0/24 next-hop 192.168.0.2;
}
autonomous-system 100;
}
}
R2 {
interfaces {
fxp3 {
unit 0 {
vlan-id 20;
family inet {
address 192.168.1.1/30;
}
}
unit 1 {
vlan-id 200;
family inet {
address 200.200.200.1/24;
}
}
}
fxp4 {
unit 0 {
vlan-id 30;
family inet {
address 192.168.2.1/30;
}
}
unit 1 {
vlan-id 201;
family inet {
address 201.201.201.1/24;
}
}
}
}
protocols {
bgp {
group group1 {
type external;
import prefix-masuk-peer1;
export prefix-keluar-peer1;
peer-as 100;
neighbor 192.168.1.2;
}
group group2 {
type external;
import prefix-masuk-peer2;
export prefix-keluar-peer2;
peer-as 300;
neighbor 192.168.2.2;
}
}
}
policy-options {
prefix-list subnet1 {
200.200.200.0/24;
}
prefix-list subnet2 {
201.201.201.0/24;
}
prefix-list subnet3 {
192.168.1.0/30;
}
prefix-list subnet4 {
192.168.2.0/30;
}
policy-statement prefix-keluar-peer1 {
term 1 {
from {

healinlodge@yahoo.co.id

prefix-list subnet1;
}
then accept;
}
term 2 {
from {
prefix-list subnet2;
}
then accept;
}
term 3 {
from {
prefix-list subnet4;
}
then accept;
}
term 4 {
from as-path FROM-R3;
then accept;
}
term 5 {
then reject;
}
}
policy-statement prefix-keluar-peer2 {
term 1 {
from {
prefix-list subnet1;
}
then accept;
}
term 2 {
from {
prefix-list subnet2;
}
then accept;
}
term 3 {
from {
prefix-list subnet3;
}
then accept;
}
term 4 {
from as-path FROM-R1;
then accept;
}
term 5 {
then reject;
}
}
policy-statement prefix-masuk-peer1 {
term 1 {
from as-path ALL;
then accept;
}
}
policy-statement prefix-masuk-peer2 {
term 1 {
from as-path ALL;
then accept;
}
}
as-path ALL .*;
as-path FROM-R1 100;
as-path FROM-R3 300;
}
routing-options {
autonomous-system 200;
}
}

healinlodge@yahoo.co.id

R3 {
interfaces {
fxp5 {
unit 0 {
vlan-id 30;
family inet {
address 192.168.2.2/30;
}
}
unit 1 {
vlan-id 55;
family inet {
address 55.55.55.1/24;
}
}
}
}
protocols {
bgp {
group group1 {
type external;
import prefix-masuk;
export prefix-keluar;
peer-as 200;
neighbor 192.168.2.1;
}
}
}
policy-options {
prefix-list subnet1 {
55.55.55.0/24;
}
policy-statement prefix-keluar {
term 1 {
from {
prefix-list subnet1;
}
then accept;
}
term 2 {
then reject;
}
}
policy-statement prefix-masuk {
from as-path ALL;
then accept;
}
as-path ALL .*;
}
routing-options {
autonomous-system 300;
}
}
}
interfaces {
fxp0 {
vlan-tagging;
}
fxp1 {
vlan-tagging;
}
fxp2 {
vlan-tagging;
}
fxp3 {
vlan-tagging;
}
fxp4 {
vlan-tagging;
}
fxp5 {

healinlodge@yahoo.co.id

vlan-tagging;
}
fxp6 {
vlan-tagging;
}
fxp7 {
vlan-tagging;
}
}

Mohon maaf bila ada kesalahan. Kritik, saran dan masukkan sangat diharapkan.
Terima Kasih.

Maret 2011

healinlodge@yahoo.co.id

Vous aimerez peut-être aussi