ccna3 chapter 2 basic switch concepts and configuration

149
CCNA 3 CHAPTER 2 BASIC SWITCH CONCEPTS AND 1 AND CONFIGURATION November 2009 Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Upload: tunisie-libre

Post on 22-Aug-2014

540 views

Category:

Documents


10 download

TRANSCRIPT

Page 1: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

CCNA 3

CHAPTER 2

BASIC SWITCH CONCEPTS

AND

1

AND

CONFIGURATION

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 2: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.0.1 Chapter introduction2

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 3: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1

INTRODUCTION

TO

ETHERNET / 802.3 LANS

3

ETHERNET / 802.3 LANS

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 4: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.1.1 Key elements of Ethernet / 802.3 Networks

4

� In this topic, you will learn about key components of the Ethernet standard that play a significant role in the design and implementation of switched networks. You will explore how Ethernet communications function and how switches play a role in the communication process.

� CSMA/CD :

� Ethernet signals are transmitted to every host connected to the LAN using a special set of rules to determine which station can access the network. The set of rules that Ethernet uses is based on the IEEE carrier sense multiple access/collision detect (CSMA/CD) technology. You may recall from CCNA Exploration: Networking Fundamentals that CSMA/CD is only used with half-duplex communication typically found in hubs. Full-duplex switches do not use CSMA/CD.

� Carrier Sense :

� In the CSMA/CD access method, all network devices that have messages to send must listen before transmitting.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

transmitting.

� If a device detects a signal from another device, it waits for a specified amount of time before attempting to transmit.

� When there is no traffic detected, a device transmits its message. While this transmission is occurring, the device continues to listen for traffic or collisions on the LAN. After the message is sent, the device returns to its default listening mode.

Page 5: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.1.1 Key elements of Ethernet / 802.3 Networks

5

� Multi-access :

� If the distance between devices is such that the latency of the signals of one device means that signals are not detected by a seconddevice, the second device may also start to transmit. The media now has two devices transmitting signals at the same time. Thedevice, the second device may also start to transmit. The media now has two devices transmitting signals at the same time. Themessages propagate across the media until they encounter each other. At that point, the signals mix and the messages aredestroyed, a collision has occurred. Although the messages are corrupted, the jumble of remaining signals continues to propagateacross the media.

� Collision Detection :

� When a device is in listening mode, it can detect when a collision occurs on the shared media, because all devices can detect anincrease in the amplitude of the signal above the normal level.

� When a collision occurs, the other devices in listening mode, as well as all the transmitting devices, detect the increase in the signalamplitude. Every device that is transmitting continues to transmit to ensure that all devices on the network detect the collision.

� Jam Signal and RandomBackoff :

� When a collision is detected, the transmitting devices send out a jamming signal. The jamming signal notifies the other devices of

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� When a collision is detected, the transmitting devices send out a jamming signal. The jamming signal notifies the other devices ofa collision, so that they invoke a backoff algorithm. This backoff algorithm causes all devices to stop transmitting for a randomamount of time, which allows the collision signals to subside.

� After the delay has expired on a device, the device goes back into the "listening before transmit" mode. A random backoff periodensures that the devices that were involved in the collision do not try to send traffic again at the same time, which would cause thewhole process to repeat. However, during the backoff period, a third device may transmit before either of the two involved in thecollision have a chance to re-transmit.

� Note : see the animation on the online course.

Page 6: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.1.2 Key elements of Ethernet / 802.3 Networks

6

� Ethernet Communications :

� Communications in a switched LAN network occur in three ways:

Unicast� Unicast� broadcast� multicast

� Unicast: Communication in which a frame is sent from onehost and addressed to one specific destination. In unicasttransmission, there is just one sender and one receiver. Unicasttransmission is the predominant form of transmission on LANsand within the Internet. Examples of protocols that use unicasttransmissions include HTTP, SMTP, FTP, and Telnet.

� Broadcast: Communication in which a frame is sent from oneaddress to all other addresses. In this case, there is just onesender, but the information is sent to all connected receivers.Broadcast transmission is essential when sending the samemessage to all devices on the LAN. An example of a broadcasttransmission is the address resolution query that the addressresolution protocol (ARP) sends to all computers on a LAN.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

resolution protocol (ARP) sends to all computers on a LAN.

� Multicast: Communication in which a frame is sent to aspecific group of devices or clients. Multicast transmissionclients must be members of a logical multicast group to receivethe information. An example of multicast transmission is thevideo and voice transmissions associated with a network-based,collaborative business meeting.

Page 7: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.1.2 Key elements of Ethernet / 802.3 Networks

7

� Ethernet Frame :

� The first course in our series, CCNA Exploration: NetworkingFundamentals, described the structure of the Ethernet frame indetail. To briefly review, the Ethernet frame structure addsheaders and trailers around the Layer 3 PDU to encapsulate theheaders and trailers around the Layer 3 PDU to encapsulate themessage being sent. Both the Ethernet header and trailer haveseveral sections (or fields) of information that are used by theEthernet protocol. The figure shows the structure of the currentEthernet frame standard, the revised IEEE 802.3 (Ethernet).

� Preamble and Start Frame Delimiter Fields :

� The Preamble (7 bytes) and Start Frame Delimiter (SFD) (1byte) fields are used for synchronization between the sendingand receiving devices. These first 8 bytes of the frame are usedto get the attention of the receiving nodes. Essentially, the firstfew bytes tell the receivers to get ready to receive a new frame.

� DestinationMAC Address Field :

� The Destination MAC Address field (6 bytes) is the identifier forthe intended recipient. This address is used by Layer 2 to assist

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

the intended recipient. This address is used by Layer 2 to assista device in determining if a frame is addressed to it. Theaddress in the frame is compared to the MAC address in thedevice. If there is a match, the device accepts the frame.

� Source MAC Address Field :

� The Source MAC Address field (6 bytes) identifies the frame'soriginating NIC or interface. Switches use this address to add totheir lookup tables.

Page 8: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.1.2 Key elements of Ethernet / 802.3 Networks

8

� Length/Type Field :

� The Length/Type field (2 bytes) defines the exact length of theframe's data field. This field is used later as part of the FrameCheck Sequence (FCS) to ensure that the message was receivedproperly. Only a frame length or a frame type can be enteredproperly. Only a frame length or a frame type can be enteredhere. If the purpose of the field is to designate a type, the Typefield describes which protocol is implemented. When a nodereceives a frame and the Length/Type field designates a type,the node determines which higher layer protocol is present. Ifthe two-octet value is equal to or greater than 0x0600hexadecimal or 1536 decimal, the contents of the Data Field aredecoded according to the protocol indicated; if the two-bytevalue is less than 0x0600 then the value represents the lengthof the data in the frame.

� Data and Pad Fields :

� The Data and Pad fields (46 to 1500 bytes) contain theencapsulated data from a higher layer, which is a generic Layer3 PDU, or more commonly, an IPv4 packet. All frames must beat least 64 bytes long (minimum length aides the detection ofcollisions). If a small packet is encapsulated, the Pad field isused to increase the size of the frame to the minimum size.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

used to increase the size of the frame to the minimum size.

� Frame Check Sequence Field :

� The FCS field (4 bytes) detects errors in a frame. It uses a cyclicredundancy check (CRC). The sending device includes theresults of a CRC in the FCS field of the frame. The receivingdevice receives the frame and generates a CRC to look forerrors. If the calculations match, no error has occurred. If thecalculations do not match, the frame is dropped.

Page 9: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.1.2 Key elements of Ethernet / 802.3 Networks

9

� MAC Address :

� In CCNA Exploration: Networking Fundamentals,you learned about the MAC address. An EthernetMAC address is a two-part 48-bit binary valueMAC address is a two-part 48-bit binary valueexpressed as 12 hexadecimal digits. The addressformats might be similar to

� 00-05-9A-3C-78-00� 00:05:9A:3C:78:00� 0005.9A3C.7800.

� All devices connected to an Ethernet LAN have MAC-addressed interfaces.

� The NIC uses the MAC address to determine if amessage should be passed to the upper layers forprocessing.

� The MAC address is permanently encoded into aROM chip on a NIC. This type of MAC address is

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

ROM chip on a NIC. This type of MAC address isreferred to as a burned in address (BIA). Somevendors allow local modification of the MAC address.

� The MAC address is made up of the organizationalunique identifier (OUI) and the vendor assignmentnumber.

Page 10: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.1.2 Key elements of Ethernet / 802.3 Networks

10

� Organizational Unique Identifier :

� The OUI is the first part of a MAC � The OUI is the first part of a MAC address.

� It is 24 bits long and identifies the manufacturer of the NIC card.

� The IEEE regulates the assignment of OUI numbers. Within the OUI, there are 2 bits that have meaning only when used in the destination address, as follows:

� Broadcast or multicast bit: Indicates to the receiving interface that the frame is

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

the receiving interface that the frame is destined for all or a group of end stations on the LAN segment.

� Locally administered address bit: If the vendor-assigned MAC address can be modified locally, this bit should be set.

Page 11: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.1.2 Key elements of Ethernet / 802.3 Networks

11

� Vendor Assignment Number :

� The vendor-assigned part of theMAC address is 24 bits long anduniquely identifies the Ethernethardware.

� It can be a BIA or modified bysoftware indicated by the local bit.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 12: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.1.3 Key elements of Ethernet / 802.3 Networks

12

� Duplex Settings

� There are two types of duplex settings used for communicationson an Ethernet network: half duplex and full duplex. Thefigure shows the two duplex settings available on modernnetwork equipment.network equipment.

� Half Duplex:

� Half-duplex communication relies on unidirectional data flowwhere sending and receiving data are not performed at thesame time. This is similar to how walkie-talkies or two-wayradios function in that only one person can talk at any one time.If someone talks while someone else is already speaking, acollision occurs. As a result, half-duplex communicationimplements CSMA/CD to help reduce the potential forcollisions and detect them when they do happen. Half-duplexcommunications have performance issues due to the constantwaiting, because data can only flow in one direction at a time.Half-duplex connections are typically seen in older hardware,such as hubs. Nodes that are attached to hubs that share theirconnection to a switch port must operate in half-duplex modebecause the end computers must be able to detect collisions.Nodes can operate in a half-duplex mode if the NIC card cannot

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Nodes can operate in a half-duplex mode if the NIC card cannotbe configured for full duplex operations. In this case the port onthe switch defaults to a half-duplex mode as well. Because ofthese limitations, full-duplex communication has replaced halfduplex in more current hardware.

Page 13: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.1.3 Key elements of Ethernet / 802.3 Networks

13

� Full Duplex:

� In full-duplex communication, data flow isbidirectional, so data can be sent and received at thesame time. The bidirectional support enhancessame time. The bidirectional support enhancesperformance by reducing the wait time betweentransmissions. Most Ethernet, Fast Ethernet, andGigabit Ethernet NICs sold today offer full-duplexcapability. In full-duplex mode, the collision detectcircuit is disabled. Frames sent by the two connectedend nodes cannot collide because the end nodes usetwo separate circuits in the network cable. Each full-duplex connection uses only one port. Full-duplexconnections require a switch that supports fullduplex or a direct connection between two nodes thateach support full duplex. Nodes that are directlyattached to a dedicated switch port with NICs thatsupport full duplex should be connected to switchports that are configured to operate in full-duplexmode.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

mode.

� Standard, shared hub-based Ethernet configurationefficiency is typically rated at 50 to 60 percent of the10-Mb/s bandwidth. Full-duplex Fast Ethernet,compared to 10-Mb/s bandwidth, offers 100 percentefficiency in both directions (100-Mb/s transmit and100-Mb/s receive).

Page 14: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.1.4 Key elements of Ethernet / 802.3 Networks

14

� Switch Port Settings :

� A port on a switch needs to be configured with duplex settingsthat match the media type. Later in this chapter, you willconfigure duplex settings. The Cisco Catalyst switches have threesettings:settings:

� The auto option sets autonegotiation of duplex mode. Withautonegotiation enabled, the two ports communicate to decide thebest mode of operation.

� The full option sets full-duplexmode.� The half option sets half-duplexmode.

� For Fast Ethernet and 10/100/1000 ports, the default is auto.For 100BASE-FX ports, the default is full. The 10/100/1000ports operate in either half- or full-duplex mode when they areset to 10 or 100 Mb/s, but when set to 1,000 Mb/s, they operateonly in full-duplex mode.

� Note: Autonegotiation can produce unpredictable results. Bydefault, when autonegotiation fails, the Catalyst switch sets thecorresponding switch port to half-duplex mode. This type of

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

corresponding switch port to half-duplex mode. This type offailure happens when an attached device does not supportautonegotiation. If the device is manually configured to operatein half-duplex mode, it matches the default mode of the switch.However, autonegotiation errors can happen if the device ismanually configured to operate in full-duplex mode. Having half-duplex on one end and full-duplex on the other causes latecollision errors at the half-duplex end. To avoid this situation,manually set the duplex parameters of the switch to match theattached device. If the switch port is in full-duplex mode and theattached device is in half-duplex mode, check for FCS errors onthe switch full-duplex port.

Page 15: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.1.4 Key elements of Ethernet / 802.3 Networks

15

� Auto-MDIX

