Redundancy and load balancing at L3 in Local Area Networks. Fulvio Risso Politecnico di Torino



Similar documents
Redundancy and load balancing at L3 in Local Area Networks. Fulvio Risso Politecnico di Torino

Redundancy and load balancing at L3 in Local. Fulvio Risso Politecnico di Torino

CCNP SWITCH: Implementing High Availability and Redundancy in a Campus Network

First Hop Redundancy (Layer 3) 1. Network Design First Hop. Agenda. First Hop Redundancy (Layer 3) 2. L102 - First Hop Redundancy

Cisco Networking Academy CCNP Multilayer Switching

Simulation of High Availability Internet Service Provider s Network

RESILIENT NETWORK DESIGN

GLBP - Gateway Load Balancing Protocol

Migration from Cisco GLBP to industry standard VRRPE

VRRP Technology White Paper

Layer 3 Redundancy with HSRP By Sunset Learning Instructor Andrew Stibbards

- Redundancy and Load Balancing -

CHAPTER 10 LAN REDUNDANCY. Scaling Networks

Objectives. The Role of Redundancy in a Switched Network. Layer 2 Loops. Broadcast Storms. More problems with Layer 2 loops

Cisco Certified Network Associate Exam. Operation of IP Data Networks. LAN Switching Technologies. IP addressing (IPv4 / IPv6)

M2M Series Routers. Virtual Router Redundancy Protocol (VRRP) Configuration Whitepaper

CCNP Switch Questions/Answers Implementing High Availability and Redundancy

Digi Certified Transport Technician Training Course (DCTT)

Top-Down Network Design

Chapter 12 Configuring VRRP and VRRPE

GC GC Analyze requirements. Develop logical design. Develop physical. Implement and test network Test, optimize, and document

Layer 3 Routing User s Manual

How To Understand and Configure Your Network for IntraVUE

VXLAN: Scaling Data Center Capacity. White Paper

Management Software. Web Browser User s Guide AT-S106. For the AT-GS950/48 Gigabit Ethernet Smart Switch. Version Rev.

Fast Fault Recovery in Switched Networks for Carrying IP Telephony Traffic

REDUNDANCY PROTOCOLS FOR CAMPOUS NETWORK

DATA CENTER. Best Practices for High Availability Deployment for the Brocade ADX Switch

16-PORT POWER OVER ETHERNET WEB SMART SWITCH

Route Discovery Protocols

Troubleshooting and Maintaining Cisco IP Networks Volume 1

OVERLAYING VIRTUALIZED LAYER 2 NETWORKS OVER LAYER 3 NETWORKS

The ABCs of Spanning Tree Protocol

What is VLAN Routing?

Virtual PortChannels: Building Networks without Spanning Tree Protocol

hp ProLiant network adapter teaming

Cisco.Selftestengine v by.Amy.32q

VRRPv3: Object Tracking Integration

Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme. Auxiliary Protocols

IP Application Services Commands show vrrp. This command was introduced. If no group is specified, the status for all groups is displayed.

OSPF Routing Protocol

Zarząd (7 osób) F inanse (13 osób) M arketing (7 osób) S przedaż (16 osób) K adry (15 osób)

GLBP Gateway Load Balancing Protocol

Interconnecting Cisco Networking Devices Part 2

QoS Switching. Two Related Areas to Cover (1) Switched IP Forwarding (2) 802.1Q (Virtual LANs) and 802.1p (GARP/Priorities)

Guide to TCP/IP, Third Edition. Chapter 3: Data Link and Network Layer TCP/IP Protocols

The VRRP Project. (Virtual Router Redundancy Protocol) Design Document

CS 5480/6480: Computer Networks Spring 2012 Homework 4 Solutions Due by 1:25 PM on April 11 th 2012

IP Routing Features. Contents

: Interconnecting Cisco Networking Devices Part 2 v1.1

20. Switched Local Area Networks

Course Contents CCNP (CISco certified network professional)

Building Secure Network Infrastructure For LANs

CHAPTER 6 DESIGNING A NETWORK TOPOLOGY

This How To Note describes one possible basic VRRP configuration.

CCT vs. CCENT Skill Set Comparison

A New Approach to Developing High-Availability Server

Outline VLAN. Inter-VLAN communication. Layer-3 Switches. Spanning Tree Protocol Recap

Switching in an Enterprise Network

Data Networking and Architecture. Delegates should have some basic knowledge of Internet Protocol and Data Networking principles.

Introduction about cisco company and its products (network devices) Tell about cisco offered courses and its salary benefits (ccna ccnp ccie )

