SlideShare a Scribd company logo
ISP Setup using MikroTik
Class - VII
Static Routing, OSPF, BGP
M Abdullah Al Naser
B.Sc in CSE
CCNA, RHCE, RHCSA, MTCNA
Static Routing
2
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
Remote networks are added to the routing table either
by configuring static routes or enabling a dynamic
routing protocol. When the router learns about a
remote network and the interface that it will use to
reach that network, it adds that route to the routing
table as long as the exit interface is enabled.
A static route includes the network address and subnet
mask of the remote network, along with the IP address
of the next-hop router or exit interface. Static routes
are denoted with the code S in the routing table.
Static Routing
3
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
Static routes should be used in the following cases:
● A network consists of only a few routers.
● A network is connected to the Internet only through a
single ISP.
● A large network is configured in a hub-and-spoke
topology.
Typically, most routing tables contain a combination of
static routes and dynamic routes. But, as stated earlier,
the routing table must first contain the directly
connected networks used to access these remote
networks before any static or dynamic routing can be
used.
Static Routing
4
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
Static Routing
5
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
Static Routing
6
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
Static Routing
7
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
Static Routing
8
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
Static Routing
9
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
Static Routing
10
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
Static Routing
11
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
Static Routing
12
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
OSPF
13
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
Open Shortest Path First (OSPF ) is a link-state
routing protocol that was developed as a
replacement for the distance vector routing
protocol RIP.
OSPF
14
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
OSPF Features:
Classless - It is classless by design; therefore, it supports
VLSM and CIDR.
Efficient - Routing changes trigger routing updates (no
periodic updates). It uses the SPF algorithm to choose the
best path.
Fast convergence - It quickly propagates network changes.
Scalable - It works well in small and large network sizes.
Routers can be grouped into areas to support a hierarchical
system.
Secure - It supports Message Digest 5 (MD5) authentication.
OSPF
15
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
OSPF
16
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
OSPF
17
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
OSPF
18
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
OSPF
19
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
There are three basic elements of OSPF configuration:
Enable OSPF Instance
There is a default instance already created which can be
found from Routing > OSPF > Instances
OSPF Area Configuration
There is a default area already created which can be found
from Routing > OSPF > Areas
OSPF Network Configuration
The directly connected networks need to announce/configure
from Routing > OSPF > Networks
OSPF
20
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
OSPF
21
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
OSPF
22
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
OSPF
23
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
BGP
24
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
The Border Gateway Protocol (BGP) is an inter-
autonomous system routing protocol based on
distance-vector algorithm. It is used to exchange
routing information across the Internet and is the
only protocol that is designed to deal with a network
of the Internet's size and the only protocol that can
deal well with having multiple connections to
unrelated routing domains.
BGP
25
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
iBGP and eBGP
BGP
26
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
iBGP and eBGP
Two BGP neighbors from different ASs are said to
maintain an "external" link. Similarly, a BGP peer in a
different AS is referred to as an external peer. BGP
connections between peers within the same AS are
known as "internal" links. BGP speakers that are
connected by internal link are referred as internal
peers. As far as this paper is concerned, iBGP refers
to the BGP session between two peers in the same
AS, or internal link. In turn, eBGP refers to the links
between external BGP peers (these that are in
different ASs).
BGP
27
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
BGP
28
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
Enabling BGP on OFFICE Router
/routing bgp instance set default as=100
BGP Peers
/routing bgp peer add name=ISP1 remote-address=10.0.0.1
remote-as=200
/routing bgp peer add name=ISP2 remote-address=20.0.0.1
remote-as=100
Network Advertisements
/routing bgp network
add network=192.168.0.0/24 synchronize=no
/routing bgp network
add network=192.168.1.0/24 synchronize=no
BGP
29
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
Enabling BGP on ISP1 Router
/routing bgp instance set default as=200
BGP Peers
/routing bgp peer add name=OFFICE remote-
address=10.0.0.2 remote-as=100
Enabling BGP on ISP2 Router
/routing bgp instance set default as=300
BGP Peers
/routing bgp peer add name=OFFICE remote-
address=20.0.0.2 remote-as=100
BGP
30
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
Failover in BGP (Main/Backup link setup on OFFICE router)
Outgoing filters to ISP1:
/routing filter
#accept our networks
add chain=isp1-out prefix=192.168.0.0/24 action=accept
add chain=isp1-out prefix=192.168.1.0/24 action=accept
#discard the rest
add chain=isp1-out action=discard
Outgoing filters to ISP2:
/routing filter
#accept our networks and prepend AS path three times
add chain=isp2-out prefix=192.168.0.0/24 action=accept set-bgp-prepend=3
add chain=isp2-out prefix=192.168.1.0/24 action=accept set-bgp-prepend=3
#discard the rest
add chain=isp2-out action=discard
BGP
31
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
Failover in BGP (Main/Backup link setup on OFFICE router)
We also do not need any routes from both ISPs, because default route is
used to force outgoing traffic through ISP1 and leave ISP2 as backup.
/routing filter
add chain=isp1-in action=discard
add chain=isp2-in action=discard
/ip route
add gateway=10.0.0.1 distance=1 check-gateway=ping
add gateway=20.0.0.1 distance=2 check-gateway=ping
Next step is to specify which routing filter chains will be used
/routing bgp peer
set ISP1 in-filter=isp1-in out-filter=isp1-out
set ISP2 in-filter=isp2-in out-filter=isp2-out
in-filter is for incoming (received) prefixes, out-filter is for advertised
prefixes.
BGP
32
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
Load Balance in BGP (on OFFICE router)
Outgoing filters to ISP1:
/routing filter
#accept our networks and prepend second network
add chain=isp1-out prefix=192.168.0.0/24 action=accept
add chain=isp1-out prefix=192.168.1.0/24 action=accept set-bgp-
prepend=3
#discard the rest
add chain=isp1-out action=discard
BGP
33
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
Load Balance in BGP (on OFFICE router)
Outgoing filters to ISP2:
/routing filter
#accept our networks and prepend first network
add chain=isp2-out prefix=192.168.0.0/24 action=accept set-bgp-
prepend=3
add chain=isp2-out prefix=192.168.1.0/24 action=accept
#discard the rest
add chain=isp2-out action=discard
Thank you very much
34
Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)

