Sunday, March 12, 2017

Lab.2 How To Configure Internal BGP Peering Mikrotik (Loopback Interface)

In This Lab,Same like before the difference is just we're going to make 2 loopback interface
okay we're just going to use the topology before :
This Are the configuration for MikroR-1 :
[admin@MikroTik] > system identity set name=R-1
[admin@R-1] > ip address add address=10.10.10.1/24 interface=ether1
[admin@R-1] > interface bridge add name=Loopback1
[admin@R-1] > interface bridge add name=Loopback2
[admin@R-1] > ip address add address=1.1.1.1/32 interface=Loopback1
[admin@R-1] > ip address add address=11.11.11.11/32 interface=Loopback2
[admin@R-1] > ip route add dst-address=2.2.2.2/32 gateway=10.10.10.2
[admin@R-1] > routing bgp instance set default as=100 router-id=1.1.1.1
[admin@R-1] > routing bgp peer add name=peer1 remote-address=2.2.2.2 remote-as=100 update-source=Loopback1
[admin@R-1] > routing bgp network add network=11.11.11.11/32
This Are the configuration for MikroR-2 :
[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] > interface bridge add name=Loopback1
[admin@R-2] > interface bridge add name=Loopback2
[admin@R-2] > ip address add address=2.2.2.2/32 interface=Loopback1
[admin@R-2] > ip address add address=22.22.22.22/32 interface=Loopback2
[admin@R-2] > routing bgp instance set default as=100 router-id=2.2.2.2
[admin@R-2] > routing bgp peer add name=peer1 remote-address=1.1.1.1 remote-as=100 update-source=Loopback1
[admin@R-2] > routing bgp network add network=22.22.22.22/32
[admin@R-2] > ip route add dst-address=1.1.1.1/32 gateway=10.10.10.1
After we Finish the configuration we can verified the BGP by This command :
[admin@R-2] > routing bgp peer print status
Flags: X - disabled, E - established
 0 E name="peer1" instance=default remote-address=1.1.1.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
     update-source=Loopback1 default-originate=never remove-private-as=no as-override=no passive=no
     use-bfd=no remote-id=1.1.1.1 local-address=2.2.2.2 uptime=1s 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-2] > ip route print detail where dst-address=11.11.11.11/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 ADb  dst-address=11.11.11.11/32 gateway=1.1.1.1 gateway-status=1.1.1.1 recursive via 10.10.10.1 ether1
        distance=200 scope=40 target-scope=30 bgp-local-pref=100 bgp-origin=igp received-from=peer1
 


EmoticonEmoticon