Usefull CCIE Notes
Usefull CCIE Notes
Topology
sw110
0 -1 e1
1/
/2
e -3
3 e1
2- /2
1/ - 3
e
e2/0-1 e2/0-1
sw101 sw102
1.1.a (i) Managing MAC Address Table
The MAC address table (also known as the CAM table) on a switch
stores the mapping between MAC addresses and the switch ports. This
table is essential for forwarding frames to the correct destination.
To add a static entry to the MAC address table, use the following
command in global configuration mode:
Example:
mac address-table static 0000.aaaa.bbbb vlan 10 interface GigabitEthernet0/1
The aging time for dynamic MAC addresses determines how long an entry
remains in the table before it is aged out if no traffic is seen from
that address.
This sets the aging time for dynamic MAC address entries to 300 seconds.
1.1.a (ii) Errdisable Recovery
Errdisable is a feature on Cisco switches that automatically disables a
port when certain events occur, such as port security violations, BPDU
guard violations, and more.
Configuring Errdisable Recovery
Viewing the Current Errdisable Recovery Settings:
This command enables recovery for ports disabled due to BPDU guard
violations.
Configuring the Errdisable Recovery Interval:
errdisable recovery interval <seconds>
Example:
errdisable recovery interval 300
This sets the recovery interval to 300 seconds, meaning the switch
will attempt to re-enable the port after 300 seconds if the cause of
the errdisable condition has been cleared.
1.1.a (iii) L2 MTU
The Layer 2 Maximum Transmission Unit (MTU) refers to the maximum frame
size that can be transmitted over a network interface.
Configuring L2 MTU
Viewing the Current MTU Settings:
show system mtu
Changing the MTU Size:
Example:
system mtu 1500
This command sets the MTU size to 1500 bytes. Note that changes to the
MTU size typically require a reboot of the switch to take effect.
Configuring the Jumbo Frame MTU Size:
For switches that support jumbo frames, you can set a higher MTU size:
Example:
This command sets the MTU size for jumbo frames to 9000 bytes.
Summary
MAC Address Table: Use show mac address-table to view, clear mac
address-table dynamic to clear, and mac address-table static to
configure static entries.
Layer 2 protocols play a crucial role in the functioning and management of switches
within a network. Here, we will cover the following protocols:
1.1.b (i) CDP and LLDP
Cisco Discovery Protocol (CDP) and Link Layer Discovery Protocol (LLDP) are network
discovery protocols used to share information about directly connected devices.
CDP (Cisco Discovery Protocol)
CDP is a Cisco proprietary protocol used to discover and share information about
other Cisco devices connected to the same network.
Enabling CDP:
conf t
cdp run
Disabling CDP:
conf t
no cdp run
Enabling CDP on an Interface:
conf t
interface <interface-id>
cdp enable
conf t
interface <interface-id>
no cdp enable
Enabling LLDP:
conf t
lldp run
Disabling LLDP:
conf t
no lldp run
Enabling LLDP on an Interface:
conf t
interface <interface-id>
lldp transmit
lldp receive
Disabling LLDP on an Interface:
conf t
interface <interface-id>
no lldp transmit
no lldp receive
conf t
interface <interface-id>
udld port
UDLD: Use UDLD to detect and prevent unidirectional links, which can
cause network issues. Enable globally or per interface, and use
aggressive mode for more proactive detection. Monitor using show
udld neighbors.
Example:
conf t
interface GigabitEthernet0/1
switchport mode access
switchport access vlan 10
This command configures interface GigabitEthernet0/1 as an access port
in VLAN 10.
Verifying Access Port Configuration:
show interfaces <interface-id> switchport
Example:
show interfaces GigabitEthernet0/1 switchport
conf t
interface <interface-id>
switchport mode trunk
switchport trunk encapsulation dot1q
switchport trunk allowed vlan <vlan-list>
Example:
conf t
interface GigabitEthernet0/2
switchport mode trunk
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 10,20,30
This command shows the trunk ports on the switch and the VLANs they carry.
1.1.c (iii) Native VLAN
The native VLAN on a trunk port is the VLAN for untagged traffic. By
default, the native VLAN is VLAN 1.
Configuring the Native VLAN:
conf t
interface <interface-id>
switchport trunk native vlan <vlan-id>
Example:
conf t
interface GigabitEthernet0/2
switchport trunk native vlan 99
Example:
conf t
interface <interface-id>
switchport trunk allowed vlan remove <vlan-list>
Example:
conf t
interface GigabitEthernet0/2
switchport trunk allowed vlan remove 30
This command removes VLAN 30 from the allowed VLANs on the trunk port
GigabitEthernet0/2.
conf t
vlan 10
name Sales
This command creates VLAN 10 named Sales.
Creating Extended Range VLANs:
conf t
vlan <vlan-id>
name <vlan-name>
Example:
conf t
vlan 2000
name R&D
This command creates VLAN 2000 named R&D. Note that VTP mode must be set to transparent to
support extended VLANs.
1.1.c (vi) Voice VLAN
A Voice VLAN is a special VLAN configured to carry voice traffic from IP phones.
Configuring a Voice VLAN:
conf t
interface <interface-id>
switchport voice vlan <vlan-id>
Example:
conf t
interface GigabitEthernet0/1
switchport voice vlan 20
This command configures VLAN 20 as the voice VLAN on interface GigabitEthernet0/1.
Verifying Voice VLAN Configuration:
show interfaces <interface-id> switchport
Example:
This command shows the voice VLAN configuration for the specified
interface.
Summary
Access Ports: Configured to carry traffic for a single VLAN. Use switchport
mode access and switchport access vlan <vlan-id>.
Trunk Ports: Carry traffic for multiple VLANs using 802.1Q tagging. Use
switchport mode trunk and switchport trunk allowed vlan <vlan-list>.
Native VLAN: The VLAN for untagged traffic on a trunk port. Use switchport
trunk native vlan <vlan-id>.
Manual VLAN Pruning: Manually control which VLANs are allowed on trunk
ports. Use switchport trunk allowed vlan remove <vlan-list>.
Normal Range and Extended Range VLANs: Normal range (1-1005) and extended
range (1006-4094) VLANs. Use vlan <vlan-id> to create VLANs.
Voice VLAN: Configured to carry voice traffic from IP phones. Use
switchport voice vlan <vlan-id>.
conf t
interface range <interface-id-range>
channel-group <group-number> mode active
Example:
conf t
interface range GigabitEthernet0/1 - 2
channel-group 1 mode active
Modes:
conf t
interface range <interface-id-range>
channel-group <group-number> mode on
Example:
conf t
interface range GigabitEthernet0/1 - 2
channel-group 1 mode on
Layer 2 EtherChannel:
This command sets the load balancing method to use both source and
destination IP addresses.
Common Methods:
conf t
spanning-tree mode pvst
Rapid PVST+ (Rapid Per-VLAN Spanning Tree Plus):
conf t
spanning-tree mode rapid-pvst
Example:
conf t
spanning-tree vlan 10 priority 4096
Port Priority:
Port priority affects which port is chosen when there are multiple
equal-cost paths to the root bridge.
conf t
interface <interface-id>
spanning-tree vlan <vlan-id> port-priority <priority>
Example:
conf t
interface GigabitEthernet0/1
spanning-tree vlan 10 port-priority 64
Tuning Port/Path Cost:
Path cost is used to determine the best path to the root bridge. Lower
cost paths are preferred.
Example:
conf t
interface GigabitEthernet0/1
spanning-tree vlan 10 cost 19
STP Timers:
STP timers control various timing aspects of the STP process, such as
hello time, forward delay, and max age.
Configuring STP Timers:
conf t
spanning-tree vlan <vlan-id> hello-time <seconds>
spanning-tree vlan <vlan-id> forward-time <seconds>
spanning-tree vlan <vlan-id> max-age <seconds>
Example:
conf t
spanning-tree vlan 10 hello-time 2
spanning-tree vlan 10 forward-time 15
spanning-tree vlan 10 max-age 20
1.1.e (iii) PortFast, BPDU Guard, BPDU Filter
PortFast:
PortFast is used on access ports to skip the usual STP
listening and learning states, allowing the port to
transition immediately to the forwarding state.
conf t conf t
Root Guard ensures that the specified port cannot become a root
port, protecting the current root bridge status.