BGP Configuration Example using Mikrotik Router

This aricle introduce basic configuration about BGP, including ASN and E-BGP.
BGP use in TCP connection and using port 179,when connecting to the internet ,enterprise can use static route or a routing protocol name as Border Gateway Routing protocol(BGP).
See BGP Configuration video

Configure Basic ip address our mikrotik router

[admin@Laxmi]/ip address >            
add address= network= broadcast= interface=WAN1
add address= network= broadcast= interface=WAN2

Configure our AS number
[admin@Laxmi]/routing bgp instance>
set default as=100

Configure BGP Neighbor

[admin@Laxmi]/routing bgp peer>add name=ISP1 remote-address= remote-as=200
[admin@Laxmi]/routing bgp peer>add name=ISP2 remote-address= remote-as=300

Verification BGP peer

[admin@Laxmi] /routing bgp peer> print
Flags: X - disabled, E - established
 #   INSTANCE        REMOTE-ADDRESS                                 REMOTE-AS
 0 E default                                                              200    
 1 E default                                                    300

Network Advertisement Configuration

/routing bgp network
add network= synchronize=no

Outgoing and Incoming Filter Chain For ISP 1

/routing filter
add chain =ISP_1-out prefix= action=accept
add chain=ISP_1-out action=discard
/routing filter
add chain=ISP_1-in action=discard

Configure Outgoing and incoming Filter Chain For ISP 2
/routing filter
add chain =ISP_2-out prefix= action=accept set-bgp-prepend=5
/routing filter
add chain=ISP_2-in action=discard

/ip route
add gateway= check-gateway=ping
add gateway= check-gateway=ping distance=10