Tags

,

Junos_sw_logo

Ok, time for some BGP Route Reflectors!
 

IBGP RR

Now onto BGP Route-Reflectors.  For this lab our IGP will be OSPF, our BGP will be done via the connected interfaces, J1 will be the RR, and we will advertise our loopbacks into BGP.

 

First though, reset the lab to the rescue config on J1, J2 and J3, and load the base on R4.

Ok, now to configure OSPF and BGP on R4:

R4#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

R4(config)#router ospf 123

R4(config-router)#no au

R4(config-router)#net 192.168.14.0 0.0.0.255 a 0

R4(config-router)#exit

R4(config)#router bgp 123

R4(config-router)#no au

R4(config-router)#nei 192.168.14.1 remote-as 123

R4(config-router)#net 4.4.4.4 mask 255.255.255.255

R4(config-router)#^Z

R4#

Will will configure J1 last.  So, now for J2:
jfry@J2> edit

Entering configuration mode

 

[edit]

jfry@J2# set routing-options autonomous-system 123

 

[edit]

jfry@J2# edit protocols ospf area 0                                

 

[edit protocols ospf area 0.0.0.0]

jfry@J2# set interface ge-0/0/0  

 

[edit protocols ospf area 0.0.0.0]

jfry@J2# exit

 

[edit]

jfry@J2# edit protocols bgp group ibgp

 

[edit protocols bgp group ibgp]

jfry@J2# set type internal

 

[edit protocols bgp group ibgp]

jfry@J2# set peer-as 123

 

[edit protocols bgp group ibgp]

jfry@J2# set neighbor 192.168.12.1  

 

[edit protocols bgp group ibgp]

jfry@J2# top

 

[edit]

jfry@J2# set policy-options prefix-list Loopbacks 2.2.2.2/32

 

[edit]

jfry@J2# set policy-options policy-statement Advertise term 1 from prefix-list Loopbacks

 

[edit]

jfry@J2# set policy-options policy-statement Advertise term 1 then accept

 

[edit]

jfry@J2# set protocols bgp export Advertise

 

[edit]

jfry@J2# commit and-quit

 

 

 

Now for J3! Entering configuration mode

[edit]

jfry@J3# set routing-options autonomous-system 123

 

[edit]

jfry@J3# edit protocols ospf area 0

 

[edit protocols ospf area 0.0.0.0]

jfry@J3# set interface fe-0/0/2

 

[edit protocols ospf area 0.0.0.0]

jfry@J3# exit

 

[edit]

jfry@J3# edit protocols bgp group ibgp

 

[edit protocols bgp group ibgp]

jfry@J3# set type internal

 

[edit protocols bgp group ibgp]

jfry@J3# set peer-as 123

 

[edit protocols bgp group ibgp]

jfry@J3# set neighbor 192.168.13.1

 

[edit protocols bgp group ibgp]

jfry@J3# top

 

[edit]

jfry@J3# set policy-options prefix-list Loopbacks 3.3.3.3/32

 

[edit]

jfry@J3# set policy-options policy-statement Advertise term 1 from prefix-list Loopbacks        

 

[edit]

jfry@J3# set policy-options policy-statement Advertise term 1 then accept

 

[edit]

jfry@J3# set protocols bgp export Advertise

 

[edit]

jfry@J3# show | compare

[edit]

+  routing-options {

+      autonomous-system 123;

+  }

+  protocols {

+      bgp {

+          export Advertise;

+          group ibgp {

+              type internal;

+              peer-as 123;

+              neighbor 192.168.13.1;

+          }

+      }

+      ospf {

+          area 0.0.0.0 {

+              interface fe-0/0/2.0;

+          }

+      }

+  }

+  policy-options {

+      prefix-list Loopbacks {

+          3.3.3.3/32;

+      }

+      policy-statement Advertise {    

+          term 1 {

+              from {

+                  prefix-list Loopbacks;

+              }

+              then accept;

+          }

+      }

+  }

 

