risnainiAvatar border
TS
risnaini
Belajar Juniper OS [Config]
Bagi yang belajar Juniper gan.
Configuration dasar berikut ini sudah jalan dan sudah lama di implementasikan.

Tujuan config dasar dibawah adalah :

1. Setup IP Address di interface
2. Setup BGP berikut policy2 nya.

http://www.ip-stories.com/?p=668

----------------------------------------------------------------------
Juniper OS [JUNOS] has a completely different model of configuration with cisco IOS.
A Basic & Simple BGP config as you can see below.
The scheme is :

- You are connected to two peers
- Your ASNumber 8888
- You are peering with PEER-1 AS 9999
- You are peering with PEER-2 AS 10000
- You are advertising first longer prefix /24 to PEER-1
- You are advertising second longer prefix /24 to PEER-2
- You are advertising supernet aggregate or /23 to PEER-1 & PEER-2
- Why ? Redundancy Purpose

+++++++++++++++++++++++++++++++++++++++++++++++++
1. Configure IP Address for BGP Peer Purpose (PEER-1 & PEER-2) for e.g
+++++++++++++++++++++++++++++++++++++++++++++++++
interfaces {
fe-0/2/0 {
description PEER-1;
speed 100m;
link-mode full-duplex;
unit 0 {
family inet {
address 88.88.88.89/30;
}
}
}
fe-0/2/1 {
description PEER-2;
speed 100m;
link-mode full-duplex;
unit 0 {
family inet {
address 88.88.88.99/30;
}
}
}
}

The command should be (you can go with step by step command architechture or directly to the end) :

admin@JUNOS>edit
Entering configuration mode

[edit]
admin@JUNOS#edit interfaceS fe-0/2/0

[edit interfaces fe-0/2/0]
admin@JUNOS#
admin@JUNOS#set description PEER-1 speed 100 link-mode full-duplex unit 0 family inet 88.88.88.89/30

admin@JUNOS#edit interfaceS fe-0/2/1
admin@JUNOS#
admin@JUNOS#set description PEER-2 speed 100 link-mode full-duplex unit 0 family inet 88.88.88.99/30

[edit interfaces fe-0/2/1]
admin@JUNOS#
admin@JUNOS#commit

++++++++++++++++++++++++++++
2. Configure AS Number in Routing Option
++++++++++++++++++++++++++++

routing-options {
autonomous-system 8888;

The command should be :

admin@JUNOS>edit
Entering configuration mode

[edit]
admin@JUNOS#set routing-option autonomous-system 8888

++++++++++++
3. Configure BGP
++++++++++++

protocols {
bgp {
group PEER-1 {
type external;
description ***PEER-1***;
damping;
import PEER-IMPORT;
export PEER1-EXPORT;
peer-as 9999;
neighbor 88.88.88.90
}
}
group PEER-2 {
type external;
description ***PEER-2***;
damping;
import PEER-IMPORT;
export PEER2-EXPORT;
peer-as 10000;
neighbor 88.88.88.100
}
}
}
}

The command should be :

admin@JUNOS>edit
Entering configuration mode

[edit]
admin@JUNOS#set protocol bgp group PEER-1 type external description ***PEER-1*** import PEER-IMPORT export PEER1-EXPORT peer-as 9999 neighbor 88.88.88.90
admin@JUNOS#set protocol bgp group PEER-2 type external description ***PEER-2*** import PEER-IMPORT export PEER2-EXPORT peer-as 1000 neighbor 88.88.88.100
admin@JUNOS#commit

++++++++++++++++++++++++++++++++++++
4. Configure BGP Policy & AS Path Access-List in Cisco emoticon-Smilie
++++++++++++++++++++++++++++++++++++

policy-options {
prefix-list PEER-1 {
88.88.86.0/24;
}
prefix-list PEER-2 {
88.88.87.0/24;
}
prefix-list PEER-12 {
88.88.86.0/23;
}

The command should be :

admin@JUNOS>edit
Entering configuration mode

[edit]
admin@JUNOS#set policy-options prefix-list PEER-1 88.88.88.86.0/24
admin@JUNOS#set policy-options prefix-list PEER-2 88.88.88.87.0/24
admin@JUNOS#set policy-options prefix-list PEER-12 88.88.88.86.0/23

policy-statement PEER-IMPORT {
term 1 {
from as-path ALL;
then accept;
}
}

admin@JUNOS#set policy-options policy-statement PEER-IMPORT term 1 from as-path ALL
admin@JUNOS#set policy-options policy-statement PEER-IMPORT term 1 then accept

policy-statement PEER1-EXPORT {
term 1 {
from {
prefix-list PEER-1;
}
then accept;
}
term 2 {
from {
prefix-list PEER-12;
}
then accept;
}
term 3 {
then reject;
}
}

admin@JUNOS#set policy-options policy-statement PEER1-EXPORT term 1 from prefix-list PEER-1
admin@JUNOS#set policy-options policy-statement PEER1-EXPORT term 1 then accept
admin@JUNOS#set policy-options policy-statement PEER1-EXPORT term 2 from prefix-list PEER-12
admin@JUNOS#set policy-options policy-statement PEER1-EXPORT term 2 then accept
admin@JUNOS#set policy-options policy-statement PEER1-EXPORT term 3 then reject

policy-statement PEER2-EXPORT {
term 1 {
from {
prefix-list PEER-2;
}
then accept;
}
term 2 {
from {
prefix-list PEER-12;
}
then accept;
}
term 3 {
then reject;
}
admin@JUNOS#set policy-options policy-statement PEER2-EXPORT term 1 from prefix-list PEER-2
admin@JUNOS#set policy-options policy-statement PEER2-EXPORT term 1 then accept
admin@JUNOS#set policy-options policy-statement PEER2-EXPORT term 2 from prefix-list PEER-12
admin@JUNOS#set policy-options policy-statement PEER2-EXPORT term 2 then accept
admin@JUNOS#set policy-options policy-statement PEER2-EXPORT term 3 then reject
}
as-path ALL .*;

admin@JUNOS#set policy-options as-path ALL .*
admin@JUNOS#commit
}
0
11.5K
28
GuestAvatar border
Guest
Tulis komentar menarik atau mention replykgpt untuk ngobrol seru
Urutan
Terbaru
Terlama
GuestAvatar border
Guest
Tulis komentar menarik atau mention replykgpt untuk ngobrol seru
Komunitas Pilihan