0% found this document useful (0 votes)
121 views

Switching Interview Questions for CCNA and CCNP Engineers

Uploaded by

SANKET PARSEKAR
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
121 views

Switching Interview Questions for CCNA and CCNP Engineers

Uploaded by

SANKET PARSEKAR
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 9

Switching Interview Questions For CCNA and CCNP Engineers

After IGP, BGP and MPLS interview question, Now I am adding switching basic
questions. Please read the below questions:-

1. Difference between hub, bridge and switch?


Hub operates at L1;Bridge and switch at L2; Bridge does not use STP, Switch uses STP
to automatically move redundant ports to blocking mode and have only one path active.

2. What is mac address and why it is required?


Media-Access-Control. To send L2 frames on LAN segment

3. In layer 2 domain do we need ip address for communication?


No

4. What is arp and why it is required?


Resolving IP address to MAC address

5. What is Spanning Tree Protocol aka STP?


Switch uses STP to automatically move redundant ports to blocking mode and have only
one path active.

6. What is the difference between STP, MSTP, PVST and RSTP?


STP - Common root bridge for all vlans, 5 states of Blocking, listening, learning,
forwarding & disabled.
PVST - Cisco proprietary, individual root bridge for each vlan.
RSTP - 3 states of Disable, learning & forwarding.
MSTP – Signal instance for multiple VLAN.

7. Can we use the two same paths for same vlan?


In context of load balancing traffic with gateways, MHSRP can be used to load balance
traffic on single vlan.

8. What is the difference between broadcast and collision domain?


A collision domain is a physical network segment where data packets can "collide" with
one another for being sent on a shared medium, in particular in the Ethernet networking
protocol
A broadcast domain is a logical network segment in which any computer or other device
connected to the network can directly transmit to any other on the domain without having
to go through a routing device, provided that they share the same subnet address and are
in the same VLAN, default or installed.

9. Define type of lan traffic.


Unicast – when sent to only one destination
Broadcast – Sent to all devices in broadcast domain.
Multicast – Sent to group of devices but not all devices in broadcast domain.

10. What is destination address of broadcast frame?


All F’s
11. Can we connect a switch to switch with straight cable?
No, a cross-over cable is needed. But Newer switches can.

12. Define functions of switch.


a switch performs the Layer 2 or Data-link layer function. That is, it simply looks at each
packet or data unit and determines from a physical address (the "MAC address") which
device a data unit is intended for and switches it out toward that device.

13. What is arp timeout?


how long a dynamically learned IP address and its corresponding Media Control Access
(MAC) address remain in the Address Resolution Protocol (ARP) cache.

14. What is aging process?


Whenever switch updates an entry in the MAC address table, the switch resets the timer
for that entry. Timers are used in aging process of old entries. Aging helps to remove old
entries and free memory of MAC address table to add new entries.

15. What is BPDU?


"Bridge Protocol Data Unit", is a Media Access Control ( MAC ) bridge management
protocol. BPDUs are data messages sent across Local Area Networks ( LAN ) to detect
loops in a network topology. BPDU contains information about ports, switches,
addresses, port priority, etc. BPDU's are exchanged between switches running STP first
to elect root switch and then using root switch as reference to select forwarding and
blocked ports in redudant n/w topology

16. What is path cost?


How far a switch is away from root switch is calculated by path cost which is based on
link Bandwidth.

17. Define selection criteria of STP root bridge.


Lowest Bridge ID—Bridge priority, Bridge MAC address

18. How to non bridge decide which port will elect as root port?
Non-root bridge decides on the lowest path cost to the root bridge or lowest BID or
lowest port ID while electing root port

19. If a non-root bridge has two redundant ports with the same root path cost, how does
the bridge choose which port will be the root port?
Based on lowest port ID
20. Port states of spanning tree protocol.
(1) Blocking Max Age (20 sec) Discards frames, does not learn MAC addresses,
receives BPDUs.
(2) Listening Forward Delay (15 sec) Discards frames, does not learnMAC addresses,
receives BPDUs to determine its role in the network.
(3) Learning Forward Delay (15 sec) Discards frames, does learn MAC addresses,
receives and transmits BPDUs.
(4) Forwarding Accepts frames, learns MAC addresses, receives
and transmits BPDUs.

