Sunday, March 12, 2017

Lab.5 How To Configure iBGP Peering Mikrotik with 3 Router

In tutorial Before we just discuss just using 2 router in iBGP or eBGP, now we're going to try how to make an iBGP Peering with 3 router,why we use 3 router because after we configure the iBGP Peering in 3 router there must be a difference between 2 router now we just going to make this topology :

Below Are the configuration for R-1 : 
[admin@MikroTik] > ip address add address=10.10.10.1/24 interface=ether1
[admin@MikroTik] > ip route add dst-address=20.20.20.0/24 gateway=10.10.10.2
[admin@MikroTik] > routing bgp instance set default as=100
[admin@MikroTik] > routing bgp peer add name=peer1 remote-address=10.10.10.2 remote-as=100
[admin@MikroTik] > routing bgp network add network=1.1.1.1/32
[admin@MikroTik] > system identity set name=R-1
[admin@R-1] > interface bridge add name=Loopback1
[admin@R-1] > ip address add address=1.1.1.1/32 interface=Loopback1
And just need to remember that this is an Peering iBGP above that R-1 can't send packet to R-3 because they not Peer so were just going to add this command :
[admin@R-1] > routing bgp peer add name=peer2 remote-address=20.20.20.2 remote-as=100
so are in the R-3 Configuration :
[admin@MikroTik] > system identity set name=R-3
[admin@R-3] > interface bridge add name=Loopback1
[admin@R-3] > ip address add address=20.20.20.2/24 interface=ether1
[admin@R-3] > ip address add address=3.3.3.3/32 interface=Loopback1
[admin@R-3] > routing bgp instance set default as=100
[admin@R-3] > routing bgp peer add name=peer1 remote-address=20.20.20.1 remote-as=100
[admin@R-3] > routing bgp network add network=3.3.3.3/32
[admin@R-3] > routing bgp peer add name=peer2 remote-address=10.10.10.1 remote-as=100
And now we just Have a look to R-2 Configuration then we're going prove our BGP is Work :
[admin@MikroTik] > system identity set name=R-2
[admin@R-2] > ip address add address=10.10.10.2/24 interface=ether1
[admin@R-2] > ip address add address=20.20.20.1/24 interface=ether2
[admin@R-2] > routing bgp instance set default as=100
[admin@R-2] > routing bgp peer add name=peer1 remote-address=10.10.10.1 remote-as=100
[admin@R-2] > routing bgp peer add name=peer2 remote-address=20.20.20.2 remote-as=100
[admin@R-2] > routing bgp network add network=2.2.2.2/32
[admin@R-2] > interface bridge add name=Loopback2
[admin@R-2] > ip address add address=2.2.2.2/32 interface=Loopback1
and now time to check my BGP network is established i'm just looking in R-3:
[admin@R-3] > routing bgp peer print status
Flags: X - disabled, E - established
 0 E name="peer1" instance=default remote-address=20.20.20.1 remote-as=100 tcp-md5-key=""
     nexthop-choice=default multihop=no route-reflect=no hold-time=3m ttl=255 in-filter="" out-filter=""
     address-families=ip default-originate=never remove-private-as=no as-override=no passive=no use-bfd=no
     remote-id=10.10.10.2 local-address=20.20.20.2 uptime=2h54m46s prefix-count=1 updates-sent=1
     updates-received=1 withdrawn-sent=0 withdrawn-received=0 remote-hold-time=3m used-hold-time=3m
     used-keepalive-time=1m refresh-capability=yes as4-capability=yes state=established

 1 E name="peer2" instance=default remote-address=10.10.10.1 remote-as=100 tcp-md5-key=""
     nexthop-choice=default multihop=no route-reflect=no hold-time=3m ttl=255 in-filter="" out-filter=""
     address-families=ip default-originate=never remove-private-as=no as-override=no passive=no use-bfd=no
     remote-id=10.10.10.1 local-address=20.20.20.2 uptime=2h40m51s prefix-count=1 updates-sent=1
     updates-received=1 withdrawn-sent=0 withdrawn-received=0 remote-hold-time=3m used-hold-time=3m
     used-keepalive-time=1m refresh-capability=yes as4-capability=yes state=established

[admin@R-3] > ip route print detail where dst-address=3.3.3.3/32
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
 0 ADC  dst-address=3.3.3.3/32 pref-src=3.3.3.3 gateway=Loopback1 gateway-status=Loopback1 reachable
        distance=0 scope=10

[admin@R-3] > ip route pr
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 0 ADb  1.1.1.1/32                         10.10.10.1              200
 1 ADb  2.2.2.2/32                         20.20.20.1              200
 2 ADC  3.3.3.3/32         3.3.3.3         Loopback1                 0
 3 A S  10.10.10.0/24                      20.20.20.1                1
 4 ADC  20.20.20.0/24      20.20.20.2      ether1                    0


EmoticonEmoticon