More Related Content

What's hot

Mikrotik hwa 5500-cpe_connection
Mikrotik hwa 5500-cpe_connectionMikrotik hwa 5500-cpe_connection
Mikrotik hwa 5500-cpe_connection
guest8423a64e
 
project on OSPF
project on OSPFproject on OSPF
project on OSPF
Om Prakash
 

What's hot (20)

Bonding Interface in MikroTik
Bonding Interface in MikroTikBonding Interface in MikroTik
Bonding Interface in MikroTik
 
Mikrotik load balansing
Mikrotik load balansingMikrotik load balansing
Mikrotik load balansing
 
MikroTik Basic Training Class - Online Moduls - English
 MikroTik Basic Training Class - Online Moduls - English MikroTik Basic Training Class - Online Moduls - English
MikroTik Basic Training Class - Online Moduls - English
 
Mikrotik hwa 5500-cpe_connection
Mikrotik hwa 5500-cpe_connectionMikrotik hwa 5500-cpe_connection
Mikrotik hwa 5500-cpe_connection
 
Mikrotik Tutorial
Mikrotik TutorialMikrotik Tutorial
Mikrotik Tutorial
 
Running BGP with Mikrotik
Running BGP with MikrotikRunning BGP with Mikrotik
Running BGP with Mikrotik
 
Basic command to configure mikrotik
Basic command to configure mikrotikBasic command to configure mikrotik
Basic command to configure mikrotik
 
project on OSPF
project on OSPFproject on OSPF
project on OSPF
 
Arun project-Final
Arun project-FinalArun project-Final
Arun project-Final
 
HOTSPOT on MikroTik Router
HOTSPOT on MikroTik RouterHOTSPOT on MikroTik Router
HOTSPOT on MikroTik Router
 