21. If the users face delay during initial login, what you will suggest to implement?
Port fast

22. Why spanning tree BPDU filter is used?


To block receiving BPDU which can potentially cause recalculation of spanning tree on
port fast enable ports. can be enabled either globally or at the interface
(config)# spanning-tree portfast bpdufilter default
(config-if)# spanning-tree bpdufilter enable

23. Can I use BPDU filter on trunk ports?


No – BPDU Carries trunk information hence trunk will not form.

24. What is port security?


Restricting access to a port based on mac-address and actions to be taken on violation
like shutdown, notification to NMS etc.

25. I want to learn only a single mac from the port, what need to be configured?
switchport port-security mac-address <mac-address of PC>

26. Can we use spanning port-fast on trunk ports?


Ideally spanning port-fast should be used on host or servers connections to switch port.
Enabling spanning-tree portfast will move the port to forwarding state without STP
checking if there are any spanning tree loops, it may create spanning tree loops.

27. If management ip address is changed, will user’s traffic will be dropped?


No

28. Difference between trunk and access port?


Trunk link is used to interconnect switches so that traffic from multiple vlans can be sent
over to other switches, access port is used to connect to end host stations or servers only.

29. What is UDLD and why it is required?


To identify one way flow of traffic in network since it may create spanning tree loops.

30. What is interface vlan on switch?


Management ip address assigned to L2 switch.
31. What is VLAN.
A virtual LAN (VLAN) is a logical LAN, or a logical subnet.

32. How to troubleshoot VLAN issue?


Check the physical connectivity, Check the switch configuration, Check the VLAN
configuration

33. What is trunk?


A trunk is a link that carries traffic for more than one VLAN

34. What are trunk encapsulation methods?


Inter-Switch Link (ISL)—A Cisco proprietary method that encapsulates the original
frame in a header, which contains VLAN information. It is protocol-independent and can
identify Cisco.Discovery Protocol (CDP) and bridge protocol data unit (BPDU) frames.
ISL trunking recognizes only VLANs numbered 1–1001
802.1Q—Standards-based, tags the frames (inserts a field into the original frame
immediately after the source MAC address field), and supports Ethernet and Token Ring
networks. 802.1Q can use VLANs 0–4094

36. What happens when non trunking port receives ISL tagged frame?
If a nontrunking port receives an ISL-encapsulated frame, the frame is dropped. If the
ISL header and footer cause the MTU size to be exceeded, it might be counted as an error

37. What happens when non trunking port receives dot1q tagged frame?
If a nontrunking port receives an 802.1Q frame, the source and destination MAC
addresses are read, the tag field is ignored, and the frame is switched normally at Layer 2.

38. What are Trunk port modes?


Trunk—The port negotiates trunking with the port on the other end of the link.
Non-negotiate—The port is a trunk and does not do DTP negotiation with the other side
of the link.
Dynamic Desirable—Actively negotiates trunking with the other side of the link. It
becomes a trunk if the port on the other switch is set to trunk, dynamic desirable, or
dynamic auto mode.
Dynamic Auto—Passively waits to be contacted by the other switch. It becomes a trunk
if the other end is set to trunk or dynamic desirable mode.

39. Can we change native vlan? How?


Yes. By command in interface mode “#switchport trunk native vlan vlan no”

40. How to troubleshoot trunk link?


Please check the following :- (a)Are both sides of the link in the correct trunking mode?
(b) Is the same trunk encapsulation on both sides? (c) If 802.1Q, is the same native
VLAN on both sides? (d) Are the same VLANs permitted on both sides?
41. What is VTP? How it works?
VTP is a protocol that runs over trunk links and synchronizes the VLAN databases of all
switches in the VTP domain. VTP works by using Configuration Revision numbers and
VTP advertisements. All switches send out VTP advertisements every five minutes, or
when there is a change to the VLAN database (when a VLAN is created, deleted, or
renamed).VTP advertisements contain a Configuration Revision number. This number is
increased by one for every VLAN change. When a switch receives a VTP advertisement,
it compares the Configuration Revision number against the one in its VLAN database. If
the new number is higher, the switch overwrites its database with the new VLAN
information, and forwards the information to its neighbor switches. If the number is the
same, the switch ignores the advertisement.. If the new number is lower, the switch
replies with the more upto- date information contained in its own database.

