MikroTik BGP dynamic routing Full table three Peers

bgp mikrotik full routing table three isp providers

Configuration

AS47453 -autonomous system from RIPE NCC

/routing bgp instance
add as=47453 client-to-client-reflection=no name=itservice router-id=93.155.130.1

Advertisements networks

/routing bgp network
add network=93.155.169.0/24 synchronize=no
add network=93.155.130.0/24 synchronize=no
add network=93.155.162.0/24 synchronize=no
add network=93.155.131.0/24 synchronize=no

Create BGP peer

/routing bgp peer
instance=itservice name=mtel-int add in-filter=mtel-int-in out-filter=mtel-int-out remote-address=213.226.26.113 remote-as=12716
instance=itservice name=mtel-bg add in-filter=mtel-bg-in out-filter=mtel-bg-out remote-address=213.226.26.117 remote-as=12716
instance=itservice name=gcn add in-filter=gcn-in out-filter=gcn-out remote-address=212.70.158.89 remote-as=12615
instance=itservice name=thezone add in-filter=thezone-in out-filter=thezone-out remote-address=93.155.130.66 remote-as=34368

Advanced routing filters for manipulation traffic

ISP1 MTEL BG PEERING
chain=mtel-bg-out without parameter = High priority
chain=mtel-bg-in set-distance=10 = High priority

ISP1 MTEL INTERNATIONAL
chain=mtel-int-out without parameter = High priority
chain=mtel-int-in set-bgp-local-pref=200 = High priority

ISP2 GCN
chain=gcn-out set-bgp-prepend=5 = Medium priority
chain=gcn-in without parameter = Medium priority

ISP3 TheZone
chain=thezone-out set-bgp-prepend=10 = Low priority
chain=thezone-in set-bgp-local-pref=80 = Low priority

/routing filter
add action=accept chain=mtel-bg-out prefix=93.155.130.0/24
add action=accept chain=mtel-bg-out prefix=93.155.131.0/24
add action=accept chain=mtel-bg-out prefix=93.155.162.0/24
add action=accept chain=mtel-bg-out prefix=93.155.169.0/24
add action=discard chain=mtel-bg-out
add action=discard chain=mtel-bg-in prefix=93.155.130.0/24
add action=discard chain=mtel-bg-in prefix=93.155.131.0/24
add action=discard chain=mtel-bg-in prefix=93.155.162.0/24
add action=discard chain=mtel-bg-in prefix=93.155.169.0/24
add action=discard chain=mtel-bg-in prefix=192.168.0.0/16 prefix-length=16-32
add action=discard chain=mtel-bg-in prefix=172.16.0.0/12 prefix-length=12-32
add action=discard chain=mtel-bg-in prefix=10.0.0.0/8 prefix-length=8-32
add action=discard chain=mtel-bg-in prefix=0.0.0.0/0
add action=accept chain=mtel-bg-in set-distance=10
 
add action=accept chain=mtel-int-out prefix=93.155.130.0/24
add action=accept chain=mtel-int-out prefix=93.155.131.0/24
add action=accept chain=mtel-int-out prefix=93.155.162.0/24
add action=accept chain=mtel-int-out prefix=93.155.169.0/24
add action=discard chain=mtel-int-out
add action=discard chain=mtel-int-in prefix=93.155.130.0/24
add action=discard chain=mtel-int-in prefix=93.155.131.0/24
add action=discard chain=mtel-int-in prefix=93.155.162.0/24
add action=discard chain=mtel-int-in prefix=93.155.169.0/24
add action=discard chain=mtel-int-in prefix=192.168.0.0/16 prefix-length=16-32
add action=discard chain=mtel-int-in prefix=172.16.0.0/12 prefix-length=12-32
add action=discard chain=mtel-int-in prefix=10.0.0.0/8 prefix-length=8-32
add action=discard chain=mtel-int-in prefix=0.0.0.0/0
add action=accept chain=mtel-int-in set-bgp-local-pref=200
 
