CCNA – Cisco Switch Cram Sheet

2900 Switches

Separate machines into separate collision domains that would exist if they were connected via a hub / directly. This means multiple machines can transmit / receive.

 

Contain MAC table which is filled when data is sent from a new host. If a switch does not know the destination it sends data out of all ports.

 

Switches are transparent bridges; do not modify frames. Switches use Application Specific Integrated Circuits ASIC  (hardware) whereas bridges use software.

 

MAC table stored in Content Addressable Memory (CAM) which is a piece of hardware.

 

Auto at both ends will not work properly, unless a desirable mode is set. Default on switch is Auto. It is best to set 100MB F/d if that is what is needed.

 

A Switch only ever has a single IP in the native VLAN.

 

All ports are disabled by default; use no shutdown to enable them and shutdown to disable.

Spanning Tree

Used to eliminate loops and provide redundancy; without it:

·         Broadcast Storm

·         Unstable MAC Table Entries

·         Duplicate packets

 

Four rules:

·         Only one root bridge per network

·         All ports on root bridge are designated

·         Non-root bridges have a root port

·         Each Segment (collision domain) has a designated port

 

Each bridge has an ID, the switch with the lowest ID is root.

 

STP is running By Default on all switches

 

Spanning-tree blocks all ports by default.

 

RSTP is much faster, and if f/d assumes that port is an edge-port.

Spanning Tree cont.

Default switch priority is 8000, thus the switch with the lowest MAC address will be root.

 

Based on path cost:

·         10 Gb – 2

·         1 Gb – 4

·         100Mb – 19

·         10 Mb – 100

 

Bridge Protocol Data Units – BPDU’s:

Root bridge sends BPDU’s every 2 seconds. If 10 are missed spanning-tree re-evaluates the network; this can take 30-50 seconds.

 

BPDU data is sent on the default VLAN.

 

Contain ID of Root, ID of Source, Path Cost

 

Port cycle:

Blocking > Listening > Learning > Forwarding

 

It is possible to block different ports on different VLAN’s; spreading the load across switches.

Spanning Tree config.

To view current spanning-tree info:

# show spanning tree

 

This will display if the switch is the root bridge and what the spanning-tree status is for the active ports.

 

To view spanning-tree info per VLAN:

# show spanning-tree vlan 101

 

To show spanning-tree info per interface:

# show spanning-tree interface eth 0/1

 

To set a port as an edge-port:

(config)# int fastethernet 0/1

(config-if)# spanning-tree portfast

 

Port speed can be set for path cost using:

(config-if)# speed 100

(config-if)# duplex full

 

To view interface configuration:

# show interface fastethernet 0/1

VLAN’s

Two types:

·         Static – assigned per port. One VLAN only per port.

·         Dynamic – sever controls membership database consisting of every MAC Address.

 

Cisco switches support two types of VLAN:

·         802.1q – industry standard, tags frames. Up to 4096 VLAN’s.

·         ISL – Cisco proprietary, encapsulates frame. Up to 1024 VLAN’s.

 

Default Native VLAN on Cisco hardware = 1

 

With ISAL all VLAN’s are tagged, with 802.1q the native VLAN is not tagged.

 

The native VLAN must be configured to be the same on all switches within a network.

 

Dynamic VLAN’s not commonly used due to administrative nightmare involved.

VLAN’s cont.

To create a VLAN:

# vlan database

# vlan 101

 

Will only apply VLAN’s when you exit VLAN d/b.

 

To assign a VLAN an IP:

# int vlan 101

# ip address 10.1.1.1 255.255.255.0

 

To assign a port to a vlan:

(config)# int fastethernet 0/1

# switchport access vlan 101

 

View VLAN information:

# show vlans / show vlan 100

# show ip interface brief

 

On newer switches it is possible to configure VLANS using:

(config)# vlan 100

Configuration

The Configuration register specifies start-up mode:

·         2142 – Ignore startup-config

·         2102 – Boot normally

·         2101 – Boot ROM OS

 

Switches have several types of memory

·         Flash – where IOS / IOS Image is stored

·         ROM – where bootstrap / mini IOS is stored.

·         NVRAM – where startup-config is stored.

 

Passwords:

VTY’s will only work when a password is set:

# line vty 0 4 – sets p/w for first 4 vty’s

# login

# password password_here

 

Console – from global config:

# enable secret – encrypted

# enable password – clear text

 

Boot process: – Interrupt using Ctrl-C / Break

POST > Boot Strap > Config Register > IOS > NVRAM

Trunks – VLAN Trunking Protocol

VTP Modes:

·         Server – can edit VLAN d/b, will send / receive adverts.

·         Client – cannot edit d/b, will receive adverts.

·         Transparent – will not send / receive adverts, can edit d/b.

 

All switches by default are Servers. This must be changed!

 

Requires a trunk to be setup between switches. Trunk carries all VTP data.

 

# vtp domain name_here

# vtp password pass_here

# vtp mode server / client etc

 

(config)# interface fastethernet 0/24

(config-if)# switchport mode trunk