Sunday, April 17, 2011

Spanning Tree Protocol

When a switch receives multiple Hellos with equal calculated cost, it uses the following tiebreakers:
1. Pick the lowest value of the forwarding switch's bridge ID.
2. Use the lowest port priority of the neighboring switch. The neighboring switch added its own port priority to the Hello before forwarding it.
3. Use the lowest internal port number (of the forwarding switch) as listed inside the received Hellos.


spanning-tree mode {mst | pvst | rapid-pvst}
[no] spanning-tree vlan vlan-id
spanning-tree vlan vlan-id {forwardtime seconds | hello-time seconds | max-age seconds | priority priority | {root {primary | secondary} [diameter net-diameter [hello-time seconds]]}}
spanning-tree vlan x cost y
spanning-tree vlan x port-priority y

channel-group channel-group-number mode {auto [non-silent] | desirable [non-silent] | on | active | passive}
channel-protocol {lacp | pagp}
interface port-channel port-channel-number

spanning-tree portfast
spanning-tree bpduguard {enable | disable}
spanning-tree uplinkfast
spanning-tree backbonefast
spanning-tree mst instance-id priority priority
spanning-tree mst configuration

show spanning-tree { root | brief | summary }
show spanning-tree { uplinkfast | backbonefast }
show interface
show interface trunk
show etherchannel [summary]
show interface switchport
show vtp status
show controllers

Tuesday, April 12, 2011

VLAN

Using VLAN Database Mode to Create VLANs
Switch3# show vlan brief
Switch3# vlan database
Switch3# vlan database
Switch3(vlan)# vlan 21
Switch3(vlan)# show current
Switch3(vlan)# show proposed
Switch3(vlan)# apply
Switch3(vlan)# vlan 22 name ccie-vlan-22
Switch3(vlan)# show current 22
VLAN 22 does not exist in current database
Switch3(vlan)# show proposed 22
Switch3(vlan)# ^Z

Using Configuration Mode to Put Interfaces into VLANs
Switch3# config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch3(config)# int fa 0/8
Switch3(config-if)# switchport access vlan 31
% Access VLAN does not exist. Creating vlan 31
Switch3(config-if)# exit
Switch3(config)# vlan 32
Switch3(config-vlan)# name ccie-vlan-32
Switch3(config-if)# ^Z

Switch3(config)# vtp domain CCIE-domain

Switch1# sh vtp status
Switch1# show vlan brief

VLAN Trunking
switchport | no switchport
switchport mode
switchport trunk
switchport access
show interface trunk
show interface type number trunk
show interface type number switchport

Trunking Configuration Options
switchport mode trunk
switchport nonegotiate
switchport mode dynamic desirable
switchport mode dynamic auto
switchport mode access
switchport trunk encapsulation


interface fastethernet 0/0.1
ip address 10.1.21.1 255.255.255.0
encapsulation isl 21
!
interface fastethernet 0/0.2
ip address 10.1.22.1 255.255.255.0
encapsulation isl 22



interface fastethernet 0/0
ip address 10.1.21.1 255.255.255.0
!
interface fastethernet 0/0.2
ip address 10.1.22.1 255.255.255.0
encapsulation dot1q 22



EdgeRouter# conf t
EdgeRouter(config)# interface fa0/1
EdgeRouter(config-if)# ip address 192.168.100.1 255.255.255.0
EdgeRouter(config-if)# ip nat inside
EdgeRouter(config)# interface fa0/1
EdgeRouter(config-if)# pppoe-client dial-pool-number 1
EdgeRouter(config-if)# exit
EdgeRouter(config)# interface dialer1
EdgeRouter(config-if)# mtu 1492
EdgeRouter(config-if)# encapsulation ppp
EdgeRouter(config-if)# ip address negotiated
EdgeRouter(config-if)# ppp authentication chap

EdgeRouter(config-if)# ip nat outside
EdgeRouter(config-if)# dialer pool 1

EdgeRouter(config-if)# dialer-group 1
EdgeRouter(config-if)# exit
EdgeRouter(config)# dialer-list 1 protocol ip permit
EdgeRouter(config)# ip nat inside source list 1 interface dialier1 overload
EdgeRouter(config)# access-list 1 permit 192.168.100.0 0.0.0.255
EdgeRouter(config)# ip route 0.0.0.0 0.0.0.0 dialer1



show pppoe session
debug pppoe [data | errors | events | packets]

show mac address-table [aging-time | count | dynamic | static] [address hw-addr] [interface interface-id] [vlan vlan-id]
show interfaces [interface-id | vlan vlan-id] switchport | trunk]
show vlan [brief | id vlan-id |name vlan-name | summary]
show vlan [vlan]
show vtp status
switchport mode {access | dot1q-tunnel | dynamic {auto | desirable} | trunk}
switchport nonegotiate
switchport trunk {allowed vlan vlan-list} | {encapsulation {dot1q | isl | negotiate}} | {native vlan vlan-id} | {pruning vlan vlan-list}
switchport access vlan vlan-id

VLAN Database
vtp {domain domain-name | password password | pruning | v2-mode | {server | client | transparent}}
vlan vlan-id [backupcrf {enable | disable}] [mtu mtu-size] [name vlan-name] [parent parent-vlan-id] [state {suspend | active}]
show {current | proposed | difference}
apply | abort | reset


VLAN Configuration Mode
vtp {domain domain-name | file filename | interface name | mode {client | server | transparent} | password password | pruning | version number}
vlan vlan-id

Step 1 Change the VTP mode to Transparent, which will reset the configuration
revision number to 0.
Step 2 Delete the vlan.dat file from the switch’s flash.
Step 3 Reboot the switch.
Step 4 Configure the appropriate VTP parameters.
Step 5 Configure trunking.
Step 6 Connect the switch to the network.