Skip to main content

BGP Simple Route Reflector

Now In this Lab we will study about Route Reflector. As we know IBGP need fully meshed.
The formula for IBGP neighbor peering is N(N-1)/2. In this Lab we configure 4 router as a IBGP. So let start calculate the peering:  4(4-1)/2=6. This is we only use 4 router if you network is using 100 routers, you can imagining how many peering setup needed. That why we use route reflector. Now we use route reflector for one cluster. In this scenario OSPF is use as underlay protocol for IBGP.




Route reflector have couple of rules for route froward. 

  1. If the route was learned from a non-client IBGP peer, it is reflected to clients only.
  2. If the route was learned from a client, it is reflected to all non-clients and clients, expect for the originating client.
  3. If the route was learned from an EBGP peer, it is reflected to all clients and non-clients.


Configuration

R1

network 11.11.11.0 mask 255.255.255.0
 neighbor 2.2.2.2 remote-as 65001
 neighbor 2.2.2.2 update-source Loopback0
 neighbor 2.2.2.2 route-reflector-client
 neighbor 2.2.2.2 next-hop-self
 neighbor 3.3.3.3 remote-as 65001
 neighbor 3.3.3.3 update-source Loopback0
 neighbor 3.3.3.3 route-reflector-client
 neighbor 3.3.3.3 next-hop-self
 neighbor 4.4.4.4 remote-as 65001
 neighbor 4.4.4.4 update-source Loopback0
 neighbor 4.4.4.4 next-hop-self
 neighbor 172.16.15.5 remote-as 65002
R2
 network 22.22.22.0 mask 255.255.255.0
 neighbor 1.1.1.1 remote-as 65001
 neighbor 1.1.1.1 update-source Loopback0

R3

neighbor 1.1.1.1 remote-as 65001
 neighbor 1.1.1.1 update-source Loopback0
 neighbor 172.16.36.6 remote-as 65003

R4

network 44.44.44.0 mask 255.255.255.0
 neighbor 1.1.1.1 remote-as 65001
 neighbor 1.1.1.1 update-source Loopback0
 neighbor 1.1.1.1 next-hop-self
 neighbor 172.16.47.7 remote-as 65004


Ok, now we have to check neighbor are up and each of network are reach at routing table.


RR Router

R1
BGP router identifier 11.11.11.11, local AS number 65001
BGP table version is 7, main routing table version 7
7 network entries using 819 bytes of memory
7 path entries using 364 bytes of memory
6/4 BGP path/bestpath attribute entries using 744 bytes of memory
3 BGP AS-PATH entries using 72 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 1999 total bytes of memory
BGP activity 7/0 prefixes, 8/1 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
2.2.2.2         4     65001      84     101        7         0    0      01:18:20        1
3.3.3.3         4     65001      87     101        7         0    0      01:18:14        2
4.4.4.4         4     65001      89      95         7         0    0      01:18:09        2
172.16.15.5     4 65002      83      89         7          0    0      01:18:31        1


RR Client Routers

R2
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
1.1.1.1           4 65001     104      87         10       0    0       01:21:52        5


R3

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
1.1.1.1           4 65001     105      91          11        0    0      01:22:32        5
172.16.36.6    4 65003      86      89           11        0    0      01:22:58        1


R4

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
1.1.1.1          4 65001     100      94            9       0    0      01:23:20        4
172.16.47.7    4 65004      87      89            9       0    0      01:22:02        1


BGP neighbor is fine. So let check the routing table.


R1#sh ip route bgp
     33.0.0.0/24 is subnetted, 1 subnets
B       33.33.33.0 [200/0] via 3.3.3.3, 01:25:27
     55.0.0.0/24 is subnetted, 1 subnets
B       55.55.55.0 [20/0] via 172.16.15.5, 01:25:27
     22.0.0.0/24 is subnetted, 1 subnets
B       22.22.22.0 [200/0] via 2.2.2.2, 01:25:27
     77.0.0.0/24 is subnetted, 1 subnets
B       77.77.77.0 [200/0] via 4.4.4.4, 01:23:47
     44.0.0.0/24 is subnetted, 1 subnets
