I know there are are a few notes threads around here, but I wanted to make my own notes thread for me, and hopefully it will help others out too. I want this to be a living document, meaning I will update it, and would appreciate the help of the community to recommend any corrections or additions. A little about me, I just finished an academy program at my community college, and I am doing final study preparations before taking the test. I feel pretty solid with the basic concepts, so most of these notes will likely relate to ICND2 material. Thanks.
Spanning Tree Protocol (STP)
Defined by IEEE 802.1D
Purpose: Prevent switching loops in redundant path networks.
Key Terms
- Bridge ID – Combination of the bridge priority, default is 32768 and the MAC address if the switch
- Root – Switch with the LOWEST bridge ID
- Bridge Protocol Data Unit – Ethernet frame that contains the BID and cost to root, used in root election, sent by all switches until converged then only by root after convergence
STP States
- Blocking – Frames are not forwarded, but BPDUs are accepted (nondesignated ports)
- Listening – Frames are not forwarded, MAC table is not populated, can send and receive BPDUs
- Learning – Frames are not forwarded, but MAC table is built and populated
- Forwarding – Frames forwarded, continues to populate MAC table
- Disabled – cannot accept BPDU or frames (shutdown)
Elections
- Root is chosen as the switch with the lowest BID (priority and MAC combo)
- Root puts all connected ports in forwarding state
- Switches in the same spanning tree will designate a root port as the lowest cost (fastest speed) to the root switch, if line speeds are equal, lowest port number becomes root port
- Two directly connected, nonroot switches will elect designated bridge as the lower cost to root, or the lowest BID, this switch will become the designated bridge
- The port on the designated bridge will forward, the port on the nondesignated bridge will block
Port Speeds
- 10Mbps = 100
- 100Mbps = 19
- 1Gbps = 4
- 10Gbps = 2
- Root cost is incremented as a BPDU travels through the network on the receiving end, not sending end (leaves root as 0)
Timers
- Hello BPDU – 2 seconds
- Max Age – 20 seconds (time to wait after not receiving a root hello before restarting STP algorithm)
- Forward Delay – 15 seconds (time allotted for each stage of listening and learning before proceeding to next stage, 30 seconds total)
- Changing times will only be effective on root switch, but not recommended because of loop possibility
Commands
- show spanning-tree (vlan) – shows Root ID, local BID, port forwarding/blocking states
Portfast
Cisco Proprietary
Purpose: Brings up ports faster by bypassing the listening and learning STP states and going directly to forwarding when activated. Can only be used on ports connecting to end-user devices, not for trunk ports!
Commands
- (config-if)# spanning-tree portfast
Rapid Spanning Tree Protocol (RSTP)
Defined by IEEE 802.1W
Key Information
- RSTP triggers topology changes when any port other than an edge port goes into the forwarding state
- BPDUs are sent by every switch in the RSTP tree at the same 2 second interval, if 3 consecutive BPDUs are not received, the link is considered down
Port Roles
- Root Port – Same as STP
- Alternate Port – Same as STP blocking port
- Backup Port – Used with dual connections to the same physical segment
- Edge Port – Access port, connects to an end user device, state changes do not trigger RSTP algorithm or election process, acts the same way as an STP port with Cisco Portfast enabled
- Point-to-Point Port – Any port that connects to another switch in full duplex mode
States
- Discarding – The initial RSTP state, combines STP disabled, blocking, and listening states
- Learning – Same as STP, doesn’t process frames, but populates MAC address table
- Forwarding – Same as STP, forwards frames, populates MAC table
Per-VLAN Spanning Tree Protocol (PVST)
Purpose: Creates a separate instance of STP for each VLAN on the network
Key Information
- Default spanning tree mode on catalyst switches
- Allows load balancing between VLANs
- Sometimes referred to as PVST+
EtherChannel
Purpose: Aggregates 2-8 switch links to load balance
Key Information
- Can aggregate 2-8 Ethernet trunk links
- STP considers the EtherChannel to be one link
- Even if all but one link in the channel fails, STP algorithm will not be triggered
Commands
- (config-int-range)# channel-group (#) mode on
Virtual Local Area Network (VLAN)
Purpose: Segments switches and breaks up broadcast domains by assigning ports to virtual LANs. Used to separate users by department, job function, etc., across one or many switches.
Key Information
- Default VLAN on Cisco switches is VLAN 1, cannot be modified
- Normal range range is 1-1005, 1001-1005 reserved for legacy FDDI and Token Ring support, 1006-4094 is considered extended range and is not supported by all protocols
- Data cannot travel between VLANs without the use of a Layer 3 device
Commands
- show vlan brief
- show mac-address-table (vlan#)
- vlan (#) – creates VLAN
- name (word) – names VLAN
- (config-if)# switchport mode (access, trunk) – changes mode for port
- (config-if)# switchport access vlan (#) – assigns port to VLAN
Trunking
ISL: Cisco proprietary, dot1q: IEEE 802.1Q
Purpose: Allows VLAN traffic over directly connected switches
Inter-Switch Link (ISL)
- Cisco proprietary
- Encapsulates entire frame with header and trailer
- Does not support Native VLAN concept
dot1q
- Industry standard, not proprietary
- Does not encapsulate frame, but adds a 4 byte header with VLAN number
- Does not add header when forwarding Native VLAN traffic
Commands
Switchport Modes
Purpose: Designates the role of an individual port on a switch.
Modes
- Access – Sets the port unconditionally as an access port (for end user devices)
- Trunk – Sets the port unconditionally as a trunk port (for connections between other switches)
- Dynamic – Attempts to negotiate the port mode as access or trunk based off of the connection on the other end of the cable
Dynamic Modes
- Auto – Will trunk if the other end initiates trunking, if both ends are in auto they will not trunk, if other end is in desirable or trunk, a trunk will form
- Desirable – Attempts to trunk and will form a trunk if other end is trunk on, desirable, or auto
- Nonegotiate – Turns off interface negotiation, goes into trunk mode but Dynamic Trunking Protocol (DTP) information is not forwarded or processed
Command
- (config-if)# switchport mode (access, trunk, dynamic)
VLAN Trunking Protocol (VTP)
Cisco Proprietary
Purpose: Manages and distributes VLAN information among switches in the same domain
Key Information
- Cannot be used with non-Cisco switches
- Domain names must match and are case sensitive
- Passwords must match and be configured on every switch in the domain if used
Modes
- Server – Can create, modify, or delete VLANs, originates and forwards VTP advertisements every 5 minutes or when its own VTP database has been updated, stores information in NVRAM, default mode for switches, each VTP domain must have at least one server
- Client – Cannot create, modify, or delete VLANs, stores VLAN information in running config, accepts and processes VTP advertisements with higher revision numbers than its last VTP update
- Transparent – Forwards advertisements but does not process them, can create, modify, and delete VLANs but changes are locally significant only, stores VLAN information in NVRAM
Commands
- vtp mode (server, client, transparent) – changes VTP mode
- vtp domain (word) – changes VTP domain name
- vtp password (word) – changes password
- vtp pruning – enables VTP pruning which prevents multicast and broadcast traffic long trunk lines that do not have ports belonging to intended VLANs
- show vtp status – displays VTP information to include mode and revision
Inter-VLAN Routing
Purpose: Route packets between different VLANs
Key Information
- Requires a layer 3 device, Router or multi-layer switch with an available Fast or Gigabit Ethernet port
- Link between switch and router must be a trunk link
- Encapsulation between switch and router must match
- Each VLAN gets configured with a subinterface on the router end
- Encapsulation mode must be entered on the subinterface first with the VLAN number
- The subinterface must have a valid IP address from the same subnet as the VLAN
- The address of the subinterface becomes the default gateway for that VLAN
- The no shutdown command must be issued on subinterfaces' parent port on the router
Commands (on router)
- interface fa0/0.1
- encapsulation (dot1q/ISL) (vlan#)
- ip address (address) (subnet mask)
- exit
- no shutdown