Ccnp Lab Flashcards
Packet switching,Fast switching, CEF
Packet Switching: High CPU usage, as each packet requires a route lookup in the main routing table, increasing CPU load, especially in large networks.
Fast Forwarding: Moderate CPU usage, as the route cache reduces the need for repeated lookups, but still requires CPU for managing the cache and occasional lookups.
CEF (Cisco Express Forwarding): Minimal CPU usage, as forwarding is handled by hardware (using the FIB and Adjacency Table), greatly reducing CPU demand and enabling faster throughput.
Commands to use Process switching, fast switching and CEF:
Sh adjacency summary
Debug ip packet
Sh ip cache– Display fast switching table
Debug ip cef receive –Enable debugging for CEF receive packets
Ip multicast-routing Enable Multicasting on Router
Sh ip int interface-id Interface info include packet switching mode
Sh ip cef -Displays the contents of routers FIB
Sh adjacency-Display the adjacency table
Enable Cef
Ip cef- Globally enable CEF
Enables CEF on an interface
Int f0/0
Ip route-cache cef
Enable Fast switching on an interface
Int f0/0
Ip route-cache
Enable Process Switching on an interface(disable fast switching)
Int f0/0
no ip route-cache
u all - cancel debug
CAM table, TCAM
- CISCO Switches default aging time is 300 seconds or five mints, we can be modifying.
The CAM table, or content addressable memory table, is present in all switches for layer 2
switching. - TCAM (ternary content-addressable memory) is a specialized type of high-speed memory that
searches its entire contents in a single clock cycle.
CEF
- CEF Stand for CISCO Express forwarding.
- CEF is built around two main components Forwarding Information Base and AdjacencyTable.
- CEF put all this information into single Hardware table which allows very fast packet forwarding.
- CEF is a feature that allows a router to very quickly and efficiently make a router lookup.
- CEF is enabled by default in Cisco Multilayer switch and Routers.
- CEF also called Topology based switching
- CEF have two table FIB (Forwarding Information Base) and Adjacency Table.
CEF –FIB
FIB stand for Forwarding Information Base.
* FIB maintains layer 3 forwarding information.
* FIB maintains mirror image of forwarding information contained in the IP routing table.
* FIB maintains next-hop address information based on information in the IP routing table.
* FIB table contains destination reachability information as well as the next hop information.
* FIB contains interface identifier and next hops info for each reachable destination network.
* FIB contains necessary information from the routing table.
CEF -Adjancy Table
Adjacency Table:
* (AIB) table
* The Adjacency table maintains layer 2 information for next hops listed in the FIB table.
* To avoid need for an Address Resolution Protocol request for each table lookup.
* The Adjacency table is tasked with maintaining the layer 2 next-hop information for the FIB.
* The Adjacency table maintains switching information linked to a particular FIB entry.
RIB
The Routing Information Base (RIB) stores all IP routing information.
It is also known as the routing table.
The RIB is built from dynamic/static routing protocols or directly connected routes.
It acts as a repository for routes from all routing protocols.
The RIB is part of the control plane, where the routing table is constructed.
sh ip route
sh ip cef
Fast Switching
Fast Switching enhances process switching using a cache.
The first packet to a destination is process-switched.
Subsequent packets are forwarded using the cached information.
The CPU examines the first packet and stores the decision in the cache.
For subsequent packets to the same destination, the cache provides the next hop info.
This avoids repeated lookups and CPU involvement for the same destination.
New destinations are processed by the CPU and stored in the cache for future use
DTP Configuration:
- Switchport mode dynamic auto
- Switchport mode dynamic desirable
- Switchport no negotiate
In newer switches default we have auto.
DTP mode
Desirable-Desirable-OK
Desirable-Auto-ok
Trunk-Desirable-ok
Auto-Trunk-ok
Auto- Auto- NO
DTP config
Sh int f0/1 switchport
Int f0/1
Switchport mode dynamic auto /desirable
DTP - turn off
S1(config)#interface g0/0
S1(config-if)#switchport nonegotiate
STP
Spanning Tree Protocols use BPDU (bridge protocol data unit) in every 2 second for preventing layer2 loops.
Switch with lowest Bridge Priority (Switch Priority) Value will become the Root Switch.
STP root bridge
Switch with lowest Bridge Priority (Switch Priority) Value will become the Root Switch.
Bridge ID: Combination of priority and switch MAC address.
Default priority: 32769 (32768 + 1).
If priorities are equal, MAC address determines the lowest Bridge ID.
Switches exchange BPDU (Bridge Protocol Data Units) every 2 seconds.
STP port
- Designated Port: Non-root port forwarding away from the root switch.
- Root Port: Port directly connected to the Root Bridge.
- Alternate Port: Activates if topology changes, moving to forwarding state.
- Forwarding Ports: Includes Designated and Root ports.
- Blocking Ports: Non-forwarding ports.
STP Port states
- Listening 15 sec.
- Learning 15 sec.
- Blocking 20 sec.
- Forwarding No limits
- Disable No limits
STP type
STP 802.1D Low Slow One
PVST+ CISCO High Slow One for Every VLAN
RSTP 802.1W Medium Fast One
Rapid PVST+ CISCO Very High Fast One for Every VLAN
MST 802.1S Medium or High Fast One for Multiple Vlans
PVST
PVST
PVST+ takes 30 to 50 seconds to transit from blocking state to forwarding state.
RPVST+
: Rapid Per-VLAN Spanning Tree Plus, an enhanced PVST+ version.
Advantages: Faster spanning tree calculations and convergence (<10 seconds).
Port States: Discarding, Learning, Forwarding.
STP vs RSTP States:
STP vs RSTP States:
Disabled → Discarding
Blocking → Discarding
Listening → Discarding
Learning → Learning
Forwarding → Forwarding
BPDU
- BPDU (Bridge Protocol Data Units): Messages exchanged between switches to prevent Layer 2 loops and broadcast storms.
- Contents: Switch ID, port info (originating port, MAC, priority, cost).
- Transmission: Multicast (MAC: 01:80:c2:00:00:00).
- STA (Spanning Tree Algorithm): Detects loops and disables redundant ports.
- BPDU Types: Configuration BPDU, TCN BPDU, TCA BPDU.
- Configuration BPDU: Elects Root Bridge, root ports, and designated ports.
STP Timers: .
Hello Timer: Interval for Root Bridge to send configuration BPDUs (Default: 2s, adjustable: 1–10s).
Forward Delay: Time spent in Listening and Learning states (Default: 15s, adjustable: 4–30s).
Maximum Age (MaxAge): Time to age out BPDUs if none are received (Default: 20s, adjustable: 6–40s).
Purpose: Ensures stable spanning tree topology by regulating BPDU timing and port state transitions.
Port Fast:
- By passing the listening & learning states, go to forwarding mode.
- STP PortFast feature causes a port to enter forwarding state immediately.
- Port Fast port normally connect to end devices such as server, printer or PC.
Spanning-Tree RootGuard:
- RootGuard will make sure you don’t accept a certain switch as a root bridge.
- BPDUs are sent and processed normally but if a switch suddenly sends a BPDU with a
superior bridge ID it won’t accept it as the root bridge.
STP root guard config
In this SW2 is root switch and we enable root guard in SW2 on interface f0/1
So when SW1 try to send superior bridge ID . SW2 will not accept it and block that port let see.
SW1
spanning-tree vlan 1 priority 0
SW2
interface FastEthernet0/1
spanning-tree guard root
STP - MTS
Maps multiple VLANs to a single STP instance (e.g., 2000 VLANs → 2 instances).
Benefits: Reduces resource use and faster convergence than PVRST+.
Regions: Logical groups of devices sharing the same MST configuration (Name, Revision, Instance).
Configuration Name: Identifies MST region.
Revision Number: Locally significant; must match across devices.
Instance: Defines VLAN-to-instance mapping..
STP- MST config
SW1(config)#spanning-tree mode mst
SW1(config)#spanning-tree mst configuration
SW1(config-mst)#name test
SW1(config-mst)#revision 1
SW1(config-mst)#instance 1 vlan 10,20,30
SW1(config-mst)#instance 2 vlan 40,50,60
priority
SW1(config)#spanning-tree mst 1 priority 4096
SW1(config)#spanning-tree mst 2 priority 0
OSPF DR /BDR selection
Highet ip or loopback ip is DR
DR by setting priority
interface Ethernet0/0
ip address 10.2.203.20 255.255.255.0
ip ospf priority 254
No dr / bdr selection
R10(config)#int e0/0
R10(config-if)#ip ospf priority 0
OSPF summerization
10.10.4.0 → 00001010.00001010.00000100.00000000
10.10.5.0 → 00001010.00001010.00000101.00000000
10.10.1.0 → 00001010.00001010.00000001.00000000
The first 22 bits are common across all three networks:
Copy code
00001010.00001010.00000
The first 22 bits are common, so we take the first 22 bits from the networks.
The summary network address is formed by keeping the first 22 bits and setting the remaining bits to 0.
The summary network address is 10.10.0.0.
Calculate the Subnet Mask
The common bits are 22, so the summary subnet mask will be /22 (or 255.255.252.0)
R2(config)#router ospf 10
R2(config-router)#area 1 range 10.10.0.0 255.255.252.0
Ether Channel l
Ether Channel load balances traffic over all the links in the bundle.
* It can be configured as layer 2 or layer 3.
* Maximum we can do ether channel to 8 Physical interfaces.
Ether Channel l mode
Pagp . LAcp. Mannnual(on)
LACP active active ok, Active passive yes, passive passive NO
PAgP Desirable desirable ok, Desirable Auto ok, Auto – auto - No
On is static , LACP , Pagp are dynamic
Etherchannel Config
interface range ethernet 0/0-3
switchport trunk encapsulation dot1q -( not for L3)
switchport mode trunk ( not for l3)
channel-group 1 mode auto/desirable/active/passive / on
L3 - follwing line extra
no switchport
no ip address
interface port-channel 1
ip address 192.168.1.1 255.255.255.0
Ehterchannel Troubleshooting
Duplex has to be the same
* Speed has to be same there.
* Same Native and allowed Vlans
* Same switchport mode (Like access or trunk).
sh spanning-tree vlan 1
sh etherchannel summary
sh etherchannel details
sh lacp counter
sh lacp neigbour
Ehterchannel Troubleshooting 2
ensure all physical interfaces match in type (Layer 2 or Layer 3), mode (access or trunk for Layer 2), native VLAN, allowed VLANs, speed, duplex, and MTU (for Layer 3), as mismatches in these settings cause failures.