How To Switch In Sonicos Enhanced (Sonicwall) On A 2400Mmi 2400Mm2 (Solarwall Nametra) (Soulwall 2400Mm1) (Network) (

Application Protocols for TCP/IP Administration

How To Learn Cisco Cisco Ios And Cisco Vlan

IP Addressing A Simplified Tutorial

NETE-4635 Computer Network Analysis and Design. Designing a Network Topology. NETE Computer Network Analysis and Design Slide 1

June Bridge & Switch. Pietro Nicoletti Piero[at]studioreti.it. Bridge-Switch-Engl - 1 P. Nicoletti: see note pag. 2

Configuring the Transparent or Routed Firewall

TechBrief Introduction

IP Routing Configuring RIP, OSPF, BGP, and PBR

Chapter 3. Enterprise Campus Network Design

TRILL for Data Center Networks

Static and Dynamic Network Configuration

ALL8894WMP. User s Manual. 8-Port 10/100/1000Mbps with 4-port PoE. Web Management Switch

OneCommand NIC Teaming and VLAN Manager

Networking. Palo Alto Networks. PAN-OS Administrator s Guide Version 6.0. Copyright Palo Alto Networks

Bridgewalling - Using Netfilter in Bridge Mode

"Charting the Course...

Microsoft Network Load Balancing and Cisco Catalyst Configuration

Seminar Seite 1 von 10

Troubleshooting Tools

Configuring Switch Ports and VLAN Interfaces for the Cisco ASA 5505 Adaptive Security Appliance

Voice Over IP. MultiFlow IP Phone # 3071 Subnet # Subnet Mask IP address Telephone.

High Availability Failover Optimization Tuning HA Timers PAN-OS 6.0.0

AUTO DEFAULT GATEWAY SETTINGS FOR VIRTUAL MACHINES IN SERVERS USING DEFAULT GATEWAY WEIGHT SETTINGS PROTOCOL (DGW)

Datagram-based network layer: forwarding; routing. Additional function of VCbased network layer: call setup.

Configuring Switch Ports and VLAN Interfaces for the Cisco ASA 5505 Adaptive Security Appliance

ICANWK613A Develop plans to manage structured troubleshooting process of enterprise networks

IP Networking. Overview. Networks Impact Daily Life. IP Networking - Part 1. How Networks Impact Daily Life. How Networks Impact Daily Life

CORPORATE NETWORKING

WAN Failover Scenarios Using Digi Wireless WAN Routers

Link Layer Discovery Protocol

vsphere Networking ESXi 5.0 vcenter Server 5.0 EN

Teldat Router. ARP Proxy

Exhibit n.2: The layers of a hierarchical network

: Interconnecting Cisco Networking Devices Part 1 v2.0 (ICND1)

Network Virtualization and Data Center Networks Data Center Virtualization - Basics. Qin Yin Fall Semester 2013

Configuring Redundancy

IMPLEMENTING CISCO SWITCHED NETWORKS V2.0 (SWITCH)

CS 457 Lecture 19 Global Internet - BGP. Fall 2011

Transcription:

Redundancy and load balancing at L3 in Local Area Networks Fulvio Risso Politecnico di Torino 1

Problem: the router is a single point of failure H1 H2 H3 VLAN4 H4 VLAN4 Corporate LAN Corporate LAN R1 R2 One-arm router for VLAN interconnection Internet 3

The wrong solution: router duplication H1 DG: R1 H2 DG: R1 H3 VLAN4 DG: R3 H4 VLAN4 DG: R3 Corporate LAN Corporate LAN R1 R2 R3 R4 Internet 4

Default gateway redundancy Objective Provide redundancy of the default gateway Two routers on the LAN are useless if hosts are not able to switch to another one in case the first fails Hosts on the LAN are not able to learn the network topology through Layer 3 routing protocols 5

A note on default gateway redundancy Interesting, incoming traffic (from the Internet to the LAN) will arrive H1 DG: R1 H2 DG: R1 H3 DG: R1 correctly, even if one router fails Routing protocols (e.g., OSPF) can detect failures R1 R2 of any router/path E.g. the failure of a ISP1 ISP2 default gateway We have troubles only in the opposite direction Internet 6

Possible solutions to default gateway redundancy HSRP (Hot Standby Routing Protocol) Cisco proprietary protocol defined in RFC 2281 VRRP (Virtual Router Redundancy Protocol) Standard protocol defined in RFC 3768 GLBP (Gateway Load Balancing Protocol) Cisco proprietary protocol 7

HSRP: overview Objectives First, redundancy of the default gateway Second, load balancing Not done very well Operations summary Among several Default gateways, one elected as master Very simple keep-alive messages ( Hello packets) to: Elect the master Detect when the master fails and replace it with a new master 8

HSRP: the idea H1 DG: 2.2.2.4 H2 DG: 2.2.2.4 H3 DG: 2.2.2.4 ARP Request: who has IP 2.2.2.4? ARP Reply: IP 2.2.2.4 is at MAC 00:00:00:44:44:44 Hello packets R3 (active) IP: 2.2.2.3/24 MAC: 00:00:00:33:33:33 HSRP Group: 4 Virtual IP: 2.2.2.4 Virtual MAC: 00:00:00:44:44:44 R2 (stand-by) IP: 2.2.2.2/24 MAC: 00:00:0:22:22:22 HSRP Group: 4 Virtual IP: 2.2.2.4 Virtual MAC: 00:00:00:44:44:44 R1 (listen) IP: 2.2.2.1/24 MAC: 00:00:00:11:11:11 HSRP Group: 4 Virtual IP: 2.2.2.4 Virtual MAC: 00:00:00:44:44:44 Internet 9

HSRP: working operations (1) Routers that provide redundancy belong to the same group Each group emulates a single virtual router Routers can be Active: the one that has the right to serve the LAN Stand-by: the one that takes place in case the Active fails Listen: the others that are neither Active nor Stand-by May become stand-by in case the active fails Within each group, we define two additional (shared) addresses A virtual IP address (set by the network admin) A virtual MAC address (automatically generated by the system) 10

HSRP: working operations (2) Only the Active Router can use the virtual addresses Only the Active router can reply to the virtual IP/MAC addresses It does no longer use its IP/MAC addresses (unless an explicit request for that address is received) Standby and Listen routers reply only to their own IP/MAC addresses The Standby will start using the virtual MAC when it is promoted to active 11

HSRP: working operations (3) Operations split in two main phases Election process Needed to define which is the Active router Priority (or, if equal) Higher IP address Keep-alive process Needed to keep track of possible failures of the default gateway Both processes make use of periodic Keep-alive ( Hello ) messages 12

HSRP addresses (1) The interface of the Active router has the following assigned addresses: Primary IP address (inserted in the source IP header field) Virtual IP address (used by hosts as default gateway) Has to be set by the network admin during HSRP configuration Physical MAC address assigned by the NIC manufacturer Virtual MAC address allocated to the HSRP Group Well-known MAC address, derived by the HSRP group Automatically generated by HSRP 13

HSRP addresses (2) Virtual MAC address Taken in charge by the Active router and used to answer at the received ARP request packets Unicast address Token Ring has only 3 possible values (corresponding to HSRP Groups 0, 1, 2) C0-00-00-01-00-00, C0-00-00-02-00-00, C0-00-00-04-00-00 Well known virtual MAC address for other LANs (e.g., 802.3, 802.11 etc.) 00-00-0C-07-AC-xx xx represents the HSRP Group 00-00-0C is a Cisco-assigned OUI 14

HSRP addresses (3) The interfaces of the Standby and Listen routers have the followings assigned addresses: Primary IP address (inserted in the source IP header field) Physical MAC address assigned by the NIC manufacturer Virtual addresses will become active when the router is promoted as active 15

HSRP packet format MAC header IP header UDP header HSRP FCS 0 8 16 24 31 Version Op Code State Hello-time Hold-time Priority Group Reserved Authentication Data Authentication Data Virtual IP Address 16

HSRP header: opcode field Describes the type of message contained in this packet Possible values 0 = Hello The router is running and is capable of becoming the active or standby router 1 = Coup The router wants to become the active router 2 = Resign The router does no longer want to be the active router Coup and Resign are not necessarily used together E.g. a router that has highest priority can send the coup message to take over the current router, but this router goes into speak state without sending any resign 17

HSRP header: state field (1) Describes the current state of the router sending the message Possible values 0 = Initial This is the starting state and indicates that HSRP is not running 1 = Learn The router has not determined the virtual IP address and is still waiting to hear it from the active router 2 = Listen The router knows the virtual IP address, but is neither the active router nor the standby router 18

HSRP header: state field (2) Possible values (cont.) : 4 = Speak The router sends periodic Hello messages and is actively participating in the election of the active and/or standby router 8 = Standby The router is a candidate to become the next active router and sends periodic Hello messages At most one router can be in Standby state (for each group) 16 = Active The router is currently forwarding packets that are sent to the group virtual MAC address Each group has at least one (and only one) router in Active state 19

HSRP header: Hello time and Hold time Hello-Time Period between the Hello messages sent by the routers In case no active routers exists, a router uses its configured value (default: 3 seconds) Hold-Time Validity of the current Hello message When this timer expires, the Standby router proposes itself as Active router In case no active routers exists, a router uses its configured value (default: 10 seconds) Notes These numbers are set by the active router for the entire LAN The convergence time for an HSRP network is about 10 seconds 20

HSRP header: priority and group fields Priority Used to force the election of the router with highest priority (higher number means higher priority) In the case of routers with equal priority, the router with the highest IP address wins Default Priority is 100 Group Group ID the current HSRP instance is referring to For Token Ring, values between 0 and 2 are valid For other media, values between 0 and 255 are valid Max 255 groups 21

HSRP header: Authentication and Virtual IP Address Authentication Data This field contains a clear-text 8-characters password If no authentication data is configured the default text is cisco Really simple authentication; mostly used to differentiate multiple instances of HSRP within the same LAN Virtual IP address The virtual IP address used by this group IP address of the default gateway configured on the hosts If the virtual IP address is not configured on a router, then it may be learned from the Hello message sent from the active router 22

HSRP encapsulation Encapsulated in UDP, src/dst port is 1985 IP Layer Transmitted to multicast address 224.0.0.2 ( all routers ) Source IP address is the actual IP address of the router (in order to elect the best router as active) TTL = 1 (packets are not further forwarded by routers) MAC layer Destination address: derived from the Destination IP address Source MAC: Virtual MAC address for the group 23

HSRP encapsulation: example H1 DG: 2.2.2.3 H2 DG: 2.2.2.3 H3 DG: 2.2.2.3 R2 (active) IP: 2.2.2.2/24 MAC: 00:00:00:22:22:22 HSRP Group: 1 V-IP: 2.2.2.3 V-MAC: 00:00:0C:07:AC:01 ETH.SRC: 00:00:0C:07:AC:01 ETH.DST: 01:00:5E:00:00:02 IP.SRC: 2.2.2.2 IP.DST: 224.0.0.2 ETH.SRC: 00:00:00:11:11:11 ETH.DST: 01-00-5E-00-00-02 IP.SRC: 2.2.2.1 IP.DST: 224.0.0.2 R1 (standby) IP: 2.2.2.1/24 MAC: 00:00:00:11:11:11 HSRP Group: 1 V-IP: 2.2.2.3 V-MAC: 00:00:0C:07:AC:0 UDP.SPORT: 1985 UDP.DPORT: 1985 UDP.SPORT: 1985 UDP.DPORT: 1985 HSRP HELLO (HSRP Group 1) HSRP HELLO (HSRP Group 1) Multicast MAC address (derived from 224.0.0.2) Internet 24

HSRP: fault reaction H1 DG: 2.2.2.3 H2 DG: 2.2.2.3 H3 DG: 2.2.2.3 Data to Internet IP.dst: IP_remote MAC.dst: 00:00:0C:07:AC:01 Data to Internet IP.dst: IP_remote MAC.dst: 00:00:0C:07:AC:01 R2 (active) IP: 2.2.2.2 MAC: 00:00:00:22:22:22 HSRP Group: 1 Virtual IP: 2.2.2.3 Virtual MAC: 00:00:0C:07:AC:01 Hello packets Internet R1 (standby) (active) IP: 2.2.2.1 MAC: 00:00:00:11:11:11 HSRP Group: 1 Virtual IP: 2.2.2.3 Virtual MAC: 00:00:0C:07:AC:01 Convergence time: depends on the HoldTime value, contained in the Hello packets (i.e., usually 10 seconds) 25

HSRP and IP networks (1) HSRP is specific for a given IP network HSRP interfaces belonging to the same group must be reachable at L2 A LAN with two Logical IP Networks must use two HSRP groups DG: 1.1.1.254 DG: 3.3.3.254 MAC: 00:00:00:11:11:11 MAC: 00:00:00:22:22:22 IP: 1.1.1.1/24 HSRP Group: 1 (standby) V-IP: 1.1.1.254 V-MAC: 00:00:0C:07:AC:01 Hello Hello IP: 1.1.1.2/24 HSRP Group: 1 (active) V-IP: 1.1.1.254 V-MAC: 00:00:0C:07:AC:01 IP: 3.3.3.3/24 HSRP Group: 4 (standby) V-IP: 3.3.3.254 V-MAC: 00:00:0C:07:AC:04 R1 Internet R2 IP: 3.3.3.4/24 HSRP Group: 4 (active) V-IP: 3.3.3.254 V-MAC: 00:00:0C:07:AC:04 26

Hello HSRP and IP networks (2) Different interfaces must have different HSRP groups active Router R1 has 2 HSRP instances, one per IP network IP: 3.3.3.3/24 MAC: 00:00:00:33:33:33 HSRP Group: 2 IP: 1.1.1.1/24 MAC: 00:00:00:11:11:11 HSRP Group: 1 IP: 1.1.1.2/24 MAC: 00:00:00:22:22:22 HSRP Group: 1 Hello R1 R2 Internet R3 IP: 3.3.3.4/24 MAC: 00:00:00:44:44:44 HSRP Group: 2 27

HSRP and VLANs Each VLAN is a separated LAN, with its own default gateway Multiple HSRP groups are required Each VLAN goes on a specific virtual interface, each one with its own HSRP group DG: 1.1.1.254 DG: 3.3.3.254 Interface Fe0 Mode Trunk MAC: 00:00:00:11:11:11 Interface Fe0 Mode Trunk MAC: 00:00:00:22:22:22 Sub-interface Fe0.1 VLAN 1 IP: 1.1.1.1/24 HSRP Group: 1 (standby) V-IP: 1.1.1.254 V-MAC: 00:00:0C:07:AC:01 Sub-interface Fe0.1 VLAN 1 IP: 1.1.1.2/24 HSRP Group: 1 (active) V-IP: 1.1.1.254 V-MAC: 00:00:0C:07:AC:01 Sub-interface Fe0.4 VLAN 4 IP: 4.4.4.4/24 HSRP Group: 4 (standby) V-IP: 4.4.4.254 V-MAC: 00:00:0C:07:AC:04 R1 Internet R2 Sub-interface Fe0.4 VLAN 4 IP: 4.4.4.5/24 HSRP Group: 4 (active) V-IP: 4.4.4.254 V-MAC: 00:00:0C:07:AC:04 28

HSRP on dual-homed servers/routers HSRP can be used to implement Dual homing servers/routers and achieve single-machine redundancy Two standard NICs HSRP will handle the virtual IP/MAC address on the primary interface Both interfaces must belong to the same LAN Other option for redundancy Server (fault tolerant) NIC Not available on routers S1 S2 R1 Server 29

HSRP and Filtering database Only the active router can use the Virtual MAC as source address in Hello Messages When the Active router changes, the new Active router will start sending messages with that MAC address All the switches will update their filtering database accordingly Filtering Database MAC Port 07:AC:01 Fe0 Fe1 Fe0 Fe1 R2 (active) IP: 2.2.2.2/24 MAC: 00:00:00:22:22:22 HSRP Group: 1 Virtual IP: 2.2.2.3 Virtual MAC: 00:00:0C:07:AC:01 30 Internet R1 (standby) (active) IP: 2.2.2.1/24 MAC: 00:00:00:11:11:11 HSRP Group: 1 Virtual IP: 2.2.2.3 Virtual MAC: 00:00:0C:07:AC:01

HSRP and ARP caches A gratuitous ARP Reply (in broadcast) is sent when a router becomes Active Source MAC: Virtual MAC address Destination MAC: broadcast ARP Reply: Virtual IP is at Virtual MAC Strictly speaking, not needed ARP mapping do not change if the Virtual IP Virtual MAC are used In some (old) cases, we may wanted to use the MAC address of the router instead of the virtual IP In those cases, we need to update the ARP cache Although some Operating Systems may not handle it properly (because of the unexpected broadcast MAC address) 31

HSRP and load sharing (1) Only one exit link used Unused bandwidth on the stand-by router Can be solved through a proper HSRP configuration H1 DG: 2.2.2.4 H2 DG: 2.2.2.4 H3 DG: 2.2.2.3 H4 DG: 2.2.2.3 R1 IP: 2.2.2.1/24 MAC: 00:00:00:11:11:11 Group 1 (standby) Virtual IP: 2.2.2.3 Virtual MAC: 00:00:0C:07:AC:01 Group 2 (active) Virtual IP: 2.2.2.4 Virtual MAC: 00:00:0C:07:AC:02 Internet R2 IP: 2.2.2.2/24 MAC: 00:00:00:22:22:22 Group 1 (active) Virtual IP: 2.2.2.3 Virtual MAC: 00:00:0C:07:AC:01 Group 2 (standby) Virtual IP: 2.2.2.4 Virtual MAC: 00:00:0C:07:AC:02 32

HSRP and load sharing (2) Multiple HSRP groups Multi-group HSRP (mhsrp) One router active for the first group, the other active for the second group Clients are configured half with the first DG, half with the second Problems of the achieved load balancing Load balancing is statically defined by physically partitioning hosts between two different default gateways What about if one group generates much more traffic than the other? Configuration burden Not easy to differentiate the Default Gateway on the clients Usually DHCP is used, and this usually returns a single DG for all hosts 33

HSRP and load sharing (3) Is it really needed? Often corporate networks have much more incoming than outgoing traffic The routing of incoming traffic does not depend on the HSRP configuration (see next slide) In this case, the egress bandwidth of a single link may be enough 34

HSRP and asymmetric routing Incoming traffic (from internet to the LAN) is routed by the external external routing protocol (OSPF, BGP, etc.) The configuration of the incoming path does not depend on HSRP We may use one or both links based on the configuration of those routing protocols Asymmetric routing possible Ingress and egress paths may be different, with or without mhsrp 35

Load sharing with VLANs We can achieve the same results of mhsrp However, no protection in case the router fails H1 VLAN 2 DG: 2.2.2.1 H2 VLAN 2 DG: 2.2.2.1 H3 VLAN 3 DG: 3.3.3.1 H4 VLAN 3 DG: 3.3.3.1 Root Bridge VLAN2 Root Bridge VLAN3 R1 VLAN1 IP: 2.2.2.1/24 R2 VLAN3 IP: 3.3.3.1/24 36

HSRP: Preemption capability Parameter configured on each router If a router has higher priority than the active router and preemption is configured, it MAY take over as the active router using a Coup message Without preemption, the currently Active router will stay active until it has a fault A router configured with the highest priority cannot force the current Active router to resign, unless preemption is used 37

HSRP: basic configuration R2(config)# interface ethernet 0 R2(config-if)# ip address 10.1.1.2 255.255.255.0 R2(config-if)# standby 24 ip 10.1.1.5 R2(config-if)# standby 24 preempt H1 DG: 10.1.1.5 H2 DG: 10.1.1.5 R1 eth0 eth1 HSRP group 24 eth0 eth1 R2 HSRP is not a router-wide function; it is a propriety of the interface that must be on the LAN Internet R1(config)# interface ethernet 0 R1(config-if)# ip address 10.1.1.1 255.255.255.0 R1(config-if)# standby 24 ip 10.1.1.5 R1(config-if)# standby 24 priority 105 R1(config-if)# standby 24 preempt 38

HSRP: track function (1) Problem: a failure on the WAN link does not trigger the Stand-by router to take place Packets are sent to R1, from there to R2 (routing protocol know the possible routes) Opposite route works as well (not under HSRP control, though) No problems in connectivity, but additional overhead in forwarding H1 DG: 2.2.2.3 H2 DG: 2.2.2.3 R1 IP: 2.2.2.1/24 Virtual IP: 2.2.2.3 (standby) HSRP group 24 R2 IP: 2.2.2.2/24 Virtual IP: 2.2.2.3 (active) 39 Internet

HSRP: track function (2) Track the status of the physical layer on the interface Dynamically decrease the HSRP Priority when a tracked interface goes down By default HSRP algorithm decrease the Priority by 10 when the link-layer of a tracked interface goes down Be careful: only some types of faults cause the interface to go down E.g. an interface will stay up if connected to an active L2 switch R1 R2 (WAN) HSRP R3 40

HSRP: advanced configuration R1(config)# interface ethernet 0 R1(config-if)# ip address 10.1.1.1 255.255.255.0 R1(config-if)# standby 1 ip 10.1.1.5 R1(config-if)# standby 1 priority 105 R1(config-if)# standby 1 preempt R1(config-if)# standby 1 track Serial0 R1(config-if)# standby 2 ip 10.1.1.6 R1(config-if)# standby 2 preempt R1(config-if)# standby 2 track Serial0 R2(config)# interface ethernet 0 R2(config-if)# ip address 10.1.1.2 255.255.255.0 R2(config-if)# standby 1 ip 10.1.1.5 R2(config-if)# standby 1 preempt R2(config-if)# standby 1 track Serial0 R2(config-if)# standby 2 ip 10.1.1.6 R2(config-if)# standby 2 priority 105 R2(config-if)# standby 2 preempt R2(config-if)# standby 2 track Serial0 H1 DG: 10.1.1.5 H2 DG: 10.1.1.5 R1 HSRP Group 1 (active) HSRP Group 2 (standby) R2 HSRP Group 1 (standby) HSRP Group 2 (active) Internet 41

VRRP overview (1) A smart clone of HSRP, with care taken not to infringe any Cisco patent Functioning, philosophy is exactly the same as HSRP Same way to achieve the Default Gateway redundancy Same way to achieve Load Balancing 42

VRRP overview (2) Minor differences Packet encapsulated in IP, protocol type 112 (no longer in UDP) Transmitted to multicast address 224.0.0.18 Different MAC addresses associated to each group TTL = 255 A VRRP router receiving a packet with the TTL not equal to 255 must discard the packet (only one possible hop) Active/Standby Master/Backup Hello Messages Advertisement messages HSRP Group Virtual Router ID (VRID) Some timers (see later) 43

VRRP overview (3) Major (?) differences Each master VRRP router can control more than one IP Address A VRRP Router may backup one or more virtual routers Any of the virtual router's IP addresses on a LAN can then be used as the Default Gateway by end-hosts Support multiple logical IP subnets on a single LAN segment For any VRID a single Master Router is elected the remaining routers are selected as Backup Routers (no longer routers in Listen ) Only the Master router sends Advertisement packets The master router may have the same address as the group virtual router address tracking not available preempt is the specified behavior 44

VRRP: packet format (1) MAC header IP header VRRP FCS 0 8 16 24 31 Ver= 2 Type= 1 Virtual Router ID Priority Count IP addr. Auth Type Advert Interval Checksum Virtual IP address 1 Virtual IP address N Authentication data (1) Authentication data (2) 45

VRRP: packet format (2) IP header Type Source IP: real IP address of the interface the packet is being sent from Destination IP: 224.0.0.18 The type field specifies the type of this VRRP packet. packet type is: The only 1 Advertisement VRID The Virtual Router Identifier (VRID) field identifies the virtual router this packet is reporting status for Allowed values: 1-255 46

VRRP: packet format (3) Priority Router with highest priority will become the master In case of a tie, the router with the highest real IP becomes master Priority = 255: assigned automatically to the router that has the same address as the virtual router The router will be the master router (known as the virtual address owner ) Priority = 1-254: normal priority values Priority = 0 the current router does not participate in VRRP Also advertised during an orderly shutdown of a master in order to speed-up Backup promotion (no need to timeout) The default priority value for VRRP routers backing up a virtual router is 100 47

VRRP: packet format (4) Count IP Addrs number of IP addresses contained in this VRRP Advertisement Authentication Type Unused in the current version (RFC 3768) Removed because operational experience showed that they did not provide any real security and would only cause multiple masters to be created 0 = No Authentication 48

VRRP Timers Advertisement Interval Time interval (in seconds) between Advertisements default value = 1 s (HSRP was 3) Skew_Time (256 - Priority) / 256 (seconds) Master_Down_Interval (3 * Advertisement_Interval) + Skew_time Time interval for Backup to declare Master down (seconds) After that time, a new Master is elected In case an orderly shutdown of a master is detected, backup waits only for the skew time 49

VRRP: Virtual MAC Address Well known virtual MAC address for any LAN except Token Ring (e.g. 802.3, 802.11 etc.) 00-00-5E-00-01-xx xx represents the VRID OUI changed (C0-00-00 is owned by Cisco) 50

VRRP: Virtual MAC Address for Token Ring VRID Token Ring Functional Address ------ --------------------------------------------- 1 03-00-02-00-00-00 2 03-00-04-00-00-00 3 03-00-08-00-00-00 4 03-00-10-00-00-00 5 03-00-20-00-00-00 6 03-00-40-00-00-00 7 03-00-80-00-00-00 8 03-00-00-01-00-00 9 03-00-00-02-00-00 10 03-00-00-04-00-00 11 03-00-00-08-00-00 51

HSRP/VRRP: convergence HSRP: about 10 sec with default parameters Hold Time User can configure Hello-Time and Hold-Time to improve this value VRRP: about 4 sec with default parameters (3 * Advertisement_Interval) + Skew_time User can configure Advertisement Interval and Priority Less flexible than HSRP 52

HSRP/VRRP on real LANs: L2 resiliency (1) H1 DG: 2.2.2.3 H2 DG: 2.2.2.3 H3 DG: 2.2.2.3 H4 DG: 2.2.2.3 Fault 5: KO IP network partitioned in half (exit traffic may use R1, but incoming traffic may come through R2) SW-1 SW-2 Fault 2: OK (traffic re-routed through R1) Fault 3: OK (traffic continues through R1) R2 (active) IP: 2.2.2.2/24 V-IP: 2.2.2.3 Fault 1: OK (traffic re-routed through R1) R1 (standby) IP: 2.2.2.1/24 V-IP: 2.2.2.3 Fault 4: OK non-optimized exit path, but everything works ( track function useless) 53 Internet We must engineer the network with resiliency at data-link level (e.g. link aggregation between SW-1 and SW-2 or STP/RSTP)

HSRP/VRRP on real LANs: L2 resiliency (2) HSRP/VRRP do not protect from all faults on the L2 network Solutions: use STP/RSTP or link aggregation The latter is the best for its reduced convergence time STP may take 50s to converge; during this period, malfunctioning may occur IP networks still partitioned HSRP/VRRP do not protect from some faults on the WAN link 54

HSRP/VRRP on real LANs: flooding (1) Switches may have incomplete filtering database Some entries may be missing, due to the Aging Time If a frame directed to that host is received, the frame is flooded A periodic generation of broadcast frames avoids the problem Some hosts generate a limited number of broadcasts (e.g. UNIX or VmWare) Sometimes ARP messages are sent only occasionally on the network ARP cache is often 5 minutes or more Max Ageing Time in the filtering database is often 2 minutes 55

HSRP/VRRP on real LANs: flooding (2) H1 DG: 2.2.2.3 H2 DG: 2.2.2.3 H3 DG: 2.2.2.3 H4 DG: 2.2.2.3 Blocked port Switches on this path will refresh the entries in the filtering database at each received frame (e.g. unicast) Root Bridge SW-1 SW-3 SW-2 SW-4 Switches on this path will refresh the entries in the filtering database only when host H1 generates a broadcast frame R2 (active) IP: 2.2.2.2/24 Virtual IP: 2.2.2.3 R1 (standby) IP: 2.2.2.1/24 Virtual IP: 2.2.2.3 Internet 56

HSRP/VRRP on real LANs: flooding (2) A possible pathological situation An hosts A that wants to contact the station B has still the mapping (IP(B), MAC(B)) in its ARP cache The entry related to MAC(B) is no longer in the filtering database In that case, host A will not send an ARP Request to B, and the MAC frame is generated and sent on the network Flooding Please note that in any case, the ARP Reply may not reach the entire network, although usually this is not a problem This situation may be extremely common with HSRP/VRRP 57

HSRP/VRRP on real LANs: flooding (4) Hypothesis Let us suppose that host H1 does not generate periodic broadcasts on its own Egress and ingress routers are different Asymmetric routing The ARP Cache on router R2 last longer than the filtering database Description Egress traffic from station H1 updates the filtering database on the exit path The ingress router still has a valid mapping for H1 in its ARP cache Switches on the ingress path do no longer have the H1 entry in the filtering database The only option (for the switch) is to send the frame on all its ports periodic flooding (every now and then) 58

HSRP/VRRP on real LANs: flooding (5) Solutions Re-engineer the L2 spanning tree (not really a solution) Force stations to send broadcast frames rather often (< Max Ageing Time) Increase Max Ageing Time on the switches 59

HSRP/VRRP on unidirectional links (1) H1 DG: 2.2.2.3 H2 DG: 2.2.2.3 H3 DG: 2.2.2.3 R2 (active) IP: 2.2.2.2/24 MAC 00:00:00:22:22:22 V-IP: 2.2.2.3 V-MAC: 00:00:0C:07:AC:01 R1 ETH.SRC: 00-00-0C-07-AC-01 ETH.DST: 01-00-5E-00-00-02 IP.SRC: 2.2.2.3 IP.DST: 224.0.0.2 UDP.SPORT: 1985 UDP.DPOR: 1985 HSRP HELLO ETH.SRC: 00-00-0C-07-AC-01 ETH.DST: 01-00-5E-00-00-02 IP.SRC: 2.2.2.3 IP.DST: 224.0.0.2 UDP.SPORT: 1985 UDP.DPOR: 1985 HSRP HELLO R1 (standby active) IP: 2.2.2.1/24 MAC: 00:00:00:11:11:11 V-IP: 2.2.2.3 V-MAC: 00:00:0C:07:AC:01 R2 Internet Instability in the filtering database of the switch 60

HSRP/VRRP on unidirectional links (1) R1 will not receive HSRP packet from R2, therefore both will become active Both R1 and R2 will send HSRP Hello using the virtual MAC address as source The filtering database on the switch SW-1 will oscillate periodically Note that the problem appears despite R1 will not answer to ARP Requests ( Who has 2.2.2.3? ) because the incoming path is unavailable 61

GLBP Gateway Load Balancing Protocol Enhancement (and replacement) of HSRP Automatic load balancing across default gateways Traffic is distributed across multiple routers No configuration problems (such as in mhsrp) in assigning multiple default gateways to clients and creating multiple groups Same first-hop failure recovery capability of HSRP A group of routers provides a unique virtual router service One IP address Multiple virtual MAC addresses for forwarding Cisco proprietary Not even available on the entire product line 62

GLBP: the idea H1 DG: 2.2.2.4 H2 DG: 2.2.2.4 H3 DG: 2.2.2.4 ARP Request: who has IP 2.2.2.4? ARP Reply: IP 2.2.2.4 is at MAC 44-44-44-44-44-44 ARP Request: who has IP 2.2.2.4? ARP Reply: IP 2.2.2.4 is at MAC 55-55-55-55-55-55 R1 (AVG) IP: 2.2.2.1/24 MAC: 11-11-11-11-11-11 V-IP: 2.2.2.4 V-MAC: 44-44-44-44-44-44 R2 (AVF) IP: 2.2.2.2/24 MAC: 22-22-22-22-22-22 V-IP: 2.2.2.4 V-MAC: 55-55-55-55-55-55 R3 (AVF) IP: 2.2.2.3/24 MAC: 33-33-33-33-33-33 V-IP: 2.2.2.4 V-MAC: 66-66-66-66-66-66 Internet 63

GLBP Functions Active Virtual Gateway (AVG) GLBP members elect one router to be the AVG for the group AVG replies to ARP requests for the virtual IP from clients AVG assigns virtual MAC addresses to the active virtual forwarders Active Virtual Forwarder (AVF) Each router in the VRRP group (up to 4 per group) routes packets forwarded to its assigned virtual MAC address 64

GLBP Operation An AVG router is elected within each GLBP group The AVG allocates a distinct virtual MAC address to each member (the AVFs) In order to move that traffic to another router in case that AVF fails If a client ARPs the virtual IP address, the AVG responds with one of the virtual MAC addresses assigned to the AVFs Clients now send their frames to one of the AVFs If an AVF fails, another AVF takes over forwarding for that AVF 65

Load Balancing Algorithm Four possibilities None: GLBP operates like HSRP Weighted: each GLBP router in the group will advertise its weighting and assignment; the AVG will act based on that value Used in case the exit links have different capacities Host dependent: this ensures that a host will be guaranteed to use the same virtual MAC address as long as the number of AVFs in the GLBP group is constant Used when using stateful Network Address Translation because it requires each host to be returned the same virtual MAC address each time it sends an ARP request for the virtual IP address Round robin: each AVF MAC address is used sequentially in ARP replies for the virtual IP address 66

Conclusions HSRP/VRRP widely used in practice Simple and effective Often, a single group (per VLAN) is used GLBP Usually outgoing traffic much smaller than incoming traffic Proprietary, not documented Be careful with the L2 network L2 resiliency L2 flooding Other faults Track function not effective 67