CCNA Questions -STP (Spanning Tree Protocol)

Started by certforumz, August 21, 2013, 04:18:24 AM

Previous topic - Next topic

certforumz

1.      What is the purpose of Spanning Tree Protocol in a switched LAN?

A.    To provide a mechanism for network monitoring in switched environments
B.    To prevent routing loops in networks with redundant paths
C.    To prevent switching loops in networks with redundant switched paths
D.    To manage the VLAN database across multiple switches
E.    To create collision domains
Answer & Explanation

Answer: Option C

Explanation:

The purpose of Spanning Tree Protocol (STP) is to prevent switching loops in networks with redundant switched paths. When there are redundant paths between switches, there is a risk of creating loops, which can result in broadcast storms and other problems. STP provides a mechanism for switches to communicate with each other and dynamically determine the best path for forwarding traffic, while also blocking redundant paths to prevent loops. This ensures that the network is reliable and stable, even in the presence of multiple paths. Option A is incorrect because network monitoring is not the purpose of STP. Option B is incorrect because routing loops are prevented by routing protocols such as OSPF and EIGRP, not STP. Option D is incorrect because managing the VLAN database is not the purpose of STP. Option E is incorrect because STP does not create collision domains. All Cisco switches have STP on by default.

2.      Which statement describes a spanning-tree network that has converged?

A.    All switch and bridge ports are in the forwarding state.
B.    All switch and bridge ports are assigned as either root or designated ports.
C.    All switch and bridge ports are in either the forwarding or blocking state.
D.    All switch and bridge ports are either blocking or looping.
Answer & Explanation

Answer: Option C

Explanation:

Convergence occurs when all ports on bridges and switches have transitioned to either the forwarding or blocking states. No data is forwarded until convergence is complete. Before data can be forwarded again, all devices must be updated.

3.      What does a switch do when a frame is received on an interface and the destination hardware address is unknown or not in the filter table?
A.    Forwards the switch to the first available link
B.    Drops the frame
C.    Floods the network with the frame looking for the device
D.    Sends back a message to the originating station asking for a name resolution

Answer & Explanation

Answer: Option C

Explanation:

Switches flood all frames that have an unknown destination address. If a device answers the frame, the switch will update the MAC address table to reflect the location of the device.

Detailed explanation:

When a switch receives a frame on an interface and the destination hardware address is unknown or not in the filter table, the switch floods the network with the frame looking for the device. This means that the switch forwards the frame out all of its other interfaces, except for the interface that received the frame, in an attempt to find the device. If the destination device is found, its hardware address is added to the filter table and future frames destined for that device will be forwarded directly to it.

Option A is incorrect because forwarding the switch to the first available link is not an appropriate action in this scenario. Option B is incorrect because dropping the frame would result in lost data and not allow for the device to be located. Option D is incorrect because switches do not have the capability to send messages asking for name resolution.


4.      In which circumstance are multiple copies of the same unicast frame likely to be transmitted in a switched LAN?

A.    During high-traffic periods
B.    After broken links are reestablished
C.    When upper-layer protocols require high reliability
D.    In an improperly implemented redundant topology

Answer & Explanation

Answer: Option D

Explanation:

If the Spanning Tree Protocol is not running on your switches and you connect them together with redundant links, you will have broadcast storms and multiple frame copies.

Detailed Explanation:

In an improperly implemented redundant topology, where multiple paths exist between switches, it is possible for multiple copies of the same unicast frame to be transmitted in a switched LAN. This is because the presence of redundant paths can result in loops, causing frames to be forwarded in a continuous loop, which can lead to broadcast storms and network congestion. Switches use Spanning Tree Protocol (STP) to prevent loops and ensure that only one active path exists between any two switches at a time. In a properly configured network, STP will block redundant paths and prevent loops, ensuring that only one copy of a frame is transmitted between switches.

Option A is incorrect because high-traffic periods would not result in multiple copies of the same unicast frame being transmitted. Option B is incorrect because after broken links are reestablished, the network should not experience multiple copies of the same unicast frame. Option C is incorrect because upper-layer protocols do not directly impact the transmission of unicast frames in a switched LAN.


5.      If you want to disable STP on a port connected to a server, which command would you use?

A.    disable spanning-tree
B.    spanning-tree off
C.    spanning-tree security
D.    spanning-tree portfast

