InterfacesCCNA 200-301

Interface Constantly Flapping Up and Down

Presenting Symptom

A switch interface repeatedly goes up and down, causing network instability and intermittent connectivity for connected devices.

Network Context

This issue occurs in a small branch office with a Cisco Catalyst 2960 switch running IOS 15.0(2). The switch connects to a single access layer switch and several end devices. The flapping interface is a GigabitEthernet port connected to a desktop PC.

Diagnostic Steps

1

Check interface status and error counters

show interfaces GigabitEthernet0/1
GigabitEthernet0/1 is up, line protocol is up (connected)
  Hardware is Gigabit Ethernet, address is 0011.2233.4455 (bia 0011.2233.4455)
  MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Keepalive set (10 sec)
  Auto-duplex, Auto-speed, media type is 10/100/1000BaseTX
  input flow-control is off, output flow-control is unsupported
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 00:00:00, output 00:00:00, 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
     0 packets input, 0 bytes, 0 no buffer
     Received 0 broadcasts (0 IP multicasts)
     0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 watchdog, 0 multicast, 0 pause input
     0 input packets with dribble condition detected
     0 packets output, 0 bytes, 0 underruns
     0 output errors, 0 collisions, 0 interface resets
     0 unknown protocol drops
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier, 0 pause output
     0 output buffer failures, 0 output buffers swapped out

Look for interface status changes (up/down) and error counters. If the interface is flapping, you may see 'up/down' or 'down/down' in the status line. Also check for input errors, CRC errors, or interface resets which indicate physical layer issues.

2

Check interface history for flaps

show interfaces GigabitEthernet0/1 history
GigabitEthernet0/1
  History:
    Last flap: 00:00:15 ago
    Number of flaps: 12
    Last 10 flaps:
      Up: 00:00:15 ago
      Down: 00:00:20 ago
      Up: 00:00:30 ago
      Down: 00:00:35 ago
      ...

This command shows the number of flaps and the time since the last flap. A high number of flaps indicates a flapping interface. The time between flaps can help identify if the issue is periodic.

3

Check for duplex mismatch

show interfaces GigabitEthernet0/1 | include Duplex
  Auto-duplex, Auto-speed, media type is 10/100/1000BaseTX

If the interface is set to auto-negotiation but the connected device is set to a fixed speed/duplex, a duplex mismatch can cause flapping. Look for 'Half-duplex' on one side and 'Full-duplex' on the other.

4

Check for cable or hardware issues

show interfaces GigabitEthernet0/1 | include errors|CRC|resets
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 output errors, 0 collisions, 0 interface resets

Non-zero values for input errors, CRC errors, or interface resets suggest a faulty cable, bad port, or electromagnetic interference. High collisions or late collisions indicate a duplex mismatch or cable length issues.

Root Cause

The interface is flapping due to a duplex mismatch: the switch port is set to auto-negotiate, but the connected PC's NIC is manually configured to 100 Mbps full-duplex. This causes the switch to detect a link but then drop it when it detects the mismatch, leading to repeated link flaps.

Resolution

Configure the switch port to match the PC's settings: set speed and duplex manually. Use the following commands: interface GigabitEthernet0/1 speed 100 duplex full no shutdown end Alternatively, set both sides to auto-negotiate if the hardware supports it. For the PC, change the NIC settings to auto-negotiate.

Verification

Run 'show interfaces GigabitEthernet0/1' and verify: - Interface status: 'GigabitEthernet0/1 is up, line protocol is up' - Duplex: 'Full-duplex' - Speed: '100 Mbps' - No error counters increasing - 'show interfaces GigabitEthernet0/1 history' should show no recent flaps.

Prevention

1. Always use auto-negotiation on both ends for speed and duplex to avoid mismatches. 2. Use consistent cabling standards (Cat5e or better for 1000BASE-T). 3. Implement interface error monitoring and alerting to detect flapping early.

CCNA Exam Relevance

On the CCNA 200-301 exam, interface flapping is a common troubleshooting scenario. Questions may present a scenario with symptoms like intermittent connectivity and ask to identify the cause (e.g., duplex mismatch, faulty cable). Candidates must know how to interpret 'show interfaces' output and understand the impact of duplex mismatch on link stability.

Exam Tips

1.

Memorize the 'show interfaces' command output fields: interface status, duplex, speed, and error counters.

2.

Understand that a duplex mismatch causes high collisions and late collisions, leading to flapping.

3.

Remember that auto-negotiation is the default and recommended setting; manual configuration should only be used when necessary.

Commands Used in This Scenario

Test Your CCNA Knowledge

Practice with scenario-based questions to prepare for the CCNA 200-301 exam.

Practice CCNA Questions