� Connections between specific devices, such asswitch-to-switch or switch-to-router, once requiredthe use of certain cable types (cross-over, straight-the use of certain cable types (cross-over, straight-through). Instead, you can now use the mdix autointerface configuration command in the CLI toenable the automatic medium-dependent interfacecrossover (auto-MDIX) feature.

� When the auto-MDIX feature is enabled, the switchdetects the required cable type for copper Ethernetconnections and configures the interfacesaccordingly. Therefore, you can use either acrossover or a straight-through cable for connectionsto a copper 10/100/1000 port on the switch,regardless of the type of device on the other end ofthe connection.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� The auto-MDIX feature is enabled by default onswitches running Cisco IOS Release 12.2(18)SE orlater. For releases between Cisco IOS Release12.1(14)EA1 and 12.2(18)SE, the auto-MDIX featureis disabled by default.

Page 16: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.1.5 Key elements of Ethernet / 802.3 Networks

16

� MAC Addressing and Switch MAC Address Tables :

� Switches use MAC addresses to direct network communications through theirswitch fabric to the appropriate port toward the destination node. The switchfabric is the integrated circuits and the accompanying machine programmingthat allows the data paths through the switch to be controlled. For a switch toknow which port to use to transmit a unicast frame, it must first learn whichnodes exist on each of its ports.nodes exist on each of its ports.

� A switch determines how to handle incoming data frames by using its MACaddress table. A switch builds its MAC address table by recording the MACaddresses of the nodes connected to each of its ports. Once a MAC address for aspecific node on a specific port is recorded in the address table, the switch thenknows to send traffic destined for that specific node out the port mapped to thatnode for subsequent transmissions.

� When an incoming data frame is received by a switch and the destination MACaddress is not in the table, the switch forwards the frame out all ports, exceptfor the port on which it was received (flooding). When the destination noderesponds, the switch records the node's MAC address in the address table fromthe frame's source address field. In networks with multiple interconnectedswitches, the MAC address tables record multiple MAC addresses for the portsconnecting the switches which reflect the node's beyond. Typically, switch portsused to interconnect two switches have multiple MAC addresses recorded in theMAC address table.

� The following describes this process:

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� Step 1. The switch receives a broadcast frame from PC 1 on Port 1.

� Step 2. The switch enters the source MAC address and the switch port thatreceived the frame into the address table.

Page 17: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.1.5 Key elements of Ethernet / 802.3 Networks

17

� Step 3. Because the destinationaddress is a broadcast, the switchaddress is a broadcast, the switchfloods the frame to all ports, exceptthe port on which it received theframe.

� Step 4. The destination devicereplies to the broadcast with aunicast frame addressed to PC 1.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 18: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.1.5 Key elements of Ethernet / 802.3 Networks

18

� Step 5. The switch enters the sourceMAC address of PC 2 and the portMAC address of PC 2 and the portnumber of the switch port that receivedthe frame into the address table. Thedestination address of the frame and itsassociated port is found in the MACaddress table.

� Step 6. The switch can now forwardframes between source and destinationdevices without flooding, because it has

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

devices without flooding, because it hasentries in the address table that identifythe associated ports.

Page 19: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.2.1 Design considerations for Ethernet 802.3 Networks

19

� In this topic, you will learn about the Ethernet designguidelines needed for interpreting hierarchical network designsfor small and medium-sized businesses. This topic focuses onbroadcast and collision domains and how they affect LANdesigns.

� Bandwidth and Throughput :

� A major disadvantage of Ethernet 802.3 networks is collisions.Collisions occur when two hosts transmit framessimultaneously. When a collision occurs, the transmittedframes are corrupted or destroyed. The sending hosts stopsending further transmissions for a random period, based onthe Ethernet 802.3 rules of CSMA/CD.

� Because Ethernet has no way of controlling which node will betransmitting at any time, we know that collisions will occurwhen more than one node attempts to gain access to thenetwork. Ethernet's resolution for collisions does not occurinstantaneously. Also, a node involved in a collision cannotstart transmitting until the matter is resolved. As more devicesare added to the shared media the likelihood of collisionsincreases. Because of this, it is important to understand thatwhen stating the bandwidth of the Ethernet network is 10

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

when stating the bandwidth of the Ethernet network is 10Mb/s, full bandwidth for transmission is available only afterany collisions have been resolved. The net throughput of theport (the average data that is effectively transmitted) will beconsiderably reduced as a function of how many other nodeswant to use the network. A hub offers no mechanisms to eithereliminate or reduce these collisions and the availablebandwidth that any one node has to transmit is correspondinglyreduced. As a result, the number of nodes sharing theEthernet network will have effect on the throughput orproductivity of the network. The bandwidth is dividedbetween all the hosts on the hub.

Page 20: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.2.1 Design considerations for Ethernet 802.3 Networks

20� Collision Domains

� When expanding an Ethernet LAN to accommodate more userswith more bandwidth requirements, the potential for collisionsincreases. To reduce the number of nodes on a given networksegment, you can create separate physical network segments,called collision domains.called collision domains.

� The network area where frames originate and collide is calledthe collision domain. All shared media environments, such asthose created by using hubs, are collision domains. When a hostis connected to a switch port, the switch creates a dedicatedconnection. This connection is considered an individualcollision domain, because traffic is kept separate from all othertraffic, thereby eliminating the potential for a collision. Thefigure shows unique collision domains in a switchedenvironment. For example, if a 12-port switch has a deviceconnected to each port, 12 collision domains are created.

� As you now know, a switch builds a MAC address table bylearning the MAC addresses of the hosts that are connected toeach switch port. When two connected hosts want tocommunicate with each other, the switch uses the switchingtable to establish a connection between the ports. The circuit ismaintained until the session is terminated. In the figure, Host A

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

maintained until the session is terminated. In the figure, Host Aand Host B want to communicate with each other. The switchcreates the connection that is referred to as a microsegment.The microsegment behaves as if the network has only twohosts, one host sending and one receiving, providing maximumutilization of the available bandwidth.

� Switches reduce collisions and improve bandwidth use onnetwork segments because they provide dedicated bandwidthto each network segment.

Page 21: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.2.2 Design considerations for Ethernet 802.3 Networks

21� Broadcast Domains :

� Although switches filter most frames based on MAC addresses,they do not filter broadcast frames. For other switches on theLAN to get broadcasted frames, broadcast frames must beforwarded by switches. A collection of interconnected switchesforms a single broadcast domain. Only a Layer 3 entity,forms a single broadcast domain. Only a Layer 3 entity,such as a router, or a virtual LAN (VLAN), can stop aLayer 3 broadcast domain. Routers and VLANs are used tosegment both collision and broadcast domains. The use ofVLANs to segment broadcast domains will be discussed in thenext chapter.

� When a device wants to send out a Layer 2 broadcast, thedestination MAC address in the frame is set to all ones. Bysetting the destination to this value, all the devices accept andprocess the broadcasted frame (FFFF.FFFF.FFFF).

� The broadcast domain at Layer 2 is referred to as the MACbroadcast domain. The MAC broadcast domain consists of alldevices on the LAN that receive frame broadcasts by a host toall other machines on the LAN. This is shown in the first half ofthe animation.

When a switch receives a broadcast frame, it forwards the

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� When a switch receives a broadcast frame, it forwards theframe to each of its ports, except the incoming port where theswitch received the broadcast frame. Each attached devicerecognizes the broadcast frame and processes it. This leads toreduced network efficiency, because bandwidth is used topropagate the broadcast traffic.

� When two switches are connected, the broadcast domain isincreased. In this example, a broadcast frame is forwarded to allconnected ports on switch S1. Switch S1 is connected to switchS2. The frame is propagated to all devices connected to switchS2. This is shown in the second half of the animation.

Page 22: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.2.3 Design considerations for Ethernet 802.3 Networks

22

� Network Latency :

� Latency is the time a frame or a packet takes to travelfrom the source station to the final destination. Usersof network-based applications experience latencyof network-based applications experience latencywhen they have to wait many minutes to access datastored in a data center or when a website takes manyminutes to load in a browser. Latency has at leastthree sources.

� First, there is the time it takes the source NIC to placevoltage pulses on the wire, and the time it takes thedestination NIC to interpret these pulses. This issometimes called NIC delay, typically around 1microsecond for a 10BASE-T NIC.

� Second, there is the actual propagation delay as the signaltakes time to travel through the cable. Typically, this isabout 0.556 microseconds per 100 m for Cat 5 UTP.Longer cable and slower nominal velocity of propagation(NVP) result in more propagation delay.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

(NVP) result in more propagation delay.

� Third, latency is added based on network devices that arein the path between two devices. These are either Layer 1,Layer 2, or Layer 3 devices. These three contributors tolatency can be discerned from the animation as the frametraverses the network.

Page 23: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.2.3 Design considerations for Ethernet 802.3 Networks

23

� Latency does not depend solely on distance and number ofdevices. For example, if three properly configured switchesseparate two computers, the computers may experience lesslatency than if two properly configured routers separated them.This is because routers conduct more complex and time-intensive functions. For example, a router must analyze Layer 3data, while switches just analyze the Layer 2 data. Since Layer 2intensive functions. For example, a router must analyze Layer 3data, while switches just analyze the Layer 2 data. Since Layer 2data is present earlier in the frame structure than the Layer 3data, switches can process the frame more quickly. Switchesalso support the high transmission rates of voice, video, anddata networks by employing application-specific integratedcircuits (ASIC) to provide hardware support for manynetworking tasks. Additional switch features such as port-basedmemory buffering, port level QoS, and congestionmanagement, also help to reduce network latency.

� Switch-based latency may also be due to oversubscribed switchfabric. Many entry-level switches do not have enough internalthroughput to manage full bandwidth capabilities on all portssimultaneously. The switch needs to be able to manage theamount of peak data expected on the network. As the switchingtechnology improves, the latency through the switch is nolonger the issue. The predominant cause of network latency in aswitched LAN is more a function of the media beingtransmitted, routing protocols used, and types of applications

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

transmitted, routing protocols used, and types of applicationsrunning on the network

Page 24: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.2.4 Design considerations for Ethernet 802.3 Networks

24

� Network Congestion :

� The primary reason for segmenting a LAN intosmaller parts is to isolate traffic and to achieve betteruse of bandwidth per user. Without segmentation, ause of bandwidth per user. Without segmentation, aLAN quickly becomes clogged with traffic andcollisions. The figure shows a network that is subjectto congestion by multiple node devices on a hub-based network.

� These are the most common causes of networkcongestion:

� Increasingly powerful computer and network technologies.Today, CPUs, buses, and peripherals are much faster andmore powerful than those used in early LANs, thereforethey can send more data at higher rates through thenetwork, and they can process more data at higher rates.

� Increasing volume of network traffic. Network traffic isnow more common because remote resources are

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

now more common because remote resources arenecessary to carry out basic work. Additionally, broadcastmessages, such as address resolution queries sent out byARP, can adversely affect end-station and networkperformance.

� High-bandwidth applications. Software applications arebecoming richer in their functionality and are requiringmore and more bandwidth. Desktop publishing,engineering design, video on demand (VoD), electroniclearning (e-learning), and streaming video all requireconsiderable processing power and speed.

Page 25: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.2.5 Design considerations for Ethernet 802.3 Networks

25

� LAN Segmentation :

� LANs are segmented into a number of smallercollision and broadcast domains using routers andswitches. Previously, bridges were used, but this typeswitches. Previously, bridges were used, but this typeof network equipment is rarely seen in a modernswitched LAN. The figure shows the routers andswitches segmenting a LAN.

� In the figure the network is segmented into two collision domains using the switch.

� However, the broadcast domain, in the figure spans the entire network.

� Bridges and Switches :

� Although bridges and switches share many

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� Although bridges and switches share manyattributes, several distinctions differentiate thesetechnologies. Bridges are generally used to segment aLAN into a couple of smaller segments. Switches aregenerally used to segment a large LAN into manysmaller segments. Bridges have only a few ports forLAN connectivity, whereas switches have many.

Page 26: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.2.5 Design considerations for Ethernet 802.3 Networks

26

� Routers :

� Even though the LAN switch reduces the sizeof collision domains, all hosts connected toof collision domains, all hosts connected tothe switch are still in the same broadcastdomain. Because routers do not forwardbroadcast traffic by default, they can be usedto create broadcast domains. Creatingadditional, smaller broadcast domains with arouter reduces broadcast traffic and providesmore available bandwidth for unicastcommunications. Each router interfaceconnects to a separate network,containing broadcast traffic within theLAN segment in which it originated.

� Click the Controlled Collision and Broadcast

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� Click the Controlled Collision and BroadcastDomain button to see the effect ofintroducing routers and more switches intothe network.

Page 27: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.3.1 Lan design considerations27

� Controlling Network Latency :

� When designing a network to reduce latency, youneed to consider the latency caused by each device onthe network. Switches can introduce latency on athe network. Switches can introduce latency on anetwork when oversubscribed on a busy network.For example, if a core level switch has to support 48ports, each one capable of running at 1000 Mb/s fullduplex, the switch should support around 96 Gb/sinternal throughput if it is to maintain full wirespeedacross all ports simultaneously. In this example, thethroughput requirements stated are typical of core-level switches, not of access-level switches.

� The use of higher layer devices can also increaselatency on a network. When a Layer 3 device, such asa router, needs to examine the Layer 3 addressinginformation contained within the frame, it must readfurther into the frame than a Layer 2 device, whichcreates a longer processing time. Limiting the use of

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

creates a longer processing time. Limiting the use ofhigher layer devices can help reduce network latency.However, appropriate use of Layer 3 devices helpsprevent contention from broadcast traffic in a largebroadcast domain or the high collision rate in a largecollision domain.

Page 28: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.3.1 Lan design considerations28

� Removing Bottlenecks :

� Bottlenecks on a network are places where high networkcongestion results in slow performance.

In this figure which shows six computers connected to a switch,� In this figure which shows six computers connected to a switch,a single server is also connected to the same switch. Eachworkstation and the server are all connected using a 1000 Mb/sNIC. What happens when all six computers try to access theserver at the same time? Does each workstation get 1000 Mb/sdedicated access to the server? No, all the computers have toshare the 1000 Mb/s connection that the server has to theswitch. Cumulatively, the computers are capable of 6000 Mb/sto the switch. If each connection was used at full capacity, eachcomputer would be able to use only 167 Mb/s, one-sixth of the1000 Mb/s bandwidth. To reduce the bottleneck to the server,additional network cards can be installed, which increases thetotal bandwidth the server is capable of receiving. The figureshows five NIC cards in the server and approximately five timesthe bandwidth. The same logic applies to network topologies.When switches with multiple nodes are interconnected by asingle 1000 Mb/s connection, a bottleneck is created at thissingle interconnect.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� Higher capacity links (for example, upgrading from 100 Mb/sto 1000 Mb/s connections) and using multiple links leveraginglink aggregation technologies (for example, combining twolinks as if they were one to double a connection's capacity) canhelp to reduce the bottlenecks created by inter-switch links androuter links. Although configuring link aggregation is outsidethe scope of this course, it is important to consider a device'scapabilities when assessing a network's needs. How many portsand of what speed is the device capable of? What is the internalthroughput of the device? Can it handle the anticipated trafficloads considering its placement in the network?

Page 29: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.3.2 Lan design considerations29

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 30: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.3.2 Lan design considerations30

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 31: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.3.2 Lan design considerations31

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 32: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.3.2 Lan design considerations32

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 33: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.3.2 Lan design considerations33

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 34: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.3.2 Lan design considerations34

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 35: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.3.2 Lan design considerations35

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 36: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.3.2 Lan design considerations36

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 37: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.3.2 Lan design considerations37

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 38: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.3.2 Lan design considerations38

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 39: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.3.2 Lan design considerations39

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 40: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.3.2 Lan design considerations40

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 41: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.3.2 Lan design considerations41

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 42: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.3.2 Lan design considerations42

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 43: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.3.2 Lan design considerations43

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 44: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.3.2 Lan design considerations44

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 45: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.1.3.2 Lan design considerations45

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 46: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.2 FORWARDING FRAMES USING A SWITCH

46

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 47: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.2.1 Switch forwarding methods47

� Switch Packet Forwarding Methods :

� In this topic, you will learn how switches forward Ethernetframes on a network. Switches can operate in different modesthat can have both positive and negative effects.

� In the past, switches used one of the following forwarding� In the past, switches used one of the following forwardingmethods for switching data between network ports: store-and-forward or cut-through switching. However, store-and-forwardis the sole forwarding method used on current models of CiscoCatalyst switches.

� Store-and-Forward Switching :

� In store-and-forward switching, when the switch receives theframe, it stores the data in buffers until the complete frame hasbeen received. During the storage process, the switch analyzesthe frame for information about its destination. In this process,the switch also performs an error check using the CyclicRedundancy Check (CRC) trailer portion of the Ethernet frame.

� CRC uses a mathematical formula, based on the number of bits(1s) in the frame, to determine whether the received frame hasan error. After confirming the integrity of the frame, the frame

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

an error. After confirming the integrity of the frame, the frameis forwarded out the appropriate port toward its destination.When an error is detected in a frame, the switch discards theframe. Discarding frames with errors reduces the amount ofbandwidth consumed by corrupt data. Store-and-forwardswitching is required for Quality of Service (QoS) analysis onconverged networks where frame classification for trafficprioritization is necessary. For example, voice over IP datastreams need to have priority over web-browsing traffic.

Page 48: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.2.1 Switch forwarding methods48

� Cut-through Switching :

� In cut-through switching, the switch acts upon thedata as soon as it is received, even if the transmissionis not complete. The switch buffers just enough of theis not complete. The switch buffers just enough of theframe to read the destination MAC address so that itcan determine to which port to forward the data. Thedestination MAC address is located in the first 6bytes of the frame following the preamble. Theswitch looks up the destination MAC address in itsswitching table, determines the outgoing interfaceport, and forwards the frame onto its destinationthrough the designated switch port.

� The switch does not perform any error checking onthe frame. Because the switch does not have to waitfor the entire frame to be completely buffered, andbecause the switch does not perform any errorchecking, cut-through switching is faster than store-and-forward switching. However, because the switchdoes not perform any error checking, it forwards

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

does not perform any error checking, it forwardscorrupt frames throughout the network. The corruptframes consume bandwidth while they are beingforwarded. The destination NIC eventually discardsthe corrupt frames.

Page 49: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.2.1 Switch forwarding methods49

� There are two variants of cut-through switching:

� Fast-forward switching: Fast-forward switching offers the lowest level of latency. Fast-forward switching� Fast-forward switching: Fast-forward switching offers the lowest level of latency. Fast-forward switchingimmediately forwards a packet after reading the destination address. Because fast-forward switching startsforwarding before the entire packet has been received, there may be times when packets are relayed with errors.This occurs infrequently, and the destination network adapter discards the faulty packet upon receipt. In fast-forward mode, latency is measured from the first bit received to the first bit transmitted. Fast-forward switching isthe typical cut-through method of switching.

� Fragment-free switching: In fragment-free switching, the switch stores the first 64 bytes of the frame beforeforwarding. Fragment-free switching can be viewed as a compromise between store-and-forward switching and cut-through switching. The reason fragment-free switching stores only the first 64 bytes of the frame is that mostnetwork errors and collisions occur during the first 64 bytes. Fragment-free switching tries to enhance cut-throughswitching by performing a small error check on the first 64 bytes of the frame to ensure that a collision has notoccurred before forwarding the frame. Fragment-free switching is a compromise between the high latency and highintegrity of store-and-forward switching, and the low latency and reduced integrity of cut-through switching.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� Some switches are configured to perform cut-through switching on a per-port basis until a user-defined error threshold is reached and then they automatically change to store-and-forward.When the error rate falls below the threshold, the port automatically changes back to cut-through switching.

Page 50: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.2.2 Symetric and asymetric switching50

� Symmetric and Asymmetric Switching :

� LAN switching may be classified as symmetric or asymmetricbased on the way in which bandwidth is allocated to the switchports.

� Symmetric switching provides switched connections betweenports with the same bandwidth, such as all 100 Mb/s ports orall 1000 Mb/s ports. An asymmetric LAN switch providesswitched connections between ports of unlike bandwidth, suchas a combination of 10 Mb/s, 100 Mb/s, and 1000Mb/s ports.

� Asymmetric :

� Asymmetric switching enables more bandwidth to be dedicatedto a server switch port to prevent a bottleneck. This allowssmoother traffic flows where multiple clients arecommunicating with a server at the same time. Memorybuffering is required on an asymmetric switch. For the switch tomatch the different data rates on different ports, entire framesare kept in the memory buffer and are moved to the port oneafter the other as required.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� Symmetric :

� On a symmetric switch all ports are of the same bandwidth.Symmetric switching is optimized for a reasonably distributedtraffic load, such as in a peer-to-peer desktop environment.

� A network manager must evaluate the needed amount ofbandwidth for connections between devices to accommodatethe data flow of network-based applications. Most currentswitches are asymmetric switches because this type of switchoffers the greatest flexibility.

Page 51: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.2.3 Memory buffering51

� Port Based and Shared Memory Buffering :

� As you learned in a previous topic, a switch analyzes some or all of a packetbefore it forwards it to the destination host based on the forwarding method.The switch stores the packet for the brief time in a memory buffer.

� An Ethernet switch may use a buffering technique to store frames before� An Ethernet switch may use a buffering technique to store frames beforeforwarding them. Buffering may also be used when the destination port is busydue to congestion and the switch stores the frame until it can be transmitted.The use of memory to store the data is called memory buffering. Memorybuffering is built into the hardware of the switch and, other than increasing theamount of memory available, is not configurable.

� There are two methods of memory buffering: port-based and sharedmemory :

� Port-based Memory Buffering :

� In port-based memory buffering, frames are stored in queues that are linked tospecific incoming and outgoing ports. A frame is transmitted to the outgoingport only when all the frames ahead of it in the queue have been successfullytransmitted. It is possible for a single frame to delay the transmission of all theframes in memory because of a busy destination port. This delay occurs even ifthe other frames could be transmitted to open destination ports.

� Shared Memory Buffering :

� Shared memory buffering deposits all frames into a common memory buffer

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� Shared memory buffering deposits all frames into a common memory bufferthat all the ports on the switch share. The amount of buffer memory required bya port is dynamically allocated. The frames in the buffer are linked dynamicallyto the destination port. This allows the packet to be received on one port andthen transmitted on another port, without moving it to a different queue.

� The switch keeps a map of frame to port links showing where a packet needs tobe transmitted. The map link is cleared after the frame has been successfullytransmitted. The number of frames stored in the buffer is restricted by the sizeof the entire memory buffer and not limited to a single port buffer. This permitslarger frames to be transmitted with fewer dropped frames. This is important toasymmetric switching, where frames are being exchanged between differentrate ports.

Page 52: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.2.4.1 Layer and Layer 3 switching52

� Layer 2 and Layer 3 Switching :

� A Layer 2 LAN switch performs switching andfiltering based only on the OSI Data Link layer (Layer2) MAC address. A Layer 2 switch is completely2) MAC address. A Layer 2 switch is completelytransparent to network protocols and userapplications. Recall that a Layer 2 switch builds aMAC address table that it uses to make forwardingdecisions.

� A Layer 3 switch, such as the Catalyst 3560,functions similarly to a Layer 2 switch, such as theCatalyst 2960, but instead of using only the Layer 2MAC address information for forwarding decisions, aLayer 3 switch can also use IP address information.Instead of only learning which MAC addresses areassociated with each of its ports, a Layer 3 switch canalso learn which IP addresses are associated with itsinterfaces. This allows the Layer 3 switch to directtraffic throughout the network based on IP address

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

traffic throughout the network based on IP addressinformation.

� Layer 3 switches are also capable of performingLayer 3 routing functions, reducing the need fordedicated routers on a LAN. Because Layer 3switches have specialized switching hardware, theycan typically route data as quickly as they can switch.

Page 53: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.2.4.2 Layer and Layer 3 switching53

� Layer 3 Switch and Router Comparison :

� In the previous topic, you learned that Layer 3switches examine Layer 3 information in an Ethernetpacket to make forwarding decisions. Layer 3packet to make forwarding decisions. Layer 3switches can route packets between different LANsegments similarly to dedicated routers. However,Layer 3 switches do not completely replace the needfor routers on a network.

� Routers perform additional Layer 3 services thatLayer 3 switches are not capable of performing.Routers are also capable of performing packetforwarding tasks not found on Layer 3 switches, suchas establishing remote access connections to remotenetworks and devices. Dedicated routers are moreflexible in their support of WAN interface cards(WIC), making them the preferred, and sometimesonly, choice for connecting to a WAN.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� Layer 3 switches can provide basic routing functionsin a LAN and reduce the need for dedicated routers.

Page 54: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.2.4.3 Layer and Layer 3 switching54

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 55: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.2.4.3 Layer and Layer 3 switching55

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 56: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.2.4.3 Layer and Layer 3 switching56

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 57: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.2.4.3 Layer and Layer 3 switching57

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 58: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.2.4.3 Layer and Layer 3 switching58

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 59: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.2.4.3 Layer and Layer 3 switching59

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 60: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3 SWITCH MANAGEMENT CONFIGURATION

60

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 61: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.1.1 Navigating switch Command Line Interface Modes

61

� The Command Line Interface Modes (CLI) :

� As a security feature, Cisco IOS software separated the EXEC sessions into these access levels:

� User EXEC: Allows a person to access only a limitednumber of basic monitoring commands. User EXECmode is the default mode you enter after logging in to aCisco switch from the CLI. User EXEC mode isidentified by the > prompt.

� Privileged EXEC: Allows a person to access all devicecommands, such as those used for configuration andmanagement, and can be password-protected to allow onlyauthorized users to access the device. Privileged EXECmode is identified by the # prompt.

� To change from user EXEC mode to privileged EXECmode, enter the enable command. To change from

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

mode, enter the enable command. To change fromprivileged EXEC mode to user EXEC mode, enter thedisable command. On a real network, the switchprompts for the password. Enter the correctpassword. By default, the password is not configured.

Page 62: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.1.1 Navigating switch Command Line Interface Modes

62

� Navigating Configuration Modes :

� Once you have entered privileged EXEC mode on the Ciscoswitch, you can access other configuration modes. Cisco IOSsoftware uses a hierarchy of commands in its command-modestructure. Each command mode supports specific Cisco IOSstructure. Each command mode supports specific Cisco IOScommands related to a type of operation on the device.

� There are many configuration modes. For now, you will explorehow to navigate two common configurationmodes:

� Global ConfigurationMode :

� The example starts with the switch in privileged EXEC mode.To configure global switch parameters such as the switchhostname or the switch IP address used for switch managementpurposes, use global configuration mode. To access globalconfiguration mode, enter the configure terminal commandin privileged EXEC mode. The prompt changes to(config)#.

� Interface ConfigurationMode :

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� Configuring interface-specific parameters is a common task. Toaccess interface configuration mode from global configurationmode, enter the interface<interface name> command. Theprompt changes to (config-if)#. To exit interfaceconfiguration mode, use the exit command. The promptswitches back to (config)#, letting you know that you are inglobal configuration mode. To exit global configuration mode,enter the exit command again. The prompt switches to #,signifying privileged EXECmode.

Page 63: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.1.2 Navigating switch Command Line Interface Modes

63

� GUI-based Alternatives to the CLI :

� There are a number of graphical management alternatives for managing a management alternatives for managing a Cisco switch. Using a GUI offers simplified switch management and configuration without in-depth knowledge of the Cisco CLI.

� Cisco Network Assistant :

� Cisco Network Assistant is a PC-based GUInetwork management application optimizedfor small and medium-sized LANs. You canconfigure and manage groups of switches orstandalone switches. The figure shows themanagement interface for Network Assistant.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

management interface for Network Assistant.Cisco Network Assistant is available at nocost and can be downloaded from Cisco (CCOusername/password required):

� http://www.cisco.com/en/US/prod/collateral/netmgtsw/ps6504/ps5931/product_data_sheet0900aecd8068820a.html

Page 64: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.1.2 Navigating switch Command Line Interface Modes

64

� CiscoView Application :

� The CiscoView device-management � The CiscoView device-management application displays a physical view of the switch that you can use to set configuration parameters and to view switch status and performance information. The CiscoViewapplication, purchased separately, can be a standalone application or part of a Simple Network Management Protocol (SNMP) platform. The figure shows the management interface for the CiscoView Device Manager. Learn more about CiscoView Device Manager at:

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

about CiscoView Device Manager at:

� http://www.cisco.com/en/US/products/sw/cscowork/ps4565/prod_bulletin0900aecd802948b0.html

Page 65: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.1.2 Navigating switch Command Line Interface Modes

65

� Cisco Device Manager :

� Cisco Device Manager is web-based software that is stored in the switch memory. You can use Device Manager to configure and manage switches. You can access Device Manager from anywhere in your network through a web browser. The figure shows the management interface.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 66: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.1.2 Navigating switch Command Line Interface Modes

66

� SNMP Network Management :

� You can manage switches from a SNMP-compatible management station, such as HP OpenView. The switch is able to provide comprehensive management information and provide four Remote Monitoring (RMON) groups. SNMP network management is more common in large enterprise networks.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 67: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.2.1 Using the help facility67

� Context Sensitive Help :

� The Cisco IOS CLI offers two types of help:

� Word help: If you do not remember an entire command but do remember the first few characters, enter the character sequence Word help: If you do not remember an entire command but do remember the first few characters, enter the character sequence followed by a question mark (?). Do not include a space before the question mark. A list of commands that start with the characters that you entered is displayed. For example, entering sh? returns a list of all commands that begin with the shcharacter sequence.

� Command syntax help: If you are unfamiliar with which commands are available in your current context within the Cisco IOS CLI, or if you do not know the parameters required or available to complete a given command, enter the ? command.

� When only ? is entered, a list of all available commands in the current context is displayed. If the ? command is entered after a specific command, the command arguments are displayed. If <cr> is displayed, no other arguments are needed to make the command function. Make sure to include a space before the question mark to prevent the Cisco IOS CLI from performing

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

question mark to prevent the Cisco IOS CLI from performing word help rather than command syntax help. For example, enter show ? to get a list of the command options supported by the show command.

Page 68: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.2.1 Using the help facility68

� The figure shows the Cisco help functions :

� Using the example of setting the device clock, let's see how CLI help works. If the device clock needs to be set but the clock command syntax is not known, the context-sensitive help provides a means to check the syntax.provides a means to check the syntax.

� Context-sensitive help supplies the whole command even if you enter just the first part of the command, such as cl?.

� If you enter the command clock followed by the Enter key, an error message indicates that the command is incomplete. To view the required parameters for the clock command, enter ?, preceded by a space. In the clock ? example, the help output shows that the keyword set is required after clock.

� If you now enter the command clock set, another error message appears indicating that the command is still incomplete. Now add a space and enter the ? command to display a list of command arguments that are available at that point for the given command.

� The additional arguments needed to set the clock on the device

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� The additional arguments needed to set the clock on the device are displayed: the current time using hours, minutes, and seconds. For an excellent resource on how to use the Cisco IOS CLI, visit:

� http://www.cisco.com/univercd/cc/td/doc/product/software/ios124/124cg/hcf_c/ch10/index.htm.

Page 69: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.2.2 Using the help facility69

� Console Error Messages :

� Console error messages help identify problems when an incorrect command has been entered. The figure provides example error messages, what they mean, and how to get help when they are displayed.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 70: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.3.1 Accessing the command history70

� The Command History Buffer

� When you are configuring many interfaces on a switch, you can save time retyping commands by using the Cisco IOS command history buffer. In this using the Cisco IOS command history buffer. In this topic, you will learn how to configure the command history buffer to support your configuration efforts.

� The Cisco CLI provides a history or record of commands that have been entered. This feature, called command history, is particularly useful in helping recall long or complex commands or entries.

� With the command history feature, you can complete the following tasks:

� Display the contents of the command buffer.� Set the command history buffer size.� Recall previously entered commands stored in the history

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� Recall previously entered commands stored in the history buffer. There is a buffer for each configuration mode.

� By default, command history is enabled, and the system records the last 10 command lines in its history buffer. You can use the show history command to view recently entered EXEC commands.

Page 71: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.3.2 Accessing the command history71

� Configure the Command History Buffer :

� In Cisco network products that support the � In Cisco network products that support the Cisco IOS software, command history is enabled by default, and the last 10 command lines are recorded in the history buffer.

� The command history can be disabled for the current terminal session only by using the terminal no history command in user or privileged EXEC mode. When command history is disabled, the device no longer retains any previously entered command lines.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� To revert the terminal history size back to its default value of 10 lines, enter the terminal no history size command in privileged EXEC mode. The figure provides an explanation and example of these Cisco IOS commands.

Page 72: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.4 The switch boot sequence72

� Describe the Boot Sequence :

� After a Cisco switch is turned on, it goes through the following boot sequence:

� The switch loads the boot loader software. The boot loader is a small program stored in ROM and is run when the switch is first turned on.

� The boot loader:

� Performs low-level CPU initialization. It initializes the CPU registers, which control where physical memory is mapped, the quantity of memory, and its speed.

� Performs power-on self-test (POST) for the CPU subsystem. It tests the CPU DRAM and the portion of the flash device that makes up the flash file system.

� Initializes the flash file system on the system board. � Loads a default operating system software image into memory and boots the switch.

The boot loader finds the Cisco IOS image on the switch by first looking in a directory that has the same name as the image file (excluding the .bin extension). If it does not find it there, the boot loader software searches each subdirectory before continuing the search in the original directory.

� The operating system then initializes the interfaces using the Cisco IOS commands found in the operating system configuration file, config.text, stored in the switch flash memory.

� Recovering from a System Crash :

� The boot loader also provides access into the switch if the operating system cannot be used. The boot loader has a command-line facility that provides

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

The boot loader also provides access into the switch if the operating system cannot be used. The boot loader has a command-line facility that provides access to the files stored on Flash memory before the operating system is loaded. From the boot loader command line you can enter commands to format the flash file system, reinstall the operating system software image, or recover from a lost or forgotten password.

Page 73: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.5 Prepare to configure the switch73

� Prepare to Configure the Switch :

� The initial startup of a Catalyst switch � The initial startup of a Catalyst switch requires the completion of the following steps:

� Step 1. Before starting the switch, verify the following:

� All network cable connections are secure.

� Your PC or terminal is connected to the console port.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� Your terminal emulator application, such as HyperTerminal, is running and configured correctly.

� The figure illustrates how to connect a PC to a switch using the console port.

Page 74: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.5 Prepare to configure the switch74

� The figure shows the correct configuration of HyperTerminal, which can be used to view the console of a Cisco device.

� Step 2. Attach the power cable plug to the switch power supply socket. The switch will start. Some Catalyst switches, including the Cisco Catalyst 2960 series, do not have power buttons.the Cisco Catalyst 2960 series, do not have power buttons.

� Step 3. Observe the boot sequence as follows:

� When the switch is on, the POST begins. During POST, the LEDs blink while a series of tests determine that the switch is functioning properly. When the POST has completed, the SYST LED rapidly blinks green. If the switch fails POST, the SYST LED turns amber. When a switch fails the POST test, it is necessary to repair the switch.

� Observe the Cisco IOS software output text on the console.

� The figure shows the boot process on the console of a Cisco switch.

� During the initial startup of the switch, if POST failures are

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� During the initial startup of the switch, if POST failures are detected, they are reported to the console and the switch does not start.

� If POST completes successfully, and the switch has not been configured before, you are prompted to configure the switch.

Page 75: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.6.1 Basic switch configuration75

� Management Interface Considerations :

� An access layer switch is much like a PC in that you need toconfigure an IP address, a subnet mask, and a default gateway.To manage a switch remotely using TCP/IP, you need to assignthe switch an IP address.the switch an IP address.

� In the figure, you want to manage S1 from PC1, a computer usedfor managing the network. To do this, you need to assign switchS1 an IP address. This IP address is assigned to a virtualinterface called a virtual LAN (VLAN), and then it is necessaryto ensure the VLAN is assigned to a specific port or ports on theswitch.

� The default configuration on the switch is to have themanagement of the switch controlled through VLAN 1.

� However, a best practice for basic switch configuration is tochange the management VLAN to a VLAN other than VLAN 1.The implications and reasoning behind this action areexplained in the next chapter. The figure illustrates the use ofVLAN 99 as the management VLAN; however, it is important toconsider that an interface other than VLAN 99 can be

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

consider that an interface other than VLAN 99 can beconsidered for the management interface.

� Note: You will learn more about VLANs in the next chapter.Here the focus is on providing management access to the switchusing an alternative VLAN. Some of the commands introducedhere are explained more thoroughly in the next chapter.

� For now, VLAN 99 is created and assigned an IP address. Thenthe appropriate port on switch S1 is assigned to VLAN 99. Thefigure also shows this configuration information.

Page 76: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.6.1 Basic switch configuration76

� Configure Management Interface :

� To configure an IP address and subnet maskon the management VLAN of the switch, youon the management VLAN of the switch, youmust be in VLAN interface configurationmode. Use the command interface vlan 99and enter the ip address configurationcommand. You must use the noshutdown interface configurationcommand to make this Layer 3interface operational. When you see"interface VLAN x", that refers to the Layer 3interface associated with VLAN x. Only themanagement VLAN has an interface VLANassociated with it.

� Note that a Layer 2 switch, such as the Cisco

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� Note that a Layer 2 switch, such as the CiscoCatalyst 2960, only permits a single VLANinterface to be active at a time. This meansthat the Layer 3 interface, interface VLAN 99,is active, but the Layer 3 interface, interfaceVLAN 1, is not active.

Page 77: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.6.1 Basic switch configuration77

� Configure Default Gateway :

� You need to configure the switch so that itcan forward IP packets to distant networks.can forward IP packets to distant networks.The default gateway is the mechanism fordoing this. The switch forwards IP packetswith destination IP addresses outside thelocal network to the default gateway. In thefigure, router R1 is the next-hop router. Its IPaddress is 172.17.99.1.

� To configure a default gateway for the switch,use the ip default-gateway command.Enter the IP address of the next-hop routerinterface that is directly connected to theswitch where a default gateway is beingconfigured. Make sure you save the

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

configured. Make sure you save theconfiguration running on a switch or router.Use the copy running-config startup-config command to back up yourconfiguration.

Page 78: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.6.1 Basic switch configuration78

� Verify Configuration :

� The top screen shot in the figure is an abbreviated screen output showing that VLAN 99 has been configured with an IP address and subnet mask, and Fast Ethernet port F0/18 has been assigned the VLAN 99 management interface.been assigned the VLAN 99 management interface.

� Show the IP Interfaces :

� Use the show ip interface brief to verify port operation and status. You will practice using the switchport access vlan 99 command in a hands on lab and a Packet Tracer activity.

� The mdix auto Command :

� You used to be required to use certain cable types (cross-over,straight-through) when connecting between specific devices,switch-to-switch or switch-to-router. Instead, you can now usethe mdix auto interface configuration command in the CLI toenable the automatic medium-dependent interface crossover(auto-MDIX) feature.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� When the auto-MDIX feature is enabled, the switch detects therequired cable type for copper Ethernet connections andconfigures the interfaces accordingly. Therefore, you can useeither a crossover or a straight-through cable for connections toa copper 10/100/1000 port on the switch, regardless of the typeof device on the other end of the connection.

� The auto-MDIX feature was introduced in Cisco IOS Release12.2(25)FX.

Page 79: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.6.2 Basic switch configuration79

� Configure Duplex and Speed :

� You can use the duplex interfaceconfiguration command to specify theduplex mode of operation for switch ports.

� You can manually set the duplex modeand speed of switch ports to avoid inter-vendor issues with autonegotiation.Although there can be issues when youconfigure switch port duplex settings toauto, in this example, S1 and S2 switches

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

auto, in this example, S1 and S2 switcheshave the same duplex settings and speeds.The figure describes the steps to configurethe port F0/1 on the S1 switch.

Page 80: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.6.3 Basic switch configuration80

� Configure a Web Interface :

� Modern Cisco switches have a number of web-basedconfiguration tools that require that the switch is configured asan HTTP server. These applications include the Cisco webbrowser user interface, Cisco Router and Security Devicebrowser user interface, Cisco Router and Security DeviceManager (SDM), and IP Phone and Cisco IOS TelephonyService applications.

� To control who can access the HTTP services on the switch, youcan optionally configure authentication. Authenticationmethods can be complex. You may have so many people usingthe HTTP services that you require a separate server specificallyto handle user authentication. AAA and TACACS authenticationmodes are examples that use this type of remote authenticationmethod. AAA and TACACS are authentication protocols thatcan be used in networks to validate user credentials. You mayneed to have a less complex authentication method. The enablemethod requires users to use the server's enable password. Thelocal authentication method requires the user to use the loginusername, password, and privilege level access combinationspecified in the local system configuration (by the usernameglobal configuration command).

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� For more information on TACACS, visit: http://www.cisco.com/en/US/tech/tk583/tk642/tsd_technology_support_sub-protocol_home.html.

� For more information on AAA, visit: http://www.cisco.com/en/US/products/ps6638/products_data_sheet09186a00804fe332.html.

Page 81: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.6.4 Basic switch configuration81

� Managing the MAC Address Table :

� Switches use MAC address tables to determine how to forwardtraffic between ports. These MAC tables include dynamic andstatic addresses. The figure shows a sample MAC address tablefrom the output of the show mac-address-table commandfrom the output of the show mac-address-table commandthat includes static and dynamicMAC addresses.

� Note: The MAC address table was previously referred to ascontent addressable memory (CAM) or as the CAM table.

� Dynamic addresses are source MAC addresses that the switchlearns and then ages when they are not in use. You can changethe aging time setting for MAC addresses. The default time is300 seconds. Setting too short an aging time can causeaddresses to be prematurely removed from the table. Then,when the switch receives a packet for an unknown destination,it floods the packet to all ports in the same LAN (or VLAN) asthe receiving port. This unnecessary flooding can impactperformance. Setting too long an aging time can cause theaddress table to be filled with unused addresses, whichprevents new addresses from being learned. This can also causeflooding.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� The switch provides dynamic addressing by learning the sourceMAC address of each frame that it receives on each port, andthen adding the source MAC address and its associated portnumber to the MAC address table. As computers are added orremoved from the network, the switch updates the MACaddress table, adding new entries and aging out those that arecurrently not in use.

Page 82: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.6.4 Basic switch configuration82

� A network administrator can specifically assign staticMAC addresses to certain ports. Static addresses arenot aged out, and the switch always knows whichport to send out traffic destined for that specific MACaddress. As a result, there is no need to relearn oraddress. As a result, there is no need to relearn orrefresh which port the MAC address is connected to.One reason to implement static MAC addresses is toprovide the network administrator complete controlover access to the network. Only those devices thatare known to the network administrator can connectto the network.

� To create a static mapping in the MAC address table,use the mac-address-table static <MACaddress> vlan {1-4096, ALL} interfaceinterface-id command.

� To remove a static mapping in the MAC addresstable, use the no mac-address-table static <MACaddress> vlan {1-4096, ALL} interface interface-id

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

address> vlan {1-4096, ALL} interface interface-idcommand.

� The maximum size of the MAC address table varieswith different switches. For example, the Catalyst2960 series switch can store up to 8,192 MACaddresses. There are other protocols that may limitthe absolute number of MAC address available to aswitch.

Page 83: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.7 Verifying the switch configuration83

� Using the Show Commands :

� Now that you have performed the� Now that you have performed theinitial switch configuration, you shouldconfirm that the switch has beenconfigured correctly.

� When you need to verify theconfiguration of your Cisco switch, theshow command is very useful. Theshow command is executed fromprivileged EXEC mode. The figurepresents some of the key options for theshow command that verify nearly allconfigurable switch features. There are

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

show command that verify nearly allconfigurable switch features. There aremany additional show commands thatyou will learn throughout this course.

Page 84: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.7 Verifying the switch configuration84

� One of the more valuable showcommands is the show running-config command. This commanddisplays the configuration currentlydisplays the configuration currentlyrunning on the switch. Use thiscommand to verify that you havecorrectly configured the switch. Thefigure shows an abbreviated outputfrom the show running-configcommand. The three periods indicatemissing content. The figure hashighlighted screen output of the S1switch showing:

� Fast Ethernet 0/18 interface configured

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� Fast Ethernet 0/18 interface configured with the management VLAN 99

� VLAN 99 configured with an IP address of 172.17.99.11 255.255.0.0

� Default gateway set to 172.17.50.1� HTTP server configured

Page 85: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.7 Verifying the switch configuration85

� Another commonly used command isthe show interfaces command, whichdisplays status and statisticsinformation on the network interfacesinformation on the network interfacesof the switch.

� The show interfaces command isused frequently while configuring andmonitoring network devices. Recall thatyou can type partial commands at thecommand prompt and, as long as noother command option is the same, theCisco IOS software interprets thecommand correctly. For example, youcan use show int for this command. Thefigure shows the output from a show

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

figure shows the output from a showinterfaces FastEthernet 0/1 command.The first highlighted line in the figureindicates that the Fast Ethernet 0/1interface is up and running. The nexthighlighted line shows that the duplexis auto-duplex and the speed is auto-speed.

Page 86: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.8.1 Basic switch management86

� Back up and Restore Switch Configurations :

� A typical job for an apprentice network technician is to load a switch with aconfiguration.

� Backing Up the Configuration :

� You have already learned how to back up the running configuration of a switchto the startup configuration file. You have used the copy running-configstartup-config privileged EXEC command to back up the configurations youhave made so far. As you may already know, the running configuration is savedin DRAM and the startup configuration is stored in the NVRAM section of Flashmemory.

� When you issue the copy running-config startup-config command, theCisco IOS software copies the running configuration to NVRAM so that whenthe switch boots, the startup-config with your new configuration is loaded.

� You do not always want to save configuration changes you make to the runningconfiguration of a switch. For example, you might want to change theconfiguration for a short time period rather than permanently.

� If you want to maintain multiple different startup-config files on the device, youcan copy the configuration to different filenames, using the copy startup-configflash:filename command. Storing multiple startup-config versions allows you toroll back to a point in time if your configuration has problems. The figure showsthree examples of backing up the configuration to Flash memory. The first isthe formal and complete syntax. The second is the syntax commonly used. Usethe first syntax when you are unfamiliar with the network device you areworking with, and use the second syntax when you know that the destination is

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

working with, and use the second syntax when you know that the destination isthe flash NVRAM installed on the switch. The third is the syntax used to save acopy of the startup-config file in flash.

Page 87: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.8.1 Basic switch management87

� Restoring the Configuration :

� Restoring a configuration is a simple process. You just need to copy the savedconfiguration over the current configuration. For example, if you had a savedconfiguration called config.bak1, you could restore it over your existing startup-config by entering this Cisco IOS command copy flash:config.bak1 startup-config. Once the configuration has been restored to the startup-config, yourestart the switch so that it reloads the new startup configuration by using therestart the switch so that it reloads the new startup configuration by using thereload command in privileged EXEC mode.

� The reload command halts the system. If the system is set to restart on error, itreboots itself. Use the reload command after configuration information isentered into a file and saved to the startup configuration.

� Note: You cannot reload from a virtual terminal if the switch is not set up forautomatic booting. This restriction prevents the system from dropping to theROM monitor (ROMMON) and thereby taking the system out of the remoteuser's control.

� After issuing the reload command, the system prompts you to answer whetheror not to save the configuration. Normally you would indicate "yes", but in thisparticular case you need to answer "no". If you answered "yes", the file you justrestored would be overwritten. In every case you need to consider whether ornot the current running configuration is the one you want to be active afterreload.

� For more details on the reload command, review the Cisco IOS ConfigurationFundamentals Command Reference, Release 12.4 found at this website:http://www.cisco.com/en/US/docs/ios/fundamentals/command/reference/cf_book.html.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

http://www.cisco.com/en/US/docs/ios/fundamentals/command/reference/cf_book.html.

� Note: There is also the option of entering the copy startup-config running-config command. Unfortunately, this command does not entirely overwrite therunning configuration; it only adds (merge) existing commands from thestartup configuration to the running configuration. This can cause unintendedresults, so be careful when you do this.

Page 88: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.8.2 Basic switch management88

� Back up Configuration Files to a TFTP Server :

� Once you have configured your switch with all the options youwant to set, it is a good idea to back up the configuration on thenetwork where it can then be archived along with the rest ofyour network data being backed up nightly. Having theyour network data being backed up nightly. Having theconfiguration stored safely off the switch protects it in the eventthere is some major catastrophic problem with your switch.

� Some switch configurations take many hours to get workingcorrectly. If you lost the configuration because of switchhardware failure, a new switch needs to be configured. If thereis a backup configuration for the failed switch, it can be loadedquickly onto the new switch. If there is no backupconfiguration, you must configure the new switch from scratch.

� You can use TFTP to back up your configuration files over thenetwork. Cisco IOS software comes with a built-in TFTP clientthat allows you to connect to a TFTP server on your network.

� Note: There are free TFTP server software packages availableon the Internet that you can use if you do not already have aTFTP server running. One commonly used TFTP server is from

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

TFTP server running. One commonly used TFTP server is fromwww.solarwinds.com.

Page 89: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.8.2 Basic switch management89

� Backing up the Configuration :

� To upload a configuration file from a switch to a TFTP server for storage, follow these to a TFTP server for storage, follow these steps:

� Step 1. Verify that the TFTP server is running on your network.

� Step 2. Log in to the switch through the console port or a Telnet session. Enable the switch and then ping the TFTP server.

� Step 3. Upload the switch configuration to the TFTP server. Specify the IP address or hostname of the TFTP server and the

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

hostname of the TFTP server and the destination filename. The Cisco IOS command is: #copy system:running-configtftp:[[[//location]/directory]/filename] or #copy nvram:startup-configtftp:[[[//location]/directory]/filename].

Page 90: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.8.2 Basic switch management90

� Restoring the Configuration :

� Once the configuration is stored successfully on the TFTPserver, it can be copied back to the switch using the followingsteps:

� Step 1. Copy the configuration file to the appropriate TFTPdirectory on the TFTP server if it is not already there.

� Step 2. Verify that the TFTP server is running on yournetwork.

� Step 3. Log in to the switch through the console port or aTelnet session. Enable the switch and then ping the TFTPserver.

� Step 4. Download the configuration file from the TFTP server to configure the switch. Specify the IP address or hostname of the TFTP server and the name of the file to download. The Cisco IOS command is: #copy tftp:[[[//location]/directory]/filename] system:running-configor #copy tftp:[[[//location]/directory]/filename] nvram:startup-config.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

nvram:startup-config.

� If the configuration file is downloaded into the running-config,the commands are executed as the file is parsed line by line. Ifthe configuration file is downloaded into the startup-config, theswitch must be reloaded for the changes to take effect.

Page 91: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.8.3 Basic switch management91

� Clearing Configuration Information :

� You can clear the configuration information from the startup configuration. You might do this to prepare a used switch to be shipped to a customer or a different department and you want to ensure that the switch gets reconfigured. When you erase the to ensure that the switch gets reconfigured. When you erase the startup configuration file when the switch reboots, it enters the setup program so that you can reconfigure the switch with new settings.

� To clear the contents of your startup configuration, use the erase nvram: or the erase startup-config privileged EXEC command.

� Caution: You cannot restore the startup configuration file after it has been erased, so make sure that you have a backup of the configuration in case you need to restore it at a later point.

� Deleting a Stored Configuration File :

� You may have been working on a complex configuration task and stored many backup copies of your files in Flash. To delete a file from Flash memory, use the delete flash:filename

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

a file from Flash memory, use the delete flash:filenameprivileged EXEC command. Depending on the setting of the file prompt global configuration command, you might be prompted for confirmation before you delete a file. By default, the switch prompts for confirmation when deleting a file.

� Caution: You cannot restore the startup configuration file after it has been deleted, so make sure that you have a backup of the configuration in case you need to restore it at a later point.

� After the configuration has been erased or deleted, you can reload the switch to initiate a new configuration for the switch.

Page 92: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.3.8.4 Basic switch management92

� Packet Tracer activity to do :

� Basic switch management is the foundation for configuring switches. This activity focuseson navigating command-line interface modes, using help functions, accessing thecommand history, configuring boot sequence parameters, setting speed and duplexsettings, as well as managing the MAC address table and switch configuration file. Skillslearned in this activity are necessary for configuring basic switch security in laterchapters. Detailed instructions are provided within the activity as well as in the PDF linkbelow.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 93: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4 CONFIGURING SWITCHSECURITY

93

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 94: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.1.1 Configure password options94

� Configure Console Access :

� Data is very valuable and must be zealously guarded and protected. The U.S. Federal Bureau of Investigation (FBI) estimates that businesses lose Investigation (FBI) estimates that businesses lose $67.2 billion annually because of computer-related crime. Personal customer data in particular sells for very high prices. The following are some current prices for stolen data:

� Automatic teller machine (ATM) or debit card with personal identification number (PIN): $500

� Driver's license number: $150 � Social Security number: $100 � Credit card number with expiration date: $15 to $20

� Securing your switches starts with protecting them from unauthorized access.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

from unauthorized access.

� You can perform all configuration options directlyfrom the console. To access the console, you need tohave local physical access to the device. If you do notsecure the console port properly, a malicious usercould compromise the switch configuration.

Page 95: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.1.1 Configure password options95

� Secure the Console :

� To secure the console port from unauthorized access,set a password on the console port using thepassword <password> line configuration modepassword <password> line configuration modecommand.

� Use the line console 0 command to switch fromglobal configuration mode to line configurationmode for console 0, which is the console port onCisco switches. The prompt changes to (config-line)#, indicating that the switch is now in lineconfiguration mode. From line configuration mode,you can set the password for the console by enteringthe password <password> command. To ensurethat a user on the console port is required to enterthe password, use the login command. Even when apassword is defined, it is not required to be entereduntil the login command has been issued.

� The figure shows the commands used to configure

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� The figure shows the commands used to configure and require the password for console access. Recall that you can use the show running-configcommand to verify your configuration. Before you complete the switch configuration, remember to save the running configuration file to the startup configuration.

Page 96: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.1.1 Configure password options96

� Remove Console Password :

� If you need to remove the password and requirement to enter the password at login, use the following steps:steps:

� Step 1. Switch from privileged EXEC mode to global configuration mode. Enter the configure terminal command.

� Step 2. Switch from global configuration mode to line configuration mode for console 0. The command prompt (config-line)# indicates that you are in line configuration mode. Enter the command line console 0.

� Step 3. Remove the password from the console line using the no password command.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� Step 4. Remove the requirement to enter the password at login to the console line using the no login command.

� Step 5. Exit line configuration mode and return to privileged EXEC mode using the end command.

Page 97: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.1.2 Configure password options97

� Secure the vty Ports :

� The vty ports on a Cisco switch allow you to access the device remotely. You can perform all configuration options using the vty terminal ports. You do not need physical access to the switch to access the vty ports, so it is very important to secure the vty ports. Any user with network access to the switch can establish a vty remote terminal connection. If the vty ports are not properly secured, a malicious user could compromise the switch configuration.malicious user could compromise the switch configuration.

� To secure the vty ports from unauthorized access, you can set a vty password that is required before access is granted.

� To set the password on the vty ports, you must be in line configuration mode.

� There can be many vty ports available on a Cisco switch. Multiple ports permit more than one administrator to connect to and manage the switch. To secure all vty lines, make sure that a password is set and login is enforced on all lines. Leaving some lines unsecured compromises security and allows unauthorized users access to the switch.

� Use the line vty 0 4 command to switch from global configuration mode to line configuration mode for vty lines 0 through 4.

� Note: If the switch has more vty lines available, adjust the range to secure them all. For example, a Cisco 2960 has lines 0 through 15 available.

� The figure shows the commands used to configure and require the password for vty access. You can use the show running-config command to verify your

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

vty access. You can use the show running-config command to verify your configuration and the copy running-config startup config command to save your work.

Page 98: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.1.2 Configure password options98

� Remove the vty Password :

� If you need to remove the password and requirement to enter the password at login, use the following steps:steps:

� Step 1. Switch from privileged EXEC mode to global configuration mode. Enter the configure terminal command.

� Step 2. Switch from global configuration mode to line configuration mode for vty terminals 0 through 4. The command prompt (config-line)# indicates that you are in line configuration mode. Enter the command line vty 0 4.

� Step 3. Remove the password from the vty lines using the no password command.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� Caution: If no password is defined and login is still enabled, there is no access to the vty lines.

� Step 4. Remove the requirement to enter the password at login to the vty lines using the no login command.

� Step 5. Exit line configuration mode and return to privileged EXEC mode using the end command.

Page 99: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.1.3 Configure password options99

� Configure EXEC Mode Passwords :

� Privileged EXEC mode allows any user enabling that mode on a Cisco switch toconfigure any option available on the switch. You can also view all the currentlyconfigured settings on the switch, including some of the unencryptedpasswords! For these reasons, it is important to secure access to privilegedEXECmode.

� The enable password global configuration command allows you to specify apassword to restrict access to privileged EXEC mode. However, one problemwith the enable password command is that it stores the password in readabletext in the startup-config and running-config. If someone were to gain access toa stored startup-config file, or temporary access to a Telnet or console sessionthat is logged in to privileged EXEC mode, they could see the password. As aresult, Cisco introduced a new password option to control access to privilegedEXECmode that stores the password in an encrypted format.

� You can assign an encrypted form of the enable password, called the enablesecret password, by entering the enable secret command with the desiredpassword at the global configuration mode prompt. If the enable secretpassword is configured, it is used instead of the enable password, not inaddition to it. There is also a safeguard built into the Cisco IOS software thatnotifies you when setting the enable secret password to the same password thatis used for the enable password. If identical passwords are entered, the IOS willaccept the password but will warn you they are the same and instruct you to re-enter a new password.

� Remove EXECMode Password :

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� If you need to remove the password requirement to access privileged EXECmode, you can use the no enable password and the no enable secret commandsfrom global configuration mode.

Page 100: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.1.4 Configure password options100

� Configure Encrypted Passwords :

� When configuring passwords in Cisco IOS CLI, by default allpasswords, except for the enable secret password, are stored inclear text format within the startup-config and running-config.The figure shows an abbreviated screen output from the showThe figure shows an abbreviated screen output from the showrunning-config command on the S1 switch. The clear textpasswords are highlighted in orange. It is universally acceptedthat passwords should be encrypted and not stored in clear textformat. The Cisco IOS command service password-encryption enables service password encryption.

� When the service password-encryption command isentered from global configuration mode, all system passwordsare stored in an encrypted form. As soon as the command isentered, all the currently set passwords are converted toencrypted passwords. At the bottom of the figure, the encryptedpasswords are highlighted in orange.

� If you want to remove the requirement to store all systempasswords in an encrypted format, enter the no servicepassword-encryption command from global configurationmode. Removing password encryption does not convertcurrently encrypted passwords back into readable text.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

currently encrypted passwords back into readable text.However, all newly set passwords are stored in clear textformat.

� Note: The encryption standard used by the service password-encryption command is referred to as type 7. This encryptionstandard is very weak and there are easily accessible tools onthe Internet for decrypting passwords encrypted with thisstandard. Type 5 is more secure but must be invoked manuallyfor each password configured.

Page 101: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.1.5 Configure password options101

� Enable Password Recovery :

� After you set passwords to control access to the Cisco IOS CLI, you need to make sure you remember them. In case you have lost or forgotten access passwords, In case you have lost or forgotten access passwords, Cisco has a password recovery mechanism that allows administrators to gain access to their Cisco devices. The password recovery process requires physical access to the device. The figure shows a screen capture of the console display indicating that password recovery has been enabled. You will see this display after Step 3 below.

� Note that you may not be able to actually recover the passwords on the Cisco device, especially if password encryption has been enabled, but you are able to reset them to a new value.

� For more information on the password procedure,

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� For more information on the password procedure, visit:

� http://www.cisco.com/en/US/products/sw/iosswrel/ps1831/products_tech_note09186a00801746e6.shtml.

Page 102: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.1.5 Configure password options102

To recover the password on a Cisco 2960 switch, use the following steps:

Step 1. Connect a terminal or PC with terminal-emulation software to the switch console port.

Step 2. Set the line speed on the emulation software to 9600 baud.

Step 3. Power off the switch. Reconnect the power cord to the switch and within 15 seconds, press the Mode button while the System LED is still flashing green. Continue pressing the Mode button until the System LED turns briefly amber and then solid green. Then release the Mode button.

Step 4. Initialize the Flash file system using the flash_initcommand.

Step 5. Load any helper files using the load_helper command.

Step 6. Display the contents of Flash memory using the dir flash command:

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

The switch file system appears:

Directory of flash:

13 drwx 192 Mar 01 1993 22:30:48 c2960-lanbase-mz.122-25.FX11 -rwx 5825 Mar 01 1993 22:31:59 config.text18 -rwx 720 Mar 01 1993 02:21:30 vlan.dat16128000 bytes total (10003456 bytes free)

Page 103: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.1.5 Configure password options103

� Step 7. Rename the configuration file to config.text.old, which contains the password definition, using the rename flash:config.text flash:config.text.old command.

� Step 8. Boot the system with the boot command. � Step 8. Boot the system with the boot command.

� Step 9. You are prompted to start the setup program. Enter N at the prompt, and then when the system prompts whether to continue with the configuration dialog, enter N.

� Step 10. At the switch prompt, enter privileged EXEC mode using the enable command.

� Step 11. Rename the configuration file to its original name using the rename flash:config.text.old flash:config.textcommand.

� Step 12. Copy the configuration file into memory using the copy flash:config.text system:running-config command. After this command has been entered, the follow is displayed on the console:

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� Source filename [config.text]?

� Destination filename [running-config]?

� Press Return in response to the confirmation prompts. The configuration file is now reloaded, and you can change the password.

Page 104: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.1.5 Configure password options104

� Step 13. Enter global configuration mode using the configure terminal command.

Step 14. Change the password using the � Step 14. Change the password using the enable secret password command.

� Step 15. Return to privileged EXEC mode using the exit command.

� Step 16. Write the running configuration to the startup configuration file using the copy running-config startup-config command.

� Step 17. Reload the switch using the reload command.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

command.

� Note: The password recovery procedure can be different depending on the Cisco switch series, so you should refer to the product documentation before you attempt a password recovery.

Page 105: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.2.1 Login banners105

� Configure a Login Banner :

� The Cisco IOS command set includes a feature that allows you to configure messages that anyone logging onto the switch sees. These messages are called login onto the switch sees. These messages are called login banners and message of the day (MOTD) banners. In this topic, you will learn how to configure them.

� You can define a customized banner to be displayed before the username and password login prompts by using the banner login command in global configuration mode. Enclose the banner text in quotations or using a delimiter different from any character appearing in the MOTD string.

� The figure shows the S1 switch being configured with a login banner Authorized Personnel Only!

� To remove the MOTD banner, enter the no format of

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� To remove the MOTD banner, enter the no format of this command in global configuration mode, for example, S1(config)#no banner login.

Page 106: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.2.2 Login banners106

� Configure a MOTD Banner :

� The MOTD banner displays on all connectedterminals at login and is useful for sendingterminals at login and is useful for sendingmessages that affect all network users (suchas impending system shutdowns). The MOTDbanner displays before the login banner if itis configured.

� Define the MOTD banner by using the banner motd command in global configuration mode. Enclose the banner text in quotations.

� The figure shows the S1 switch being configured with a MOTD banner to display

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

configured with a MOTD banner to display Device maintenance will be occurring on Friday!

� To remove the login banner, enter the no format of this command in global configuration mode, for example S1(config)#no banner motd.

Page 107: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.3.1 Configure Telnet and SSH107

� Telnet and SSH :

� Older switches may not support securecommunication with Secure Shell (SSH). This topicwill help you choose between the Telnet and SSHwill help you choose between the Telnet and SSHmethods of communicating with a switch.

� There are two choices for remotely accessing a vty ona Cisco switch.

� Telnet is the original method that was supported on earlyCisco switch models. Telnet is a popular protocol used forterminal access because most current operating systemscome with a Telnet client built in. However, Telnet is aninsecure way of accessing a network device, because itsends all communications across the network in clear text.Using network monitoring software, an attacker can readevery keystroke that is sent between the Telnet client andthe Telnet service running on the Cisco switch. Because ofthe security concerns of the Telnet protocol, SSH hasbecome the preferred protocol for remotely accessing

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

become the preferred protocol for remotely accessingvirtual terminal lines on a Cisco device.

� SSH gives the same type of access as Telnet with the addedbenefit of security. Communication between the SSH clientand SSH server is encrypted. SSH has gone through a fewversions, with Cisco devices currently supporting bothSSHv1 and SSHv2. It is recommended that you implementSSHv2 when possible, because it uses a more enhancedsecurity encryption algorithm than SSHv1.

Page 108: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.3.2 Configure Telnet and SSH108

� Configuring Telnet :

� Telnet is the default vty-supported protocol on a Cisco switch. When a management IP address is assigned to the Cisco switch, you can connect to it using a Telnet client. Initially, the vty lines are unsecured allowing access by any user attempting to are unsecured allowing access by any user attempting to connect to them.

� In the previous topic, you learned how to secure access to the switch over the vty lines by requiring password authentication. This makes running the Telnet service a little more secure.

� Because Telnet is the default transport for the vty lines, you do not need to specify it after the initial configuration of the switch has been performed. However, if you have switched the transport protocol on the vty lines to permit only SSH, you need to enable the Telnet protocol to permit Telnet access manually.

� If you need to re-enable the Telnet protocol on a Cisco 2960 switch, use the following command from line configuration mode: (config-line)#transport input telnet or (config-line)#transport input all.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� By permitting all transport protocols, you still permit SSH access to the switch as well as Telnet access.

Page 109: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.3.3 Configure Telnet and SSH109

� Configuring SSH :

� SSH is a cryptographic security feature that is subject to exportrestrictions. To use this feature, a cryptographic image must beinstalled on your switch.

� The SSH feature has an SSH server and an SSH integratedclient, which are applications that run on the switch. You canuse any SSH client running on a PC or the Cisco SSH clientrunning on the switch to connect to a switch running the SSHserver.

� The switch supports SSHv1 or SSHv2 for the server component.The switch supports only SSHv1 for the client component.

� SSH supports the Data Encryption Standard (DES) algorithm,the Triple DES (3DES) algorithm, and password-based userauthentication. DES offers 56-bit encryption, and 3DESoffers168-bit encryption. Encryption takes time, but DES takesless time to encrypt text than 3DES. Typically, encryptionstandards are specified by the client, so if you have to configureSSH, ask which one to use. (The discussion of data encryptionmethods is beyond the scope of this course.)

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

methods is beyond the scope of this course.)

