29
Failover using VRRP, OSPF & BFD Federico Martín Perdichizzi October 17 th , 2016 Second Dubai MUM, Emirates

Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

  • Upload
    others

  • View
    30

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

Failover using VRRP, OSPF & BFD

Federico Martín Perdichizzi

October 17th, 2016

Second Dubai MUM, Emirates

Page 2: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

• Bachelor’s Degree in Organization’s Information Systems (In progress)

• MTCNA (1511NA064)

• MTCRE (1511RE099)

• MTCTCE (1511TCE030)

• MTCINE (1604INE052)

• 4 years working in networking with MikroTik

About me

2

Page 3: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

• VRRP, OSPF & BFD: Description and properties

• Steps for configuration

• Testing failover

• Final comments

• Q & A

Outline

3

Page 4: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

Original Network Topology

4

Page 5: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

• Time to coordinate replacements

• Only 1 IP address allowed and unique gateway

• Building only accessible during working hours

• Second router with VRRP, OSPF & BFD

5

Page 6: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

• Virtual Router Redundancy Protocol (RFC 3768)

• Virtual interface over physical

• Priorities (Master: 255, Backups: 1-254)

• Time of convergence

• IP address /32

VRRP

6

Page 7: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

How does it work?

• Multicast packets

VRRP

• Same IP Addresses

VRID in Hex

• MAC Address 00-00-5E-00-01-XX

7

Moderador
Notas de la presentación
Regarding the switch where these routers are connected, I must tell you that there are no static ARP entries configured, and that is why this configuration is possible without further considerations.
Page 8: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

OSPF (Open Shortest Path First)• Internal Gateway Protocol

• Best path

Bidirectional Forwarding Detection• Session between two endpoints

• Hello packets each 200ms

• Wireless considerations

OSPF & BFD

8

Page 9: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

Original Network Topology

9

Page 10: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

Goal Network Topology

10

Page 11: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

• Custom’s network has only 1 IP as GW for ours

• Non static ARP entries

• Wireless distance: Less than 400 meters

• No connection tracking used in redundant routers

Things to consider

11

Page 12: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

Things to consider

Routes:Tunnels GW IP via VRRP

Routes:Customs subnets via VRRP

VRRP BACKUP

VRRP MASTER

Workout side Customs side

VRRP MASTER

VRRP BACKUP

NATNo connection tracking

12

Page 13: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

• Best Practice

• Management

• Bridge -> Add

Loopback

13

Page 14: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

Loopback

Lo IP= 10.255.255.1

Lo IP= 10.255.255.4Lo IP= 10.255.255.3

Lo IP= 10.255.255.2

14

Moderador
Notas de la presentación
Here you can see what Loopback IP addresses I used on each router.
Page 15: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

Loopback

Lo IP= 10.255.255.1

Lo IP= 10.255.255.4Lo IP= 10.255.255.3

Lo IP= 10.255.255.2

• Static routes between all routers to reach Loopback IP’s (not physical mesh)

15

Moderador
Notas de la presentación
Loopback IP’s allow us to access the router if there is any way to do so, if we configured it properly. In this case, everything is routed so any router can reach other on every way that’s possible.
Page 16: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

• How to

VRRP

16

Page 17: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

VRRP

VRRP Master Interface VRRP Backup Interface17

Moderador
Notas de la presentación
On both sides, Workout and Customs, I did this with the two routers involved in this failover configuration.
Page 18: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

• Assign Loopback IP to the default OSPF Instance on each router

OSPF

18

Page 19: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

• Add network to start running the protocol

OSPF

19

Page 20: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

• Make a customizable static interface

OSPF

20

Page 21: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

• Adjust parameters

OSPF

21

Moderador
Notas de la presentación
Default 10, 40
Page 22: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

• Default Setup• Check neighbors

BFD

22

Moderador
Notas de la presentación
BLACK WINDOW: ANECDOTE!!!
Page 23: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

Server Farms

Normal Packet Flow

OSPF Routes (Distance 110)

TLS link, principalWireless link, secondary

Master Router

Master Router

23

Moderador
Notas de la presentación
(After animation) Now, this Transparent Layer Service, or any router could fail. In any case, the secondary router or link will become active.
Page 24: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

Server Farms

WKO TLS Router Fail

No route to host!

Master Router

Master Router

24

Page 25: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

Server Farms

WKO TLS Router Fail

Static Routes (Distance 200)

Master Router

Master Router

25

Page 26: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

Server Farms

TLS Failure

Master Router

Master Router

26

Page 27: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

• Check Gateway: Ping

• Avoid manually add static routes

Why OSPF ?

27

Moderador
Notas de la presentación
The second answer is that sometimes we need to grant access to new servers that are in a different subnet, so it is simpler to just add the new routes on both routers on the Customs side and let the routes propagate themselves.
Page 28: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

• Very usefulEmail notification

VRRP Scripts

28

Moderador
Notas de la presentación
That brings me to the end of my presentation. If anyone has any questions, I’d be happy to answer them.
Page 29: Failover using VRRP, OSPF & BFD - MikroTikmum.mikrotik.com/presentations/ME16/presentation_3912_1476763… · Bidirectional Forwarding Detection • Session between two endpoints

Thank you!

MUM Middle East, October 2016Federico Martín Perdichizzi

[email protected]

Any other question?

29

Moderador
Notas de la presentación
If you think of another question later, here it’s my email address. You can write me and I will reply you.