42. Explain VTP modes


Server—The default VTP role. Servers can create, delete, and rename VLANs. They
originate both periodic and triggered VTP advertisements and synchronize their databases
with other switches in the domain.
Client—Clients cannot make VLAN changes. They originate periodic VTP
advertisements and synchronize their databases with other switches in the domain.
Transparent—It can create, delete, and rename VLANs, but its VLANs are only local. It
does not originate advertisements or synchronize its database with any other switches. It
forwards VTP advertisements out its trunk links, however.

43. What is VTP Pruning ? Where it is enabled?


Enabling VTP pruning causes the switch to keep track of VLAN port assignments in its
downstream switches. The switch then sends flooded traffic only on trunks toward
switches that have ports assigned to the VLAN originating the traffic. It prunes flooded
traffic from all other trunks. VTP pruning increases the available bandwidth by
preventing unnecessary traffic on trunk links. It is enable in global mode.

44. Difference in VTP V1 & V2


Version 2 has the following added features: (a)It supports Token Ring VLANs. (b)
Transparent switches pass along messages from both versions of VTP. (c) Consistency
checks are performed only when changes are configured through the CLI or SNMP.

45. What are precautions before adding new switch to VTP domain?
Adding a new switch in client mode does not prevent it from propagating its incorrect
VLAN information. A server synchronizes to a client if the client has the higher
configuration revision number. You must reset the revision number back to 0 on the new
switch

46. Spanning tree link coasts.


Spanning Tree Costs
Link Speed Old Cost New Cost
10 Mbps 100 100
100 Mbps 10 19
1 Gbps 1 4
10 Gbps 1 2

47. How STP selects lowest path coast?


Based on following: - (a) Lowest path cost to the root (b) Lowest sender bridge ID (c)
Lowest sender port ID (PID)

48. Define role of BPDU in STP


There are two types of BPDUs :- (a) Configuration BPDUs-sent every two seconds,Are
used during an election, Maintain connectivity between switches, Send timer information
from the root.
(b) TCN BPDUs - sent toward the root when There is a link failure OR A port starts
forwarding, and there is already a designated porT OR The switch receives a TCN from a
neighbor.

49. What is PVST?


With PVST (Per Vlan STP), there is a different instance of STP for each VLAN. To
derive the VLAN BID, the switch picks a different MAC address from its base pool for
each VLAN. Each VLAN has its own root bridge, root port, and so on.

50. What is port fast?


Portfast is for access (user) ports only. It causes the port to bypass the STP listening and
learning states and transition directly to forwarding. Connecting a switch to a Portfast
port can cause loops to develop.
(config-if)#spanning-tree portfast

51. What is Uplink Fast?


UplinkFast is for speeding convergence when a direct link to an upstream switch fails.
The switch identifies backup ports for the root port (these are called an uplink group). If
the root port fails, then one of the ports in the uplink group is unblocked and transitions
immediately to forwarding.
(config)# spanning-tree uplinkfast

52. What is Backbone Fast?


BackboneFast is used for speeding convergence when a link fails that is not directly
connected to the switch. It helps the switch detect indirect failures. If a switch running
BackboneFast receives an inferior BPDU from its designated bridge, it knows a link on
the path to the root has failed. (An inferior BPDU is one that lists the same switch for
root bridge and designated bridge.) The switch then tries to find an alternate path to the
root by sending a Root Link Query (RLQ) frame out all alternate ports.
(config)#spanning-tree backbonefast

53. What are RSTP port roles?


Root port—The best path to the root (same as STP).
Designated port—Same role as with STP.
Alternate port—A backup to the root port.
Backup port—A backup to the designated port.
Disabled port—One not used in the Spanning Tree.
Edge port—One connected only to an end user.

54. How BPDU works differently in RSTP?


In regular STP, BPDUs are originated by the root and relayed by each switch. In RSTP,
each switch originates BPDUs, whether or not it receives a BPDU on its root port. The
RSTP BPDU is set to Type 2, Version 2. PVST is done by Rapid PVST+ on Catalyst
switches

55. What is BPDU guard?