� To implement SSH, you need to generate RSA keys. RSAinvolves a public key, kept on a public RSA server, and a privatekey, kept only by the sender and receiver. The public key can beknown to everyone and is used for encrypting messages.Messages encrypted with the public key can only be decryptedusing the private key. This is known as asymmetric encryptionand will be discussed in greater detail in the Exploration:Accessing the WAN course.

Page 110: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.3.3 Configure Telnet and SSH110

� You need to generate the encrypted RSA keys using the crypto key generate rsa command.

� This procedure is required if you are configuring the switch as an SSH server. Beginning in privileged EXEC mode, follow these steps to configure a hostname and an IP domain name and to generate an RSA key pair.

� Step 1. Enter global configuration mode using the configure terminal command.

� Step 2. Configure a hostname for your switch using the hostname hostnamecommand.

� Step 3. Configure a host domain for your switch using the ip domain-name domain_name command.

� Step 4. Enable the SSH server for local and remote authentication on the switch and generate an RSA key pair using the crypto key generate rsacommand.

� When you generate RSA keys, you are prompted to enter a modulus length. Cisco recommends using a modulus size of 1024 bits. A longer modulus length might be more secure, but it takes longer to generate and to use.

� Step 5. Return to privileged EXEC mode using the end command.

� Step 6. Show the status of the SSH server on the switch using the show ip sshor show ssh command.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

