Gestão Otimizada de uma Infraestrutura de Switching Redundante
Full text
FACULDADE DE ENGENHARIA DA UNIVERSIDADE DO PORTO Gestão otimizada de uma infraestrutura de switching redundante João Correia WORKING VERSION Mestrado Integrado em Engenharia Eletrotécnica e de Computadores Supervisor: João Neves October 30, 2015
© João Correia, 2015
ii
Resumo Com o desenvolvimento das redes de computadores, bem como, o aumento da nossa dependência perante elas, torna-se imperativo aumentar a fiabilidade das mesmas, de forma a reduzir a perda de conectividade quando um problema acontece. Uma falha de conectividade de longa duração pode provocar perdas monetárias ou colocar pessoas e bens em perigo. Temos neste caso de recorrer a técnicas de redundância para assegurar os serviços necessários. Redundância numa rede de computadores é quando introduzimos equipamentos extras na rede de forma a garantir que quando algum problema ocorre existem caminhos adicionais para manter a conexão. Geralmente temos para este efeito uma duplicação de equipamentos nas camadas principais de uma rede assim como um aumento das ligações entre os componentes. Na presença destes equipamentos extras, a nossa rede fica mais complexa e mais difícil de gerir, é então necessário introduzir maneiras de controlar o aumento dos componentes de forma a gerir-los. Para isso usamos protocolos como Spanning Tree e protocolos de redundância para impedir a criação de loops na nossa rede. Este projeto de dissertação nasce então da necessidade de estudar as tecnologias que nos permitam gerir e controlar a redundância introduzida numa rede assim como descobrir novas maneiras de o fazer. Tendo este objetivo em mente este projeto foca-se em encontrar uma solução ótima e implementa-la de forma a testar a sua resiliência. É também pertinente o estudo de técnicas para otimizar a gestão de uma rede deste calibre de forma a diminuir a dificuldade e o tempo necessário que o processo de gestão toma, assim como o estudo de serviços a disponibilizar numa rede com estas características. iii
iv
Abstract With the development of computer networks and the increasing dependence on them, we need more reliability to ensure a reduction of loss of connectivity when a problem arises. A long loss of connection may cause negative effects on a business and may endanger lives or property. In this case we need to use redundancy techniques to ensure the necessary services. Network redundancy occurs when we introduce additional equipments to the network to make sure that if a problem occurs, additional paths exist to maintain connection. Normally for this effect we have a duplication of the key network components and an increase of links between them. In the presence of this additional equipments, our network becomes more complex and difficult to manage, we need to find a way to control the increase of components so that we can manage it. To do so we use protocols like Spanning Tree and Redundancy protocols to eliminate loops in our network. This dissertation project came from the necessity to study and research technologies that allows us to manage and control the introduced redundancy as well as to find additional ways to do so. With this goal in mind this project focus on finding an optimal solution and implement it so that we can test its resilience. It is also relevant to study the techniques that optimize the management of a network of this scale, in order to make this process easier and faster, as well as, the study of services that can be provided on a network with this characteristics. v
vi
Acknowledgements This project concludes one of the most important stages of my academic journey, the hardships encountered were surpassed with the support of dear ones and I would like to thank them. In the first place, I would like to thank my close friends and colleagues that walked this path alongside me and helped me during the course of this project. From this circle of friends I would like to specially thank Carlos Leocádio, Carlos Pina, Hugo Ribeiro, Madalena Ferreira, Pedro Araujo, Pedro Nogueira and Pedro Pires for all the help that they offered and all the motivation that they gave me. I would also like to thank my parents and sister for the opportunity that they provided me and for all the support during all of my academic life. I thank my supervisor, João Neves, for proposing this project and for all the guidance that he gave me, allowing me to finish this project that taught me so much. Lastly I would like to thank Paulo Vaz for the help he gave me, most of the times when I was on a dead end. Thank you. João Correia vii
xiv LIST OF FIGURES
List of Tables 2.1 Redundancy protocols comparison[5] ....................... 9 4.1 Subnetworks .................................... 24 4.2 Ports used to create the Port-Channels . . . . . . . . . . . . . . . . . . . . . . . 25 4.3 SwitchesIPaddresses................................ 25 4.4 Core and Border Routers interfaces IP addresses . . . . . . . . . . . . . . . . . . 25 4.5 ISP Routers interfaces IP addresses . . . . . . . . . . . . . . . . . . . . . . . . . 26 4.6 BGPconfigurations................................. 27 4.7 HostIPaddresses.................................. 27 xv
xvi LIST OF TABLES
List of Listings A.1 EnablingAccessmode ............................... 46 A.2 EnablingTrunkmode................................ 47 A.3 Configure interface IP address . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 A.4 Activating Nat on an interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 A.5 CreatinganEtherchannel.............................. 47 A.6 Enablingspanningtree ............................... 47 A.7 Changing the priority of a vlan . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 A.8 EnablingVRRP................................... 48 A.9 ConfiguringVRRPtimers.............................. 48 A.10EnablingHSRP................................... 48 A.11configuringHSRPtimers.............................. 48 A.12EnablingGLBP................................... 49 A.13 Configuring GLBP load balancing . . . . . . . . . . . . . . . . . . . . . . . . . 49 A.14ConfiguringGLBPweight ............................. 49 A.15ConfiguringGLBPtimers.............................. 49 A.16ConfiguringAccessLists.............................. 49 A.17ConfiguringNAT .................................. 50 B.1 HSRPactivationscript ............................... 51 B.2 VRRPactivationscript ............................... 53 B.3 GLBPactivationscript ............................... 54 xvii
xviii LIST OF LISTINGS
Abbreviations, Acronyms and Initials API Application programming interface ARP Address Resolution Protocol AS Autonomous System AVF Active Virtual Forwarder AVG Active Virtual Gateway BGP Border Gateway Protocol BPDU Bridge Protocol Data Units DHCP Dynamic Host Configuration Protocol DNS Domain Name System EC EthernetChannel ECMP Equal Cost Multi-Path Routing EIGRP Enhanced Interior Gateway Routing Protocol FEUP Faculdade de Engenharia da Universidade do Porto FHRP First Hop Redundancy Protocol FIB Forwarding information base FTP File Transfer Protocol GLBP Gateway Load Balancing Protocol HSRP Hot Standby Router Protocol HTTP Hypertext Transfer Protocol ICMP Internet Control Message Protocol IETF Internet Engineering Task Force INESC TEC INstituto de Engenharia de Sistemas e Computadores - Tecnologia e Ciência IP Internet Protocol ISP Internet Service Provider LACP Link Aggregation Control Protocol LAN Local Area Network MAC Media Access Control MEC Multichassis EtherChannel MRTG Multi Router Traffic Grapher NAT Network Address Translation NSF Nonstop Forwarding NTP Network Time Protocol OSI Open Systems Interconnection OSPF Open Shortest Path First PAgP Port Aggregation Protocol PVST Per-VLAN Spanning Tree RFC Request for Comments xix
xx Abbreviations, acronyms and initials RP Routing Protocol RSTP Rapid Spanning Tree Protocol SDN Software Defined Networking SMTP Simple Mail Transfer Protocol SNMP Simple Network Management Protocol SSH Secure Shell SSO Stateful Switchover STP Spanning Tree Protocol TCP Transmission Control Protocol UDP User Datagram Protocol VLAN Virtual LAN VOIP Voice over IP VPN Virtual Private Network VRRP Virtual Router Redundancy Protocol VSL Virtual Switch Link VSS Virtual Switching System
Chapter 1 Introduction This chapter introduces the context, motivation and problem of this dissertation project, providing a global overview of its structure as well. 1.1 Context This thesis project was proposed by Professor João Neves and it falls under the programme of the Master’s Degree in Electrical and Computer Engineering of the Faculdade de Engenharia da Universidade do Porto (FEUP). 1.2 Motivation With the development of data networks, the world started to rely more on them. We use them in our homes, companies, hospitals, almost everywhere. Because of this we need them to be reliable, available and easy to manage, since a simple 2 minutes down time could cause a loss of millions of Euro to some companies or in case of a medical facility it could endanger human lives. To help prevent such unwanted sceneries, there are certain configurations and protocols that can be implemented on a network, normally known as adding redundancy to a network. This allows the creation of additional paths in the network that can be used when a disorder occurs, be it a device failure or a broken link. Redundancy in some cases can also increase the bandwidth of certain paths improving performance. 1.3 Purpose and Objectives The problem of this project is the study of the balance between network redundancy and its increased management complexity. With this problem in mind the objectives for this project are the following: • Study of redundancy solutions for a enterprise sized network. 1
2Introduction • Establishment of a reliable enterprise sized network. • Study of services to provide on the network. The desired network resembles the one presented on figure 1.1, consisting of a core layer, composed of two switches, supporting a distribution layer that connects to the access layer, that provides connectivity to the user terminals and the rest of the equipments. Figure 1.1: A L2/L3 network[1, p.8] 1.4 Document Structure This document is arranged in 6 chapters. As stated before, this chapter describes the context, motivation of this project and its objectives. The second chapter begins with a description of network redundancy and management and then presents technologies and protocols that can be used to increase network redundancy and simplify its management. The third chapter describes some of the possible solutions to the problem at hand. The forth chapter describes the implementation of the chosen solution. The fifth chapter describes the tests performed to validate the solution implemented and to assert the reliability of the network. The sixth chapter is a brief conclusion. Lastly we have the appendixes, in appendix one the necessary configurations (to activate Cisco Virtual Switching System and for the implementation) are presented and in appendix two we have some of the python scripts used.
Chapter 2 State of the Art This chapter will introduce some important concepts and some of the possible protocols and technologies to help solve this problem, focusing on those using Cisco equipment since it is the one available for this project. 2.1 Important Concepts In order to properly find a solution some important concepts are needed. In this first section the concepts of network redundancy and management are introduced so that proper solutions can be researched. 2.1.1 Network Redundancy Network redundancy is the installation of additional or alternate instances of network devices, equipment and communication mediums. This process helps to ensure network availability in case of a network device or path failure and unavailability. As such, it provides a means of network failover. Network redundancy is primarily implemented in enterprise network infrastructure to provide a redundant source of network communications. It serves as a backup mechanism for quickly swapping network operations onto redundant infrastructure in the event of unplanned network outages. Typically, network designs achieve redundancy through the addition of alternate network paths, in this manner, through redundant standby router at the third layer of the Open Systems Interconnection (OSI) model and backup switches at layer 2. When the primary path is unavailable, the alternate path can be instantly deployed to ensure minimal downtime and continuity of network services. 3
10 State of the Art BGP is a very robust and scalable routing protocol, as evidenced by the fact that it is the routing protocol employed on the Internet. To achieve scalability at this level, BGP uses many route parameters, to define routing policies and maintain a stable routing environment. BGP neighbours exchange full routing information when the TCP connection between neighbours is first established. When changes to the routing table are detected, the BGP routers send to their neighbours only those routes that have changed. BGP routers do not send periodic routing updates, and BGP routing updates advertise only the optimal path to a destination network. 2.5 Link Aggregation Link Aggregation refers to various methods of combining multiple physical connections in parallel to increase the throughput of a point-to-point connection and/or to provide link redundancy. There are several standards when it comes to Link Aggregation, one of them is vendor independent like the Link Aggregation Control Protocol, but there are proprietary solutions, for example EtherChannel from Cisco. Link aggregation can work in various modes, having only one link active while the others stay as backups, rotate the active link so no link is used more that a certain time or using load balancing to divide the traffic between all the links aggregated which improves the throughput to almost the number of links aggregated times their speed. In the case of 8 aggregated links which is the limit of aggregated links, we can have connections up to 800Mbits/s in case of 10Mbits/s links, 8Gbit/s in case of 1Gbits/s links or 80Gbits/s in case of 10Gbits/s links. So far the only solution for multichassis link aggregation is the Multichassis EtherChannel developed by Cisco and only available on Cisco’s Virtual Switching System. 2.6 Stackable Switches A stackable switch works like any other switch when operating on standalone, but can be set to operate together with one or more switches, becoming a stack. During the initial configuration of a stack it receives an IP address for the whole stack which simplifies the management of the switches, since the system administrator can control the whole stack from a single connection. Stackable switches used in combination with link aggregation can be used to improve the resilience of the network since they permit the aggregation of links connected in different switches of the same stack.[8] Even if one of the switches fails the the rest of the stack can still work properly and with link aggregation can provide the necessary connection to other levels of the network.
2.7 Virtual Switching System (VSS) 11 2.7 Virtual Switching System (VSS) Cisco’s Virtual Switching System permits the merge of two or more physical switches into an unique logical entity. This technology grants improvements in availability, reliability, management, scalability and maintenance. The Virtual Switching System is created by logically merging two standalone Cisco Catalyst able systems. This conversion is a one-time process that requires simple configuration steps. The VSS can be seen as a single logical network entity from the network control plane and management perspectives. To neighbouring devices, the VSS appears as a single logical switch or router, due to the use of Cisco IOS Stateful Switchover technology, as well as Non-Stop Forwarding extensions to routing protocols.[9] 2.7.1 VSS Architecture Within a VSS, one chassis is designated as the active virtual switch while the other is the standby virtual switch. The control plane functions are managed by the active supervisor engine of the active virtual switch, including: • Management (Telnet, SSH, SNMP, etc) • Layer 2 protocols (STP, LACP, etc) • Layer 3 protocols (routing protocols, etc) • Software data path From the data plane perspective both switches in the VSS actively forward traffic but only the active virtual switch has the control plane active making him responsible for the management of both equipments. This is better visualized on figure 2.5. Figure 2.5: Components of a VSS.[9]
12 State of the Art 2.7.2 Virtual Switching Link (VSL) Since the VSS consists of two chassis, in order to bond them into a single logical node, special signalling and control information must be exchanged. To facilitate this information exchange, a dedicated link is used to transfer both data and control traffic between the two chassis. This link is referred to as the virtual switch link. The VSL is formed as a EtherChannel interface and can comprise of one to eight physical member ports. All the communication over the VSL is encapsulated with a virtual switch header, which is appended to the frames. This header is placed after the Ethernet preamble and directly before the layer 2 header as seen on figure 2.6. Figure 2.6: VS Header.[9] 2.7.3 High Availability VSS can provide High Availability like other solutions but it is simpler to implement. VSS takes care of all the management of the connection between the two redundant switches and automatically bonds the links from the other levels of the network using Cisco’s proprietary solution MultiChassis EtherChannels (MECs). 2.7.4 Hardware and Software requirements VSS is supported on Catalyst 6500, 4500-E and 4500-X but require specifics supervisors. For Catalyst 6500 the supervisors Sup2T or Sup720-10G are required but the Catalyst 4500-E require supervisors Sup7-E or Sup7L-E for it to be possible to create a VSS. For VSS created from Catalyst 6500 and 4500-E, there is not a need for the chassis and the installed modules to be the same, this means that we can create a VSS using a Catalyst 6506 and a Catalyst 6509 that have different modules installed. 2.8 Software Defined Networking (SDN) SDN is the physical separation of the network control plane from the forwarding plane enabling one control plane to control several devices[10].
2.9 OpenStack 13 SDN is an emerging architecture, that is dynamic and easily manageable. Today switches and routers already have their control and data planes decoupled even through they run on the same chassis, this architecture further decouples them and allow the control plane to be moved outside of the chassis to a centralized controller.[11] This controller dictates the overall network behaviour, making it easier to introduce changes in the behaviour through a software program that manually configure several equipments with a set of commands. This simplifies the management of a network making it easier to administrators to adapt the network to changes as needed.[12] To be possible to implement SDN, the network equipments need to be able to communicate with the controller, normally called the southbound SDN interface. The most common one is OpenFlow since several vendors produce OpenFlow capable equipment. the Open Networking Foundation is responsible for standardizing the OpenFlow protocol. There are several controllers with compatibility with OpenFlow, for example NOX, Floodlight and Maestro. Nox is a controller that facilitates the development of C++ and Python controllers, Floodlight is a java-based controller and Maestro focus on achieving better performance using multithreading. This architecture is shown on figure 2.7. Figure 2.7: SDN architecture. 2.9 OpenStack OpenStack is a cloud operating system that controls large pools of compute, storage, and networking resources throughout a datacenter, all managed through a dashboard. It is backed by some of the biggest companies in software development and hosting as well as individuals community members. It is managed by the OpenStack Foundation.[13] This system gives its users the ability to deploy virtual machines and other instances that can handle different tasks for managing a cloud environment quite easily. OpenStack is open source software, that means that anyone who needs to make modifications to adapt OpenStack to its needs can access the source code and do so, and freely share those changes to the community.[14]
14 State of the Art 2.9.1 Key components OpenStack is made up by several components, given its open nature anyone can add additional components to OpenStack to help it to meet their needs. However the OpenStack community has collaboratively identified nine key components that are distributed as a part of any OpenStack system and officially maintained by the OpenStack community. 2.9.1.1 Nova - Computing Nova is the primary computing engine behind OpenStack. It is a "fabric controller" which is used for deploying and managing large numbers of virtual machines and other instances to handle computing tasks. Nova can work with widely available virtualization technologies. KVM, VMware, and Xen are available choices for hypervisor technology, together with Hyper-V and Linux container technology such as LXC 2.9.1.2 Swift - Object Storage Swift is a storage system for objects and files. Rather than the traditional idea of a referring to files by their location on a disk drive, developers can instead refer to a unique identifier referring to the file or piece of information and let OpenStack decide where to store this information. Swift is redundant system responsible for ensuring data replication and integrity across the cluster. In the event of a server or hard drive failure, Swift replicates their content from other active nodes to new locations in the cluster. 2.9.1.3 Cinder - Block Storage Cinder is a block storage component, which is more analogous to the traditional notion of a computer being able to access specific locations on a disk drive. Cinder manages the creation, attaching and detaching of the block devices to servers. Block storage volumes are fully integrated into Nova and the Dashboard, allowing for cloud users to manage their own storage needs. 2.9.1.4 Neutron - Networking Neutron provides the networking capability for OpenStack. It helps to ensure that each of the components of an OpenStack deployment can communicate with each other quickly and efficiently. Neutron provides networking models for different applications or user groups. It manages IP addresses, allowing for dedicated static IP addresses or DHCP. Floating IP addresses let traffic be dynamically rerouted to any resources in the IT infrastructure, so users can redirect traffic during maintenance or in case of a failure. Users can create their own networks, control traffic, and connect servers and devices to one or more networks. Administrators can use software-defined networking (SDN) technology like
2.10 Python 15 OpenFlow to support high levels of multi-tenancy and massive scale. Neutron provides an extension framework that can deploy and manage additional network services such as intrusion detection systems (IDS), load balancing, firewalls, and virtual private networks (VPN). 2.9.1.5 Horizon - Dashboard Horizon is the dashboard behind OpenStack. It is the only graphical interface to OpenStack, so for users wanting to give OpenStack a try, this may be the first component they actually “see” Developers can access all of the components of OpenStack individually through an application programming interface (API), but the dashboard provides to the system administrators a look at what is going on in the cloud and allow them to manage it as needed. 2.9.1.6 Keystone - Identity Service Keystone provides identity services for OpenStack. It is essentially a central list of all of the users of the OpenStack cloud mapped against all of the services provided by the cloud and the users permission. It provides multiple means of access, meaning developers can easily map their existing user access methods against Keystone. 2.9.1.7 Glance - Image Service Glance provides image (virtual copies of hard disks) services to OpenStack. Glance allows these images to be used as templates when deploying new virtual machine instances. 2.9.1.8 Ceilometer - Telemetry Ceilometer provides telemetry services, which allow the cloud to provide billing services to individual users of the cloud. It also keeps a verifiable count of each user’s system usage of each of the various components of an OpenStack cloud. 2.9.1.9 Heat - Orchestration Heat is the orchestration component of OpenStack, which allows developers to store the requirements of a cloud application in a file that defines what resources are necessary for that application. In this way, it helps to manage the infrastructure needed for a cloud service to run. 2.10 Python Python is an interpreted, interactive, object-oriented programming language. It combines remarkable power with very clear syntax and has many interfaces with system calls and libraries. Python is a high-level general purpose language that can be applied to many different problems, be it simple scripts to boost productivity or more complex applications capable of working with internet
16 State of the Art protocols such as HTTP, FTP and SMTP or operating directly on the system interfaces like file systems or TCP/IP sockets [15]. Python has a wide variety of third-party extensions like Paramiko an implementation of the SSH2 protocol that let us send commands though a SSH session[16] or ciscoconfparse a library which parses through Cisco IOS style configurations. Using some of the available libraries we can create scripts to automate equipment configurations and or monitor our network. For this effect exists a library called Netmiko that enhances the library previously refereed Paramiko, providing us with functions to connect to a network equipment through SSH and send commands to configure or view information about the connected equipment. Other libraries enhance the Simple Network Management Protocol (SNMP) functionalities of Python letting us send SNMP requests to get information on the equipment or to alter its configuration.
Chapter 3 Solutions This chapter introduces the possible solution to establish a reliable enterprise sized network and a brief comparison between them. 3.1 Problem Analyses This project introduces some of the main problems around networks in this era. With the necessity for reliable and available connection to content like servers or data storages, it is required to implement certain precautions to ensure that the levels of performance and availability required are met. These requirements bring us several problems, like how to ensure the redundancy of a key network device or a specific link. Generally this is achieved by duplicating the desired device and its connections and adding the relevant connections between them. For example a core switch should be duplicated so that even if one of the switches fails there is always one active to provide connectivity, as shown on figure 3.1. Figure 3.1: Network equipment duplication. 17
18 Solutions However this brings another problem that is the difficulty to manage the network with all the additional components. This requires certain protocols and/or technologies that smooth the management and control of a more complex network. 3.2 Possible Solutions There are several ways to add and manage the redundancy of a network. We describe two different solutions on this chapter: one solution that works with equipment from any manufacturer and one another that relies on Cisco’s proprietary technology. 3.2.1 General Solution First we have the general solution. This solution is manufacturer independent, it uses standard protocols and does not require any technology available to a specific company. Those conditions make this the most used solution, easier to implement, due to the vast amount of information available. This solution manages the redundancy of the network using some of the protocols and technologies referred in the previous chapter such as: Spanning Tree, Redundancy and Routing Protocols and Link aggregation. This technologies combined with the correct duplication of the key network equipments, enable the creation of a reliable and stable network that can sustain equipment and link failures. Considering an enterprise sized network, we will have a duplication of the Core and Distribution switches and/or routers. When we do this we require the protocols mentioned before to manage the increased number of equipment and links, so we use Spanning Tree Protocol to ensure that we do not end up with loops in our network. However in order to reach connectivity with the outside we need another layer of equipment above the core switches, normally we have at least one border router connected to the core layer, this requires us to manage how they communicate with each other. In order to manage the default gateway of the hosts we set up a Redundancy Protocol on the core layer so that we distribute a single IP address to the hosts. But we still have the problem of how the core layers communicates with the border routers, at this point a routing protocol is required to distribute the routes of the border routers to the core layer so that when a request is sent from a host and one of the core equipments receives that request, it knows where to forward that request to. Another precaution we can take is to make use of the link aggregation technology to ensure that the links between our equipment are reliable, not only from the point of view of performance but also from the point of view of failover. In general this will be our setup for a possible solution, as we can see in more detail in figure 3.2, we have STP on the Distribution and Core layers, a FHRP on the Core layer, Link aggregation between our equipment and a Routing protocol running between the Core layer and the Border routers.
3.2 Possible Solutions 19 Figure 3.2: Protocols per Layer. 3.2.1.1 Advantages and disadvantages The main advantage of this solution is that it works with any manufacturer’s equipment, making it possible to implement in almost every scenery that we may encounter. Other advantage is that its quite simple to implement and we can encounter a lot of information about the technologies involved on the internet or in books. The main disadvantage is that this solution may be difficult to manage given the size that the network may have. Certain protocols used on this solution were not designed with the goal of redundancy in mind, like the case of STP that was designed to prevent loops, this makes this solution not optimized as we desire, given that the protocols may take more time that we want to recover. 3.2.2 Virtual Switching System Virtual Switching System Cisco’s Proprietary solution to simplify the management of a redundant network. This technology was created with the goal of optimizing the behaviour of a network where redundancy is desired. The VSS enables the merge of two Cisco Catalyst 6500 or 4500 series switches, making it seem like a single logical unit. This allow us to remove some of the protocols needed on the previous solution such as the FHRP used on the core layer. VSS takes care of much of the management of the corresponding layer. It optimizes the management of link aggregation by enabling the creation of Multichassis Etherchannels which opens new possibilities. VSS also reduces the use of Spanning Tree since some of the links that were blocked by it are now used to create MECs that use them to improve the throughput. Figure 4.2 presents us with the characteristics of a network with the core and distribution layer composed of a VSS.
26 Implementation VRRP was the redundancy protocol enabled, during the implementation, on the GigabitEthernet 0/1 interfaces of Core 1 and 2 with VRRP group 1 and the virtual IP address 10.0.0.254. The hosts connected to our network would use this IP address as their default Gateway. At this point our network was established but some configurations were still amiss that will be presented ahead. Now for the configuration of the fictitious ISPs, the remaining routers were used to establish two autonomous systems simulating two different ISPs. Since this two routers only have 2 interfaces available it was required to create virtual interfaces to meet our design. Each router is connected to one of the Border routers and to another extra switch. This switch has four Vlans, two of them are the ISPs own networks (Vlan 22 and 33), another is the vlan that connects the ISP routers to the NETLAB network to simulate internet access (Vlan 44) and a vlan that is used to manage this switch (Vlan 2) that connects to our network with the IP address 10.0.0.30. The IP addresses given to the ISP routers interfaces can be visualized on table 4.5. Table 4.5: ISP Routers interfaces IP addresses Router interface IP address ISP 1 Gigabit 0/0.1 10.22.22.59 Gigabit 0/0.2 172.16.1.59 Gigabit 0/1 10.2.2.2 ISP 2 Gigabit 0/0.1 10.33.33.69 Gigabit 0/0.2 172.16.1.69 Gigabit 0/1 10.3.3.2 At this point all the equipment used was configured with the exception of BGP and Network Address Translation (NAT) that will be presented now. At this point all used equipment was configured without BGP and Network Address Translation (NAT). BGP was configured on all the routers, the Core and Border Routers were configured as AS 10, ISP 1 as AS 50 and ISP 2 as AS 60. The Core routers advertised the 10.0.0.0 and the 10.10.10.0 sub network and had the Border routers configured as neighbours. The Border routers advertised the 10.10.10.0 and the sub network that was used to connect to the respective ISP, in case of Border 1 10.2.2.0 and in case of Border 2 10.3.3.0, they also advertised themselves as default gateway to the Core routers, they had the respective ISP router and the Core routers as neighbours. The ISP routers advertised their respective sub networks and 172.16.1.0 and had the corresponding Border router as neighbour and the other ISP. This configuration is best verified on table 4.6. The default Gateway of the Border and ISP routers was 172.16.1.254, the IP address of the Netlab router that connects to the exterior. Having BGP enabled and configured this way enabled two different paths to the exterior. The default Gateway of the Core routers was acquired through BGP being the possible gateways the Border routers. Now to have connectivity to the exterior, NAT is needed to be configured on the layers that required it. The first NAT configured was on the Core routers this NAT converted the IP range of
4.1 Implementation 27 Table 4.6: BGP configurations Router Core 1/2 Border 1 Border 2 ISP 1 ISP2 Advertised Nerworks 10.0.0.0 10.10.10.10 10.10.10.0 10.2.2.0 10.10.10.0 10.3.3.0 10.2.2.0 10.22.22.0 172.16.1.0 10.3.3.0 10.33.33.0 172.16.1.0 Neighbours Border 3/4 Core 1/2 Border 2 ISP 1 Core 1/2 Border 1 ISP 2 Border 1 ISP 2 Border 2 ISP 1 the 10.0.0.0 network to the respective router IP on the network 10.10.10.0. The second layer of NAT was deployed on the Border routers, here the IP addresses of Core 1 and 2 were translated to the IP of the connection network between the Border and ISP routers. The Last layer of NAT was enabled on the ISP routers translating the IP address of the corresponding Border router and its own network range of IP to its IP in the 172.16.1.0 network in order to establish connectivity to the exterior. To note that each layer of NAT only allowed the translation of IP from the network hierarchically lower to the router were it was configured. The commands used to configure this network can be found in appendix A section 2. 4.1.2 Hosts configurations In order to better manage and test the network, some hosts were configured on this network. It was configured a host in each ISP with an FTP server to test the limits of the network, and four hosts on our network one of them running Nagios and MRTG to monitor the network. Nagios is a piece of software that monitors an IT infrastructure to make sure that systems and services are working properly. MRTG is another software that, using SNMP requests, analyses the network equipment bandwidth over time. The hosts were configured with the following IP address (table 4.7) and connected to the Distribution switches using the GigabitEthernet, when possible, and FastEthernet interfaces with the exception of one that was connected using a 2 ports bond. Table 4.7: Host IP addresses Host IP Network Purpose Tux-41 10.0.0.41 Home FTP server - Tests Tux-42 10.0.0.42 Home FTP server - Tests Tux-43 10.0.0.43 Home FTP server - Tests Tux-44 10.0.0.45 Home Wireshark - Tests Tux-14 10.0.0.14 Home Nagios and MRTG Tux-24 10.22.22.24 ISP 1 FTP server - Tests Tux-32 10.33.33.32 ISP 2 FTP server - Tests To create the bond we required to install the ifenslave package that enabled us to create a virtual interface, in this case Bond0, that enslaved two of the available interfaces, as shown on figure 4.3
28 Implementation Figure 4.3: Bond interface. MRTG was configured to monitor the bandwidth of all the switches and routers interfaces. Figure 4.4 shows the daily statistics of one of the routers interfaces. Figure 4.4: MRTG daily statistics. Nagios was configured to monitor all the equipments involved as shown on figure 4.5. Figure 4.5: Nagios service overview.
4.1 Implementation 29 For the hosts we configured Nagios to monitor the CPU load, latency, disk and swap usage, number of processes and the state of HTTP and SSH services as we can see in figure 4.6. Figure 4.6: Nagios Host services. For the Routers and Switches we configured Nagios to monitor the uptime and ping of each equipment as well as the bandwidth usage and the status of the most important interfaces (figure 4.7). Figure 4.7: Nagios switch services. To facilitate the tests we installed and configured vsftpd FTP server on several hosts to test the reliability of the port-channels. We enabled the anonymous user and configured the maximum tranfer rate allowed to anonymous users to 1 Gigabyte per second, in order make the equipment bandwidth the bottleneck of the network. We installed Wireshark on Tux-44 and in a personal laptop to analyse the network traffic.
30 Implementation
Chapter 5 Tests and results This chapter presents tests that were performed and its results. 5.1 Tests To fully grasp the depth of the implemented solution several tests were designed and performed. This includes the validation tests of our solution and the tests to assert the level of performance reached. 5.1.1 Validation Tests The first tests performed were to validate our implementation. The most important point was the existence of connectivity with the outside so this was the first test, verification of connectivity with the exterior. To do so we tried to ping Google’s DNS server with the IP address 8.8.8.8 with success and a traceroute to verify the desired path, as shown on figure 5.1 (for security reasons part of the traceroute is not displayed). Figure 5.1: Traceroute to 8.8.8.8. Once verified the connectivity we successfully tried to reach all hosts, figure 5.2 shows us the result of the pings to the hosts in each of the fictitious ISPs. 31
32 Tests and results Figure 5.2: Pings to the ISP hosts. At this point we were sure that all the equipments were correctly connected, which left us with the task of verifying the proper functioning of the redundancy measures implemented. To do so we disconnected the router that was serving as tux-44 gateway, during a ping request, to verify the correct functioning of the redundancy protocol in the Core routers. Figure 5.3 shows the ping request and we can see that a problem occurred between request 6 and request 18 this resulted on a loss of connectivity during approximately 11 seconds. Figure 5.3: Ping to verify redundancy. With the network validated we were ready to start the rest of the tests to analyse and compare the different technologies available. 5.1.2 Failover Time tests Certain tests to measure the time that each protocol takes to recover from a failure were performed. The procedure for each test involving a FHRP was similar, first we did a traceroute to the IP address of the virtual router created with the FHRP in question, to discover which router was forwarding packets for the virtual router, then during a ping command we disconnected that router from the rest of the network and measured the time that the protocol took to recover, calculated using the missing packets from the ping command and confirmed with Wireshark. Lastly we did another traceroute just to be sure the router forwarding packets changed. To change the redundancy protocol enabled between the tests we used some Python scripts that are included in Appendix B.
5.1 Tests 33 To test the reaction time of BGP, we did something similar to the previous tests, in the case of STP tests we shutdown the root bridge to calculate the time STP took to reconverge, in the case of BGP we did a traceroute to discover which of the border router was forwarding packets to the outside and disconnected him during a ping command. 5.1.2.1 HSRP On figure 5.4 we see that before the test the master router of our virtual router was CoreRt1 since it was the one that responded to the traceroute sent to the virtual IP address. This was the router that we disconnected during the test, and in the end of the test we can see that the Router that responds to our traceroute is CoreRt2 confirming the change of its state. Figure 5.4: HSRP reaction time. By counting the number of packets that were lost during the ping command we can get a approximated value of the reaction time of the protocol. In this case ten packets were lost and since the ping command sends request every second by default we can estimate that the delay is around 10 seconds. On figure 5.5 we can confirm that result by checking the Wireshark logs, we filtered the packets so that only Internet Control Message Protocol (ICMP) packets originated from the virtual router IP address were shown, and configured the time to show the amount of seconds since the last packet that is shown. We can see that packet 48 had a delay of 11 seconds (1 second of the normal ping delay plus the 10 seconds of delay) from the previous displayed packet confirming the value calculated before. Figure 5.5: HSRP reaction time 2. On figure 5.6 we have displayed the HSRP packets and the ICMP packets shown on the previous figure. We can see that the 11 seconds interval between packet 15 and packet 48 is the time
34 Tests and results that CoreRt2 took to detect that the other Core was not responding and changed its state to active, making him forward the packets sent to the virtual IP address. Figure 5.6: HSRP reaction time 3. 5.1.2.2 VRRP On figure 5.7 we see that the router that was forwarding the packets for the virtual router was CoreRt2, making this the router that we disconnected during the test. At the end of the test we confirmed that CoreRt1 switched to the role of master. Figure 5.7: VRRP reaction time. In this case we had 4 lost packets that translate roughly into a reaction of time of about 4 seconds. Analysing the packets from figure 5.8 where we applied the same filter as before, we see a delay of 5 seconds on packet 55 thus confirming the value estimated before. Figure 5.8: VRRP reaction time 2.
5.1 Tests 35 Figure 5.9 shows the ICMP packets sent from 10.0.0.254 and the VRRP packets, on packet 50 we see that the source of the VRRP packets change from 10.0.0.29 to 10.0.0.19, meaning that just before this packet we disconnected the CoreRt2 and CoreRt1 not receiving VRRP packets from the master for more that 3 seconds (default timer) took the role of master and started to forward the packets sent to the virtual IP address. Figure 5.9: VRRP reaction time 3. 5.1.2.3 GLBP In the case of GLBP the router that was serving our host during the tests was CoreRt1 because it was the one that the master had attributed to us, as shown on figure 5.10. We can also see a successful switch to CoreRt2. Figure 5.10: GLBP reaction time.
42 Conclusion and Future Work
Appendix A Configuration Commands This appendix contains the commands used to enable VSS and to establish the network of chapter 4. A.1 Enabling VSS In order to establish a VSS between the two Cisco Catalyst 6506 certain configuration are required. In this chapter a example configuration will be presented. Step 1: Configure virtual switch ID and domain. Both switches should be configured with the same domain but different IDs Switch 1 VSS-sw1#conf t Enter configuration commands, one per line. End with CNTL/Z. VSS-sw1(config)#switch virtual domain 100 Domain ID 100 config will take effect only after the exec command ‘switch convert mode virtual’ is issued VSS-sw1(config-vs-domain)#switch 1 VSS-sw1(config-vs-domain)# Switch 2 VSS-sw1#conf t Enter configuration commands, one per line. End with CNTL/Z. VSS-sw1(config)#switch virtual domain 100 Domain ID 100 config will take effect only after the exec command ‘switch convert mode virtual’ is issued VSS-sw1(config-vs-domain)#switch 1 VSS-sw1(config-vs-domain)# Step 2. Configure the VSL port channel and member ports. Unique port channel IDs must be chosen. VSS-sw1#conf t Enter configuration commands, one per line. End with CNTL/Z. VSS-sw1(config)#interface port-channel 1 VSS-sw1(config-if)#switch virtual link 1 VSS-sw1(config-if)#no shut VSS-sw1(config-if)# 43
44 Configuration Commands VSS-sw2#conf t Enter configuration commands, one per line. End with CNTL/Z. VSS-sw2(config)#interface port-channel 2 VSS-sw2(config-if)#switch virtual link 2 VSS-sw2(config-if)#no shut VSS-sw2(config-if)# Now the ports of each side of the VSL should be added to the respective port channel VSS-sw1(config)#interface range tenGigabitEthernet 5/4 - 5 VSS-sw1(config-if-range)#channel-group 1 mode on VSS-sw1(config-if-range)#no shut VSS-sw1(config-if-range)#^Z VSS-sw1# VSS-sw2(config)#interface range tenGigabitEthernet 5/4 - 5 VSS-sw2(config-if-range)#channel-group 2 mode on VSS-sw2(config-if-range)#no shut VSS-sw2(config-if-range)#^Z VSS-sw2# Step 3. Convert to virtual switch mode. VSS-sw1#switch convert mode virtual This command will convert all interface names to naming convention “interface-type switch-number/slot/port”, save the running config to startup-config and reload the switch. Do you want to proceed? [yes/no]: yes Converting interface names Building configuration... [OK] Saving converted configurations to bootflash ... [OK] VSS-sw2#switch convert mode virtual This command will convert all interface names to naming convention “interface-type switch-number/slot/port”, save the running config to startup-config and reload the switch. Do you want to proceed? [yes/no]: yes Converting interface names Building configuration... [OK] Saving converted configurations to bootflash ... [OK] Four actions occur when this last commands is issued: • he running configuration of the individual switch is converted into a three-level virtual switch interface notation. Two-level interface configurations (such as 10 GigabitEthernet 5/4) are converted into three-level interfaces (such as 10 GigabitEthernet 1/5/4 in Switch 1 and 10 GigabitEthernet 2/5/4 in Switch 2). • The startup configuration is updated with the three-number notation. • A copy of the original startup configuration converted to three-number notation is written to the multilayer switch feature card (MSFC) bootflash of the respective switch. • Both switches reload.
A.1 Enabling VSS 45 When the two switches are brought online, they proceed with VSL initialization and initialize their respective VSL ports. The two switches communicate with each other and determine active and standby roles. This exchange of information is evident through the following console messages: System detected Virtual Switch configuration... Interface TenGigabitEthernet 1/5/4 is member of PortChannel 1 Interface TenGigabitEthernet 1/5/5 is member of PortChannel 1 <snip> 00:00:26: %VSL_BRINGUP-6-MODULE_ UP: VSL module in slot 5 switch 1 brought up Initializing as Virtual Switch active System detected Virtual Switch configuration... Interface TenGigabitEthernet 2/5/4 is member of PortChannel 2 Interface TenGigabitEthernet 2/5/5 is member of PortChannel 2 <snip> 00:00:26: %VSL_BRINGUP-6-MODULE_ UP: VSL module in slot 5 switch 2 brought up Initializing as Virtual Switch standby After the VSL is initialized and the Cisco Virtual Switching System becomes active, you may notice that the console is active only for the active virtual switch and has been disabled for the standby virtual switch: 00:08:01: SW1_SP: Card inserted in Switch_number = 2, physical slot 3, interfaces are now online VSS > VSS>en VSS# 00:01:43: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is OFF 00:01:43: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is OFF VSS-sdby> Standby console disabled Although not required, it is possible to verify that all modules have been automatically provisioned and their module types stored in the configuration by issuing the following command on the active virtual switch: VSS#sh run | begin module provision With the following command you can determine that the Cisco Virtual Switching System is now operating and that the two switches are acting as a single, logical network node. VSS#show switch virtual Switch mode : Virtual Switch Virtual switch domain number : 100 Local switch number : 1 Local switch operational role: Virtual Switch Active Peer switch number : 2 Peer switch operational role : Virtual Switch Standby
46 Configuration Commands If the conversion process is performed using software release 12.2(33)SXI3 or newer, it is complete once the two supervisors reach the SSO Standby Hot redundancy mode. If the conversion is performed using a software release prior to 12.2(33)SXI3, there is one more critical step to perform in order to finalize the conversion. During the conversion process, the configuration of the standby virtual switch (in this case, Switch 2) is cleared, including the configuration of the two VSL interfaces on the switch. If the switch were to reload at this point it would not have the information available to determine which interfaces to use for VSL communication. Therefore the configuration for the VSL interfaces on the standby switch must be applied, or merged from the active switch configuration. In order to facilitate this information to be repopulated again, you must complete the next step. Step 4. Finalize the Virtual Switch Conversion When the standby virtual switch is in SSO hot mode, you must execute the following command to automatically configure the standby virtual switch configuration on the active virtual switch: VSS#switch accept mode virtual This command will bring in all VSL configurations from the standby switch and populate it into the running configuration. In addition the startup configurations will be updated with the new merged configurations. Do you want proceed? [yes/no]: yes Merging the standby VSL configuration. . . Building configuration... [OK] This concludes the initial configurations of the VSS. A.2 Network configuration Commands To implement the solution on FEUP Netlab several IOS commands were needed. A.2.1 Interfaces To change the between the access and trunk modes of the interfaces we use the following commands: Listings A.1: Enabling Access mode con figur e t e r m i n a l i n t e r f a c e type number switchport mode access switchport access vlan vlan end
A.2 Network configuration Commands 47 Listings A.2: Enabling Trunk mode con figur e t e r m i n a l i n t e r f a c e type number switchport mode trunk switchport t r un allowed vlan vlans end To configure the IP address of an interface we require this commands: Listings A.3: Configure interface IP address con figur e t e r m i n a l i n t e r f a c e type number ip address ip−address mask end To activate NAT on an interface we use this commands: Listings A.4: Activating Nat on an interface con figur e t e r m i n a l i n t e r f a c e type number ip nat i n s i d e | o ut si d e end To create the Etherchannels the following commands are required: Listings A.5: Creating an Etherchannel con figur e t e r m i n a l i n t e r f a c e range type numbers channel−group group id mode on end A.2.2 Spanning Tree Protocol To enable STP on the switches the following commands are required: Listings A.6: Enabling spanning tree con figur e t e r m i n a l spanning−t r e e mode pvst | mst | rapid −pvst end
48 Configuration Commands After STP is enabled certain parameter of its behaviour can be configured at will. To change the priority of a switch: Listings A.7: Changing the priority of a vlan con figur e t e r m i n a l spanning−t r e e vlan vlan−id p r i o r i t y value end A.2.3 Virtual Router Redundancy Protocol To enable VRRP: Listings A.8: Enabling VRRP con figur e t e r m i n a l i n t e r f a c e type number ip address ip−address mask vrrp group ip ip−address end To configure VRRP timers: Listings A.9: Configuring VRRP timers con figur e t e r m i n a l i n t e r f a c e type number vrrp group t im er s a d v e r t i s e [ msec ] i n t e r v a l end A.2.4 Hot Standby Redundancy Protocol To enable HSRP: Listings A.10: Enabling HSRP con figur e t e r m i n a l standby group−number ip ip−address end To configure HSRP timers: Listings A.11: configuring HSRP timers con figur e t e r m i n a l standby group−number timer s hellotime holdtime end
A.2 Network configuration Commands 49 A.2.5 Gateway Load Balancing Protocol To enable GLBP: Listings A.12: Enabling GLBP con figur e t e r m i n a l i n t e r f a c e type number ip address ip−address mask glbp group ip ip−address end To configure GLBP load balancing mode: Listings A.13: Configuring GLBP load balancing con figur e t e r m i n a l i n t e r f a c e type number glbp group load−balancing host−dependent | round−robin | weighted end To configure GLBP weight: Listings A.14: Configuring GLBP weight con figur e t e r m i n a l i n t e r f a c e type number glbp group weighting maximum [ lower lower ] [ upper upper ] end To configure GLBP timers: Listings A.15: Configuring GLBP timers con figur e t e r m i n a l i n t e r f a c e type number glbp group id time r s [ msec ] h e l l o t i m e [ msec ] holdtime end A.2.6 Network address translation To create and add IP address to an access list: Listings A.16: Configuring Access Lists con figur e t e r m i n a l access−l i s t number permit IP address end To enable NAT:
50 Configuration Commands Listings A.17: Configuring NAT con figur e t e r m i n a l ip nat pool name s t a r t −ip end−ip prefix −le ngth prefix −length ip nat i n s i d e source l i s t access −l i s t pool name overload A.2.7 Show Some commands to verify the configuration and the state of the equipment are: Show running configuration, Show Vlan, Show IP routes, Show BGP, Show GLBP, Show VRRP, Show HSRP.
Appendix B Python scripts This appendix includes the Python scripts used in the tests to change the redundancy protocols. This is the HSRP enabling script Listings B.1: HSRP activation script from netmiko import ConnectHandler from ciscoconfparse import CiscoConfParse r1 = { ’ d evi ce_ typ e ’ : ’ c i s c o _ i o s ’ , ’ ip ’ : ’ 1 0 .0 . 0 . 1 9 ’ , ’ username ’ : ’ user ’ , ’ password ’ : ’ pass ’ , } r2 = { ’ d evi ce_ typ e ’ : ’ c i s c o _ i o s ’ , ’ ip ’ : ’ 1 0 .0 . 0 . 2 9 ’ , ’ username ’ : ’ user ’ , ’ password ’ : ’ pass ’ , } router1 = ConnectHandler(** r1 ) router2 = ConnectHandler(** r2 ) config_commands = [ ’ i n t e r f a c e gi 0/1 ’ , ’no glbp 1 ip 1 0.0.0. 2 5 4 ’ , ’no glbp 1 load−balancing ’ , 51