BPDU Guard is used to prevent loops if another switch is attached to a Portfast port.
When BPDU Guard is enabled on an interface, it is put into an error-disabled state
(basically, shut down) if a BPDU is received on the interface. It can be enabled at either
global config mode or interface mode
(config)#spanning-tree portfast bpduguard default
(config-if)#spanning-tree bpduguard enable

56.What is ROOT guard?


Root Guard is meant to prevent the wrong switch from becoming the Spanning Tree root.
It is enabled on ports other than the root port and on switches other than the root. If a
Root Guard port receives a BPDU that might cause it to become a root port, then the port
is put into “rootinconsistent” state and does not pass traffic through it. If the port stops
receiving these BPDUs, it automatically re-enables itself.
(config-if)# spanning-tree guard root

57. What is Loop Guard?


Loop Guard prevents loops that might develop if a port that should be blocking
inadvertently transitions to the forwarding state. This can happen if the port stops
receiving BPDUs (perhaps because of a unidirectional link or a software/configuration
problem in its neighbor switch). When one of the ports in a physically redundant
topology stops receiving BPDUs, the STP conceives the topology as loop-free.
Eventually, the blocking port becomes designated and moves to forwarding state, thus
creating a loop. With Loop Guard enabled, an additional check is made.
(config-if)# spanning-tree guard loop
(config)# spanning-tree loopguard default

58. How to prevent loop on layer 2?


Suspect a loop if you see the following: (a) You capture traffic on a link, and see the
same frames multiple times.(B) All users in a bridging domain have connectivity
problems at the same time. (C) There is abnormally high port utilization.
To remedy a loop quickly, shut redundant ports and then enable them one at a time.
59. What are Multicast ip & port used by HSRP?
224.0.0.2, UDP port 1985

60. How active router is chosen in HSRP?


The active router is chosen because it has the highest HSRP priority (default priority is
100). In case of a tie, the router with the highest configured IP address wins the election.
A new router with a higher priority does not cause an election unless it is configured to
preempt that is, take over from a lower priority router. Configuring a router to preempt
also insures that the highest priority router regains its active status if it goes down but
then comes back online again.

61. What are HSRP states?


Initial—HSRP is not running.
Learn—The router does not know the virtual IP address and is waiting to hear from the
active router.
Listen—The router knows the IP and MAC of the virtual router, but it is not the active or
standby router.
Speak—Router sends periodic HSRP hellos and participates in the election of the active
router.
Standby—Router monitors hellos from active router and assumes responsibility if active
router fails.
Active—Router forwards packets on behalf of the virtual router.

62. Timers in HSRP?


They can be set between 1–255 seconds (the default hello is 3 seconds and hold time is
10 seconds):

63. How many group can we have in HSRP?


You can have a maximum of 255 groups.

64. What is multicast ip and port number in VRRP?


224.0.0.18, using UDP port 112

65. Define VRRP timers?


Hello interval is 1 second & dead timer is 3 seconds

66. Difference between HSRP & VRRP

66. What is difference between PAGP & LACP?


PAGP - Ciso Proprietory, PAgP also dynamically modifies parameters of the
EtherChannel if one of the bundled ports is modified. For example, if the configured
VLAN, speed, or duplex mode of a port in an established bundle is changed, PAgP
reconfigures that parameter for all ports in the bundle.
LACP also assigns roles to the EtherChannel’s endpoints. The switch with the lowest
system priority (a 2-byte priority value followed by a 6-byte switch MAC address) is
allowed to make decisions about what ports actively are participating in the EtherChannel
at a given time.
Ports are selected and become active according to their port priority value (a 2-byte
priority followed by a 2-byte port number), where a low value indicates a higher priority.
A set of up to 16 potential links can be defined for each Ether Channel. Through LACP, a
switch selects up to eight of these having the lowest port priorities as active Ether
Channel links at any given time. The other links are placed in a standby state and will be
enabled in the Ether Channel if one of the active links goes down.

67. Define Ether channel modes?


Ether Channel desirable (PAgP) or active (LACP) mode attempts to ask the far end to
bring up a channel.EtherChannel auto (PAgP) or passive (LACP) mode participates in the
channel protocol, but only if the far end asks for participation.EtherChannel auto (PAgP)
or passive (LACP) mode participates in the channel protocol, but only if the far end asks
for participation.

You might also like