or show ssh command.

� To delete the RSA key pair, use the crypto key zeroize rsa global configuration command. After the RSA key pair is deleted, the SSH server is automatically disabled.

Page 111: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.3.3 Configure Telnet and SSH111

� Configuring the SSH Server :

� Beginning in privileged EXEC mode, follow these steps to configure the SSH server.

� Step 1. Enter global configuration mode using the configure terminal command.

� Step 2. (Optional) Configure the switch to run SSHv1 or SSHv2 using the ip ssh version [1 | 2] command.

� If you do not enter this command or do not specify a keyword, the SSH server selects the latest SSH version supported by the SSH client. For example, if the SSH client supports SSHv1 and SSHv2, the SSH server selects SSHv2.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� Step 3. Configure the SSH control parameters:

� Specify the time-out value in seconds; the default is 120 seconds. The range is 0 to 120 seconds. For a SSH connect to be established, a number of phases must be completed, such as connection, protocol negotiation, and parameter negation. The time-out value applies to the amount of time the switch allows for a connection to be established.

Page 112: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.3.3 Configure Telnet and SSH112

� By default, up to five simultaneous, encrypted SSH connections for multiple CLI-based sessions over the network are available (session 0 to session 4). After the execution shell starts, the CLI-based session time-out value returns to the default of 10 minutes.