Answer & Explanation

Answer: Option D

Explanation:

If you have a server or other devices connected into your switch that you're totally sure won't create a switching loop if STP is disabled, you can use something called portfast on these ports. Using it means the port won't spend the usual 50 seconds to come up while STP is converging.

6.      Which of the following statement is true?

A.    A switch creates a single collision domain and a single broadcast domain. A router creates a single collision domain.
B.    A switch creates separate collision domains but one broadcast domain. A router provides a separate broadcast domain.
C.    A switch creates a single collision domain and separate broadcast domains. A router provides a separate broadcast domain as well.
D.    A switch creates separate collision domains and separate broadcast domains. A router provides separate collision domains.

Answer & Explanation

Answer: Option B

Explanation:

Switches break up collision domains, and routers break up broadcast domains.

7.      You have two switches connected together with two crossover cables for redundancy, and STP is disabled. Which of the following will happen between the switches?

A.    The routing tables on the switches will not update.
B.    The MAC forward/filter table will not update on the switch.
C.    Broadcast storms will occur on the switched network.
D.    The switches will automatically load-balance between the two links.
Answer & Explanation

Answer: Option C

Explanation:

If spanning tree is disabled on a switch and you have redundant links to another switch, broadcast storms will occur, among other possible problems.

8.      Layer 2 switching provides which of the following?

   
  • Hardware-based bridging
  • Wire speed
  • Low latency
  • Low cost
(ASIC)

A.    1 and 3
B.    2 and 4
C.    1, 2 and 4
D.    All of the above

Answer & Explanation

Answer: Option D

Explanation:

Switches, unlike bridges, are hardware based. Cisco says its switches are wire speed and provide low latency, and I guess they are low cost compared to their prices in the 1990s.

9.      Your switch has a port status LED that is alternating between green and amber. What could this indicate?


A.    The port is experiencing errors.
B.    The port is shut down.
C.    The port is in STP blocking mode.
D.    Nothing; this is normal.

Answer & Explanation

Answer: Option A

Explanation:

When you connect to a switch port, at first the link lights are orange/amber, and then they turn green, indicating normal operation. If the link light is blinking, you have a problem.

10.      You want to run the new 802.1w on your switches. Which of the following would enable this protocol?

A.    Switch(config)# spanning-tree mode rapid-pvst
B.    Switch# spanning-tree mode rapid-pvst
C.    Switch(config)# spanning-tree mode 802.1w
D.    Switch# spanning-tree mode 802.1w
Answer & Explanation

Answer: Option A

Explanation:

802.1w is the also called Rapid Spanning Tree Protocol. It is not enabled by default on Cisco switches, but it is a better STP to run since it has all the fixes that the Cisco extensions provide with 802.1d.

11.      Which of the following is a layer 2 protocol used to maintain a loop-free network?


A.    VTP   
B.    STP
C.    RIP   
D.    CDP

Answer & Explanation

Answer: Option B

Explanation:

The Spanning Tree Protocol is used to stop switching loops in a switched network with redundant paths.

Detailed Explanation

B. STP (Spanning Tree Protocol) is a layer 2 protocol used to maintain a loop-free network. STP is used to prevent switching loops in networks with redundant switched paths. When there are redundant paths between switches, there is a risk of creating loops, which can result in broadcast storms and other problems. STP provides a mechanism for switches to communicate with each other and dynamically determine the best path for forwarding traffic, while also blocking redundant paths to prevent loops. This ensures that the network is reliable and stable, even in the presence of multiple paths.

Option A (VTP) is incorrect because VTP is a Cisco proprietary protocol used to manage VLAN configuration information across multiple switches. Option C (RIP) is incorrect because RIP is a layer 3 routing protocol used to share routing information between routers. Option D (CDP) is incorrect because CDP is a Cisco proprietary protocol used to share information about directly connected Cisco networking devices.

12.      You need to allow one host to be permitted to attach dynamically to each switch interface. Which two commands must you configure on your catalyst switch to meet this policy?

   
  • Switch(config-if)# ip access-group 10
  • Switch(config-if)# switchport port-security maximum 1
  • Switch(config)# access-list 10 permit ip host 1
  • Switch(config-if)# switchport port-security violation shutdown
  • Switch(config)# mac-address-table secure 
 