VXLAN and FRRouting
VXLAN and FRRoutingVXLAN and FRRouting
VXLAN and FRRouting
 
Ccna day3
Ccna day3Ccna day3
Ccna day3
 
Choosing MikroTik for Your Network
Choosing MikroTik for Your NetworkChoosing MikroTik for Your Network
Choosing MikroTik for Your Network
 
MikroTik & RouterOS
MikroTik & RouterOSMikroTik & RouterOS
MikroTik & RouterOS
 
Spanning Tree Bridge Root Priority value & Extended System ID
Spanning Tree Bridge Root Priority value & Extended System IDSpanning Tree Bridge Root Priority value & Extended System ID
Spanning Tree Bridge Root Priority value & Extended System ID
 
Mikro tik advanced training
Mikro tik advanced trainingMikro tik advanced training
Mikro tik advanced training
 
PPPoE With Mikrotik and Radius
PPPoE With Mikrotik and RadiusPPPoE With Mikrotik and Radius
PPPoE With Mikrotik and Radius
 
Ccna new syllabus brochure
Ccna new syllabus brochureCcna new syllabus brochure
Ccna new syllabus brochure
 
MTU (maximum transmission unit) & MRU (maximum receive unit)
MTU (maximum transmission unit) & MRU (maximum receive unit)MTU (maximum transmission unit) & MRU (maximum receive unit)
MTU (maximum transmission unit) & MRU (maximum receive unit)
 
Layer 2 & layer 3 switching
Layer 2 & layer 3 switchingLayer 2 & layer 3 switching
Layer 2 & layer 3 switching
 

Viewers also liked

Viewers also liked (18)

VLAN on mikrotik
VLAN on mikrotikVLAN on mikrotik
VLAN on mikrotik
 
Class 5
Class 5Class 5
Class 5
 
Class 4
Class 4Class 4
Class 4
 
Class 2
Class 2Class 2
Class 2
 
Class 1
Class 1Class 1
Class 1
 
Mikrotik API
Mikrotik APIMikrotik API
Mikrotik API
 
Mikrotik firewall raw table
Mikrotik firewall raw tableMikrotik firewall raw table
Mikrotik firewall raw table
 
Access point redundancy, by Lorenzo Busatti - MikroTik MUM USA Las Vegas 2011
Access point redundancy, by Lorenzo Busatti - MikroTik MUM USA Las Vegas 2011Access point redundancy, by Lorenzo Busatti - MikroTik MUM USA Las Vegas 2011
Access point redundancy, by Lorenzo Busatti - MikroTik MUM USA Las Vegas 2011
 
Mikrotik firewall filter
Mikrotik firewall filterMikrotik firewall filter
Mikrotik firewall filter
 
BGP on mikrotik
BGP on mikrotikBGP on mikrotik
BGP on mikrotik
 
Detecting network virus using mikrotik
Detecting network virus using mikrotikDetecting network virus using mikrotik
Detecting network virus using mikrotik
 
MikroTik MTCNA
MikroTik MTCNAMikroTik MTCNA
MikroTik MTCNA
 
Routing fundamentals with mikrotik
Routing fundamentals with mikrotikRouting fundamentals with mikrotik
Routing fundamentals with mikrotik
 
Mikrotik advanced
Mikrotik advancedMikrotik advanced
Mikrotik advanced
 
Limiting bandwidth of specific destination based on address list
Limiting bandwidth of specific destination based on address listLimiting bandwidth of specific destination based on address list
Limiting bandwidth of specific destination based on address list
 
Qo s of service with winbox
Qo s of service with winboxQo s of service with winbox
Qo s of service with winbox
 
Mikrotik router os qos best practice
Mikrotik router os qos best practiceMikrotik router os qos best practice
Mikrotik router os qos best practice
 
Dhcp commandas
Dhcp commandasDhcp commandas
Dhcp commandas
 

Similar to Class 7

Computer network (14)
Computer network (14)Computer network (14)
Computer network (14)
NYversity
 