� Specify the number of times that a client can re-authenticate to the server. The default is 3; the range is 0 to 5. For example, a user can allow the SSH session to sit for more than 10 minutes three times before the SSH session is terminated.

� Repeat this step when configuring both parameters. To configure both parameters use the ip ssh {timeout seconds | authentication-retries number} command.

� Step 4. Return to privileged EXEC mode using the end command.

� Step 5. Display the status of the SSH server connections on the switch using the show ip ssh or the show ssh command.

� Step 6. (Optional) Save your entries in the configuration file

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� Step 6. (Optional) Save your entries in the configuration file using the copy running-config startup-config command.

� If you want to prevent non-SSH connections, add the transport input ssh command in line configuration mode to limit the switch to SSH connections only. Straight (non-SSH) Telnet connections are refused.

Page 113: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.4.1 Common security attacks113

� Security Attacks :

� Unfortunately, basic switch security does not stop malicious attacks from occurring. In this� Unfortunately, basic switch security does not stop malicious attacks from occurring. In thistopic, you will learn about a few common security attacks and how dangerous they are. Thistopic provides introductory level information about security attacks. The details of how some ofthese common attacks work are beyond the scope of the course. If you find network security ofinterest, you should explore the course CCNA Exploration: Accessing the WAN.

� MAC Address Flooding :