add action=accept chain=gcn-out prefix=93.155.130.0/24 set-bgp-prepend=5
add action=accept chain=gcn-out prefix=93.155.131.0/24 set-bgp-prepend=5
add action=accept chain=gcn-out prefix=93.155.162.0/24 set-bgp-prepend=5
add action=accept chain=gcn-out prefix=93.155.169.0/24 set-bgp-prepend=5
add action=discard chain=gcn-out
add action=discard chain=gcn-in prefix=93.155.130.0/24
add action=discard chain=gcn-in prefix=93.155.131.0/24
add action=discard chain=gcn-in prefix=93.155.162.0/24
add action=discard chain=gcn-in prefix=93.155.169.0/24
add action=discard chain=gcn-in prefix=192.168.0.0/16 prefix-length=16-32
add action=discard chain=gcn-in prefix=172.16.0.0/12 prefix-length=12-32
add action=discard chain=gcn-in prefix=10.0.0.0/8 prefix-length=8-32
add action=discard chain=gcn-in prefix=0.0.0.0/0
add action=accept chain=gcn-in
 
add action=accept chain=thezone-out prefix=93.155.130.0/24 set-bgp-prepend=10
add action=accept chain=thezone-out prefix=93.155.131.0/24 set-bgp-prepend=10
add action=accept chain=thezone-out prefix=93.155.162.0/24 set-bgp-prepend=10
add action=accept chain=thezone-out prefix=93.155.169.0/24 set-bgp-prepend=10
add action=discard chain=thezone-out
add action=discard chain=thezone-in prefix=93.155.130.0/24
add action=discard chain=thezone-in prefix=93.155.131.0/24
add action=discard chain=thezone-in prefix=93.155.162.0/24
add action=discard chain=thezone-in prefix=93.155.169.0/24
add action=discard chain=thezone-in prefix=192.168.0.0/16 prefix-length=16-32
add action=discard chain=thezone-in prefix=172.16.0.0/12 prefix-length=12-32
add action=discard chain=thezone-in prefix=10.0.0.0/8 prefix-length=8-32
add action=discard chain=thezone-in prefix=0.0.0.0/0
add action=accept chain=thezone-in set-bgp-local-pref=80

Monitoring

[admin@R1] > routing bgp peer print 
Flags: X - disabled, E - established 
 #   INSTANCE   REMOTE-ADDRESS                             REMOTE-AS  
 0 E itservice  213.226.26.113                             12716      
 1 E itservice  213.226.26.117                             12716      
 2 E itservice  212.70.158.89                              12615      
 3 E itservice  93.155.130.66                              34368
[admin@R1] > routing bgp peer print status 
Flags: X - disabled, E - established 
 0 E name="mtel-int" instance=itservice remote-address=213.226.26.113 
     remote-as=12716 tcp-md5-key="" nexthop-choice=force-self 
     multihop=no route-reflect=no hold-time=3m ttl=default 
     in-filter=mtel-int-in out-filter=mtel-int-out 
     address-families=ip default-originate=never 
     remove-private-as=no as-override=no passive=no use-bfd=no 
     remote-id=213.226.7.253 local-address=213.226.26.114 
     uptime=1w1d22h6m52s prefix-count=610947 updates-sent=11 
     updates-received=3637678 withdrawn-sent=0 
     withdrawn-received=163485 remote-hold-time=3m used-hold-time=3m 
     used-keepalive-time=1m refresh-capability=yes 
     as4-capability=yes state=established 
 
 1 E name="mtel-bg" instance=itservice remote-address=213.226.26.117 
     remote-as=12716 tcp-md5-key="" nexthop-choice=force-self 
     multihop=no route-reflect=no hold-time=3m ttl=default 
     in-filter=mtel-bg-in out-filter=mtel-bg-out address-families=ip 
     default-originate=never remove-private-as=no as-override=no 
     passive=no use-bfd=no remote-id=213.226.7.252 
     local-address=213.226.26.118 uptime=1w1d22h6m52s 
     prefix-count=11674 updates-sent=11 updates-received=51850 
     withdrawn-sent=0 withdrawn-received=16632 remote-hold-time=3m 
     used-hold-time=3m used-keepalive-time=1m refresh-capability=yes 
     as4-capability=yes state=established 
 
 2 E name="gcn" instance=itservice remote-address=212.70.158.89 
     remote-as=12615 tcp-md5-key="" nexthop-choice=force-self 
     multihop=no route-reflect=no hold-time=3m ttl=default 
     in-filter=gcn-in out-filter=gcn-out address-families=ip 
     default-originate=never remove-private-as=no as-override=no 
     passive=no use-bfd=no remote-id=78.108.240.2 
     local-address=212.70.158.90 uptime=2w6d9h19m58s 
     prefix-count=627143 updates-sent=24 updates-received=8606895 
     withdrawn-sent=0 withdrawn-received=919241 remote-hold-time=3m 
     used-hold-time=3m used-keepalive-time=1m refresh-capability=yes 
     as4-capability=yes state=established 
 
 3 E name="thezone" instance=itservice remote-address=93.155.130.66 
     remote-as=34368 tcp-md5-key="" nexthop-choice=force-self 
     multihop=no route-reflect=no hold-time=3m ttl=default 
     in-filter=thezone-in out-filter=thezone-out address-families=ip 
     default-originate=never remove-private-as=no as-override=no 
     passive=no use-bfd=no remote-id=85.217.193.30 
     local-address=93.155.130.65 uptime=2w6d9h19m6s prefix-count=609947 
     updates-sent=388275 updates-received=52 withdrawn-sent=388275 
     withdrawn-received=0 remote-hold-time=3m used-hold-time=3m 
     used-keepalive-time=1m refresh-capability=yes 
     as4-capability=yes state=established