Similar to Class 7 (20)

Computer network (14)
Computer network (14)Computer network (14)
Computer network (14)
 
Bgp
BgpBgp
Bgp
 
Dynamische Routingprotokolle Aufzucht und Pflege - BGP
Dynamische Routingprotokolle Aufzucht und Pflege - BGPDynamische Routingprotokolle Aufzucht und Pflege - BGP
Dynamische Routingprotokolle Aufzucht und Pflege - BGP
 
3 ip routing bgp-updated
3 ip routing bgp-updated3 ip routing bgp-updated
3 ip routing bgp-updated
 
3 ip routing part b
3 ip routing part b3 ip routing part b
3 ip routing part b
 
PLNOG15: BGP New Advanced Features - Piotr Wojciechowski
PLNOG15: BGP New Advanced Features - Piotr WojciechowskiPLNOG15: BGP New Advanced Features - Piotr Wojciechowski
PLNOG15: BGP New Advanced Features - Piotr Wojciechowski
 
BGP (Border Gateway Protocol)
BGP (Border Gateway Protocol)BGP (Border Gateway Protocol)
BGP (Border Gateway Protocol)
 
3 ip routing pbr bfd -v2
3 ip routing   pbr bfd -v23 ip routing   pbr bfd -v2
3 ip routing pbr bfd -v2
 
Dynamic routing
Dynamic routingDynamic routing
Dynamic routing
 
ENCOR_Chapter_6.pptx
ENCOR_Chapter_6.pptxENCOR_Chapter_6.pptx
ENCOR_Chapter_6.pptx
 
Bgp in-large-networks
Bgp in-large-networksBgp in-large-networks
Bgp in-large-networks
 
BORDER GATEWAY PROTOCOL
BORDER GATEWAY PROTOCOLBORDER GATEWAY PROTOCOL
BORDER GATEWAY PROTOCOL
 
3 ip routing vrf lite - v2
3 ip routing   vrf lite - v23 ip routing   vrf lite - v2
3 ip routing vrf lite - v2
 
IPv6 Routing.pdf
IPv6 Routing.pdfIPv6 Routing.pdf
IPv6 Routing.pdf
 
CCNP Route 642 902 BGP
CCNP Route 642 902 BGPCCNP Route 642 902 BGP
CCNP Route 642 902 BGP
 
3 ip routing eigrp
3 ip routing eigrp3 ip routing eigrp
3 ip routing eigrp
 
Bigbgp
BigbgpBigbgp
Bigbgp
 
Implementing Internet and MPLS BGP
Implementing Internet and MPLS BGPImplementing Internet and MPLS BGP
Implementing Internet and MPLS BGP
 
Cisco ccnp 642-902 practice tests for quick preparation
Cisco ccnp 642-902 practice tests for quick preparationCisco ccnp 642-902 practice tests for quick preparation
Cisco ccnp 642-902 practice tests for quick preparation
 
CSC427_Week_11.pdf
CSC427_Week_11.pdfCSC427_Week_11.pdf
CSC427_Week_11.pdf
 

Recently uploaded

一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理
一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理
一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理
eemet
 
NO1 Uk Amil Baba In Lahore Kala Jadu In Lahore Best Amil In Lahore Amil In La...
NO1 Uk Amil Baba In Lahore Kala Jadu In Lahore Best Amil In Lahore Amil In La...NO1 Uk Amil Baba In Lahore Kala Jadu In Lahore Best Amil In Lahore Amil In La...
NO1 Uk Amil Baba In Lahore Kala Jadu In Lahore Best Amil In Lahore Amil In La...
Amil baba
 
一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理
一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理
一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理
kywwoyk
 
一比一原版UVM毕业证佛蒙特大学毕业证成绩单如何办理
一比一原版UVM毕业证佛蒙特大学毕业证成绩单如何办理一比一原版UVM毕业证佛蒙特大学毕业证成绩单如何办理
一比一原版UVM毕业证佛蒙特大学毕业证成绩单如何办理
kywwoyk
 