� MAC address flooding is a common attack. Recall that the MAC address table in a switchcontains the MAC addresses available on a given physical port of a switch and the associatedVLAN parameters for each. When a Layer 2 switch receives a frame, the switch looks in theMAC address table for the destination MAC address. All Catalyst switch models use a MAC

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

MAC address table for the destination MAC address. All Catalyst switch models use a MACaddress table for Layer 2 switching. As frames arrive on switch ports, the source MAC addressesare learned and recorded in the MAC address table. If an entry exists for the MAC address, theswitch forwards the frame to the MAC address port designated in the MAC address table. If theMAC address does not exist, the switch acts like a hub and forwards the frame out every otherport on the switch. MAC address table overflow attacks are sometimes referred to as MACflooding attacks. To understand the mechanism of a MAC address table overflow attack, recallthe basic operation of a switch.

Page 114: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.4.1 Common security attacks114

How MAC address table overflow attack begins ?

In the figure, host A sends traffic to host B. The switch receives the frames and looks up the destination MAC address in its MAC address table. If the switch cannot find the destination MAC in the MAC address table, the switch then copies the frame and broadcasts it out every switch port.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 115: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.4.1 Common security attacks115

� Host B receives the frame and sends a reply to host A. The switch sends a reply to host A. The switch then learns that the MAC address for host B is located on port 2 and writes that information into the MAC address table.