B       44.44.44.0 [200/0] via 4.4.4.4, 01:25:22


Wait a minutes, did we miss some route? Yes we are, 66.66.66.0/24 network from AS 65003. At router 3 we can see the neighbor is up from 65003, So let check from R6, first we need to check config is correct or not.


R6
router bgp 65003
network 66.66.66.0 mask 255.255.255.0

neighbor 172.16.36.3 remote-as 65001

Configure is fine, let move on R3.


R3#sh ip route bgp
     55.0.0.0/24 is subnetted, 1 subnets
B       55.55.55.0 [200/0] via 1.1.1.1, 01:32:21
     66.0.0.0/24 is subnetted, 1 subnets
B       66.66.66.0 [20/0] via 172.16.36.6, 01:32:27

     22.0.0.0/24 is subnetted, 1 subnets
B       22.22.22.0 [200/0] via 2.2.2.2, 01:20:46
     77.0.0.0/24 is subnetted, 1 subnets
B       77.77.77.0 [200/0] via 4.4.4.4, 01:20:46
     11.0.0.0/24 is subnetted, 1 subnets
B       11.11.11.0 [200/0] via 1.1.1.1, 01:32:21
     44.0.0.0/24 is subnetted, 1 subnets
B       44.44.44.0 [200/0] via 4.4.4.4, 01:20:46


Router 3 know the AS 65003 advertised network. So, did R3 passed the route information to RR router?


R1#sh ip bgp
BGP table version is 7, local router ID is 11.11.11.11
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
*> 11.11.11.0/24    0.0.0.0                  0         32768 i
*>i22.22.22.0/24    2.2.2.2                  0    100      0 i
*>i33.33.33.0/24    3.3.3.3                  0    100      0 i
*>i44.44.44.0/24    4.4.4.4                  0    100      0 i
*> 55.55.55.0/24    172.16.15.5              0             0 65002 i
* i66.66.66.0/24    172.16.36.6              0    100      0 65003 i
*>i77.77.77.0/24    4.4.4.4                  0    100      0 65004 i


RR router got 66.66.66.0/24 network information  but next-hop network is unknown.
Just one command missing at R3.


R3
neighbor 1.1.1.1 next-hop-self  

Now RR router can see the 66.0/24 network

R1#sh ip bgp 66.66.66.0
BGP routing table entry for 66.66.66.0/24, version 8
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
  Advertised to update-groups:
     1          2          3        
  65003, (Received from a RR-client)
    3.3.3.3 (metric 2) from 3.3.3.3 (33.33.33.33)


      Origin IGP, metric 0, localpref 100, valid, internal, best