A.    1 and 3
B.    2 and 4
C.    2, 3 and 5
D.    4 and 5
Answer & Explanation

Answer: Option B

Explanation:

The switchport port-security is an important command, and it's super easy with the CNA; however, from the CLI, you can set the maximum number of MAC addresses allowed into the port, and then set the penalty if this maximum has been passed.

13.      What command will display the forward/filter table?

A.    show mac filter
B.    show run
C.    show mac address-table
D.    show mac filter-table
Answer & Explanation

Answer: Option C

Explanation:

The command show mac address-table displays the forward/filter table on the switch.

14.      If a switch receives a frame and the source MAC address is not in the MAC address table but the destination address is, what will the switch do with the frame?


A.    Discard it and send an error message back to the originating host
B.    Flood the network with the frame
C.    Add the source address and port to the MAC address table and forward the frame out the destination port
D.    Add the destination to the MAC address table and then forward the frame
Answer & Explanation

Answer: Option C

Explanation:

Since the source MAC address is not in the MAC address table, the switch will add the source address and the port it is connected to into the MAC address table and then forward the frame to the outgoing port.

15.      What is the result of segmenting a network with a bridge (switch)?

 
  • It increases the number of collision domains.
  • It decreases the number of collision domains.
  • It increases the number of broadcast domains.
  • It decreases the number of broadcast domains.
  • It makes smaller collision domains.
  • It makes larger collision domains.
 
A.    1 and 5
B.    2, 3 and 5
C.    3, 4 and 6
D.    1, 3 and 6

Answer & Explanation

Answer: Option A

Explanation:

Bridges break up collision domains, which would increase the number of collision domains in a network and also make smaller collision domains.

16.      What are the distinct functions of layer 2 switching that increase available bandwidth on the network?


   
  • Address learning
  • Routing
  • Forwarding and filtering
  • Creating network loops
  • Loop avoidance
  • IP addressing

A.    1, 3 and 5
B.    2, 4 and 6
C.    2 and 6
D.    3 and 5

Answer & Explanation

Answer: Option A

Explanation:

Layer 2 features include address learning, forwarding and filtering of the network, and loop avoidance.

Question 16

Which three statements about RSTP are true? (Choose three)

A. RSTP significantly reduces topology reconvening time after a link failure.
B. RSTP expands the STP port roles by adding the alternate and backup roles.
C. RSTP port states are blocking, discarding, learning, or forwarding.
D. RSTP provides a faster transition to the forwarding state on point-to-point links than STP does.
E. RSTP also uses the STP proposal-agreement sequence.
F. RSTP uses the same timer-based process as STP on point-to-point links.



Answer: A B D

Source: http://www.indiabix.com/networking/spanning-tree-protocol/009004

Practice Tests:
http://www.simulationexams.com/exam-details/ccna-200-301.htm

certforumz

#1
This task requires you to use the CLI of Sw-AC3 to answer five multiple-choice questions. This does not require any configuration.
To answer the multiple-choice questions, click on the numbered boxes in the right panel.
There are five multiple-choice questions with this task. Be sure to answer all five questions before leaving this item.
Figure (1):

Question 1:

What interface did Sw-AC3 associate with source MAC address 0010.5a0c.ffba ?

a)  Fa0/1
b)  Fa0/3
c)  Fa0/6
d)  Fa0/8
e)  Fa0/9
f)  Fa0/12

Answer: Fa 0/8
Explanation:  when answering this sort of question use the show mac-address-table command to verify which interface associated with a given MAC address, this command displays the learned MAC addresses and their assigned interfaces, below is an example of the output  you will see: -

Looking at the detailed table above, we can conclude that the MAC address 0010.5a0c.ffba is associated with interface Fa0/8

certforumz

#2
See Figure(1) in the previous post.

2. What ports on Sw-AC3 are operating has trunks (choose three)?

a)  Fa0/1
b)  Fa0/3
c)  Fa0/4
d)  Fa0/6
e)  Fa0/9
f)  Fa0/12

Answer: Fa0/3, Fa0/9 and Fa0/12

Explanation: Use the show interface trunk command to verify  the trunking and VLAN status of a link. This command displays detailed lists of assigned ports,  mode, encapsulation type and trunking status. The display below shows the output:



3. Question 3:

What kind of router is VLAN-R1?