� Host C also receives the frame from host A to host B, but because the destination MAC address of

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

the destination MAC address of that frame is host B, host C drops that frame.

Page 116: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.4.1 Common security attacks116

� Now, any frame sent by host A (or any other host) to host B is forwarded to port 2 of the switch and not broadcast out every port.out every port.

� The key to understanding how MAC address table overflow attacks work is to know that MAC address tables are limited in size. MAC flooding makes use of this limitation to bombard the switch with fake source MAC addresses until the switch MAC address table is full. The switch then enters into what is known as a fail-open mode, starts acting as a hub, and broadcasts packets

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

acting as a hub, and broadcasts packets to all the machines on the network. As a result, the attacker can see all of the frames sent from a victim host to another host without a MAC address table entry.

Page 117: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.4.1 Common security attacks117

� The figure shows how an attacker can use the normal operating characteristics of the switch to stop the switch from operating.

� MAC flooding can be performed using a network� MAC flooding can be performed using a networkattack tool. The network intruder uses the attack toolto flood the switch with a large number of invalidsource MAC addresses until the MAC address tablefills up. When the MAC address table is full, theswitch floods all ports with incoming traffic becauseit cannot find the port number for a particular MACaddress in the MAC address table. The switch, inessence, acts like a hub.

� Some network attack tools can generate 155,000MAC entries on a switch per minute. Depending onthe switch, the maximum MAC address table sizevaries. In the figure, the attack tool is running on thehost with MAC address C in the bottom right of thescreen. This tool floods a switch with packets

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

screen. This tool floods a switch with packetscontaining randomly generated source anddestination MAC and IP addresses. Over a shortperiod of time, the MAC address table in the switchfills up until it cannot accept new entries. When theMAC address table fills up with invalid source MACaddresses, the switch begins to forward all framesthat it receives to every port.

Page 118: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.4.1 Common security attacks118

� As long as the network attack tool is left running, the MAC address table left running, the MAC address table on the switch remains full.

� When this happens, the switch begins to broadcast all received frames out every port so that frames sent from host A to host B are also broadcast out of port 3 on the switch.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 119: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.4.2 Common security attacks119

� Spoofing Attacks :

� One way an attacker can gain access to network traffic is tospoof responses that would be sent by a valid DHCP server. TheDHCP spoofing device replies to client DHCP requests. Thelegitimate server may also reply, but if the spoofing device is onlegitimate server may also reply, but if the spoofing device is onthe same segment as the client, its reply to the client may arrivefirst. The intruder DHCP reply offers an IP address andsupporting information that designates the intruder as thedefault gateway or Domain Name System (DNS) server. In thecase of a gateway, the clients then forward packets to theattacking device, which in turn, sends them to the desireddestination. This is referred to as a man-in-the-middle attack,and it may go entirely undetected as the intruder intercepts thedata flow through the network.

� You should be aware of another type of DHCP attack called aDHCP starvation attack. The attacker PC continually requestsIP addresses from a real DHCP server by changing their sourceMAC addresses. If successful, this kind of DHCP attack causesall of the leases on the real DHCP server to be allocated, thuspreventing the real users (DHCP clients) from obtaining an IPaddress.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� To prevent DHCP attacks, use the DHCP snooping and portsecurity features on the Cisco Catalyst switches.

Page 120: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.4.2 Common security attacks120

� Cisco Catalyst DHCP Snoopingand Port Security Features :

� DHCP snooping is a Cisco Catalystfeature that determines which switchports can respond to DHCP requests.

� Ports are identified as trusted anduntrusted. Trusted ports can sourceall DHCP messages; untrusted portscan source requests only. Trusted portshost a DHCP server or can be an uplinktoward the DHCP server. If a roguedevice on an untrusted port attempts tosend a DHCP response packet into thenetwork, the port is shut down. This

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

network, the port is shut down. Thisfeature can be coupled with DHCPoptions in which switch information,such as the port ID of the DHCPrequest, can be inserted into the DHCPrequest packet.

Page 121: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.4.2 Common security attacks121

� Untrusted ports are those not explicitly configured as trusted. ADHCP binding table is built for untrusted ports. Each entrycontains a client MAC address, IP address, lease time, bindingtype, VLAN number, and port ID recorded as clients makeDHCP requests. The table is then used to filter subsequentDHCP traffic. From a DHCP snooping perspective, untrustedaccess ports should not send any DHCP server responses.DHCP traffic. From a DHCP snooping perspective, untrustedaccess ports should not send any DHCP server responses.

� These steps illustrate how to configure DHCP snooping on aCisco IOS switch:

� Step 1. Enable DHCP snooping using the ip dhcp snoopingglobal configuration command.

� Step 2. Enable DHCP snooping for specific VLANs using the ipdhcp snooping vlan number [number] command.

� Step 3. Define ports as trusted or untrusted at the interfacelevel by defining the trusted ports using the ip dhcpsnooping trust command.

� Step 4. (Optional) Limit the rate at which an attacker cancontinually send bogus DHCP requests through untrusted ports

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

continually send bogus DHCP requests through untrusted portsto the DHCP server using the ip dhcp snooping limitraterate command.

Page 122: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.4.3 Common security attacks122

� CDP Attacks :

� The Cisco Discovery Protocol (CDP) is a proprietary protocolthat all Cisco devices can be configured to use. CDP discoversother Cisco devices that are directly connected, which allowsthe devices to auto-configure their connection in some cases,the devices to auto-configure their connection in some cases,simplifying configuration and connectivity. CDP messages arenot encrypted.

� By default, most Cisco routers and switches have CDP enabled.CDP information is sent in periodic broadcasts that are updatedlocally in each device's CDP database. Because CDP is a Layer 2protocol, it is not propagated by routers.

� CDP contains information about the device, such as the IPaddress, software version, platform, capabilities, and the nativeVLAN. When this information is available to an attacker, theycan use it to find exploits to attack your network, typically in theform of a Denial of Service (DoS) attack.

� The figure is a portion of an Ethereal packet trace showing theinside of a CDP packet. The Cisco IOS software versiondiscovered via CDP, in particular, would allow the attacker to

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

discovered via CDP, in particular, would allow the attacker toresearch and determine whether there were any securityvulnerabilities specific to that particular version of code. Also,because CDP is unauthenticated, an attacker could craft bogusCDP packets and have them received by the attacker's directlyconnected Cisco device.

� To address this vulnerability, it is recommended that youdisable the use of CDP on devices that do not need to use it.

Page 123: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.4.4 Common security attacks123

� Telnet Attacks :

� The Telnet protocol can be used by an attacker to gain remoteaccess to a Cisco network switch. In an earlier topic, youconfigured a login password for the vty lines and set the lines torequire password authentication to gain access. This providesrequire password authentication to gain access. This providesan essential and basic level of security to help protect the switchfrom unauthorized access. However, it is not a secure methodof securing access to the vty lines. There are tools available thatallow an attacker to launch a brute force password crackingattack against the vty lines on the switch.

� Brute Force Password Attack :

� The first phase of a brute force password attack starts with theattacker using a list of common passwords and a programdesigned to try to establish a Telnet session using each word onthe dictionary list. Luckily, you are smart enough not to use adictionary word, so you are safe for now. In the second phase ofa brute force attack, the attacker uses a program that createssequential character combinations in an attempt to "guess" thepassword. Given enough time, a brute force password attackcan crack almost all passwords used.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� The simplest thing that you can do to limit the vulnerability tobrute force password attacks is to change your passwordsfrequently and use strong passwords randomly mixing upperand lowercase letters with numerals. More advancedconfigurations allow you to limit who can communicate withthe vty lines by using access lists, but that is beyond the scopeof this course.

Page 124: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.4.4 Common security attacks124

� DoS Attack :

� Another type of Telnet attack is the DoS� Another type of Telnet attack is the DoSattack. In a DoS attack, the attackerexploits a flaw in the Telnet serversoftware running on the switch thatrenders the Telnet service unavailable.This sort of attack is mostly a nuisancebecause it prevents an administratorfrom performing switch managementfunctions.

� Vulnerabilities in the Telnet servicethat permit DoS attacks to occur areusually addressed in security patches

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

that permit DoS attacks to occur areusually addressed in security patchesthat are included in newer Cisco IOSrevisions. If you are experiencing a DoSattack against the Telnet service, or anyother service on a Cisco device, check tosee if there is a newer Cisco IOSrevision available.

Page 125: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.5.1 Security tools125

� After you have configured switch security, you needto verify that you have not left any weakness for anattacker to exploit. Network security is a complexand changing topic. In this section, you areintroduced to how network security tools are oneintroduced to how network security tools are onecomponent used to protect a network from maliciousattacks.

� Network security tools help you test your network forvarious weaknesses. They are tools that allow you toplay the roles of a hacker and a network securityanalyst. Using these tools, you can launch an attackand audit the results to determine how to adjust yoursecurity policies to prevent a given attack.

� The features used by network security tools areconstantly evolving. For example, network securitytools once focused only on the services listening onthe network and examined these services for flaws.Today, viruses and worms are able to propagate

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Today, viruses and worms are able to propagatebecause of flaws in mail clients and web browsers.Modern network security tools not only detect theremote flaws of the hosts on the network, but alsodetermine if there are application level flaws, such asmissing patches on client computers. Networksecurity extends beyond network devices, all the wayto the desktop of users. Security auditing andpenetration testing are two basic functions thatnetwork security tools perform.

Page 126: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.5.1 Security tools126

� Network Security Audit :

� Network security tools allow you to perform a security audit of your network. A security audit reveals what sort of information anattacker can gather simply by monitoring network traffic. Network security auditing tools allow you to flood the MAC table withattacker can gather simply by monitoring network traffic. Network security auditing tools allow you to flood the MAC table withbogus MAC addresses. Then you can audit the switch ports as the switch starts flooding traffic out all ports as the legitimate MACaddress mappings are aged out and replaced with more bogus MAC address mappings. In this way, you can determine which portsare compromised and have not been correctly configured to prevent this type of attack.