[admin@R1] > routing bgp advertisements print 
PEER     PREFIX               NEXTHOP          A ORIGIN     LOCAL-PREF
mtel-int 93.155.169.0/24      213.226.26.114     igp       
mtel-int 93.155.130.0/24      213.226.26.114     igp       
mtel-int 93.155.162.0/24      213.226.26.114     igp       
mtel-int 93.155.131.0/24      213.226.26.114     igp
mtel-bg  93.155.169.0/24      213.226.26.118     igp       
mtel-bg  93.155.130.0/24      213.226.26.118     igp       
mtel-bg  93.155.162.0/24      213.226.26.118     igp       
mtel-bg  93.155.131.0/24      213.226.26.118     igp       
gcn      93.155.169.0/24      212.70.158.90      igp       
gcn      93.155.130.0/24      212.70.158.90      igp       
gcn      93.155.162.0/24      212.70.158.90      igp       
gcn      93.155.131.0/24      212.70.158.90      igp    
thezone  93.155.169.0/24      93.155.130.66      igp       
thezone  93.155.130.0/24      93.155.130.66      igp       
thezone  93.155.162.0/24      93.155.130.66      igp       
thezone  93.155.131.0/24      93.155.130.66      igp
[admin@R1] > ip route print count-only 
1858965

Search route

[admin@R1] > /ip route print where dst-address=194.145.63.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 
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 0 ADb  194.145.63.0/24                    212.70.158.89            20
 1  Db  194.145.63.0/24                    213.226.26.117           20
 2  Db  194.145.63.0/24                    213.226.26.113           20
 3  Db  194.145.63.0/24                    93.155.130.66            20
[admin@R1] > ip route print where dst-address in 194.145.63.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 
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 0 ADb  194.145.63.0/24                    212.70.158.89            20
 1  Db  194.145.63.0/24                    213.226.26.117           20
 2  Db  194.145.63.0/24                    213.226.26.113           20
 3  Db  194.145.63.0/24                    93.155.130.66            20
[admin@R1] > ip route print where received-from=gcn dst-address=194.145.63.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 
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 0 ADb  194.145.63.0/24                    212.70.158.89            20
[admin@R1] > ip route print detail  where dst-address=194.145.63.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=194.145.63.0/24 gateway=212.70.158.89 gateway-status=212.70.158.89 reachable via  vlan149 distance=20 scope=40 
        target-scope=10 bgp-as-path="12615,8262,8860" bgp-local-pref=100 bgp-origin=igp received-from=gcn 
 
 1  Db  dst-address=194.145.63.0/24 gateway=213.226.26.117 gateway-status=213.226.26.117 reachable via  vlan1701 distance=20 scope=40 
        target-scope=10 bgp-as-path="12716,8860" bgp-local-pref=200 bgp-origin=igp received-from=mtel-bg 
 
 2  Db  dst-address=194.145.63.0/24 gateway=213.226.26.113 gateway-status=213.226.26.113 reachable via  vlan1702 distance=20 scope=40 
        target-scope=10 bgp-as-path="12716,8447,8262,8860" bgp-local-pref=200 bgp-origin=igp received-from=mtel-int

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.