Sunday, March 12, 2017

Lab.3 How To Configure External BGP Peering Mikrotik [Physical Interface]

Previously we have been discuss about Internal Border Gateway Protocol (iBGP) When we connecting to the Same 1 AS (Autonomous System),and now we're going to practice about external BGP Peering (eBGP).What about we use same topology like before
Now below are the configuration in MikroR-1 :
[admin@MikroTik] > system identity set name=R-1
[admin@R-1] > ip address add address=192.168.1.1/24 interface=ether2
[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] > ip address add address=1.1.1.1/32 interface=Loopback1
[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=200
[admin@R-1] > routing bgp network add network=1.1.1.1/32
[admin@R-1] > routing bgp network add network=192.168.1.0/24
And here are the following command for MikroR-2 :
[admin@MikroTik] > system identity set name=R-2
[admin@R-2] > ip address add address=10.10.10.2/24 interface=ether2
[admin@R-2] > ip address add address=192.168.2.1/24 interface=ether1
[admin@R-2] > interface bridge add name=Loopback1
[admin@R-2] > ip address add address=2.2.2.2/32 interface=Loopback1
[admin@R-2] > routing bgp instance set default as=200
[admin@R-2] > routing bgp peer add name=peer1 remote-address=10.10.10.1 remote-as=100
[admin@R-2] > routing bgp network add network=2.2.2.2/32
[admin@R-2] > routing bgp network add network=192.168.2.0/32
After we finish configuring External BGP Peering You can verified with 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=2s prefix-count=2 updates-sent=1 updates-received=2
     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=192.168.1.0/24
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=192.168.1.0/24 gateway=10.10.10.1 gateway-status=10.10.10.1 reachable via  ether1
        distance=20 scope=40 target-scope=10 bgp-as-path="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 - osp
B - blackhole, U - unreachable, P - prohibit
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 0 ADb  1.1.1.1/32                         10.10.10.1               20
 1 ADC  2.2.2.2/32         2.2.2.2         Loopback1                 0
 2 ADC  10.10.10.0/24      10.10.10.2      ether1                    0
 3 ADb  192.168.1.0/24                     10.10.10.1               20
 4 ADC  192.168.2.0/24     192.168.2.1     ether2                    0


EmoticonEmoticon