ip-stories.com

  •  

    September 2010
    M T W T F S S
    « Aug    
     12345
    6789101112
    13141516171819
    20212223242526
    27282930  
  • Web Stat Counter

    • Search This Blog :

    • Add url
    • Add Me on FB

      Rahman Isnaini's Facebook profile
    • Hurricane Electric IPv6 Cert

      IPv6 Certification Badge for risnaini
    • comments

    • Visitors Referred From :

    • Geo Stats

    • Categories

    [Juniper] Simple Basic BGP Configuration Juniper OS [Step by Step]

    Posted by a. Rahman Isnaini r. Sutan on May 14th, 2008

    =======================
    Juniper Config Manager [Here..]
    =======================

    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 :)
    ++++++++++++++++++++++++++++++++++++

    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

    }

    a. rahman isnaini r.sutan

    8 Responses to “[Juniper] Simple Basic BGP Configuration Juniper OS [Step by Step]”

    1. [Juniper] Redistribute Connected, Static & Local Router into BGP « IP Stories Says:

      [...] see BGP step by step config for more detail on how configuring [...]

    2. Martin Says:

      That was great, it helped me iron out some issues i had with policy application. Please cover something on firewall. Thanx

    3. a. Rahman Isnaini r. Sutan Says:

      Glad to hear that, Martin.
      Firewall working on it :)

    4. zakki a Says:

      Thanks for the article. It’s really help me.

    5. a. Rahman Isnaini r. Sutan Says:

      Sama2 Mas Zakki.

    6. [Juniper] Simple Basic BGP Configuration Juniper OS [Step by Step] :Networking Tutorial Says:

      [...] Source :  risnaini [...]

    7. [Juniper] Simple Basic BGP Configuration Juniper OS [Step by Step] « IP Stories Says:

      [...] post has been moved to http://www.ip-stories.com Please kindly update & noted. I’m really sorry for your [...]

    8. Lan Says:

      Tutorial yg sangat bagus..

    Leave a Reply

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