Saturday, March 11, 2017

Lab.1 How To Configure Internal BGP Peering Mikrotik (Physical Interface)

The first BGP Lab in Mikrotik is  an Internal BGP Peering (Physical Interface)

In This lab i will use 2 router and i'm going to advertise my IP loopback when in the field i usually use the LAN Network to advertise in WAN network because BGP is an Internet Routing Protocol

Now he're Are the Topology : 

Here Are The Configuration On 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=Loopback
[admin@R-1] > ip address add address=1.1.1.1/32 interface=Loopback
[admin@R-1] > routing bgp instance set default as=100
[admin@R-1] > routing bgp peer add name=peer1 remote-address=10.10.10.2 remote-as=100
[admin@R-1] > routing bgp network add network=1.1.1.1/32
 

And Here 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=Loopback
[admin@R-2] > ip address add address=2.2.2.2/32 interface=Loopback
[admin@R-2] > routing bgp instance set default as=100
[admin@R-2] > routing bgp peer add name=peer1 remote-address=10.10.10.2 remote-as=100
[adnin@R-2] > routing bgp network add network=2.2.2.2/32
 
And After we finish the configuration we can verified the BGP Stat by write this Command :

[admin@R-2] > routing bgp peer print status
Flags: X - disabled, E - established
 0 E name="peer1" 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=1.1.1.1 local-address=10.10.10.2 uptime=10s 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=1.1.1.1/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=1.1.1.1/32 gateway=10.10.10.1 gateway-status=10.10.10.1 reachable via  ether1
        distance=200 scope=40 target-scope=30 bgp-local-pref=100 bgp-origin=igp received-from=peer1

[admin@R-2] > 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 ADC  2.2.2.2/32         2.2.2.2         Loopback                  0
 2 ADC  10.10.10.0/24      10.10.10.2      ether1                    0




EmoticonEmoticon