R1#sh ip bgp 33.33.33.0
BGP routing table entry for 33.33.33.0/24, version 4
Paths: (1 available, best #1, table Default-IP-Routing-Table)
  Advertised to update-groups:
     1          2          3        
  Local, (Received from a RR-client)
    3.3.3.3 (metric 2) from 3.3.3.3 (33.33.33.33)
      Origin IGP, metric 0, localpref 100, valid, internal, best


R3

R3#sh ip bgp 22.22.22.0
BGP routing table entry for 22.22.22.0/24, version 10
Paths: (1 available, best #1, table Default-IP-Routing-Table)
  Advertised to update-groups:
     1        
  Local
    2.2.2.2 (metric 3) from 1.1.1.1 (11.11.11.11)
      Origin IGP, metric 0, localpref 100, valid, internal, best
      Originator: 22.22.22.22, Cluster list: 1.1.1.1


Testing


R3

R3#ping 22.22.22.22 source lo1     

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 22.22.22.22, timeout is 2 seconds:
Packet sent with a source address of 33.33.33.33
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/35/68 ms
R3#ping 44.44.44.44 source lo1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 44.44.44.44, timeout is 2 seconds:
Packet sent with a source address of 33.33.33.33
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/26/44 ms
R3#ping 55.55.55.55 source lo1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 55.55.55.55, timeout is 2 seconds:
Packet sent with a source address of 33.33.33.33
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/48/112 ms

Comments

Popular posts from this blog

How to setup AWS VPC Peering (VPC to VPC)

    Hi Everyone... ဒီကနေ့တော့ VPC Peering လုပ်တဲ့ အကြောင်းလေးပြောပြပေးသွားမှာပါ။ VPC peering ဘာလို့လုပ်တာလဲ ဘယ်အချိန်တွေမှာသုံးတာလဲဆိုတာကို ကြည့်ရအောင်... သိတဲ့ အတိုင်း ပဲ AWS networking မှာ VPC ကမပါမဖြစ်အရေးပါပါတယ် AWS account တခုရဲ့ AWS region တခုမှာ VPC 5ခုအများဆုံး ထားလို့ရပါတယ်... AZ မဟုတ်ပါဘူး အဲ့ဒါလေးတော့သတိထားရမှာပါ.. peering က one to one ဖြစ်တဲ့အတွက် VPC များလာရင်တော့ configuation complex ဖြစ်လာပါမယ်၊ နောက်တခုကတခြား AWS account တွေရဲ့ VPC နဲ့ချိတ်ဆက်သုံးချင်တာတွေလဲရှိနိုင်ပါတယ် အဲ့လို VPC တွေများလာမယ်ဆိုရင်တော့ Transit Gateway ကိုသုံးတာက ပိုစိတ်ချမ်းသာရပါတယ်။ VPC နည်းသေးတယ် နောင်လဲတိုးလာဖို့ မရှိသေးဘူးဆိုရင်တော့ အခုနည်းလမ်းက ပိုအဆင်ပြေပါတယ်. ဆိုတော့ Pubilc VPC နဲ့ Private VPC ဆိုပြီးရှိတယ်ဆိုပါစို့ Pubilc VPC ထဲက webserver က Private VPC ထဲ က database ကိုလှမ်းသုံးချင်တယ်ဆိုရင် အဲ့ဒီ VPC တွေကို peering လုပ်ပေးဖို့လိုပါတယ်.. Peering လုပ်မယ်ဆိုရင်တော့ VPC ထဲက peering connections ကိုရွေးရပါမယ်. ပြီးရင်တော့ Create peering connections ကို click ပါ၊ ဒီ box ကျလာရင်တော့ name မှာ

Access-list at SVI

SVI (Switch Virtual Interfaces) We use the SVI for inter vlan routing. In this scenario I will configure the access list with SVI. In this scenario I want to permit vlan 10 network to vlan 50 Server farm. Vlan 10 and vlan 20 can communicate each other. First create vlan and then interface vlan#. Switch(config)#vlan 10 Switch(config)#interface vlan 10 Switch(config-if)#ip address 192.168.10.254 255.255.255.0 Switch(config)#vlan 20 Switch(config)#interface vlan 20 Switch(config-if)#ip address 192.168.20.254 255.255.255.0 Switch(config)#vlan 50 Switch(config)#interface vlan 50 Switch(config-if)#ip address 192.168.50.254 255.255.255.0 when we finish the vlan interface create make sure the switch port are belong to each vlan. Port to vlan assign configure is Switch(config)#interface g0/1 Switch(config-if)#switchport access vlan 10 Switch(config)#interface g0/2 Switch(config-if)#switchport access vlan 20 Switch(config)#int

BGP Disable Connected Check and EBGP Multi Hop

Figure 1.1 In this scenario I use OSPF for TCP reachability. We can see the difference 'disable connected' check and 'EBGP multihop'. We can use both for EBGP neighbor connection with loopback address. Disable connected check This command used to disable the connection verification process for ebgp. Use for ebgp neighbor are directly connected and they using the loopback address for peering. It not increment TTL but neighbor must reachable at single hop. EBGP multihop This command can use for ebgp neighbor are not directly connected. It increment TTL. R1 router bgp 100  neighbor 2.2.2.2 remote-as 200  neighbor 2.2.2.2 disable-connected-check  neighbor 2.2.2.2 update-source Loopback0  neighbor 3.3.3.3 remote-as 300  neighbor 3.3.3.3 ebgp-multihop 2  neighbor 3.3.3.3 update-source Loopback0 R2 router bgp 200  neighbor 1.1.1.1 remote-as 100  neighbor 1.1.1.1 disable-connected-check  neighbor 1.1.1.1 update-source Loopback0 R3