Recently uploaded (6)

一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理
一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理
一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理
 
NO1 Uk Amil Baba In Lahore Kala Jadu In Lahore Best Amil In Lahore Amil In La...
NO1 Uk Amil Baba In Lahore Kala Jadu In Lahore Best Amil In Lahore Amil In La...NO1 Uk Amil Baba In Lahore Kala Jadu In Lahore Best Amil In Lahore Amil In La...
NO1 Uk Amil Baba In Lahore Kala Jadu In Lahore Best Amil In Lahore Amil In La...
 
一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理
一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理
一比一原版SDSU毕业证圣地亚哥州立大学毕业证成绩单如何办理
 
F5 LTM TROUBLESHOOTING Guide latest.pptx
F5 LTM TROUBLESHOOTING Guide latest.pptxF5 LTM TROUBLESHOOTING Guide latest.pptx
F5 LTM TROUBLESHOOTING Guide latest.pptx
 
一比一原版UVM毕业证佛蒙特大学毕业证成绩单如何办理
一比一原版UVM毕业证佛蒙特大学毕业证成绩单如何办理一比一原版UVM毕业证佛蒙特大学毕业证成绩单如何办理
一比一原版UVM毕业证佛蒙特大学毕业证成绩单如何办理
 
Memory compiler tutorial – TSMC 40nm technology
Memory compiler tutorial – TSMC 40nm technologyMemory compiler tutorial – TSMC 40nm technology
Memory compiler tutorial – TSMC 40nm technology
 

