Config Router

  • Google Sheets
  • CCNA Online training
    • CCNA
  • CISCO Lab Guides
    • CCNA Security Lab Manual With Solutions
    • CCNP Route Lab Manual with Solutions
    • CCNP Switch Lab Manual with Solutions
  • Juniper
  • Linux
  • DevOps Tutorials
  • Python Array
You are here: Home / Juniper / Sample Configuration of eBGP and iBGP(Border Gateway Protocol) on EX series switches

Sample Configuration of eBGP and iBGP(Border Gateway Protocol) on EX series switches

May 27, 2016 by James Palmer

This article provides the configuration eBGP(External BGP) and iBGP(Internal BGP) on EX series switches
Topology:

Switch A-(ge-0/0/0)--------(ge-0/0/0) Switch B-(ge-0/0/1)----------(ge-0/0/1)-Switch C-(ge-0/0/2)------------(ge-0/0/2)-Switch D

                     iBGP & OSPF                                                eBGP                                                               OSPF

Setup:

Switch A :
Lo0 - 100.1.1.1
Ge-0/0/0 – 110.1.1.1/24

Switch B:
Lo0 – 150.1.1.1
Ge-0/0/0 – 110.1.1.2/24
Ge-0/0/1 – 120.1.1.1/24

Switch C:
Lo0 – 200.1.1.1
Ge-0/0/1-120.1.1.2/24
Ge-0/0/2 – 130.1.1.1/24

Switch D:
Lo0 – 210.1.1.1
Ge-0/0/2 – 130.1.1.2/24

The following is the configuration on all the four switches:

Switch 1:

{master:0}[edit ]
[email protected]# show policy-options
policy-statement ospf {
      term t1 {
          from protocol [ direct local ];
          then accept;
      }
}


{master:0}[edit ]
[email protected]# show protocols ospf
export ospf;
area 0.0.0.0 {
      interface ge-0/0/0.0;
}

{master:0}[edit ]
[email protected]# show routing-options
autonomous-system 1000;

{master:0}[edit ]
[email protected]# show protocols bgp
local-as 1000;
group iBGP {
         type internal;
         local-address 100.1.1.1;
         neighbor 150.1.1.1 {
             peer-as 1000;
         }
}

Switch 2:

{master:0}[edit ]
[email protected]# show policy-options
policy-statement bgp {
      term t1 {
            from protocol bgp;
            then {
              next-hop self;
              accept;
           }
      }
}
policy-statement bgp1 {
   term t2 {
        from {
            route-filter 120.1.1.0/24 exact;
            route-filter 150.1.1.1/32 exact;
        }
        then reject;
    }
    term t1 { 
       from protocol [ ospf direct local ];
       then {
             tag add 100;
             accept;
       }
   }
}
policy-statement ospf {
     term t1 {
        from protocol [ local direct static ];
        then accept;
     }
}

{master:0}[edit ]
[email protected]# show protocols bgp
local-as 1000;
group eBGP {
    type external;
    local-address 150.1.1.1;
    export bgp1;
    neighbor 200.1.1.1 {
         multihop {
              ttl 2;
         }
         peer-as 2000;        
     }
}
group iBGP {
    type internal;
    local-address 150.1.1.1;
    export bgp;
    neighbor 100.1.1.1 {
             peer-as 1000;
    }
}

{master:0}[edit ]
[email protected]# show  routing-options
static {
          route 200.1.1.1/32 next-hop 120.1.1.2;
}
autonomous-system 1000;

Switch 3:

{master:0}[edit ]
[email protected]# show policy-options
policy-statement bgp {
   term t2 {
     from {
              route-filter 120.1.1.0/24 exact;
              route-filter 200.1.1.1/32 exact;
    }
    then reject;
  }
  term t1 {
            from protocol [ ospf direct local ];
            then accept;
   }
}
policy-statement ospf {
          term t1 {
               from protocol [ direct local bgp static ];
               then {
                    tag2 add 1000;
                    accept;
               }
         }
}

{master:0}[edit ]
[email protected]# show protocols bgp
local-as 2000;
group eBGP {
         type external;
         local-address 200.1.1.1;
         export bgp;
         neighbor 150.1.1.1 {
                 multihop {
                 ttl 2;
         }
         peer-as 1000;
    }
}

{master:0}[edit ]
[email protected]# show routing-options
static {
       route 150.1.1.1/32 next-hop 120.1.1.1;
}
autonomous-system 2000;

Switch 4:

{master:0}[edit ]
[email protected]# show policy-options
policy-statement ospf {
    term t1 {
          from protocol [ ospf direct local ];
          then accept;
    }
}

{master:0}[edit ]
[email protected]# show protocols ospf
export ospf;
area 0.0.0.0 {
           interface ge-0/0/2.0;
}

{master:0}[edit ]
[email protected]# show routing-options
autonomous-system 2000;

 

Related

Filed Under: Juniper Tagged With: BGP, External BGP, Internal BGP

Recent Posts

  • How do I give user access to Jenkins?
  • What is docker volume command?
  • What is the date format in Unix?
  • What is the difference between ARG and ENV Docker?
  • What is rsync command Linux?
  • How to Add Music to Snapchat 2021 Android? | How to Search, Add, Share Songs on Snapchat Story?
  • How to Enable Snapchat Notifications for Android & iPhone? | Steps to Turn on Snapchat Bitmoji Notification
  • Easy Methods to Fix Snapchat Camera Not Working Black Screen Issue | Reasons & Troubleshooting Tips to Solve Snapchat Camera Problems
  • Detailed Procedure for How to Update Snapchat on iOS 14 for Free
  • What is Snapchat Spotlight Feature? How to Make a Spotlight on Snapchat?
  • Snapchat Hack Tutorial 2021: Can I hack a Snapchat Account without them knowing?

Copyright © 2023 · News Pro Theme on Genesis Framework · WordPress · Log in