a) 1720
b) 1841
c)  2611
d) 2620

Answer: 2620

Explanation: To answer this type of question, use the show cdp neighbors command to verify; the output of the command is displayed below with brief explanation:

Explanation:

Capabilities: The device type of the neighbor. This device can be a router, a bridge, a transparent bridge, asource-routing bridge, a switch, a host, an IGMP device, or a repeater.

Device ID: The name of the neighbor device ; either the MAC address or the serial number of this device.

Local Interface: The protocol and port number of the port on the current device - device you are running cdp from.

Holdtime : The remaining amount of time, in seconds, the current device will hold the CDP advertisement from a transmitting router before discarding it.

Platform: The product name and number of the neighbor device.
Port ID: Neighbor's remote port type and number where you receive the cdp information.

certforumz

#3
Question 4: Which switch is the root bridge forVLAN 1?

Answer: Sw-DS1

Explanation:

To get the answer,  use the show spanning-tree vlan 1 to verify  the Spanning Tree information of VLAN 1



From the display above, you can see two of the interface roles are in Desg(designated) role and one root . This shows that Sw-Ac3 switch is not the root bridge for this VLAN (VLAN 1). The root bridges normally have the entire interface in  forwarding roles. And the default cost of the"Cost 19", we learn that the root switch is directly connected to the Sw-Ac3 switch over a 100Mbps Ethernet link.

BY judging from above, there is one Root port in the interface role status, the root port FastEthernet0/12 is connected to the root bridge..  Using the show cdp neighbors command again to verify:


As displayed above , there is one Root port in the interface role status, the root port FastEthernet0/12 is connected to the root bridge..

The "Local Interface" column shows the interface on the switch running "show cdp neighbors" command.

You can see that, Sw-DS1 is associated with interface FastEthernet0/12 -> this confirms that Sw-DS1is the root bridge. You might find it a bit difficult because, you might not be allowed to access all the switches CLI, if you were allowed; you would have seen that all the ports on the root bridge is in forwarding (fwd) state.

certforumz

#4
Question 5: What address should be configured as the default-gateway for the host connected to interface fa0/4 of SW-Ac3?

Answer: 192.168.44.254

Explanation:

Use the show vlan command to verify which VLAN interface Fa0/4 belongs to



From the exhibit above we can confirm that VLAN 44 is configured on the router VLAN-R1 using sub-interface Fa0/0.44 with IP address 192.168.44.254/24

certforumz

#5
Question 6: From which switch did Sw-Ac3 receive VLAN information ?

Answer: Sw-AC2

Explanation: To view the VTP configuration information, use the show vtp status command:



From the display above, we can confirm that Sw-Ac3 received VLAN information from the IP address 163.5.8.3 - the IP address may vary during your exam - .
Finally,  you use the show cdp neighbors detail to very what device is configured with 163.5.8.3


certforumz

#6
Question 7: Refer to the exibit,  switch SwX was taken out of the production network for maintenance. It will be reconnected to the Fa 0/16 port of Sw-Ac3. What happens to the network when it is reconnected and a trunk exists between the two switches?



A - All VLANs except the default VLAN win be removed from allswitches
B - All existing switches will have the students, admin, faculty, Servers, Management, Production, and no-where VLANs
C - The VLANs Servers, Management, Production and no-where will replace the VLANs on SwX
D - The VLANs Servers, Management, Production and no-where will be removed from existing switches

Answer : D

Explanation:

Firstly,verify the VTP configuration of switch Sw-Ac3 using the show vtp status command on Sw-Ac3



From the display above, you can see that the configuration revision number is 5 and VTP Domain Name is Home-office
Looking back at the exhibit, we can see that switch SwX has a revision number of 6, which is greater than that of switch Sw-Ac3, both switches have the same VTP Domain Name called "Home-office".

Because switch SwX  revision number is higher, it will replace the vlan information on other switches with its own information. Basically, the switch with a higher revision number automatically becomes the updater and overwrites other switches databases (on the same domain except the switch in a transparent mode) with it's own information.

Try and verify the vlan information of switch Sw-Ac3 with show vlan command:

certforumz

#7
Question 8:

Out of which ports will a frame be forwarded that has source mac-address 0010.5a0c.fd86 and destination mac-address 000a.8a47.e612? (Choose three)