And now for J1!
jfry@J1> edit

Entering configuration mode

 

[edit]

jfry@J1# set routing-options autonomous-system 123

 

[edit]

jfry@J1# edit protocols ospf area 0

 

[edit protocols ospf area 0.0.0.0]

jfry@J1# set interface ge-0/0/0

 

[edit protocols ospf area 0.0.0.0]

jfry@J1# set interface fe-0/0/2

 

[edit protocols ospf area 0.0.0.0]

jfry@J1# set interface fe-0/0/7

 

[edit protocols ospf area 0.0.0.0]

jfry@J1# top

 

[edit]

jfry@J1# edit protocols bgp group ibgp

 

[edit protocols bgp group ibgp]

jfry@J1# set type internal

 

[edit protocols bgp group ibgp]

jfry@J1# set peer-as 123

 

Here is where tell J1 that it is a Route-Reflector and what clients are associated with it.

[edit protocols bgp group ibgp]

jfry@J1# set cluster 1.1.1.1

 

[edit protocols bgp group ibgp]

jfry@J1# set neighbor 192.168.13.3

 

[edit protocols bgp group ibgp]

jfry@J1# set neighbor 192.168.12.2

 

[edit protocols bgp group ibgp]

jfry@J1# set neighbor 192.168.14.4

 

[edit protocols bgp group ibgp]

jfry@J1# top

 

[edit]

jfry@J1# set policy-options prefix-list Loopbacks 1.1.1.1/32

 

[edit]

jfry@J1# set policy-statement Advertise term 1 from prefix-list Loopbacks       

 

[edit]

jfry@J1# set policy-options policy-statement Advertise term 1 then accept

 

[edit]

jfry@J1# set protocols bgp export Advertise 

 

 

 

Ok, let’s look at the whole config now for this:

[edit]

jfry@J1# show | compare

[edit]

+  routing-options {

+      autonomous-system 123;

+  }

+  protocols {

+      bgp {

+          export Advertise;

+          group ibgp {

+              type internal;

+              cluster 1.1.1.1;

+              peer-as 123;

+              neighbor 192.168.13.3;

+              neighbor 192.168.12.2;

+              neighbor 192.168.14.4;

+          }

+      }

+      ospf {

+          area 0.0.0.0 {

+              interface ge-0/0/0.0;

+              interface fe-0/0/2.0;

+              interface fe-0/0/7.0;

+          }

+      }

+  }                                   

+  policy-options {

+      prefix-list Loopbacks {

+          1.1.1.1/32;

+      }

+      policy-statement Advertise {

+          term 1 {

+              from {

+                  prefix-list Loopbacks;

+              }

+              then accept;

+          }

+      }

+  }

 

[edit]

jfry@J1# commit and-quit


 

 

Ok, all that is now configure.  Let’s hop back to R4 and look at our BGP:
R4#sh ip bgp        

BGP table version is 5, local router ID is 4.4.4.4

Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,

              r RIB-failure, S Stale

Origin codes: i – IGP, e – EGP, ? – incomplete

 

   Network          Next Hop            Metric LocPrf Weight Path

*>i1.1.1.1/32       192.168.14.1                  100      0 i

*>i2.2.2.2/32       192.168.12.2                  100      0 i

*>i3.3.3.3/32       192.168.13.3                  100      0 i

*> 4.4.4.4/32       0.0.0.0                  0         32768 i

R4#

 

Cool!  We have all the loopbacks in BGP.  Time to see if R4 can ping the other loopbacks!

R4#p 2.2.2.2 so l0

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:

Packet sent with a source address of 4.4.4.4

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms

R4#p 3.3.3.3 so l0

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:

Packet sent with a source address of 4.4.4.4

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/8 ms

R4#ping 1.1.1.1 so l0

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:

Packet sent with a source address of 4.4.4.4

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms

R4#