CCENT 3 S01 E15 – LANS: Optimizing and Troubleshooting Switches

  CCENT, Networking, Switches

Configuring Speed and Duplex

By default both Speed and Duplex are set to “Auto”
Auto-detect Speed works every time.
Auto-detect Duplex can fail if both the switch and the device are set to auto detect.

DUPLEX MISMATCH: duplex mismatch discovered on FastEthernet 0/1 (not half duplex), with AccessServer Ethernet (half duplex).
You will only see these messages if you are directly connected to the monitor, or if you have “Terminal Monitor” enabled.

 

Symptoms

If one side sends “Full Duplex” and the other is only “Half Duplex”, there will be numerous collisions and everything will be slow.

Solution

Set the switchport listed in the error (0/1) to match the device.

Sw1(config)#interface fastethernet 0/1
Sw1(config-if)#duplex half
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to down
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up

Set the Speed

Sw1(config-if)#speed 10

 

Recommendations

Allow PCs to “Auto Detect”

Manually configure these to ensure the settings are correct.

  • Servers
  • Routers
  • Printers
  • Other Switches (using cross-over cables)

 

Optimizing Your Switch

These probably won’t be on the test, but good to know (or at least to know about!)

Stop messages from splitting commands

Example:

Sw1#show
%SYS 5 CONFIG I: Configurd from console by thomas on vty0 (172.2.30.100) ip ...

Commands for Console and Telnet:

Sw1(config)#line console 0
Sw1(config-line)#logging synchronous
Sw1(config-line)#exit
Sw1(config)#line vty 0 4
Sw1(config-line)#logging synchronous

Result:

Sw1#show
%SYS 5 CONFIG I: Configurd from console by thomas on vty0 (172.2.30.100)
Sw1#show ip ...

 

Setting the Idle Timer

By default the Idle Timer is set to 5 minutes.
Example: Set to 30 minutes and 0 seconds

Sw1(config)#line console 0
Sw1(config-line)#exec-timeout 30 0
Sw1(config-line)#exit
Sw1(config)#line vty 0 4
Sw1(config-line)#exec-timeout 30 

To disable the timeout completely:

Sw1(config-line)#no exec timeout

 

Fixing Typo Delays (Due to domain lookups)

If you enter a typo, the switch will try to locate the mis-typed word as a domain. This can cause long delays before the prompt is displayed
Example:

Sw1#flow
Translating "flow"...domain server (255.255.255.255)
...long delay!...
% Unknown command or computer name, or unable to find computer address
Sw1#_

Command to disable this feature

Sw1(config)#no ip domain-lookup

Result:

Sw1#flow
% Unknown command or computer name, or unable to find computer address
Sw1#_

 

Creating Aliases

Aliases may be create for the “Mode” you are in, so the same alias can mean different things depending on the operating mode
Example: Create Alias for Privilege Mode (Exec Mode)

Sw1(config)#alias exec s show ip interface brief

Result:

Sw1#s
Interfaces    IP Address       OK?  .....
Vlan1         172.2.30.180     YES  ..... 
...

 

Spanning Tree Protocol

“Spanning Tree blocks redundancies to prevent loops.”
Designed to prevent loops caused by broadcasts between multiple devices with redundant connections.
This is known as a Broadcast Storm
SpanningTreeFailExample

Spanning Tree Protocol will drop trees on redundant links until they are needed.

  • Blocks one link and monitors the active link to verify it is working
  • Activates the blocked link if the primary link fails

This gets quite complicated in real world setups!!!
complexnetworksetup

Troubleshooting Using Show Commands

show ip interface brief

Will provide a report of all interfaces on the switch, and their current status.

Sw1#show ip interface brief 
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/1        unassigned      YES manual up                    up
FastEthernet0/2        unassigned      YES manual up                    up
FastEthernet0/3        unassigned      YES manual down                  down
FastEthernet0/4        unassigned      YES manual administratively down down
...
FastEthernet0/23       unassigned      YES manual down                  down
FastEthernet0/24       unassigned      YES manual down                  down
Vlan1                  172.2.30.180    YES manual up

Status:Physical Layer
Protocol: Data Link Layer

show interface fastethernet 0/N

Sw1#show interface fastethernet 0/2
FastEthernet0/2 is up, line protocol is up (connected)

FastEthernet0/2 is up = Status (Physical Layer)
line protocol is up = Protocol (Data Link Layer)

  Hardware is Lance, address is 0001.c7d6.bb02 (bia 0001.c7d6.bb02)

bia = Built In Address = MAC address for the switchport

 BW 100000 Kbit, DLY 1000 usec,
     reliability 255/255, txload 1/255, rxload 1/255

Reliability = 255/255 = 100% Reliable = 1=0 && 255=100
txload = Transmitting Load: 1/255 = very low, 255/255 = full load
rxload = Receiving Load

  Encapsulation ARPA, loopback not set
  Keepalive set (10 sec)
  Full-duplex, 100Mb/s
  input flow-control is off, output flow-control is off
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 00:00:08, output 00:00:05, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
  Output queue :0/40 (size/max)
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec

The following information is Historical Data

     956 packets input, 193351 bytes, 0 no buffer
     Received 956 broadcasts, 0 runts, 0 giants, 0 throttles

To calculate percentage of broadcasts: # Broadcasts / # Packets Input
Average usually about 20%
Runts: Packets that are too small
Giants: Packets that are too large
Runts & Giants generally caused by bad connections

     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
     0 watchdog, 0 multicast, 0 pause input
     0 input packets with dribble condition detected
     2357 packets output, 263570 bytes, 0 underruns
     0 output errors, 0 collisions, 10 interface resets
     0 babbles, 0 late collision, 0 deferred

Collisions generally caused by:

  • Cable is too long
  • Duplex mismatch (most common)

Late Collisions may occur if # hops between src and dest is too great.

  • This causes a packet to become delayed
  • The Source resends the packet because it did not receive an ACK
  • The new, repeat packet arrives

0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out

 

show running-config

Displays the actual configuration of the switch.
This is essentially a list of all configuration commands being currently used.

During the Cisco test, it is common to have this command disabled to force you to use different commands to find the problem!

 

Sw1#show running-config
Building configuration...

Current configuration : 1386 bytes
!
version 12.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
service password-encryption
!
hostname Sw1
!
enable secret 5 $1$mERr$GvDaTJK9lhdXRUPWKA74O0
!
ip ssh version 2
ip domain-name sw1.switch.com
!
username thomas privilege 1 password 7 08314D5D1A0E0A0516
!
spanning-tree mode pvst
!
interface FastEthernet0/1
 switchport mode access
 switchport port-security
!
interface FastEthernet0/2
 switchport mode access
!
interface FastEthernet0/3
!
...
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface Vlan1
 ip address 172.2.30.180 255.255.255.0
!
ip default-gateway 172.2.30.1
!
banner motd ^C

***
Keep Out!
***

^C
!
line con 0
 password 7 08314D5D1A0E0A0516
 login
!
line vty 0 4
 exec-timeout 60 0
 password 7 08314D5D1A0E0A0516
 login
 transport input ssh
line vty 5 15
 login
!
!
end

LEAVE A COMMENT