A-  Fa0/8
B - Fa0/3
C - Fa0/1
D - Fa0/12

Answer: B C D

Explanation:

Firstly, use the show mac-address-table command to verify the list, source and destination mac-address and the various ports that they   belong to. 

If you look carefully, you will notice that the source mac-address 0010.5a0c.fd86 belongs to Vlan 33.
The destination mac-address 000a.8a47.e612 is not in the table. Which means that, the switch will flood frame to ports Fa0/1,Fa0/3and Fa0/12 of Vlan 33 and all the trunk links, except port Fa0/6 where it received this frame from. Remember that the "show mac-address-table" command displays information learned by the switch, there are other ports beside the mentioned ports assigned to vlan 33. Using the show vlan command to verify all assigned ports to vlan 33

Using the show interface trunk command, You can verify trunk ports received this frame.

certforumz

#8
Question 9:

If one of the host connected to Sw-AC3 wants to send message to ip 190.0.2.5 (or any ip on a different subnet) what will be the destination MAC address ?

Answer and Explanation:
Because the destination address is on a different subnet from the switch, the packet will be forwarded to its default gateway. To verify the default gateway of this switch, use the show running-config command


From the output above, we can see that its default-gateway is 192.168.1.254. Which can be said to be a layer 3 device (router); in this case, the VLAN-R1 router. You can use the show cdp neighbor detail command verify further.



From the output above, you can confirm that the switch's default gateway is VLAN-R1 router (with the IP address of 192.168.1.254).The interface FastEthernet0/3 shows that the switch is directly connected to VLAN-R1 router through the switchport Fa0/3. To verify the MAC address associated this interface is interface, you use the show mac-address-table command:



Looking closely at the table above, you will discorver that the corresponding MAC address is 000a.b7e9.8360. Although there are some entries on port Fa0/3 with different Vlans ,but they have the same MAC address.

certforumz

#9
Refer to the exhibit. Each of these four switches has been configured with a hostname, as well as being configured to run RSTP. No other configuration changes have been made. Which three of these show the correct RSTP port roles for the indicated switches and interfaces? (Choose three)



A. SwitchA, Fa0/2, designated
B. SwitchA, Fa0/1, root
C. SwitchB, Gi0/2, root
D. SwitchB, Gi0/1, designated
E. SwitchC, Fa0/2, root
F. SwitchD, Gi0/2, root



Answer: A B F

Explanation

The question says "no other configuration changes have been made" so we can understand these switches have the same bridge priority. Switch C has lowest MAC address so it will become root bridge and 2 of its ports (Fa0/1 & Fa0/2) will be designated ports -> E is incorrect.

Because SwitchC is the root bridge so the 2 ports nearest SwitchC on SwitchA (Fa0/1) and SwitchD (Gi0/2) will be root ports -> B and F are correct.

Now we come to the most difficult part of this question: SwitchB must have a root port so which port will it choose? To answer this question we need to know about STP cost and port cost.

In general, "cost" is calculated based on bandwidth of the link. The higher the bandwidth on a link, the lower the value of its cost. Below are the cost values you should memorize:

Link speed    Cost
10Mbps            100
100Mbps              19
1 Gbps                4

SwitchB will choose the interface with lower cost to the root bridge as the root port so we must calculate the cost on interface Gi0/1 & Gi0/2 of SwitchB to the root bridge. This can be calculated from the "cost to the root bridge" of each switch because a switch always advertises its cost to the root bridge in its BPDU. The receiving switch will add its local port cost value to the cost in the BPDU.

One more thing to notice is that a root bridge always advertises the cost to the root bridge (itself) with an initial value of 0.

Now let's have a look at the topology again



SwitchC advertises its cost to the root bridge with a value of 0. Switch D adds 4 (the cost value of 1Gbps link) and advertises this value (4) to SwitchB. SwitchB adds another 4 and learns that it can reach SwitchC via Gi0/1 port with a total cost of 8. The same process happens for SwitchA and SwitchB learns that it can reach SwitchC via Gi0/2 with a total cost of 23 -> Switch B chooses Gi0/1 as its root port -> D is not correct.

Now our last task is to identify the port roles of the ports between SwitchA & SwitchB. It is rather easy as the MAC address of SwitchA is lower than that of SwitchB so Fa0/2 of SwitchA will be designated port while Gi0/2 of SwitchB will be alternative port -> A is correct but C is not correct.