� Timing is an important factor in performing the audit successfully. Different switches support varying numbers of MAC addressesin their MAC table. It can be tricky to determine the ideal amount of spoofed MAC addresses to throw out on the network. You alsohave to contend with the age-out period of the MAC table. If the spoofed MAC addresses start to age out while you are performingyour network audit, valid MAC addresses start to populate the MAC table, limiting the data that you can monitor with a networkauditing tool.

� Network Penetration Testing :

� Network security tools can also be used for penetration testing against your network. This allows you to identify weaknesses withinthe configuration of your networking devices. There are numerous attacks that you can perform, and most tool suites come withextensive documentation detailing the syntax needed to execute the desired attack. Because these types of tests can have adverseeffects on the network, they are carried out under very controlled conditions, following documented procedures detailed in a

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

effects on the network, they are carried out under very controlled conditions, following documented procedures detailed in acomprehensive network security policy. Of course, if you have a small classroom-based network, you can arrange to work withyour instructor to try your own network penetration tests.

� In the next topic, you will learn how to implement port security on your Cisco switches so that you can ensure these networksecurity tests do not reveal any flaws in your security configuration.

Page 127: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.5.2 Security tools127

� Network Security Tools Features

� A secure network really is a process not a product.You cannot just enable a switch with a secureconfiguration and declare the job done. To say youhave a secure network, you need to have ahave a secure network, you need to have acomprehensive network security plan defining howto regularly verify that your network can withstandthe latest malicious network attacks. The changinglandscape of security risks means that you needauditing and penetration tools that can be updated tolook for the latest security risks. Common features ofa modern network security tool include:

� Service identification: Tools are used to target hosts usingthe Internet Assigned Numbers Authority (IANA) portnumbers. These tools should also be able to discover anFTP server running on a non-standard port or a web serverrunning on port 8080. The tool should also be able to testall the services running on a host.

� Support of SSL services: Testing services that use SSL levelsecurity, including HTTPS, SMTPS, IMAPS, and security

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

security, including HTTPS, SMTPS, IMAPS, and securitycertificate.

� Non-destructive and destructive testing: Performing non-destructive security audits on a routine basis that do notcompromise or only moderately compromise networkperformance. The tools should also let you performdestructive audits that significantly degrade networkperformance. Destructive auditing allows you to see howwell your network withstands attacks from intruders.

� Database of vulnerabilities: Vulnerabilities change all thetime.

Page 128: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.5.2 Security tools128

� Network security tools need to be designed sothey can plug in a module of code and thenrun a test for that vulnerability. In this way, alarge database of vulnerabilities can bemaintained and uploaded to the tool tolarge database of vulnerabilities can bemaintained and uploaded to the tool toensure that the most recent vulnerabilitiesare being tested.

� You can use network security tools to:

� Capture chat messages� Capture files from NFS traffic� Capture HTTP requests in Common Log Format� Capture mail messages in Berkeley mbox format� Capture passwords� Display captured URLs in browser in real time

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� Flood a switched LAN with random MACaddresses

� Forge replies to DNS address / pointer queries� Intercept packets on a switched LAN

Page 129: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.6.1 Configuring port security129

� Using Port Security to Mitigate Attacks :

� Port Security :

� A switch that does not provide port security allows an attackerto attach a system to an unused, enabled port and to perform

� A switch that does not provide port security allows an attackerto attach a system to an unused, enabled port and to performinformation gathering or attacks. A switch can be configured toact like a hub, which means that every system connected to theswitch can potentially view all network traffic passing throughthe switch to all systems connected to the switch. Thus, anattacker could collect traffic that contains usernames,passwords, or configuration information about the systems onthe network.

� All switch ports or interfaces should be secured before theswitch is deployed. Port security limits the number of validMAC addresses allowed on a port. When you assign secureMAC addresses to a secure port, the port does not forwardpackets with source addresses outside the group of definedaddresses.

� If you limit the number of secure MAC addresses to one andassign a single secure MAC address to that port, the

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

assign a single secure MAC address to that port, theworkstation attached to that port is assured the full bandwidthof the port, and only that workstation with that particularsecure MAC address can successfully connect to that switchport.

� If a port is configured as a secure port and the maximumnumber of secure MAC addresses is reached, a securityviolation occurs when the MAC address of a workstationattempting to access the port is different from any of theidentified secure MAC addresses. The figure summarizes thesepoints.

Page 130: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.6.1 Configuring port security130

� Secure MAC Address Types :

� There are a number of ways to configure port security. The following describes the ways security. The following describes the ways you can configure port security on a Cisco switch:

� Static secure MAC addresses:MAC addresses are manually configured by using the switchport port-security mac-addressmac-address interface configuration command. MAC addresses configured in this way are stored in the address table and are added to the running configuration on the switch.

� Dynamic secure MAC addresses:MAC addresses are dynamically learned and stored only in the address table. MAC addresses configured in this way are removed when the

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

configured in this way are removed when the switch restarts.

� Sticky secure MAC addresses: You can configure a port to dynamically learn MAC addresses and then save these MAC addresses to the running configuration.

Page 131: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.6.1 Configuring port security131

� Sticky MAC Addresses :

� Sticky secure MAC addresses have these characteristics:

� When you enable sticky learning on an interface by using the switchport port-security mac-address sticky interface configuration command, the interface converts all the dynamic secure MAC addresses, including those that were dynamically learned before sticky learning was enabled, to sticky secure MAC addresses and adds all sticky secure MAC addresses to the running configuration.

� If you disable sticky learning by using the no switchportport-security mac-address sticky interface configuration command, the sticky secure MAC addresses remain part of the address table but are removed from the running configuration.

� When you configure sticky secure MAC addresses by using the switchport port-security mac-address sticky mac-address interface configuration command, these addresses are added to the address table and the running configuration. If port security is disabled, the sticky secure

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

configuration. If port security is disabled, the sticky secure MAC addresses remain in the running configuration.

� If you save the sticky secure MAC addresses in the configuration file, when the switch restarts or the interface shuts down, the interface does not need to relearn these addresses. If you do not save the sticky secure addresses, they are lost.

� If you disable sticky learning and enter the switchportport-security mac-address sticky mac-address interface configuration command, an error message appears, and the sticky secure MAC address is not added to the running configuration.

Page 132: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.6.1 Configuring port security132

� Security Violation Modes :

� It is a security violation when either of these situations occurs:

� The maximum number of secure MAC addresses have been added to the address table, and a station whose MAC address is not in the address table attempts to access the interface.

� An address learned or configured on one secure interface is seen on another secure interface in the same VLAN.

� You can configure the interface for one of three violation modes, based on theaction to be taken if a violation occurs. The figure presents which kinds of datatraffic are forwarded when one of the following security violation modes areconfigured on a port:

� protect: When the number of secure MAC addresses reaches the limit allowed on the port, packets with unknown source addresses are dropped until you remove a sufficient number of secure MAC addresses or increase the number of maximum allowable addresses. You are not notified that a security violation has occurred.

� restrict: When the number of secure MAC addresses reaches the limit allowed on the port, packets with unknown source addresses are dropped until you remove a sufficient number of secure MAC addresses or increase the number of maximum allowable addresses. In this mode, you are notified that a security violation has occurred. Specifically, an SNMP trap is sent, a syslog message is logged, and the violation counter increments.

� shutdown: In this mode, a port security violation causes the interface to immediately become error-disabled and turns off the port LED. It also sends an

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

shutdown: In this mode, a port security violation causes the interface to immediately become error-disabled and turns off the port LED. It also sends an SNMP trap, logs a syslog message, and increments the violation counter. When a secure port is in the error-disabled state, you can bring it out of this state by entering the shutdown and no shutdown interface configuration commands. This is the default mode.

Page 133: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.6.2 Configuring port security133

� Configure Port Security :

� The ports on a Cisco switch are preconfigured with defaults.

� The figure shows the Cisco IOS CLI commands needed to configure port security on the Fast Ethernet F0/18 port on S1 switch. Notice that the

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

S1 switch. Notice that the example does not specify a violation mode. In this example, the violation mode is set to shutdown.

Page 134: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.6.2 Configuring port security134

� The figure shows how to enable sticky port security on Fast Ethernet port 0/18 of switch S1. As stated earlier, you can configure the maximum number of can configure the maximum number of secure MAC addresses. In this example, you can see the Cisco IOS command syntax used to set the maximum number of MAC addresses to 50. The violation mode is set to shutdown by default.

� There are other port security settings that you may find useful. For a complete listing of port security configuration options, visit:

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

configuration options, visit: http://www.cisco.com/en/US/docs/switches/lan/catalyst2960/software/release/12.2_44_se/configuration/guide/swtrafc.html

Page 135: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.6.3 Configuring port security135

� Verify Port Security :

� After you have configured port security for your switch, you want to verify that it has been configured correctly. You need to check each interface to verify that you have set the port security correctly. You also have to check to make sure that you have correctly. You also have to check to make sure that you have configured static MAC addresses correctly.

� Verify Port Security Settings :

� To display port security settings for the switch or for the specified interface, use the show port-security [interface interface-id] command.

� The output displays the following:

� Maximum allowed number of secure MAC addresses for each interface

� Number of secure MAC addresses on the interface� Number of security violations that have occurred� Violation mode

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� Verify Secure MAC Addresses :

� To display all secure MAC addresses configured on all switch interfaces or on a specified interface with aging information for each, use the show port-security [interface interface-id] address command.

Page 136: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.4.7 Securing unused ports136

� Disable Unused Ports :

� In this topic, you will learn how to use a simple Cisco IOScommand to secure unused switch ports. A simple methodmany administrators use to help secure their network fromunauthorized access is to disable all unused ports on a networkunauthorized access is to disable all unused ports on a networkswitch. For example, imagine that a Cisco 2960 switch has 24ports. If there are three Fast Ethernet connections in use, goodsecurity practice demands that you disable the 21 unused ports.The figure shows partial output for this configuration.

� It is simple to disable multiple ports on a switch. Navigate toeach unused port and issue this Cisco IOS shutdowncommand. An alternate way to shutdown multiple ports is touse the interface range command. If a port needs to beactivated, you can manually enter the no shutdown commandon that interface.

� The process of enabling and disabling ports can become atedious task, but the value in terms of enhancing security onyour network is well worth the effort.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� To do Packet Tracer activity :

� In this activity, you will configure basic switch commands andthen configure and test port security. Detailed instructions areprovided within the activity as well as in the PDF link below.

Page 137: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.5 CHAPTER LABS

137

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 138: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.5.1 Basic switch configuration138

� In this lab, you will examine and configure a standalone LAN switch. Although a switchperforms basic functions in its default out-of-the-box condition, there are a number ofparameters that a network administrator should modify to ensure a secure and optimizedLAN. This lab introduces you to the basics of switch configuration.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 139: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.5.2 Managing switch operating system and configuration files

139

� In this lab, you will create and save a basic switch configuration to a TFTP server. Youwill use a TFTP server to load a configuration to the switch and to upgrade the Cisco IOSsoftware. You will also use password recovery procedures to access a switch for which thepassword is unknown.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 140: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.5.3 Managing switch operating system and configuration files -Challenge

140

� Cable a network that is similar to the one in the topology diagram. Then, create a consoleconnection to the switch. If necessary, refer to Lab 1.3.1. The output shown in this lab isfrom a 2960 switch. If you use other switches, the switch outputs and interfacedescriptions may appear different.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 141: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.6 CHAPTER SUMMARY

141

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 142: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.6.1.1 Chapter summary142

� In this chapter, we discussed IEEE 802.3 Ethernetcommunication using unicast, broadcast, and multicast traffic.Early implementations of Ethernet networks needed to useCSMA/CD to help prevent and detect collisions between frameson the network. Duplex settings and LAN segmentationimprove performance and reduce the need for CSMA/CD.

� LAN design is a process with the intended end result adetermination of how a LAN is to be implemented. LAN designconsiderations include collision domains, broadcast domains,network latency, and LAN segmentation.

� We discussed how switch forwarding methods influence LANperformance and latency. Memory buffering plays a role inswitch forwarding, symmetric and asymmetric switching, andmultilayer switching.

� An introduction to navigating the Cisco IOS CLI on a CiscoCatalyst 2960 switch was presented. Built-in help functions areused to identify commands and command options. The CiscoIOS CLI maintains a command history that allows you to morequickly configure repetitive switch functions.

� We discussed the initial switch configuration and how to verifythe switch configuration. Backing up a switch configuration and

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

� We discussed the initial switch configuration and how to verifythe switch configuration. Backing up a switch configuration andrestoring a switch configuration are key skills for anyoneadministering a switch.

� We learned how to secure access to the switch: implementingpasswords to protect console and virtual terminal lines,implementing passwords to limit access to privileged EXECmode, configuring system-wide password encryption, andenabling SSH. There are a number of security risks common toCisco Catalyst switches, many of which are mitigated by usingport security.

Page 143: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.6.1.2 Chapter summary143

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 144: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.6.1.2 Chapter summary144

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 145: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.6.1.2 Chapter summary145

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 146: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.6.1.2 Chapter summary146

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 147: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.6.1.2 Chapter summary147

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 148: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.6.1.2 Chapter summary148

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration

Page 149: Ccna3 Chapter 2 Basic Switch Concepts and Configuration

2.6.1.3 Chapter summary149

� In this Packet Tracer Skills Integration Challenge activity, you will configure basic switchmanagement, including general maintenance commands, passwords, and port security.This activity provides you an opportunity to review previously acquired skills. Detailedinstructions are provided within the activity as well as in the PDF link below.

� Don’t forget to do the litthe quizz at the end of the online chapter.

November 2009Philippe Dastroy - IEPSA - CCNA 3 - Chapter 2 - Basic switch concepts and configuration