Class 7

  • 1. ISP Setup using MikroTik Class - VII Static Routing, OSPF, BGP M Abdullah Al Naser B.Sc in CSE CCNA, RHCE, RHCSA, MTCNA
  • 2. Static Routing 2 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com) Remote networks are added to the routing table either by configuring static routes or enabling a dynamic routing protocol. When the router learns about a remote network and the interface that it will use to reach that network, it adds that route to the routing table as long as the exit interface is enabled. A static route includes the network address and subnet mask of the remote network, along with the IP address of the next-hop router or exit interface. Static routes are denoted with the code S in the routing table.
  • 3. Static Routing 3 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com) Static routes should be used in the following cases: ● A network consists of only a few routers. ● A network is connected to the Internet only through a single ISP. ● A large network is configured in a hub-and-spoke topology. Typically, most routing tables contain a combination of static routes and dynamic routes. But, as stated earlier, the routing table must first contain the directly connected networks used to access these remote networks before any static or dynamic routing can be used.
  • 4. Static Routing 4 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
  • 5. Static Routing 5 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
  • 6. Static Routing 6 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
  • 7. Static Routing 7 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
  • 8. Static Routing 8 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
  • 9. Static Routing 9 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
  • 10. Static Routing 10 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
  • 11. Static Routing 11 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
  • 12. Static Routing 12 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
  • 13. OSPF 13 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com) Open Shortest Path First (OSPF ) is a link-state routing protocol that was developed as a replacement for the distance vector routing protocol RIP.
  • 14. OSPF 14 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com) OSPF Features: Classless - It is classless by design; therefore, it supports VLSM and CIDR. Efficient - Routing changes trigger routing updates (no periodic updates). It uses the SPF algorithm to choose the best path. Fast convergence - It quickly propagates network changes. Scalable - It works well in small and large network sizes. Routers can be grouped into areas to support a hierarchical system. Secure - It supports Message Digest 5 (MD5) authentication.
  • 15. OSPF 15 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
  • 16. OSPF 16 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
  • 17. OSPF 17 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
  • 18. OSPF 18 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
  • 19. OSPF 19 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com) There are three basic elements of OSPF configuration: Enable OSPF Instance There is a default instance already created which can be found from Routing > OSPF > Instances OSPF Area Configuration There is a default area already created which can be found from Routing > OSPF > Areas OSPF Network Configuration The directly connected networks need to announce/configure from Routing > OSPF > Networks
  • 20. OSPF 20 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
  • 21. OSPF 21 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
  • 22. OSPF 22 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
  • 23. OSPF 23 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
  • 24. BGP 24 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com) The Border Gateway Protocol (BGP) is an inter- autonomous system routing protocol based on distance-vector algorithm. It is used to exchange routing information across the Internet and is the only protocol that is designed to deal with a network of the Internet's size and the only protocol that can deal well with having multiple connections to unrelated routing domains.
  • 25. BGP 25 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com) iBGP and eBGP
  • 26. BGP 26 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com) iBGP and eBGP Two BGP neighbors from different ASs are said to maintain an "external" link. Similarly, a BGP peer in a different AS is referred to as an external peer. BGP connections between peers within the same AS are known as "internal" links. BGP speakers that are connected by internal link are referred as internal peers. As far as this paper is concerned, iBGP refers to the BGP session between two peers in the same AS, or internal link. In turn, eBGP refers to the links between external BGP peers (these that are in different ASs).
  • 27. BGP 27 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)
  • 28. BGP 28 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com) Enabling BGP on OFFICE Router /routing bgp instance set default as=100 BGP Peers /routing bgp peer add name=ISP1 remote-address=10.0.0.1 remote-as=200 /routing bgp peer add name=ISP2 remote-address=20.0.0.1 remote-as=100 Network Advertisements /routing bgp network add network=192.168.0.0/24 synchronize=no /routing bgp network add network=192.168.1.0/24 synchronize=no
  • 29. BGP 29 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com) Enabling BGP on ISP1 Router /routing bgp instance set default as=200 BGP Peers /routing bgp peer add name=OFFICE remote- address=10.0.0.2 remote-as=100 Enabling BGP on ISP2 Router /routing bgp instance set default as=300 BGP Peers /routing bgp peer add name=OFFICE remote- address=20.0.0.2 remote-as=100
  • 30. BGP 30 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com) Failover in BGP (Main/Backup link setup on OFFICE router) Outgoing filters to ISP1: /routing filter #accept our networks add chain=isp1-out prefix=192.168.0.0/24 action=accept add chain=isp1-out prefix=192.168.1.0/24 action=accept #discard the rest add chain=isp1-out action=discard Outgoing filters to ISP2: /routing filter #accept our networks and prepend AS path three times add chain=isp2-out prefix=192.168.0.0/24 action=accept set-bgp-prepend=3 add chain=isp2-out prefix=192.168.1.0/24 action=accept set-bgp-prepend=3 #discard the rest add chain=isp2-out action=discard
  • 31. BGP 31 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com) Failover in BGP (Main/Backup link setup on OFFICE router) We also do not need any routes from both ISPs, because default route is used to force outgoing traffic through ISP1 and leave ISP2 as backup. /routing filter add chain=isp1-in action=discard add chain=isp2-in action=discard /ip route add gateway=10.0.0.1 distance=1 check-gateway=ping add gateway=20.0.0.1 distance=2 check-gateway=ping Next step is to specify which routing filter chains will be used /routing bgp peer set ISP1 in-filter=isp1-in out-filter=isp1-out set ISP2 in-filter=isp2-in out-filter=isp2-out in-filter is for incoming (received) prefixes, out-filter is for advertised prefixes.
  • 32. BGP 32 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com) Load Balance in BGP (on OFFICE router) Outgoing filters to ISP1: /routing filter #accept our networks and prepend second network add chain=isp1-out prefix=192.168.0.0/24 action=accept add chain=isp1-out prefix=192.168.1.0/24 action=accept set-bgp- prepend=3 #discard the rest add chain=isp1-out action=discard
  • 33. BGP 33 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com) Load Balance in BGP (on OFFICE router) Outgoing filters to ISP2: /routing filter #accept our networks and prepend first network add chain=isp2-out prefix=192.168.0.0/24 action=accept set-bgp- prepend=3 add chain=isp2-out prefix=192.168.1.0/24 action=accept #discard the rest add chain=isp2-out action=discard
  • 34. Thank you very much 34 Prepared by- M Abdullah Al Naser (mail.naserbd@yahoo.com)