Below summaries all the port roles of these switches:



+ DP: Designated Port (forwarding state)
+ RP: Root Port (forwarding state)
+ AP: Alternative Port (blocking state)

certforumz

#10
Refer to the exhibit. At the end of an RSTP election process, which access layer switch port will assume the discarding role?

A. Switch3, port fa0/1
B. Switch3, port fa0/12
C. Switch4, port fa0/11
D. Switch4, port fa0/2
E. Switch3, port Gi0/1



Answer: C

Explanation

In this question, we only care about the Access Layer switches (Switch3 & 4). Switch 3 has a lower bridge ID than Switch 4 (because the MAC of Switch3 is smaller than that of Switch4) so both ports of Switch3 will be in forwarding state. The alternative port will surely belong to Switch4.

Switch4 will need to block one of its ports to avoid a bridging loop between the two switches. But how does Switch4 select its blocked port? Well, the answer is based on the BPDUs it receives from Switch3. A BPDU is superior than another if it has:

1. A lower Root Bridge ID
2. A lower path cost to the Root
3. A lower Sending Bridge ID
4. A lower Sending Port ID

These four parameters are examined in order. In this specific case, all the BPDUs sent by Sswitch3 have the same Root Bridge ID, the same path cost to the Root and the same Sending Bridge ID. The only parameter left to select the best one is the Sending Port ID (Port ID = port priority + port index). In this case the port priorities are equal because they use the default value, so Switch4 will compare port index values, which are unique to each port on the switch, and because Fa0/12 is inferior to Fa0/1, Switch4 will select the port connected with Fa0/1 (of Switch3) as its root port and block the other port -> Port fa0/11 of Switch4 will be blocked (discarding role).

certforumz

#11
Refer to the topology shown in the exhibit. Which ports will be STP designated ports if all the links are operating at the same bandwidth? (Choose three)



A. Switch A – Fa0/0
B. Switch A – Fa0/1
C. Switch B – Fa0/0
D. Switch B – Fa0/1
E. Switch C – Fa0/0
F. Switch C – Fa0/1

Answer: B C D
Explanation
First by comparing their MAC addresses we learn that switch B will be root bridge as it has lowest MAC. Therefore all of its ports are designated ports -> C & D are correct.
On the link between switch A & switch C there must have one designated port and one non-designated (blocked) port. We can figure out which port is designated port by comparing their MAC address again. A has lower MAC so Fa0/1 of switch A will be designated port while Fa0/1 of switch C will be blocked ->  B is correct.

certforumz

#12
Refer to the exhibit:


Why has this switch not been elected the root bridge for VLAN1?

A. It has more than one internee that is connected to the root network segment.
B. It is running RSTP while the elected root bridge is running 802.1d spanning tree.
C. It has a higher MAC address than the elected root bridge.
D. It has a higher bridge ID than the elected root bridge.



Answer: D

Explanation

As we can see from the output above, the priority of the root bridge is 20481 while that of the local bridge is 32769.

certforumz

#13
Refer to the exhibit. Which statement is true?


A. The Fa0/11 role confirms that SwitchA is the root bridge for VLAN 20.
B. VLAN 20 is running the Per VLAN Spanning Tree Protocol.
C. The MAC address of the root bridge is 0017.596d.1580.
D. SwitchA is not the root bridge, because not all of the interface roles are designated.



Answer: D

Explanation

Only non-root bridge can have root port. Fa0/11 is the root port so we can confirm this switch is not the root bridge -> A is not correct.

From the output we learn this switch is running Rapid STP, not PVST -> B is not correct.

0017.596d.1580 is the MAC address of this switch, not of the root bridge. The MAC address of the root bridge is 0017.596d.2a00 -> C is not correct.

All of the interface roles of the root bridge are designated. SwitchA has one Root port and 1 Alternative port so it is not the root bridge -> D is correct.

certforumz

#14
Refer to the exhibit. Based on the information given, which switch will be elected root bridge and why?



A. Switch A, because it has the lowest MAC address
B. Switch A, because it is the most centrally located switch
C. Switch B, because it has the highest MAC address
D. Switch C, because it is the most centrally located switch
E. Switch C, because it has the lowest priority
F. Switch D, because it has the highest priority



Answer: E