R&S Blog

Just another WordPress.com site

Switch Port Configuration

Port Duplex Mode

If a 10/100 or a 10/100/1000 port is assigned a speed of auto, both it speed and duplex mode will be negotiated.

If port is set to Auto and the other end is set to Full the port will be set to the default of Half Duplex due to duplex mismatch, a general rule of thumb make sure both ends have the same speed and duplex settings to avoid any duplex mismatch.

To configure:

Switch(Config-if)# duplex (Auto | Full | Half)

Switch(config)# interface gig 3/1 Switch(config-if)# speed auto Switch(config-if)# duplex auto Switch(config-if)# interface gig 3/2 Switch(config-if)# speed 100 Switch(config-if)# duplex full

Looking for Speed and Duplex Mismatches

The host was configured at 100 mb Full Duplex and  the switch was set to Auto, the negotiation process fails and sets the port to half duplex on the switch, to fix this issue either set the host port duplex setting to Auto or set the switchport to Full-Duplex

Switch# show interfaces fastethernet 1/0/13
FastEthernet1/0/13 is up, line protocol is up
  Hardware is Fast Ethernet, address is 00d0.589c.3e8d (bia 00d0.589c.3e8d)
  MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec,
     reliability 255/255, txload 2/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Keepalive not set
 Auto-duplex (Half), Auto Speed (100), 100BASETX/FX  ARP type: ARPA, ARP
    Timeout 04:00:00
 Last input never, output 00:00:01, output hang never
  Last clearing of "show interface" counters never
  Queueing strategy: fifo
  Output queue 0/40, 0 drops; input queue 0/75, 0 drops
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 81000 bits/sec, 49 packets/sec
     500867 packets input, 89215950 bytes
     Received 12912 broadcasts, 374879 runts, 0 giants, 0 throttles
     374879 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored

Managing Error Conditions On a Switch Port

By default a Catalyst switch detects an error for every possible cause, if an error condition is detected it put the port status into errdiable, you can tune this behaviour on a global level is that only certain causes trigger a port to be errdisabled.

Switch(config)# [no] errdisable detect cause [all | cause-name]

You can repeat this command to enable or disable more than on e cause

List of causes:

  • all— Detects every possible cause
  • arp-inspection— Detects errors with dynamic ARP inspection
  • bpduguard— Detects when a spanning-tree bridge protocol data unit (BPDU) is received on a port configured for STP PortFast
  • channel-misconfig— Detects an error with an EtherChannel bundle
  • dhcp-rate-limit— Detects an error with DHCP snooping
  • dtp-flap— Detects when trunking encapsulation is changing from one type to another
  • gbic-invalid— Detects the presence of an invalid GBIC or SFP module
  • ilpower— Detects an error with offering inline power
  • l2ptguard— Detects an error with Layer 2 Protocol Tunneling
  • link-flap— Detects when the port link state is “flapping” between the up and down states
  • loopback— Detects when an interface has been looped back
  • pagp-flap— Detects when an EtherChannel bundle’s ports no longer have consistent configurations
  • psecure-violation— Detects conditions that trigger port security configured on a port
  • rootguard— Detects when an STP BPDU is received from the root bridge on an unexpected port
  • security-violation— Detects errors related to port security
  • storm-control— Detects when a storm control threshold has been exceeded on a port
  • udld— Detects when a link is seen to be unidirectional (data passing in only one direction)
  • unicast-flood— Detects conditions that trigger unicast flood blocking on a port
  • vmps— Detects errors when assigning a port to a dynamic VLAN through VLAN membership policy server (VMPS)

Automatically Recover From Error Conditions

By default ports in the errdisbale state must be manually shutdown and re-enabled by using the no shut command under the interface, you can configure a port to automatically reenable a port, you first have to specify the errdisable cause:

Switch(config)# errdisable recovery cause [all | cause-name]

If any errdisable causes are configured for automatic recovery, the errdisabled port stays down for 300 seconds, by default. To change the recovery timer, use the following command in global configuration mode:

Switch(config)# errdisable recovery interval seconds

If the errdisbale cause is configured for automatic recovery it stay down for 300 sec

you could use the following commands to configure all switch ports to be reenabled automatically in 1 hour after a port security violation has been detected:

Switch(config)# errdisable recovery cause psecurity-violation
Switch(config)# errdisable recovery interval 3600

Looking for Port Sates

Switch# show interfaces fastethernet 1/0/1 FastEthernet1/0/1 is up, line protocol is up Hardware is Fast Ethernet, address is 0009.b7ee.9801 (bia 0009.b7ee.9801) MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, reliability 255/255, txload 1/255, rxload 1/255

The first up tell us that the physical links is up, the 2nd up tells us that line protocol is up this relates to the layer 2 status

To quicky see a list of all states use the show interface status command, to see ports in the errdisable status use the show interface status status err-disabled


Single Post Navigation

One thought on “Switch Port Configuration

  1. Pingback: NETWORKING (Basics Understanding & Functions.) Part-1 | myreviews

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: