Chapter 1. Configuring Interface Characteristics

- Restrictions for Configuring Interface Characteristics

- Information About Configuring Interface Characteristics

- How to Configure Interface Characteristics

- Monitoring Interface Characteristics

- Configuration Examples for Interface Characteristics

- Feature History and Information for Configuring Interface Characteristics

Restrictions for Configuring Interface Characteristics

- Flex Links are not supported.

Information About Configuring Interface Characteristics

- Interface Types

- Using the Switch USB Ports

- Interface Connections

- Interface Configuration Mode

- Default Ethernet Interface Configuration

- Interface Speed and Duplex Mode

- Speed and Duplex Configuration Guidelines

- IEEE 802.3x Flow Control

Interface Types

This section describes the different types of interfaces supported by the switch. The rest of the chapter describes configuration procedures for physical interface characteristics.

- Port-Based VLANs

- Switch Ports

- Switch Virtual Interfaces

- EtherChannel Port Groups

- Dual-Purpose Uplink Ports

- Power over Ethernet Ports

Port-Based VLANs

A VLAN is a switched network that is logically segmented by function, team, or application, without regard to the physical location of the users. Packets received on a port are forwarded only to ports that belong to the same VLAN as the receiving port. Network devices in different VLANs cannot communicate with one another without a Layer 3 device to route traffic between the VLANs.

VLAN partitions provide hard firewalls for traffic in the VLAN, and each VLAN has its own MAC address table. A VLAN comes into existence when a local port is configured to be associated with the VLAN, when the VLAN Trunking Protocol (VTP) learns of its existence from a neighbor on a trunk, or when a user creates a VLAN.

To configure VLANs, use the vlan vlan-id global configuration command to enter VLAN configuration mode. The VLAN configurations for normal-range VLANs (VLAN IDs 1 to 1005) are saved in the VLAN database. If VTP is version 1 or 2, to configure extended-range VLANs (VLAN IDs 1006 to 4094), you must first set VTP mode to transparent. Extended-range VLANs created in transparent mode are not added to the VLAN database but are saved in the switch running configuration. With VTP version 3, you can create extended-range VLANs in client or server mode. These VLANs are saved in the VLAN database.

Add ports to a VLAN by using the switchport interface configuration commands:

- Identify the interface.

- For a trunk port, set trunk characteristics, and, if desired, define the VLANs to which it can belong.

- For an access port, set and define the VLAN to which it belongs.

Switch Ports

Switch ports are Layer 2-only interfaces associated with a physical port. Switch ports belong to one or more VLANs. A switch port can be an access port or a trunk port. You can configure a port as an access port or trunk port or let the Dynamic Trunking Protocol (DTP) operate on a per-port basis to set the switchport mode by negotiating with the port on the other end of the link. Switch ports are used for managing the physical interface and associated Layer 2 protocols and do not handle routing or bridging.

Configure switch ports by using the switchport interface configuration commands.

- Access Ports

- Trunk Ports

Access Ports

An access port belongs to and carries the traffic of only one VLAN (unless it is configured as a voice VLAN port). Traffic is received and sent in native formats with no VLAN tagging. Traffic arriving on an access port is assumed to belong to the VLAN assigned to the port.

The types of access ports supported are:

- Static access ports are manually assigned to a VLAN (or through a RADIUS server for use with IEEE 802.1x.

- VLAN membership of dynamic access ports is learned through incoming packets. By default, a dynamic access port is not a member of any VLAN, and forwarding to and from the port is enabled only when the VLAN membership of the port is discovered.

You can also configure an access port with an attached Cisco IP Phone to use one VLAN for voice traffic and another VLAN for data traffic from a device attached to the phone.

Trunk Ports

A trunk port carries the traffic of multiple VLANs and by default is a member of all VLANs in the VLAN database.

The switch supports only IEEE 802.1Q trunk ports. An IEEE 802.1Q trunk port supports simultaneous tagged and untagged traffic. An IEEE 802.1Q trunk port is assigned a default port VLAN ID (PVID), and all untagged traffic travels on the port default PVID. All untagged traffic and tagged traffic with a NULL VLAN ID are assumed to belong to the port default PVID. A packet with a VLAN ID equal to the outgoing port default PVID is sent untagged. All other traffic is sent with a VLAN tag.

Although by default, a trunk port is a member of every VLAN known to the VTP, you can limit VLAN membership by configuring an allowed list of VLANs for each trunk port. The list of allowed VLANs does not affect any other port but the associated trunk port. By default, all possible VLANs (VLAN ID 1 to 4094) are in the allowed list. A trunk port can become a member of a VLAN only if VTP knows of the VLAN and if the VLAN is in the enabled state. If VTP learns of a new, enabled VLAN and the VLAN is in the allowed list for a trunk port, the trunk port automatically becomes a member of that VLAN and traffic is forwarded to and from the trunk port for that VLAN. If VTP learns of a new, enabled VLAN that is not in the allowed list for a trunk port, the port does not become a member of the VLAN, and no traffic for the VLAN is forwarded to or from the port.

Switch Virtual Interfaces

A switch virtual interface (SVI) represents a VLAN of switch ports as one interface to the routing or bridging function in the system. You can associate only one SVI with a VLAN. You configure an SVI for a VLAN only to route between VLANs or to provide IP host connectivity to the switch. By default, an SVI is created for the default VLAN (VLAN 1) to permit remote switch administration. Additional SVIs must be explicitly configured.

Note

You cannot delete interface VLAN 1.

SVIs provide IP host connectivity only to the system. SVIs are created the first time that you enter the vlan interface configuration command for a VLAN interface. The VLAN corresponds to the VLAN tag associated with data frames on an IEEE 802.1Q encapsulated trunk or the VLAN ID configured for an access port. Configure a VLAN interface for each VLAN for which you want to route traffic, and assign it an IP address.

You can also use the interface range command to configure existing VLAN SVIs within the range. The commands entered under the interface range command are applied to all existing VLAN SVIs within the range. When the VLAN interface is created, interface range vlan id can be used to configure the VLAN interface.

When you create an SVI, it does not become active until it is associated with a physical port.

EtherChannel Port Groups

EtherChannel port groups treat multiple switch ports as one switch port. These port groups act as a single logical port for high-bandwidth connections between switches or between switches and servers. An EtherChannel balances the traffic load across the links in the channel. If a link within the EtherChannel fails, traffic previously carried over the failed link changes to the remaining links. You can group multiple trunk ports into one logical trunk port or multiple access ports into one logical access port. Most protocols operate over either single ports or aggregated switch ports and do not recognize the physical ports within the port group. Exceptions are the DTP, the Cisco Discovery Protocol, and the Port Aggregation Protocol (PAgP), which operate only on physical ports.

When you configure an EtherChannel, you create a port-channel logical interface and assign an interface to the EtherChannel. For Layer 2 interfaces, use the channel-group interface configuration command to dynamically create the port-channel logical interface. This command binds the physical and logical ports together.

Dual-Purpose Uplink Ports

Catalyst switches support dual-purpose uplink ports. Each uplink port is considered as a single interface with dual front ends—an RJ-45 connector and an small form-factor pluggable (SFP) module connector. The dual front ends are not redundant interfaces, and the switch activates only one connector of the pair.

By default, the switch selects the RJ-45 connector as the interface type. However, you can use the media-type interface configuration command on the interface to manually select the SFP module connector. For information about configuring speed and duplex settings for a dual-purpose uplink, see the Setting the Interface Speed and Duplex Parameters section.

Each uplink port has one LED which is located below the SFP module connector. The port LED is on for whichever uplink port is active. For more information about the LEDs, see the hardware installation guide.

Power over Ethernet Ports

A PoE-capable switch port automatically supplies power to one of these connected devices if the switch senses that there is no power on the circuit:

- a Cisco pre-standard powered device (such as a Cisco IP Phone, a Cisco Aironet Access Point, or a Cisco Catalyst Access Point)

- an IEEE 802.3af and IEEE 802.3at-compliant powered device

A powered device can receive redundant power when it is connected to a PoE switch port and to an AC power source. The device does not receive redundant power when it is only connected to the PoE port.

Using the Switch USB Ports

The switch has two USB ports on the front panel — a USB Micro-Type B console port and a USB Type C port.

- USB Micro-Type B Console Port

- USB Type C port

USB Micro-Type B Console Port

The device supports a USB Micro Type B Connector for the console port, that allows a USB Type A port (typically found on a Personal Computer) to be cabled directly to a switch console management port. A USB Type A to USB Micro Type B cable is used for the connection.

USB Type C port

The device has two USB Type C ports that provides power capability.

USB Type C ports are independent power sourcing ports and are not meant for data transfer. This port provides sufficient power to frequently used peripherals such as laptop, monitor, tablet and smartphone.

For information about the power distribution on the ports, see Power Supply Slot.

Interface Connections

Devices within a single VLAN can communicate directly through any switch. Ports in different VLANs cannot exchange data without going through a routing device.

In the following configuration example, when Host A in VLAN 20 sends data to Host B in VLAN 30, the data must go from Host A to the switch, to the router, back to the switch, and then to Host B.

Connecting VLANs with the Switch

With a standard Layer 2 switch, ports in different VLANs have to exchange information through a router.

Interface Configuration Mode

The switch supports these interface types:

- Physical ports: switch ports and routed ports

- VLANs: switch virtual interfaces

- Port channels: EtherChannel interfaces

You can also configure a range of interfaces.

To configure a physical interface (port), specify the interface type, module number, and port number, and enter interface configuration mode.

- Type: Gigabit Ethernet (gigabitethernet or gi) for 10/100/1000 Mb/s Ethernet ports,, or small form-factor pluggable (SFP) module Gigabit Ethernet interfaces (gigabitethernet or gi).

- Module number: The module or slot number on the switch (always 0).

- Port number: The interface number on the switch. The 10/100/1000 port numbers always begin at 1, starting with the far left port when facing the front of the switch, for example, gigabitethernet1/0/1 or gigabitethernet1/0/8. For a switch with 10/100/1000 ports and SFP module ports, SFP module ports are numbered consecutively following the 10/100/1000 ports.

You can identify physical interfaces by physically checking the interface location on the switch. You can also use the show privileged EXEC commands to display information about a specific interface or all the interfaces on the switch. The remainder of this chapter primarily provides physical interface configuration procedures.

Default Ethernet Interface Configuration

This table shows the Ethernet interface default configuration, including some features that apply only to Layer 2 interfaces.

Default Layer 2 Ethernet Interface Configuration

Feature

Default Setting

Operating mode

Layer 2 or switching mode (switchport command).

Allowed VLAN range

VLANs 1– 4094.

Default VLAN (for access ports)

VLAN 1.

Native VLAN (for IEEE 802.1Q trunks)

VLAN 1.

802.1p priority-tagged traffic

Drop all packets tagged with VLAN 0.

VLAN trunking

Switchport mode dynamic auto (supports DTP).

Port enable state

All ports are enabled.

Port description

None defined.

Speed

Autonegotiate. (Not supported on the 10-Gigabit interfaces.)

Duplex mode

Autonegotiate. (Not supported on the 10-Gigabit interfaces.)

Flow control

Flow control is set to receive: off . It is always off for sent packets.

EtherChannel (PAgP)

Disabled on all Ethernet ports.

Port blocking (unknown multicast and unknown unicast traffic)

Disabled (not blocked).

Broadcast, multicast, and unicast storm control

Disabled.

Protected port

Disabled.

Port security

Disabled.

Port Fast

Disabled.

Auto-MDIX

Enabled.

Note

The switch might not support a pre-standard powered device—such as Cisco IP phones and access points that do not fully support IEEE 802.3af—if that powered device is connected to the switch through a crossover cable. This is regardless of whether auto-MIDX is enabled on the switch port.

Power over Ethernet (PoE)

Enabled (auto).

Keepalive messages

Disabled on SFP module ports; enabled on all other ports.

Interface Speed and Duplex Mode

Ethernet interfaces on the switch operate at 10, 100, or 1000 Mb/s and in either full- or half-duplex mode. In full-duplex mode, two stations can send and receive traffic at the same time. Normally, 10-Mb/s ports operate in half-duplex mode, which means that stations can either receive or send traffic.

Switch modules include Gigabit Ethernet (10/100/1000-Mb/s) ports and small form-factor pluggable (SFP) module slots supporting SFP modules.

Speed and Duplex Configuration Guidelines

When configuring an interface speed and duplex mode, note these guidelines:

- Do not disable Auto-Negotiation on PoE switches.

- Gigabit Ethernet (10/100/1000-Mb/s) ports support all speed options and all duplex options (auto, half, and full). However, Gigabit Ethernet ports operating at 1000 Mb/s do not support half-duplex mode.

- For SFP module ports, the duplex CLI options change depending on the SFP module type. Speeds of 10/100 Mb/s are not supported.

- If both ends of the line support autonegotiation, we highly recommend the default setting of auto negotiation.

- If one interface supports autonegotiation and the other end does not, configure duplex and speed on both interfaces; do not use the auto setting on the supported side.

- When STP is enabled and a port is reconfigured, the switch can take up to 30 seconds to check for loops. The port LED is amber while STP reconfigures.

- As best practice, we suggest configuring the speed and duplex options on a link to auto or to fixed on both the ends. If one side of the link is configured to auto and the other side is configured to fixed, the link will not be up and this is expected.

Caution

Changing the interface speed and duplex mode configuration might shut down and re-enable the interface during the reconfiguration.

IEEE 802.3x Flow Control

Flow control enables connected Ethernet ports to control traffic rates during congestion by allowing congested nodes to pause link operation at the other end. If one port experiences congestion and cannot receive any more traffic, it notifies the other port by sending a pause frame to stop sending until the condition clears. Upon receipt of a pause frame, the sending device stops sending any data packets, which prevents any loss of data packets during the congestion period.

Note

The switch ports can receive, but not send, pause frames.

Use the flowcontrol interface configuration command to set the interface’s ability to receive pause frames to on , off , or desired . The default state is on .

When set to desired , an interface can operate with an attached device that is required to send flow-control packets or with an attached device that is not required to but can send flow-control packets.

These rules apply to flow control settings on the device:

- receive on (or desired ): The port cannot send pause frames but can operate with an attached device that is required to or can send pause frames; the port can receive pause frames.

- receive off : Flow control does not operate in either direction. In case of congestion, no indication is given to the link partner, and no pause frames are sent or received by either device.

Note

For details on the command settings and the resulting flow control resolution on local and remote ports, see the flowcontrol interface configuration command in the command reference for this release.

How to Configure Interface Characteristics

- Configuring Interfaces

- Adding a Description for an Interface

- Configuring a Range of Interfaces

- Configuring and Using Interface Range Macros

- Configuring Ethernet Interfaces

- Configuring IEEE 802.3x Flow Control

- Shutting Down and Restarting the Interface

- Configuring the Console Media Type

- Configuring the USB Inactivity Timeout

Configuring Interfaces

These general instructions apply to all interface configuration processes.

Procedure

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

interface

Example:

Device(config)# interface gigabitethernet 1/0/1

Identifies the interface type and the number of the connector.

Note

You do not need to add a space between the interface type and the interface number. For example, in the preceding line, you can specify either gigabitethernet 1/0/1 , gigabitethernet1/0/1 , gi 1/0/1 , or gi1/0/1 .

Step 4

Follow each interface command with the interface configuration commands that the interface requires.

Defines the protocols and applications that will run on the interface. The commands are collected and applied to the interface when you enter another interface command or enter end to return to privileged EXEC mode.

Step 5

interface range or interface range macro

(Optional) Configures a range of interfaces.

Note

Interfaces configured in a range must be the same type and must be configured with the same feature options.

Step 6

show interfaces

Displays a list of all interfaces on or configured for the switch. A report is provided for each interface that the device supports or for the specified interface.

Adding a Description for an Interface

Procedure

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

interface interface-id

Example:

Device(config)# interface gigabitethernet 1/0/2

Specifies the interface for which you are adding a description, and enter interface configuration mode.

Step 4

description string

Example:

Device(config-if)# description Connects to Marketing

Adds a description (up to 240 characters) for an interface.

Step 5

end

Example:

Device(config-if)# end

Returns to privileged EXEC mode.

Step 6

show interfaces interface-id description

Verifies your entry.

Step 7

copy running-config startup-config

Example:

Device# copy running-config startup-config

(Optional) Saves your entries in the configuration file.

Configuring a Range of Interfaces

To configure multiple interfaces with the same configuration parameters, use the interface range global configuration command. When you enter the interface-range configuration mode, all command parameters that you enter are attributed to all interfaces within that range until you exit this mode.

Procedure

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

interface range {port-range | macro macro_name}

Example:

Device(config)# interface range macro

Specifies the range of interfaces (VLANs or physical ports) to be configured, and enter interface-range configuration mode.

- You can use the interface range command to configure up to five port ranges or a previously defined macro.

- The macro variable is explained in the section on Configuring and Using Interface Range Macros.

- In a comma-separated port-range , you must enter the interface type for each entry and enter spaces before and after the comma.

- In a hyphen-separated port-range , you do not need to re-enter the interface type, but you must enter a space before the hyphen.

Note

Use the regular configuration commands to apply the configuration parameters to all interfaces in the range. Each command is executed as it is entered.

Step 4

end

Example:

Device(config)# end

Returns to privileged EXEC mode.

Step 5

show interfaces [interface-id]

Example:

Device# show interfaces

Verifies the configuration of the interfaces in the range.

Step 6

copy running-config startup-config

Example:

Device# copy running-config startup-config

(Optional) Saves your entries in the configuration file.

Configuring and Using Interface Range Macros

You can create an interface range macro to automatically select a range of interfaces for configuration. Before you can use the macro keyword in the interface range macro global configuration command string, you must use the define interface-range global configuration command to define the macro.

Procedure

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

define interface-range macro_name interface-range

Example:

Device(config)# define interface-range enet_list gigabitethernet 1/0/1 - 2

Defines the interface-range macro, and save it in NVRAM.

- The macro_name is a 32-character maximum character string.

- A macro can contain up to five comma-separated interface ranges.

- Each interface-range must consist of the same port type.

Note

Before you can use the macro keyword in the interface range macro global configuration command string, you must use the define interface-range global configuration command to define the macro.

Step 4

interface range macro macro_name

Example:

Device(config)# interface range macro enet_list

Selects the interface range to be configured using the values saved in the interface-range macro called macro_name .

You can now use the normal configuration commands to apply the configuration to all interfaces in the defined macro.

Step 5

end

Example:

Device(config)# end

Returns to privileged EXEC mode.

Step 6

show running-config | include define

Example:

Device# show running-config | include define

Shows the defined interface range macro configuration.

Step 7

copy running-config startup-config

Example:

Device# copy running-config startup-config

(Optional) Saves your entries in the configuration file.

Configuring Ethernet Interfaces

- Setting the Interface Speed and Duplex Parameters

Setting the Interface Speed and Duplex Parameters

Procedure

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

interface interface-id

Example:

Device(config)# interface gigabitethernet 1/0/3

Specifies the interface for which you are adding a description, and enter interface configuration mode.

Step 4

speed {10 | 100 | 1000}

Example:

Device(config-if)# speed 10

Enter the appropriate speed parameter for the interface:

- Enter 10 , 100 , 1000 to set a specific speed for the interface.

Step 5

duplex {auto | full | half}

Example:

Device(config-if)# duplex half

This command is not available on a 10-Gigabit Ethernet interface.

Enter the duplex parameter for the interface.

Enable half-duplex mode (for interfaces operating only at 10 or 100 Mb/s). You cannot configure half-duplex mode for interfaces operating at 1000 Mb/s.

You can configure the duplex setting when the speed is set to auto .

Step 6

end

Example:

Device(config-if)# end

Returns to privileged EXEC mode.

Step 7

show interfaces interface-id

Example:

Device# show interfaces gigabitethernet 1/0/3

Displays the interface speed and duplex mode configuration.

Step 8

copy running-config startup-config

Example:

Device# copy running-config startup-config

(Optional) Saves your entries in the configuration file.

Configuring IEEE 802.3x Flow Control

Procedure

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

interface interface-id

Example:

Device(config)# interface gigabitethernet 1/0/1

Specifies the interface for which you are adding a description, and enter interface configuration mode.

Step 4

flowcontrol {receive} {on | off | desired}

Example:

Device(config-if)# flowcontrol receive on

Configures the flow control mode for the port.

Step 5

end

Example:

Device(config-if)# end

Returns to privileged EXEC mode.

Step 6

show interfaces interface-id

Example:

Device# show interfaces gigabitethernet 1/0/1

Verifies the interface flow control settings.

Step 7

copy running-config startup-config

Example:

Device# copy running-config startup-config

(Optional) Saves your entries in the configuration file.

Shutting Down and Restarting the Interface

Shutting down an interface disables all functions on the specified interface and marks the interface as unavailable on all monitoring command displays. This information is communicated to other network servers through all dynamic routing protocols. The interface is not mentioned in any routing updates.

Procedure

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

interface {vlan vlan-id} | {gigabitethernet interface-id} | {port-channel port-channel-number}

Example:

Device(config)# interface gigabitethernet 1/0/2

Selects the interface to be configured.

Step 4

shutdown

Example:

Device(config-if)# shutdown

Shuts down an interface.

Step 5

no shutdown

Example:

Device(config-if)# no shutdown

Restarts an interface.

Step 6

end

Example:

Device(config-if)# end

Returns to privileged EXEC mode.

Step 7

show running-config

Example:

Device# show running-config

Verifies your entries.

Configuring the Console Media Type

Follow these steps to set the console media type to RJ-45. If you configure the console as RJ-45, USB console operation is disabled, and input comes only through the RJ-45 connector.

Procedure

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

line console 0

Example:

Device(config)# line console 0

Configures the console and enters line configuration mode.

Step 4

media-type rj45

Example:

Device(config-line)# media-type rj45

Configures the console media type to be only RJ-45 port. If you do not enter this command and both types are connected, the USB port is used by default.

Step 5

end

Example:

Device(config-if)# end

Returns to privileged EXEC mode.

Step 6

copy running-config startup-config

Example:

Device# copy running-config startup-config

(Optional) Saves your entries in the configuration file.

Configuring the USB Inactivity Timeout

The configurable inactivity timeout reactivates the RJ-45 console port if the USB console port is activated but no input activity occurs on it for a specified time period. When the USB console port is deactivated due to a timeout, you can restore its operation by disconnecting and reconnecting the USB cable.

Note

This procedure is not applicable to Cisco Catalyst 1000 Fast Ethernet Series Switches.

Procedure

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

line console 0

Example:

Device(config)# line console 0

Configures the console and enters line configuration mode.

Step 4

usb-inactivity-timeout timeout-minutes

Example:

Device(config-line)# usb-inactivity-timeout 30

Specify an inactivity timeout for the console port. The range is 1 to 240 minutes. The default is to have no timeout configured.

Step 5

copy running-config startup-config

Example:

Device# copy running-config startup-config

(Optional) Saves your entries in the configuration file.

Monitoring Interface Characteristics

- Monitoring Interface Status

- Clearing and Resetting Interfaces and Counters

Monitoring Interface Status

Commands entered at the privileged EXEC prompt display information about the interface, including the versions of the software and the hardware, the configuration, and statistics about the interfaces.

Show Commands for Interfaces

Command

Purpose

show interfaces interface-number downshift modulemodule-number

Displays the downshift status details of the specified interfaces and modules.

show interfaces interface-id status [err-disabled]

Displays interface status or a list of interfaces in the error-disabled state.

show interfaces [interface-id] switchport

Displays administrative and operational status of switching (nonrouting) ports. You can use this command to find out if a port is in routing or in switching mode.

show interfaces [interface-id] description

Displays the description configured on an interface or all interfaces and the interface status.

show ip interface [interface-id]

Displays the usability status of all interfaces configured for IP routing or the specified interface.

show interface [interface-id] stats

Displays the input and output packets by the switching path for the interface.

show interfaces interface-id

(Optional) Displays speed and duplex on the interface.

show interfaces transceiver dom-supported-list

(Optional) Displays Digital Optical Monitoring (DOM) status on the connect SFP modules.

show interfaces transceiver properties

(Optional) Displays temperature, voltage, or amount of current on the interface.

show interfaces [interface-id] [{transceiver properties | detail}] module number]

Displays physical and operational status about an SFP module.

show running-config interface [interface-id]

Displays the running configuration in RAM for the interface.

show version

Displays the hardware configuration, software version, the names and sources of configuration files, and the boot images.

show controllers ethernet-controller interface-id phy

Displays the operational state of the auto-MDIX feature on the interface.

Clearing and Resetting Interfaces and Counters

Clear Commands for Interfaces

Command

Purpose

clear counters [interface-id]

Clears interface counters.

clear interface interface-id

Resets the hardware logic on an interface.

clear line [number | console 0 | vty number]

Resets the hardware logic on an asynchronous serial line.

Note

The clear counters privileged EXEC command does not clear counters retrieved by using Simple Network Management Protocol (SNMP), but only those seen with the show interface privileged EXEC command.

Configuration Examples for Interface Characteristics

- Configuring a Range of Interfaces: Examples

- Configuring and Using Interface Range Macros: Examples

- Setting Interface Speed and Duplex Mode: Example

- Configuring the Console Media Type: Example

- Configuring the USB Inactivity Timeout: Example

Configuring a Range of Interfaces: Examples

This example shows how to use the interface range global configuration command to set the speed to 100 Mb/s on ports 1 to 4 on switch 1:

Device# configure terminal
Device(config)# interface range gigabitethernet 1/0/1 - 4
Device(config-if-range)# speed 100

If you enter multiple configuration commands while you are in interface-range mode, each command is executed as it is entered. The commands are not batched and executed after you exit interface-range mode. If you exit interface-range configuration mode while the commands are being executed, some commands might not be executed on all interfaces in the range. Wait until the command prompt reappears before exiting interface-range configuration mode.

Configuring and Using Interface Range Macros: Examples

This example shows how to define an interface-range named enet_list to include ports 1 and 2 on switch 1 and to verify the macro configuration:

Device# configure terminal
Device(config)# define interface-range enet_list gigabitethernet 1/0/1 - 2
Device(config)# end
Device# show running-config | include define
define interface-range enet_list gigabitethernet 1/0/1 - 2

This example shows how to enter interface-range configuration mode for the interface-range macro enet_list:

Device# configure terminal
Device(config)# interface range macro enet_list
Device(config-if-range)#

This example shows how to delete the interface-range macro enet_list and to verify that it was deleted.

Device# configure terminal
Device(config)# no define interface-range enet_list
Device(config)# end
Device# show run | include define
Device#

Setting Interface Speed and Duplex Mode: Example

This example shows how to set the interface speed to 100 Mb/s and the duplex mode to half on a 10/100/1000 Mb/s port:

Device# configure terminal
Device(config)# interface gigabitethernet 1/0/3
Device(config-if)# speed 10
Device(config-if)# duplex half

This example shows how to set the interface speed to 100 Mb/s on a 10/100/1000 Mb/s port:

Device# configure terminal
Device(config)# interface gigabitethernet 1/0/2
Device(config-if)# speed 100

Configuring the Console Media Type: Example

This example disables the USB console media type and enables the RJ-45 console media type.

Device# configure terminal
Device(config)# line console 0
Device(config-line)# media-type rj45

This example reverses the previous configuration and immediately activates any USB console that is connected.

Device# configure terminal
Device(config)# line console 0
Device(config-line)# no media-type rj45

Configuring the USB Inactivity Timeout: Example

This example configures the inactivity timeout to 30 minutes:

Device# configure terminal
Device(config)# line console 0
Device(config-line)# usb-inactivity-timeout 30

To disable the configuration, use these commands:

Device# configure terminal
Device(config)# line console 0
Device(config-line)# no usb-inactivity-timeout

If there is no (input) activity on a USB console port for the configured number of minutes, the inactivity timeout setting applies to the RJ-45 port, and a log shows this occurrence:

*Mar  1 00:47:25.625: %USB_CONSOLE-6-INACTIVITY_DISABLE: Console media-type USB disabled due to inactivity, media-type reverted to RJ45.

At this point, the only way to reactivate the USB console port is to disconnect and reconnect the cable.

When the USB cable on the switch has been disconnected and reconnected, a log similar to this appears:

*Mar  1 00:48:28.640: %USB_CONSOLE-6-MEDIA_USB: Console media-type is USB.

Feature History and Information for Configuring Interface Characteristics

The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.

Feature History and Information for Configuring VLAN

Feature

Release

Feature Information

Configuring Interface Characteristics

This feature was introduced.

Chapter 2. Configuring Auto-MDIX

- Prerequisites for Auto-MDIX

- Restrictions for Auto-MDIX

- Information About Auto-MDIX

- How to Configure Auto-MDIX

- Feature History and Information for Auto-MDIX

Prerequisites for Auto-MDIX

If the interface is in Layer 3 mode and you want to want to configure Layer 2 parameters, you must first change the interface to Layer 2 mode. Enter the switchport interface configuration command without any parameters, to change the interface to Layer 2 mode. This shuts down the interface and then re-enables it, which may generate messages on the device to which the interface is connected. When you change an interface from Layer 3 mode to Layer 2 mode, previous configuration information related to the affected interface might be lost, and the interface is returned to its default configuration.

Restrictions for Auto-MDIX

- Automatic medium-dependent interface crossover (auto-MDIX) is supported on all 10/100/1000-Mb/s and on 10/100/1000BASE-TX small form-factor pluggable (SFP) module interfaces. It is not supported on 1000BASE-SX or -LX SFP module interfaces.

- The switch might not support a pre-standard powered device such as a Cisco IP phone or an access point that does not fully support IEEE 802.3af, if that powered device is connected to the switch through a crossover cable. This is regardless of whether auto-MIDX is enabled on the switch port or not.

Information About Auto-MDIX

- Auto-MDIX on an Interface

Auto-MDIX on an Interface

When auto-MDIX is enabled on an interface, the interface automatically detects the required cable connection type (straight through or crossover) and configures the connection appropriately. When connecting devices without the auto-MDIX feature, you must use straight-through cables to connect to devices such as servers, workstations, or routers and crossover cables to connect to other devices or repeaters. With auto-MDIX enabled, you can use either type of cable to connect to other devices, and the interface automatically corrects for any incorrect cabling. For more information about cabling requirements, see the hardware installation guide.

This feature is enabled by default.

The following table shows the link states that result from auto-MDIX settings and correct and incorrect cabling.

Link Conditions and Auto-MDIX Settings

Local Side Auto-MDIX

Remote Side Auto-MDIX

With Correct Cabling

With Incorrect Cabling

On

On

Link up

Link up

On

Off

Link up

Link up

Off

On

Link up

Link up

Off

Off

Link up

Link down

How to Configure Auto-MDIX

- Configuring Auto-MDIX on an Interface

Configuring Auto-MDIX on an Interface

To configure auto-MDIX on an interface, complete the following steps:

Procedure

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode. Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode

Step 3

interface interface-id

Example:

Device(config)# interface gigabitethernet 1/0/1

Specifies the physical interface to be configured, and enters interface configuration mode.

Step 4

speed auto

Example:

Device(config-if)# speed auto

Configures the interface to autonegotiate speed with the connected device.

Step 5

duplex auto

Example:

Device(config-if)# duplex auto

Configures the interface to autonegotiate duplex mode with the connected device.

Step 6

end

Example:

Device(config-if)# end

Returns to privileged EXEC mode.

Step 7

copy running-config startup-config

Example:

Device# copy running-config startup-config

(Optional) Saves your entries in the configuration file.

Feature History and Information for Auto-MDIX

The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.

Feature Name

Releases

Feature Information

Auto-MDIX

Cisco IOS Release 15.2(7)E3k

This feature was introduced.

Chapter 3. Configuring LLDP, LLDP-MED, and Wired Location Service

- Information About LLDP, LLDP-MED, and Wired Location Service

- How to Configure LLDP, LLDP-MED, and Wired Location Service

- Configuration Examples for LLDP, LLDP-MED, and Wired Location Service

- Monitoring and Maintaining LLDP, LLDP-MED, and Wired Location Service

- Feature History and Information for LLDP, LLDP-MED, and Wired Location Service

Information About LLDP, LLDP-MED, and Wired Location Service

- LLDP

- LLDP-MED

- Default LLDP Configuration

- Restrictions for LLDP

LLDP

The Cisco Discovery Protocol (CDP) is a device discovery protocol that runs over Layer 2 (the data link layer) on all Cisco-manufactured devices (routers, bridges, access servers, switches, and controllers). CDP allows network management applications to automatically discover and learn about other Cisco devices connected to the network.

To support non-Cisco devices and to allow for interoperability between other devices, the device supports the IEEE 802.1AB Link Layer Discovery Protocol (LLDP). LLDP is a neighbor discovery protocol that is used for network devices to advertise information about themselves to other devices on the network. This protocol runs over the data-link layer, which allows two systems running different network layer protocols to learn about each other.

- LLDP Supported TLVs

- LLDP and Cisco Medianet

LLDP Supported TLVs

LLDP supports a set of attributes that it uses to discover neighbor devices. These attributes contain type, length, and value descriptions and are referred to as TLVs. LLDP supported devices can use TLVs to receive and send information to their neighbors. This protocol can advertise details such as configuration information, device capabilities, and device identity.

The switch supports these basic management TLVs. These are mandatory LLDP TLVs.

- Port description TLV

- System name TLV

- System description TLV

- System capabilities TLV

- Management address TLV

These organizationally specific LLDP TLVs are also advertised to support LLDP-MED.

- Port VLAN ID TLV (IEEE 802.1 organizationally specific TLVs)

- MAC/PHY configuration/status TLV (IEEE 802.3 organizationally specific TLVs)

LLDP and Cisco Medianet

When you configure LLDP or CDP location information on a per-port basis, remote devices can send Cisco Medianet location information to the device.

LLDP-MED

LLDP for Media Endpoint Devices (LLDP-MED) is an extension to LLDP that operates between endpoint devices such as IP phones and network devices. It specifically provides support for voice over IP (VoIP) applications and provides additional TLVs for capabilities discovery, network policy, Power over Ethernet, inventory management and location information. By default, all LLDP-MED TLVs are enabled.

- LLDP-MED Supported TLVs

LLDP-MED Supported TLVs

LLDP-MED supports these TLVs:

- LLDP-MED capabilities TLV

Allows LLDP-MED endpoints to determine the capabilities that the connected device supports and has enabled.

- Network policy TLV

Allows both network connectivity devices and endpoints to advertise VLAN configurations and associated Layer 2 and Layer 3 attributes for the specific application on that port. For example, the switch can notify a phone of the VLAN number that it should use. The phone can connect to any device, obtain its VLAN number, and then start communicating with the call control.

By defining a network-policy profile TLV, you can create a profile for voice and voice-signaling by specifying the values for VLAN, class of service (CoS), differentiated services code point (DSCP), and tagging mode. These profile attributes are then maintained centrally on the switch and propagated to the phone.

- Power management TLV

Enables advanced power management between LLDP-MED endpoint and network connectivity devices. Allows device and phones to convey power information, such as how the device is powered, power priority, and how much power the device needs.

LLDP-MED also supports an extended power TLV to advertise fine-grained power requirements, end-point power priority, and end-point and network connectivity-device power status. LLDP is enabled and power is applied to a port, the power TLV determines the actual power requirement of the endpoint device so that the system power budget can be adjusted accordingly. The device processes the requests and either grants or denies power based on the current power budget. If the request is granted, the switch updates the power budget. If the request is denied, the device turns off power to the port, generates a syslog message, and updates the power budget. If LLDP-MED is disabled or if the endpoint does not support the LLDP-MED power TLV, the initial allocation value is used throughout the duration of the connection.

You can change power settings by entering the power inline {auto [max max-wattage] | never | static [max max-wattage]} interface configuration command. By default the PoE interface is in auto mode; If no value is specified, the maximum is allowed (30 W).

- Inventory management TLV

Allows an endpoint to send detailed inventory information about itself to the device, including information hardware revision, firmware version, software version, serial number, manufacturer name, model name, and asset ID TLV.

- Location TLV

Provides location information from the device to the endpoint device. The location TLV can send this information:

- Civic location information

Provides the civic address information and postal information. Examples of civic location information are street address, road name, and postal community name information.

- ELIN location information

Provides the location information of a caller. The location is determined by the Emergency location identifier number (ELIN), which is a phone number that routes an emergency call to the local public safety answering point (PSAP) and which the PSAP can use to call back the emergency caller.

Default LLDP Configuration

Default LLDP Configuration

Feature

Default Setting

LLDP global state

Disabled

LLDP holdtime (before discarding)

120 seconds

LLDP timer (packet update frequency)

30 seconds

LLDP reinitialization delay

2 seconds

LLDP tlv-select

Disabled to send and receive all TLVs

LLDP interface state

Disabled

LLDP receive

Disabled

LLDP transmit

Disabled

LLDP med-tlv-select

Disabled to send all LLDP-MED TLVs. When LLDP is globally enabled, LLDP-MED-TLV is also enabled.

Restrictions for LLDP

- If the interface is configured as a tunnel port, LLDP is automatically disabled.

- If you first configure a network-policy profile on an interface, you cannot apply the switchport voice vlan command on the interface. If the switchport voice vlan vlan-id is already configured on an interface, you can apply a network-policy profile on the interface. This way the interface has the voice or voice-signaling VLAN network-policy profile applied on the interface.

- You cannot configure static secure MAC addresses on an interface that has a network-policy profile.

- When Cisco Discovery Protocol and LLDP are both in use within the same switch, it is necessary to disable LLDP on interfaces where Cisco Discovery Protocol is in use for power negotiation. LLDP can be disabled at interface level with the commands no lldp tlv-select power-management or no lldp transmit / no lldp receive .

How to Configure LLDP, LLDP-MED, and Wired Location Service

- Enabling LLDP

- Configuring LLDP Characteristics

- Configuring LLDP-MED TLVs

- Configuring Network-Policy TLV

Enabling LLDP

Procedure

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

lldp run

Example:

Device(config)# lldp run

Enables LLDP globally on the device.

Step 4

interface interface-id

Example:

Device(config)# interface gigabitethernet 1/0/1

Specifies the interface on which you are enabling LLDP, and enter interface configuration mode.

Step 5

lldp transmit

Example:

Device(config-if)# lldp transmit

Enables the interface to send LLDP packets.

Step 6

lldp receive

Example:

Device(config-if)# lldp receive

Enables the interface to receive LLDP packets.

Step 7

end

Example:

Device(config-if)# end

Returns to privileged EXEC mode.

Step 8

show lldp

Example:

Device# show lldp

Verifies the configuration.

Step 9

copy running-config startup-config

Example:

Device# copy running-config startup-config

(Optional) Saves your entries in the configuration file.

Configuring LLDP Characteristics

You can configure the frequency of LLDP updates, the amount of time to hold the information before discarding it, and the initialization delay time. You can also select the LLDP and LLDP-MED TLVs to send and receive.

Note

Steps 3 through 6 are optional and can be performed in any order.

Procedure

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

lldp holdtime seconds

Example:

Device(config)# lldp holdtime 120

(Optional) Specifies the amount of time a receiving device should hold the information from your device before discarding it.

The range is 0 to 65535 seconds; the default is 120 seconds.

Step 4

lldp reinit delay

Example:

Device(config)# lldp reinit 2

(Optional) Specifies the delay time in seconds for LLDP to initialize on an interface.

The range is 2 to 5 seconds; the default is 2 seconds.

Step 5

lldp timer rate

Example:

Device(config)# lldp timer 30

(Optional) Sets the sending frequency of LLDP updates in seconds.

The range is 5 to 65534 seconds; the default is 30 seconds.

Step 6

lldp tlv-select

Example:

Device(config)# tlv-select

(Optional) Specifies the LLDP TLVs to send or receive.

Step 7

interface interface-id

Example:

Device(config)# interface gigabitethernet 1/0/1

Specifies the interface on which you are enabling LLDP, and enter interface configuration mode.

Step 8

lldp med-tlv-select

Example:

Device(config-if)# lldp med-tlv-select inventory management

(Optional) Specifies the LLDP-MED TLVs to send or receive.

Step 9

end

Example:

Device(config-if)# end

Returns to privileged EXEC mode.

Step 10

show lldp

Example:

Device# show lldp

Verifies the configuration.

Step 11

copy running-config startup-config

Example:

Device# copy running-config startup-config

(Optional) Saves your entries in the configuration file.

Configuring LLDP-MED TLVs

By default, the device only sends LLDP packets until it receives LLDP-MED packets from the end device. It then sends LLDP packets with MED TLVs, as well. When the LLDP-MED entry has been aged out, it again only sends LLDP packets.

By using the lldp interface configuration command, you can configure the interface not to send the TLVs listed in the following table.

LLDP-MED TLVs

LLDP-MED TLV

Description

inventory-management

LLDP-MED inventory management TLV

location

LLDP-MED location TLV

network-policy

LLDP-MED network policy TLV

power-management

LLDP-MED power management TLV

Follow these steps to enable a TLV on an interface:

Procedure

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

interface interface-id

Example:

Device(config)# interface gigabitethernet 1/0/1

Specifies the interface on which you are enabling LLDP, and enter interface configuration mode.

Step 4

lldp med-tlv-select

Example:

Device(config-if)# lldp med-tlv-select inventory management

Specifies the TLV to enable.

Step 5

end

Example:

Device(config-if)# end

Returns to privileged EXEC mode.

Step 6

copy running-config startup-config

Example:

Device# copy running-config startup-config

(Optional) Saves your entries in the configuration file.

Configuring Network-Policy TLV

Procedure

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

network-policy profile profile number

Example:

Device(config)# network-policy profile 1

Specifies the network-policy profile number, and enter network-policy configuration mode. The range is 1 to 4294967295.

Step 4

{voice | voice-signaling} vlan [vlan-id {cos cvalue | dscp dvalue}] | [[dot1p {cos cvalue | dscp dvalue}] | none | untagged]

Example:

Device(config-network-policy)# voice vlan 100 cos 4

Configures the policy attributes:

- voice —Specifies the voice application type.

- voice-signaling —Specifies the voice-signaling application type.

- vlan —Specifies the native VLAN for voice traffic.

- vlan-id —(Optional) Specifies the VLAN for voice traffic. The range is 1 to 4094.

- cos cvalue —(Optional) Specifies the Layer 2 priority class of service (CoS) for the configured VLAN. The range is 0 to 7; the default is 5.

- dscp dvalue —(Optional) Specifies the differentiated services code point (DSCP) value for the configured VLAN. The range is 0 to 63; the default is 46.

- dot1p —(Optional) Configures the telephone to use IEEE 802.1p priority tagging and use VLAN 0 (the native VLAN).

- none —(Optional) Do not instruct the IP telephone about the voice VLAN. The telephone uses the configuration from the telephone key pad.

- untagged —(Optional) Configures the telephone to send untagged voice traffic. This is the default for the telephone.

Step 5

exit

Example:

Device(config-network-policy)# exit

Returns to global configuration mode.

Step 6

interface interface-id

Example:

Device(config)# interface gigabitethernet 1/0/1

Specifies the interface on which you are configuring a network-policy profile, and enter interface configuration mode.

Step 7

network-policy profile number

Example:

Device(config-if)# network-policy 1

Specifies the network-policy profile number.

Step 8

lldp med-tlv-select network-policy

Example:

Device(config-if)# lldp med-tlv-select network-policy

Specifies the network-policy TLV.

Step 9

end

Example:

Device(config)# end

Returns to privileged EXEC mode.

Step 10

show network-policy profile

Example:

Device# show network-policy profile

Verifies the configuration.

Step 11

copy running-config startup-config

Example:

Device# copy running-config startup-config

(Optional) Saves your entries in the configuration file.

Configuration Examples for LLDP, LLDP-MED, and Wired Location Service

- Example: Configuring Network-Policy TLV

Example: Configuring Network-Policy TLV

This example shows how to configure VLAN 100 for voice application with CoS and to enable the network-policy profile and network-policy TLV on an interface:

Device# configure terminal
Device(config)# network-policy 1
Device(config-network-policy)# voice vlan 100 cos 4
Device(config-network-policy)# exit
Device(config)# interface gigabitethernet 1/0/1
Device(config-if)# network-policy profile 1
Device(config-if)# lldp med-tlv-select network-policy

This example shows how to configure the voice application type for the native VLAN with priority tagging:

Device(config-network-policy)# voice vlan dot1p cos 4
Device(config-network-policy)# voice vlan dot1p dscp 34

Monitoring and Maintaining LLDP, LLDP-MED, and Wired Location Service

Commands for monitoring and maintaining LLDP, LLDP-MED, and wired location service.

Command

Description

clear lldp counters

Resets the traffic counters to zero.

clear lldp table

Deletes the LLDP neighbor information table.

clear nmsp statistics

Clears the NMSP statistic counters.

show lldp

Displays global information, such as frequency of transmissions, the holdtime for packets being sent, and the delay time before LLDP initializes on an interface.

show lldp entry entry-name

Displays information about a specific neighbor.

You can enter an asterisk (*) to display all neighbors, or you can enter the neighbor name.

show lldp interface [interface-id]

Displays information about interfaces with LLDP enabled.

You can limit the display to a specific interface.

show lldp neighbors [interface-id] [detail]

Displays information about neighbors, including device type, interface type and number, holdtime settings, capabilities, and port ID.

You can limit the display to neighbors of a specific interface or expand the display for more detailed information.

show lldp traffic

Displays LLDP counters, including the number of packets sent and received, number of packets discarded, and number of unrecognized TLVs.

show location admin-tag string

Displays the location information for the specified administrative tag or site.

show location civic-location identifier id

Displays the location information for a specific global civic location.

show location elin-location identifier id

Displays the location information for an emergency location

show network-policy profile

Displays the configured network-policy profiles.

show nmsp

Displays the NMSP information

Feature History and Information for LLDP, LLDP-MED, and Wired Location Service

Release

Modification

Cisco IOS Release 15.2(7)E3k

This feature was introduced.

Chapter 4. Configuring EEE

- Prerequisites for EEE

- Restrictions for EEE

- Information About EEE

- How to Configure EEE

- Monitoring EEE

- Configuration Examples for EEE

- Feature History and Information for EEE

Prerequisites for EEE

Enable the Link Layer Discovery Protocol (LLDP) for devices that require longer wakeup times before they are able to accept data on their receive paths. Doing so enables the device to negotiate for extended system wakeup times from the transmitting link partner.

Restrictions for EEE

Changing the Energy Efficient Ethernet (EEE) configuration resets the interface because the device has to restart Layer 1 autonegotiation.

Information About EEE

- EEE Overview

- Default EEE Configuration

EEE Overview

EEE is an IEEE 802.3az standard that is designed to reduce power consumption in Ethernet networks during idle periods.

Default EEE Configuration

EEE is by default.

How to Configure EEE

- Enabling or Disabling EEE

Enabling or Disabling EEE

You can enable or disable EEE on an interface that is connected to an EEE-capable link partner. Starting in the Privileged EXEC mode, complete the following steps to enable EEE:

Procedure

Step 1

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 2

interface interface-id

Example:

Device(config)# interface gigabitethernet 1/0/1

Specifies the interface to be configured, and enter interface configuration mode.

Step 3

power efficient-ethernet auto

Example:

Device(config-if)# power efficient-ethernet auto

Enables EEE on the specified interface. When EEE is enabled, the device advertises and autonegotiates EEE to its link partner.

Enter the no form of the command to disable EEE.

Step 4

end

Example:

Device(config-if)# end

Returns to privileged EXEC mode.

Step 5

copy running-config startup-config

Example:

Device# copy running-config startup-config

(Optional) Saves your entries in the configuration file.

Monitoring EEE

Commands for Displaying EEE Settings

Command

Purpose

show eee capabilities interface interface-id

Displays EEE capabilities for the specified interface.

show eee status interface interface-id

Displays EEE status information for the specified interface.

The following are sample outputs of the show eee commands:

Device# show eee capabilities interface gigabitethernet 1/0/1
Gi0/1
EEE(efficient-ethernet): yes (100-Tx and 1000T auto)
Link Partner : yes (100-Tx and 1000T auto)

ASIC/Interface : EEE Capable/EEE Enabled

Device# show eee status interface gigabitethernet 1/0/1
Gi0/1 is up
EEE(efficient-ethernet): Operational
Rx LPI Status : Low Power
Tx LPI Status : Low Power
Wake Error Count : 0

ASIC EEE STATUS
Rx LPI Status : Receiving LPI
Tx LPI Status : Transmitting LPI
Link Fault Status : Link Up
Sync Status : Code group synchronization with data stream intact

Configuration Examples for EEE

The following example shows how to disable EEE on an interface:

Device# configure terminal
Device(config)# interface gigabitethernet 1/0/1
Device(config-if)# no power efficient-ethernet auto

Feature History and Information for EEE

The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.

Feature Name

Release

Feature Information

Energy Efficient Ethernet (EEE)

Cisco IOS Release 15.2(7)E3k

This feature was introduced

Energy Efficient Ethernet (EEE) is an IEEE 802.3az standard that is designed to reduce power consumption in Ethernet networks during idle periods.

Chapter 5. Configuring PoE

- Information About PoE

- How to Configure PoE

- How to Configure Deep Sleep

- Monitoring Power Status

- Configuration Examples for Configuring PoE

- Feature Information for PoE

Information About PoE

- Power over Ethernet Ports

Power over Ethernet Ports

A PoE-capable switch port automatically supplies power to one of these connected devices if the device senses that there is no power on the circuit:

- a Cisco pre-standard powered device (such as a Cisco IP Phone)

- an IEEE 802.3af and IEEE 802.3at-compliant powered device

The device does not receive redundant power when it is connected to the PoE port.

- Supported Protocols and Standards

- Powered-Device Detection and Initial Power Allocation

- PoE and PoE Pass-Through Ports

- Power Management Modes

- Fast POE

- Perpetual POE

- Configuring Deep Sleep

Supported Protocols and Standards

The switch uses these protocols and standards to support PoE:

- CDP with power consumption: The powered switch notifies the device of the amount of power it is consuming. The device does not reply to the power-consumption messages. The device can only supply power to or remove power from the PoE port.

- Cisco intelligent power management: The powered device and the switch negotiate through power-negotiation CDP messages for an agreed-upon power-consumption level. The negotiation allows a high-power Cisco powered device, which consumes more than 7 W, to operate at its highest power mode. The powered device first boots up in low-power mode, consumes less than 7 W, and negotiates to obtain enough power to operate in high-power mode. The device changes to high-power mode only when it receives confirmation from the switch.

High-power devices can operate in low-power mode on switches that do not support power-negotiation CDP.

Cisco intelligent power management is backward-compatible with CDP with power consumption; the switch responds according to the CDP message that it receives. CDP is not supported on third-party powered devices; therefore, the switch uses the IEEE classification to determine the power usage of the device.

- IEEE 802.3af and IEEE 802.3at: The major features of this standard are powered-device discovery, power administration, disconnect detection, and optional powered-device power classification. For more information, see the standard.

Powered-Device Detection and Initial Power Allocation

The device detects a Cisco pre-standard or an IEEE-compliant powered device when the PoE-capable port is in the no-shutdown state, PoE is enabled (the default), and the connected device is not being powered by an AC adaptor.

After device detection, the device determines the device power requirements based on its type:

- The initial power allocation is the maximum amount of power that a powered device requires. The device initially allocates this amount of power when it detects and powers the powered device. As the device receives CDP messages from the powered device and as the powered device negotiates power levels with the device through CDP power-negotiation messages, the initial power allocation might be adjusted.

- The device classifies the detected IEEE device within a power consumption class. Based on the available power in the power budget, the device determines if a port can be powered.

IEEE Power Classifications

Class

Maximum Power Level Required from the Device

0 (class status unknown)

15.4 W

1

4 W

2

7 W

3

15.4 W

4

30 W (For IEEE 802.3at Type 2 powered devices)

The device monitors and tracks requests for power and grants power only when it is available. The device tracks its power budget (the amount of power available on the device for PoE). The device performs power-accounting calculations when a port is granted or denied power to keep the power budget up to date.

After power is applied to the port, the device uses CDP to determine the CDP-specific power consumption requirement of the connected Cisco powered devices, which is the amount of power to allocate based on the CDP messages. The device adjusts the power budget accordingly. This does not apply to third-party PoE devices. The device processes a request and either grants or denies power. If the request is granted, the device updates the power budget. If the request is denied, the device ensures that power to the port is turned off, generates a syslog message, and updates the LEDs. Powered devices can also negotiate with the device for more power.

With PoE+, powered devices use IEEE 802.3at and LLDP power with media dependent interface (MDI) type, length, and value descriptions (TLVs), Power-via-MDI TLVs, for negotiating power up to 30 W. Cisco pre-standard devices and Cisco IEEE powered devices can use CDP or the IEEE 802.3at power-via-MDI power negotiation mechanism to request power levels up to 30 W.

Note

The initial allocation for Class 0, Class 3, and Class 4 powered devices is 15.4 W. When a device starts up and uses CDP or LLDP to send a request for more than 15.4 W, it can be allocated up to the maximum of 30 W.

Note

The CDP-specific power consumption requirement is referred to as the actual power consumption requirement in the software configuration guides and command references.

If the device detects a fault caused by an undervoltage, overvoltage, overtemperature, oscillator-fault, or short-circuit condition, it turns off power to the port, generates a syslog message, and updates the power budget and LEDs.

PoE and PoE Pass-Through Ports

Note

This section is applicable only to the CMICR-4PT model of the Cisco Catalyst Micro Switches.

The device is a PD/PSE product, which means that the device can behave like both a Power Device (PD) and Power Source Equipment (PSE). This device can be powered on by the PoE voltage derived from its uplink ports or from the voltage supplied by external auxiliary power supply (AUX). The device enables powering over PoE, PoE+ and UPOE, as well as AC and DC input.

The power available from uplinks and one of the power adapter is added for increased input power, which translates to a higher PoE budget. Some of this power is used for system power and rest would be provided to downlink POE+ ports as pass-through power that will be available to power other PoE peripheral devices like IP phones, IP Cameras, and so on.

- The device supports powering from uplink connected to IEEE 802.3bt Type 4.

- The device supports a DC power adaptor which enables the device to be powered by 24V DC input.

- AUX contributes 60W to the system.

- The power sources (AC or DC) and PoE is additive. The table below lists different power values for PoE budget.

PoE Budget

PoE Budget (Watts)

Power Sources

55

PD (type 4)

60

AUX

105

AUX + PD (type3)

120

AUX + PD (type 4)

The device is expected to boot with T1 power and negotiate to T2 power which is known as low power bootup. The low power bootup occurs if no auxiliary power adapter is connected.

The show power privileged EXEC command provides information about powering options on the device:

Device# show power

PD-PSE Info
===============================================
Aux Present : Yes
Aux Power : 133(Watts)
LLDP PKT RECVD : 36983908
PD Type : 4
PD Present : Yes
PD Class : Type4 90(w)
PD Power : 43 (Watts)

USB PD Info
===============================================
USB1 SINK: Connected Power Present: 60 watt
USB2 SINK: Connected Power Present: 0 watt

Power Management Modes

The device supports these PoE modes:

- auto —The device automatically detects if the connected device requires power. If the device discovers a powered device connected to the port and if the device has enough power, it grants power, updates the power budget, turns on power to the port on a first-come, first-served basis, and updates the LEDs. For LED information, see the hardware installation guide.

If the device has enough power for all the powered devices, they all come up. If enough power is available for all powered devices connected to the device, power is turned on to all devices. If there is not enough available PoE, or if a device is disconnected and reconnected while other devices are waiting for power, it cannot be determined which devices are granted or are denied power.

If granting power would exceed the system power budget, the device denies power, ensures that power to the port is turned off, generates a syslog message, and updates the LEDs. After power has been denied, the device periodically rechecks the power budget and continues to attempt to grant the request for power.

If a device being powered by the device is then connected to wall power, the device might continue to power the device. The device might continue to report that it is still powering the device whether the device is being powered by the device or receiving power from an AC power source.

If a powered device is removed, the device automatically detects the disconnect and removes power from the port. You can connect a nonpowered device without damaging it.

You can specify the maximum wattage that is allowed on the port. If the IEEE class maximum wattage of the powered device is greater than the configured maximum value, the device does not provide power to the port. If you do not specify a wattage, the device delivers the maximum value. Use the auto setting on any PoE port. The auto mode is the default setting.

- static —The device pre-allocates power to the port (even when no powered device is connected) and guarantees that power will be available for the port. The device allocates the port configured maximum wattage, and the amount is never adjusted through the IEEE class or by CDP messages from the powered device. Because power is pre-allocated, any powered device that uses less than or equal to the maximum wattage is guaranteed to be powered when it is connected to the static port. The port no longer participates in the first-come, first-served model.

However, if the powered-device IEEE class is greater than the maximum wattage, the device does not supply power to it. If the device learns through CDP messages that the powered device is consuming more than the maximum wattage, the device shuts down the powered device.

Note

In interface mode, the power consumption of a device cannot exceed the power supplied to the static port.

For the CMICR-4PT model of the Cisco Catalyst Micro Switches, the total static power configured (from port 1 to 4) should not exceed 60000 milli-watts.

If you do not specify a wattage, the device pre-allocates the maximum value. The device powers the port only if it discovers a powered device. Use the static setting on a high-priority interface.

- never —The device disables powered-device detection and never powers the PoE port even if an unpowered device is connected. Use this mode only when you want to make sure that power is never applied to a PoE-capable port, making the port a data-only port.

For most situations, the default configuration (auto mode) works well, providing plug-and-play operation. No further configuration is required. However, perform this task to configure a PoE port for a higher priority, to make it data only, or to specify a maximum wattage to disallow high-power powered devices on a port.

- Power Monitoring and Power Policing

- Maximum Power Allocation (Cutoff Power) on a PoE Port

- Power Consumption Values

Power Monitoring and Power Policing

When policing of the real-time power consumption is enabled, the device takes action when a powered device consumes more power than the maximum amount allocated, also referred to as the cutoff-power value.

When PoE is enabled, the device senses the real-time power consumption of the powered device. The device monitors the real-time power consumption of the connected powered device; this is called power monitoring or power sensing. The device also polices the power usage with the power policing feature.

Power monitoring is backward-compatible with Cisco intelligent power management and CDP-based power consumption. It works with these features to ensure that the PoE port can supply power to the powered device.

The device senses the real-time power consumption of the connected device as follows:

1. The device monitors the real-time power consumption on individual ports.

2. The device records the power consumption, including peak power usage. The device reports the information through the CISCO-POWER-ETHERNET-EXT-MIB.

3. If power policing is enabled, the device polices power usage by comparing the real-time power consumption to the maximum power allocated to the device. The maximum power consumption is also referred to as the cutoff power on a PoE port.

If the device uses more than the maximum power allocation on the port, the device can either turn off power to the port, or the device can generate a syslog message and update the LEDs (the port LED is now blinking amber) while still providing power to the device based on the device configuration. By default, power-usage policing is disabled on all PoE ports.

If error recovery from the PoE error-disabled state is enabled, the device automatically takes the PoE port out of the error-disabled state after the specified amount of time.

If error recovery is disabled, you can manually re-enable the PoE port by using the shutdown and no shutdown interface configuration commands.

4. If policing is disabled, no action occurs when the powered device consumes more than the maximum power allocation on the PoE port, which could adversely affect the device.

Maximum Power Allocation (Cutoff Power) on a PoE Port

When power policing is enabled, the device determines one of the these values as the cutoff power on the PoE port in this order:

1. Manually when you set the user-defined power level that limits the power allowed on the port by using the power inline auto max max-wattage or the power inline static max max-wattage interface configuration command

2. Automatically when the device sets the power usage of the device by using CDP power negotiation.

Use the first or second method in the previous list to manually configure the cutoff-power value by entering the power inline consumption default wattage or the power inline [auto | static max] max-wattage command.

If you do not manually configure the cutoff-power value, the device automatically determines it by using CDP power negotiation or the device IEEE classification and LLDP power negotiation. If CDP or LLDP are not enabled, the default value of 30 W is applied. However without CDP or LLDP, the device does not allow devices to consume more than 15.4 W of power because values from 15400 to 30000 mW are only allocated based on CDP or LLDP requests. If a powered device consumes more than 15.4 W without CDP or LLDP negotiation, the device might be in violation of the maximum current (Imax) limitation and might experience an Icut fault for drawing more current than the maximum. The port remains in the fault state for a time before attempting to power on again. If the port continuously draws more than 15.4 W, the cycle repeats.

Note

When a powered device connected to a PoE+ port restarts and sends a CDP or LLDP packet with a power TLV, the device locks to the power-negotiation protocol of that first packet and does not respond to power requests from the other protocol. For example, if the device is locked to CDP, it does not provide power to devices that send LLDP requests. If CDP is disabled after the device has locked on it, the device does not respond to LLDP power requests and can no longer power on any accessories. In this case, you should restart the powered device.

Power Consumption Values

You can configure the initial power allocation and the maximum power allocation on a port. However, these values are only the configured values that determine when the device should turn on or turn off power on the PoE port. The maximum power allocation is not the same as the actual power consumption of the powered device. The actual cutoff power value that the device uses for power policing is not equal to the configured power value.

When power policing is enabled, the device polices the power usage at the switch port, which is greater than the power consumption of the device. When you manually set the maximum power allocation, you must consider the power loss over the cable from the switch port to the powered device. The cutoff power is the sum of the rated power consumption of the powered device and the worst-case power loss over the cable.

We recommend that you enable power policing when PoE is enabled on your device. For example, if policing is disabled and you set the cutoff-power value by using the power inline auto max 6300 interface configuration command, the configured maximum power allocation on the PoE port is 6.3 W (6300 mW). The device provides power to the connected devices on the port if the device needs up to 6.3 W. If the CDP-power negotiated value or the IEEE classification value exceeds the configured cutoff value, the device does not provide power to the connected device. After the device turns on power on the PoE port, the device does not police the real-time power consumption of the device, and the device can consume more power than the maximum allocated amount, which could adversely affect the device and the devices connected to the other PoE ports.

Note

In interface mode, the power consumption of a device cannot exceed the power supplied to the static port.

For example, if you configure power supply to the port at 6000 mW (power inline static6000 interface configuration command), do not configure power consumption by a device at 8000 mW on the same port (power inline consumption8000 interface configuration command).

Fast POE

This feature remembers the last power drawn from a particular PSE port and switches on power the moment AC power is plugged in (within 15 to 20 seconds of switching on power) without waiting for IOS to boot up. When poe-ha is enabled on a particular port, the switch on a recovery after power failure, provides power to the connected endpoint devices within short duration before even the IOS forwarding starts up.

This feature can be configured by the same command as poe-ha which is already implemented. If the user replaces the power device connected to a port when the switch is powered off, then this new device will get the power which the previous device was drawing.

Note

In case of UPOE, even though Fast POE is available on the switch side, the PD endpoints may not be able to take advantage of the same, due to the reliance on LLDP to signal the UPOE power availability. This reliance on LLDP requires that the PD endpoint still needs to wait till the IOS comes up and LLDP packet exchanges can happen, signaling the availability of UPOE power.

Perpetual POE

Perpetual POE provides uninterrupted power to connected PD device even when the PSE switch is booting.

Note

Power to the ports will be interrupted in case of MCU firmware upgrade and ports will be back up immediately after the upgrade.

Configuring Deep Sleep

Deep Sleep is a power saving feature that puts the switch into hibernation mode. In this mode, the switch draws very little power. All connected devices also stop drawing power from the switch.

You can configure certain triggers that will put the switch into Deep Sleep mode. Similarly, the switch can wake up from Deep Sleep mode upon certain triggers.

How to Configure PoE

- Configuring a Power Management Mode on a PoE Port

- Configuring Persistent and Fast PoE

- Budgeting Power for Devices Connected to a PoE Port

- Configuring Power Policing

Configuring a Power Management Mode on a PoE Port

Note

When you make PoE configuration changes, the port being configured drops power. Depending on the new configuration, the state of the other PoE ports, and the state of the power budget, the port might not be powered up again. For example, port 1 is in the auto and on state, and you configure it for static mode. The device removes power from port 1, detects the powered device, and repowers the port. If port 1 is in the auto and on state and you configure it with a maximum wattage of 10 W, the device removes power from the port and then redetects the powered device. The device repowers the port only if the powered device is a class 1, class 2, or a Cisco-only powered device.

Procedure

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

interface interface-id

Example:

Device(config)# interface gigabitethernet 1/0/1

Specifies the physical port to be configured, and enters interface configuration mode.

Step 4

power inline {auto [max max-wattage] | never | static [max max-wattage]}

Example:

Device(config-if)# power inline auto

Configures the PoE mode on the port. The keywords have these meanings:

- auto —Enables powered-device detection. If enough power is available, automatically allocates power to the PoE port after device detection. This is the default setting.

- max max-wattage —Limits the power allowed on the port. The range is 4000 to 30000 mW. If no value is specified, the maximum is allowed.

- never —Disables device detection, and disable power to the port.

Note

If a port has a Cisco powered device connected to it, do not use the power inline never command to configure the port. A false link-up can occur, placing the port into the error-disabled state.

- static —Enables powered-device detection. Pre-allocate (reserve) power for a port before the device discovers the powered device. The device reserves power for this port even when no device is connected and guarantees that power will be provided upon device detection.

Note

Configure power values in multiples of 100. For example, you can configure 7400 mW, but do not configure 7386 mW or 7421 mW.

The device allocates power to a port configured in static mode before it allocates power to a port configured in auto mode.

Step 5

end

Example:

Device(config-if)# end

Returns to privileged EXEC mode.

Step 6

show power inline [interface-id | module switch-number]

Example:

Device# show power inline

Displays PoE status for a device for the specified interface.

Step 7

copy running-config startup-config

Example:

Device# copy running-config startup-config

(Optional) Saves your entries in the configuration file.

Configuring Persistent and Fast PoE

To configure persistent POE and Fast PoE, perform the following steps:

Note

You will need to configure the poe-ha command before connecting the PD, or you will need to manually shut/unshut the port after configuring poe-ha .

Procedure

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

interface interface-id

Example:

Device(config)# interface gigabitethernet 1/0/1

Specifies the physical port to be configured, and enters interface configuration mode.

Step 4

end

Example:

Device(config-if)# end

Returns to privileged EXEC mode.

Budgeting Power for Devices Connected to a PoE Port

When Cisco powered devices are connected to PoE ports, the device uses Cisco Discovery Protocol (CDP) or Link Layer Discovery Protocol (LLDP) to determine the protocol-specific power consumption of the devices, and the device adjusts the power budget accordingly. This does not apply to IEEE third-party powered devices. For these devices, when the device grants a power request, the device adjusts the power budget according to the powered-device IEEE classification. If the powered device is a class 0 (class status unknown) or a class 3, the device budgets 15,400 mW for the device, regardless of the CDP-specific amount of power needed. If the powered device reports a higher class than its CDP-specific consumption or does not support power classification (defaults to class 0), the device can power fewer devices because it uses the IEEE class information to track the global power budget.

By using the power inline consumption wattage interface configuration command, you can override the default power requirement specified by the IEEE classification. The difference between what is mandated by the IEEE classification and what is actually needed by the device is reclaimed into the global power budget for use by additional devices. You can then extend the device power budget and use it more effectively.

Caution

You should carefully plan your device power budget, enable the power monitoring feature, and make certain not to oversubscribe the power supply.

Note

When you manually configure the power budget, you must also consider the power loss over the cable between the device and the powered device.

Note

In interface mode, the power consumption of a device cannot exceed the power supplied to the static port.

For example, if you configure power supply to the port at 6000 mW (power inline static6000 interface configuration command), do not configure power consumption by a device at 8000 mW on the same port (power inline consumption8000 interface configuration command).

- Budgeting Power to All PoE ports

- Budgeting Power to a Specific PoE Port

Budgeting Power to All PoE ports

Procedure

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

no cdp run

Example:

Device(config)# no cdp run

(Optional) Disables CDP.

Step 4

power inline consumption default wattage

Example:

Device(config)# power inline consumption default 5000

Configures the power consumption of powered devices connected to each PoE port.

The range for each device is 4000 to 15400 mW (PoE+). The default is 15400 mW.

Step 5

end

Example:

Device(config)# end

Returns to privileged EXEC mode.

Step 6

show power inline consumption

Example:

Device# show power inline consumption

Displays the power consumption status.

Step 7

copy running-config startup-config

Example:

Device# copy running-config startup-config

(Optional) Saves your entries in the configuration file.

Budgeting Power to a Specific PoE Port

Procedure

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

no cdp run

Example:

Device(config)# no cdp run

(Optional) Disables CDP.

Step 4

interface interface-id

Example:

Device(config)# interface gigabitethernet 1/0/1

Specifies the physical port to be configured, and enter interface configuration mode.

Step 5

power inline consumption wattage

Example:

Device(config-if)# power inline consumption 5000

Configures the power consumption of a powered device connected to a PoE port on the device.

The range for each device is 4000 to 30000 mW (PoE+). The default is 15400 mW (PoE+).

Step 6

end

Example:

Device(config-if)# end

Returns to privileged EXEC mode.

Step 7

show power inline consumption

Example:

Device# show power inline consumption

Displays the power consumption data.

Step 8

copy running-config startup-config

Example:

Device# copy running-config startup-config

(Optional) Saves your entries in the configuration file.

Configuring Power Policing

By default, the device monitors the real-time power consumption of connected powered devices. You can configure the device to police the power usage. By default, policing is disabled.

Note

The power consumption is displayed in units of 0.5 W. For example, if a connected device draws 3.9 W, this feature will display 4.0 W power drawn.

Procedure

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

interface interface-id

Example:

Device(config)# interface gigabitethernet 1/0/1

Specifies the physical port to be configured, and enter interface configuration mode.

Step 4

power inline police [action{log | errdisable}]

Example:

Device(config-if)# power inline police

If the real-time power consumption exceeds the maximum power allocation on the port, configures the device to take one of these actions:

- power inline police —Shuts down the PoE port, turns off power to it, and puts it in the error-disabled state.

Note

You can enable error detection for the PoE error-disabled cause by using the errdisable detect cause inline-power global configuration command. You can also enable the timer to recover from the PoE error-disabled state by using the errdisable recovery cause inline-power interval interval global configuration command.

- power inline police action errdisable —Turns off power to the port if the real-time power consumption exceeds the maximum power allocation on the port.

- power inline police action log —Generates a syslog message while still providing power to the port.

If you do not enter the action log keywords, the default action shuts down the port and puts the port in the error-disabled state.

Step 5

exit

Example:

Device(config-if)# exit

Returns to global configuration mode.

Step 6

Use one of the following:

- errdisable detect cause inline-power

- errdisable recovery cause inline-power

- errdisable recovery interval interval

Example:

Device(config)# errdisable detect cause inline-power

Device(config)# errdisable recovery cause inline-power

Device(config)# errdisable recovery interval 100

(Optional) Enables error recovery from the PoE error-disabled state, and configures the PoE recover mechanism variables.

By default, the recovery interval is 300 seconds.

For interval interval , specifies the time in seconds to recover from the error-disabled state. The range is 30 to 86400.

Step 7

exit

Example:

Device(config)# exit

Returns to privileged EXEC mode.

Step 8

Use one of the following:

- show power inline police

- show errdisable recovery

Example:

Device# show power inline police

Device# show errdisable recovery

Displays the power monitoring status, and verify the error recovery settings.

Step 9

copy running-config startup-config

Example:

Device# copy running-config startup-config

(Optional) Saves your entries in the configuration file.

How to Configure Deep Sleep

This section explains how to configure the various triggers that will put the switch into Deep Sleep mode and wake up the switch from Deep Sleep Mode.

- Configuring the Switch to Enter Deep Sleep Mode

- Configuring the Switch to Wake Up From Deep Sleep Mode

Configuring the Switch to Enter Deep Sleep Mode

You can configure several triggers that will put the switch into Deep Sleep mode.

- Using EnergyWise to hibernate the switch at a specified time

- A COAP CLI command

- A COAP command over HTTP that sends a payload data packet to the switch

- Using the SNMP 'set-request' operation, which hibernates the switch immediately when it receives an authentic SNMP message.

Using EnergyWise

You can use an EnergyWise Level 1 command to put the switch into hibernation mode automatically at a specified time. This will use the real-time clock that runs on the switch. This hibernation mode will cause the switch to enter Deep Sleep mode.

You can also use an EnergyWise level 1 command to put the switch into Deep Sleep mode immediately. To do this, provide the time in CRON format (instead of a time range). For example, enter the following:

Switch(config)#energywise level 1 recurrence importance 100 at 20 14 31 5 4
where

20 - Minutes

14 - Hours

31 - Day

5 - Month

4 - (No significance. But a value is required; can range from 0-7)

The Switch will enter Deep Sleep immediately after the command is given, and will wake up at 14:20 31st of May of the current year.

For details on using the EnergyWise Level 1 command, see the section in the Configuring Hibernation Start and End Times chapter of this book.

COAP CLI Command

You can use a COAP command to put the switch into Deep Sleep mode immediately.

In the global configuration mode, enter the following command.

Command

Purpose

Switch(Config)#coap sleep wol{enable | disable}

Puts the switch immediately into Deep Sleep Mode.

- enable— The switch will listen for incoming packets in the uplink ports in order to wake up.

- disable— The switch cannot be woken up from packets sent to the uplink ports. In this case, the only way to wake up the switch is to press the MODE button.

Send Payload Data

You can configure the switch to enter Deep Sleep mode when a packet of data (payload) is sent to the switch. This packet is sent via COAP over HTTP.

- Step 1: Use a REST client and connect to the switch by going to the URL http://<Switch IP>/level/15/coap/cisco/sleep.

- Step 2: POST with payload 'data={“WOL”:1}'

Enter "WOL:1" if you want the switch to listen for incoming packets in the uplink ports in order to wake up.

Enter "WOL:0" if you do not want the switch to listen for incoming packets in the uplink ports in order to wake up. In this case, the only way to wake up the switch is to press the MODE button.

Using SNMP 'set-request' operation

You can send a 'set-request' message from the SNMP (Simple Network Management Protocol) manager to the SNMP agent on the switch to put it into Deep Sleep mode immediately. The switch will wake up from Deep Sleep at the time specified in the request.

- Operation: set-request

- MIB: CISCO-ENERGYWISE-MIB

- MIB table for the operation: cewEventEntry

Note

Deep Sleep using the SNMP method can be enabled only on Catalyst switches that support the Cisco Digital Building architecture.

The following object IDs in the MIB table are applicable:

- cewEventLevel—Format must be the integer of 2

- cewEventImportance—Format must be an unsigned integer between 1 to 100

- cewEventTime—Format must be a octal string

- cewEventStatus—Format must be the integer value of 4

Note

For the entPhysical index, specify 1001 for switch. For the cewEvent index, specify 1.

For example, if you are sending the request from a Linux device, enter the following:

snmpset -mALL -v2c -cpublic 10.106.18.102 cewEventLevel.1001.1 i 2 cewEventImportance.1001.1 u 100 cewEventTime.1001.1 x " 34 35 20 39 20 33 30 20 35 " cewEventStatus.1001.1 i 4
where the cewEventTime.1001.1 x " 34 35 20 39 20 33 30 20 35 " is mentioned as an octal string of 34 35 20 39 20 33 30 20 35 which translates into the string equivalent of 45 9 30 5; thus, translating into 09:45 30th-May of the current year.

Configuring the Switch to Wake Up From Deep Sleep Mode

You can configure several triggers that will wake up the switch from Deep Sleep mode.

Triggers that wake up the switch from Deep Sleep mode are:

- Using EnergyWise to wake up the switch at a specified time

- A COAP command that sends a payload data packet to the switch

- Using the SNMP 'set-request' operation to wake up the switch at a specified time

- Pressing the MODE button on the switch

Using EnergyWise

If you have configured an EnergyWise Level 1 command to put the switch into Deep Sleep mode at a specified time, the same configuration is used to wake up the switch at a specified time. This will use the real-time clock that runs on the switch.

Send Payload Data

You can configure the switch to wake up from Deep Sleep mode when a packet of data (payload) is sent to the switch. This packet is sent via COAP.

- Step 1: Use a REST client and connect to the switch by going to the URL coap://<switch IP>/cisco/sleep.

- Step 2: POST with payload '{"level":"10"}'

Using SNMP 'set-request' operation

If you have configured Deep Sleep using the SNMP 'set-request' operation, then the switch will wake up from hibernation at the time specified in this operation.

MODE Button

Press and hold the MODE button on the switch for 5 seconds to wake up the switch from Deep Sleep mode. If you have configured the switch to wake up from hiberation at a specified time, you can use the MODE button to wake up the switch earlier than the scheduled time.

Monitoring Power Status

Show Commands for Power Status

Command

Purpose

show env power

(Optional) Displays the status of the internal power supplies for the switch.

show power inline [interface-id

Displays PoE status for an interface.

show power inline police

Displays the power policing data.

Note

Use thedebug ilpower controller privileged EXEC command to enable debugging of the platform-specific Power over Ethernet (PoE) software module on the switch in long message format. These messages include the Power Controller register reading. Use the no form of this command to disable debugging.

Configuration Examples for Configuring PoE

- Budgeting Power: Example

- Example: Configuring Perpetual PoE

Budgeting Power: Example

When you enter one of the following commands, this caution message appears:

- [no] power inline consumption default wattage global configuration command

- [no] power inline consumption wattage

interface configuration command

%CAUTION: Interface Gi0/1: Misconfiguring the 'power inline  consumption/allocation' command may cause damage to the
switch and void your warranty. Take precaution not to oversubscribe the power supply. It is recommended to enable power
policing if the switch supports it. Refer to documentation.

Example: Configuring Perpetual PoE

This example shows how you can configure perpetual POE on the switch.

Device> enable
Device# configure terminal
Device(config)# interface gigabitethernet2/0/1
Device(config-if)# power inline port poe-ha
Device(config-if)# end

Feature Information for PoE

The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.

Feature Name

Releases

Feature Information

PoE

Cisco IOS Release 15.2(7)E3k

This feature was introduced.

Chapter 6. Configuring Auto SmartPorts

- Information about Auto SmartPorts

- How to Configure Auto SmartPorts

- Configuration Examples for Auto SmartPorts

- Feature Information for Auto SmartPorts

Information about Auto SmartPorts

Auto SmartPort macros dynamically configure ports based on the device type detected on the port. When the switch detects a new device on a port, it applies the appropriate Auto SmartPorts macro. When a link-down event occurs on the port, the switch removes the macro. For example, when you connect a Cisco IP phone to a port, Auto SmartPorts automatically applies the Cisco IP phone macro. The Cisco IP phone macro enables quality of service (QoS), security features, and a dedicated voice VLAN to ensure proper treatment of delay-sensitive voice traffic.

Auto SmartPorts uses event triggers to map devices to macros. The most common event triggers are based on Cisco Discovery Protocol (CDP) messages received from connected devices. The detection of a device (Cisco IP phone, Cisco wireless access point, or Cisco router) invokes an event trigger for that device.

Link Layer Discovery Protocol (LLDP) is used to detect devices that do not support CDP. Other mechanisms used as event triggers include the 802.1X authentication result and MAC-address learned.

System built-in event triggers exist for various devices based mostly on CDP and LLDP messages and some MAC address. These triggers are enabled as long as Auto SmartPort is enabled.

You can configure user-defined trigger groups for profiles and devices. The name of the trigger group is used to associate a user-defined macro.

- Auto SmartPort Macros

- Commands executed by CISCO_LIGHT_AUTO_SMARTPORT

Auto SmartPort Macros

The Auto SmartPort macros are groups of CLI commands. Detection of devices on a port triggers the application of the macro for the device. System built-in macros exist for various devices, and, by default, system built-in triggers are mapped to the corresponding built-in macros. You can change the mapping of built-in triggers or macros as needed.

A macro basically applies or removes a set of CLIs on an interface based on the link status. In a macro, the link status is checked. If the link is up, then a set of CLIs is applied; if the link is down, the set is removed (the no format of the CLIs are applied). The part of the macro that applies the set of CLIs is termed macro. The part that removes the CLIs (the no format of the CLIs) are termed antimacro.

When a device is connected to an Auto SmartPort, if it gets classified as a lighting end point, it invokes the event trigger CISCO_LIGHT_EVENT , and the macro CISCO_LIGHT_AUTO_SMARTPORT is executed.

Commands executed by CISCO_LIGHT_AUTO_SMARTPORT

When the macro is executed, it runs a series of commands on the switch.

The commands that are executed by running the macro CISCO_LIGHT_AUTO_SMARTPORT are:

- switchport mode access

- switchport port-security violation restrict

- switchport port-security mac-address sticky

- switchport port-security

- power inline port poe-ha

- storm-control broadcast level 50.00

- storm-control multicast level 50.00

- storm-control unicast level 50.00

- spanning-tree portfast

- spanning-tree bpduguard enable

How to Configure Auto SmartPorts

The following sections provide information on how to configure Auto SmartPorts.

- Enabling Auto SmartPort

- Configuring Mapping Between Event Triggers and Built-in Macros

Enabling Auto SmartPort

Note

Auto SmartPort is disabled by default.

To disable Auto SmartPorts macros on a specific port, use the no macro auto global processing interface command before enabling Auto SmartPort globally.

To enable Auto SmartPort globally, use the macro auto global processing global configuration command.

To enable Auto SmartPorts, perform this task:

Procedure

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

device classifier

Example:

Device(config)# device classifier

Enables the device classifier.

Use no device classifier command to disable the device classifier.

Step 4

macro auto global processing

Example:

Device(config)# macro auto global processing

Enables Auto SmartPorts on the switch globally.

Use no macro auto global processing command to disable Auto SmartPort globally.

Step 5

end

Example:

Device(config)# end

Returns to privileged EXEC mode.

Step 6

show running-config

Example:

Device# show running-config

Verifies your entries.

Step 7

copy running-config startup-config

Example:

Device# copy running-config startup-config

(Optional) Saves your entries in the configuration file.

Configuring Mapping Between Event Triggers and Built-in Macros

Note

You need to perform this task when a Cisco switch is connected to the Auto SmartPort.

To map an event trigger to a built-in macros, perform this task:

Before you begin

You need to enable auto smartport macros globally.

Procedure

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

macro auto execute event trigger builtin built-in macro name

Example:

Device(config)# macro auto execute CISCO_SWITCH_EVENT builtin CISCO_SWITCH_AUTO_SMARTPORT

Specifies a user-defined event trigger and a macro name. This action configures mapping from an event trigger to a built-in Auto Smartports macro.

Step 4

macro auto trigger event trigger

Example:

Device(config)# macro auto trigger CISCO_SWITCH_EVENT

Invokes the user-defined event trigger.

Step 5

device device_ID

Example:

Device(config)# device cisco WS-C3560CX-8PT-S

Matches the event trigger to the device identifier.

Step 6

end

Example:

Device(config)# end

Returns to privileged EXEC mode.

Step 7

show shell triggers

Example:

Device# show shell triggers

Displays the event triggers on the switch.

Step 8

show running-config

Example:

Device# show running-config

Verifies your entries.

Step 9

copy running-config startup-config

Example:

Device# copy running-config startup-config

(Optional) Saves your entries in the configuration file.

Configuration Examples for Auto SmartPorts

The following sections provide configuration examples for Auto SmartPorts.

- Example: Enabling Auto SmartPorts

- Example: Configuring Mapping Between Event Triggers and Built-in Macros

Example: Enabling Auto SmartPorts

This example shows how you can enable to Auto SmartPort.

Device> enable
Device# configure terminal
Device(config)# device classifier
Device(config)# macro auto global processing
Device(config)# end

Example: Configuring Mapping Between Event Triggers and Built-in Macros

This example shows how you can configure mapping between event triggers and built-in macros.

Device> enable
Device# configure terminal
Device(config)# macro auto execute CISCO_SWITCH_EVENT builtin CISCO_SWITCH_AUTO_SMARTPORT
Device(config)# macro auto trigger CISCO_SWITCH_EVENT
Device(config)# device cisco WS-C3560CX-8PT-S
Device(config)# end

Feature Information for Auto SmartPorts

The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.

Feature Information for Auto SmartPorts

Feature Name

Releases

Feature Information

Auto SmartPorts

Cisco IOS Release 15.2(7)E3k

Auto SmartPort macros dynamically configure ports based on the device type detected on the port.

Chapter 7. Configuring the COAP Proxy Server

- Restrictions for the COAP Proxy Server

- Information About the COAP Proxy Server

- How to Configure the COAP Proxy Server

- Examples: Configuring the COAP Proxy Server

- Monitoring COAP Proxy Server

- Feature Information for COAP

Restrictions for the COAP Proxy Server

The following restrictions apply to COAP proxy server:

- Switch cannot advertise itself as CoAP client using ipv6 broadcast (CSCuw26467).

- Support for Observe Not Implemented.

- Blockwise requests are not supported. We handle block-wise responses and can generate block-wise responses.

- DTLS Support is for the following modes only RawPublicKey and Certificate Based.

- Switch does not act as DTLS client. DTLS for endpoints only.

- IPv6 DTLS is not supported.

- Endpoints are expected to handle and respond with CBOR payloads.

- Client side requests are expected to be in JSON.

- Switch cannot advertise itself to other Resource Directories as IPv6, due to an IPv6 broadcast
issue.

Information About the COAP Proxy Server

The COAP protocol is designed for use with constrained devices. COAP works in the same way on constrained devices as HTTP works on servers in accessing information.

The comparison of COAP and HTTP is shown below:

- In the case of a webserver: HTTP is the protocol; TCP is the transport; and HTML is the most common information format transported.

- In case of a constrained device: COAP is the protocol; UDP is the transport; and JSON/link-format/CBOR is the popular information format.

COAP provides a means to access and control device using a similar GET /POST metaphor and restful API as in HTTP.

How to Configure the COAP Proxy Server

To configure the COAP proxy server, you can configure the COAP Proxy and COAP Endpoints in the Configuration mode.

The commands are: coap [proxy | endpoints] .

- Configuring the COAP Proxy

- Configuring COAP Endpoints

Configuring the COAP Proxy

To start or stop the COAP proxy on the switch, perform the steps given below:

Procedure

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

coap proxy

Example:

Device(config)# coap proxy

Enters the COAP proxy sub mode.

Note

To stop the coap proxy and delete all configurations under coap proxy, use the no coap proxy command.

Step 4

security [none [[ ipv4 | ipv6 ] {ip-address ip-mask/prefix } | list {ipv4-list name | ipv6-list-name }] | dtls [id-trustpoint {identity-trustpoint label }] [verification-trustpoint {verification-trustpoint } | [ ipv4 | ipv6 {ip-address ip-mask/prefix }] | list {ipv4-list name | ipv6-list-name }]]

Example:

Device(config-coap-proxy)# security none ipv4 1.1.0.0 255.255.0.0

Takes the encryption type as argument. The two security modes supported are none and dtls

- none - Indicates no security on that port.

With security none , a maximum of 5 ipv4 and 5 ipv6 addresses can be associated.

- dtls - The DTLS security takes RSA trustpoint and Verification trustpoint which are optional. Without Verification trustpoint it does the normal Public Key Exchange.

With security dtls , a maximum of 5 ipv4 and 5 ipv6 addresses can be associated.

Note

To delete all security configurations under coap proxy, use the no security command.

Step 5

max-endpoints {number }

Example:

Device(config-coap-proxy)#max-endpoints 10

(Optional) Specifies the maximum number of endpoints that can be learnt on the switch. The default value is 10. The range is 1 to 500.

Note

To delete all max-endpoints configured under coap proxy, use the no max-endpoints command.

Step 6

port-unsecure {port-num }

Example:

Device(config-coap-proxy)#port-unsecure 5683

(Optional) Configures a port other than the default 5683. The range is 1 to 65000.

Note

To delete all port configurations under coap proxy, use the no port-unsecure command.

Step 7

port-dtls {port-num }

Example:

Device(config-coap-proxy)#port-dtls 5864

(Optional) Configures a port other than the default 5684.

Note

To delete all dtls port configurations under coap proxy, use the no port-dtls command.

Step 8

resource-directory [ ipv4 | ipv6 ] {ip-address } ]

Example:

Device(config-coap-proxy)#resource-directory ipv4 192.168.1.1

Configures a unicast upstream resource directory server to which the switch can act as a COAP client.

With resource-directory , a maximum of 5 of ipv4 and 5 ipv6, ip addresses can be configured.

Note

To delete all resource directory configurations under coap proxy, use the no resource-directory command.

Step 9

list [ ipv4 | ipv6 ] {list-name }

Example:

Device(config-coap-proxy)#list ipv4 trial_list

(Optional) Restricts the IP address range where the lights and their resources can be learnt. Creates a named list of ip address/masks, to be used in the security [ none | dtls ] command options above.

With list , a maximum of 5 ip-lists can be configured, irrespective of ipv4 or ipv6. We can configure a max of 5 ip addresses per ip-list.

Note

To delete any ip list on the COAP proxy server, use the no list [ ipv4 | ipv6 ] {list-name } command.

Step 10

start

Example:

Device(config-coap-proxy)#start

Starts the COAP proxy on this switch.

Step 11

stop

Example:

Device(config-coap-proxy)#stop

Stops the COAP proxy on this switch.

Step 12

exit

Example:

Device(config-coap-proxy)# exit

Exits the COAP proxy sub mode.

Step 13

end

Example:

Device(config)# end

Returns to privileged EXEC mode.

Configuring COAP Endpoints

To configure the COAP Proxy to support multiple IPv4/IPv6 static-endpoints, perform the steps given below:

Procedure

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

coap endpoint [ ipv4 | ipv6 ] {ip-address }

Example:

Device(config)#coap endpoint ipv4  1.1.1.1
Device(config)#coap endpoint ipv6  2001::1

Configures the static endpoints on the switch.

- ipv4 - Configures the IPv4 Static endpoints.

- ipv6 - Configures the IPv6 Static endpoints.

Note

To stop the coap proxy on any endpoint, use the no coap endpoint [ ipv4 |ipv6 ] {ip-address } command.

Step 4

exit

Example:

Device(config-coap-endpoint)# exit

Exits the COAP endpoint sub mode.

Step 5

end

Example:

Device(config)# end

Returns to privileged EXEC mode.

Examples: Configuring the COAP Proxy Server

This example shows how you can configure the port number 5683 to support a maximum of 10 endpoints.

Device# coap proxy security none ipv4 2.2.2.2 255.255.255.0 port 5683 max-endpoints 10

------------------------------------------------------------------------------------------------

This example shows how to configure COAP proxy on ipv4 1.1.0.0 255.255.0.0 with no security settings.

Device(config-coap-proxy)# security ?
dtls  dtls
none  no security

Device(config-coap-proxy)# security none ?
ipv4    IP address range on which to learn lights
ipv6    IPv6 address range on which to learn lights
list    IP address range on which to learn lights

Device(config-coap-proxy)# security none ipv4 ?
A.B.C.D  {/nn || A.B.C.D}  IP address range on which to learn lights

Device(config-coap-proxy)# security none ipv4 1.1.0.0 255.255.0.0

------------------------------------------------------------------------------------------------

This example shows how to configure COAP proxy on ipv4 1.1.0.0 255.255.0.0 with dtls id trustpoint security settings.

Device(config-coap-proxy)# security dtls ?
id-trustpoint DTLS RSA and X.509 Trustpoint Labels
ipv4 IP address range on which to learn lights
ipv6 IPv6 address range on which to learn lights
list IP address range on which to learn lights

Device(config-coap-proxy)# security dtls id-trustpoint ?
WORD  Identity TrustPoint Label

Device(config-coap-proxy)# security dtls id-trustpoint RSA-TRUSTPOINT ?
verification-trustpoint  Certificate Verification Label
<cr>

Device(config-coap-proxy)# security dtls id-trustpoint RSA-TRUSTPOINT

Device(config-coap-proxy)# security dtls ?
id-trustpoint DTLS RSA and X.509 Trustpoint Labels
ipv4 IP address range on which to learn lights
ipv6 IPv6 address range on which to learn lights
list IP address range on which to learn lights

Device(config-coap-proxy)#  security dtls ipv4 1.1.0.0 255.255.0.0

Note

For configuring ipv4 / ipv6 / list , the id-trustpoint and (optional) verification-trustpoint , should be pre-configured, else the system shows an error.

------------------------------------------------------------------------------------------------

This example shows how to configure a Trustpoint. This is a pre-requisite for COAP security dtls with id trustpoint configurations.

ip domain-name myDomain
crypto key generate rsa general-keys exportable label MyLabel modulus 2048

Device(config)# crypto pki trustpoint MY_TRUSTPOINT
Device(ca-trustpoint)# rsakeypair MyLabel 2048
Device(ca-trustpoint)# enrollment selfsigned
Device(ca-trustpoint)# exit

Device(config)# crypto pki enroll MY_TRUSTPOINT
% Include the router serial number in the subject name? [yes/no]: no
% Include an IP address in the subject name? [no]: no
Generate Self Signed Router Certificate? [yes/no]: yes

------------------------------------------------------------------------------------------------

This example shows how to configure COAP proxy on ipv4 1.1.0.0 255.255.0.0 with dtls verification trustpoint (DTLS with certificates or verification trustpoints)

Device(config-coap-proxy)# security dtls ?
id-trustpoint DTLS RSA and X.509 Trustpoint Labels
ipv4 IP address range on which to learn lights
ipv6 IPv6 address range on which to learn lights
list IP address range on which to learn lights

Device(config-coap-proxy)# security dtls id-trustpoint ?
WORD  Identity TrustPoint Label

Device(config-coap-proxy)# security dtls id-trustpoint RSA-TRUSTPOINT ?
verification-trustpoint  Certificate Verification Label
<cr>

Device(config-coap-proxy)# security dtls id-trustpoint RSA-TRUSTPOINT verification-trustpoint ?
WORD  Identity TrustPoint Label

Device(config-coap-proxy)# security dtls id-trustpoint RSA-TRUSTPOINT verification-trustpoint CA-TRUSTPOINT ?
<cr>

------------------------------------------------------------------------------------------------

This example shows how to configure Verification Trustpoint. This is a pre-requisite for COAP security dtls with verification trustpoint configurations.

Device(config)# crypto pki import CA-TRUSTPOINT pkcs12 flash:hostA.p12 password cisco123
% Importing pkcs12...
Source filename [hostA.p12]?
Reading file from flash:hostA.p12
CRYPTO_PKI: Imported PKCS12 file successfully.

------------------------------------------------------------------------------------------------

This example shows how to create a list named trial-list, to be used in the security [ none | dtls ] command options.

Device(config-coap-proxy)# list ipv4 trial_list
Device(config-coap-proxy-iplist)# 1.1.0.0 255.255.255.0
Device(config-coap-proxy-iplist)# 2.2.0.0 255.255.255.0
Device(config-coap-proxy-iplist)# 3.3.0.0 255.255.255.0
Device(config-coap-proxy-iplist)# exit
Device(config-coap-proxy)# security none list trial_list

------------------------------------------------------------------------------------------------

This example shows all the negation commands available in the coap-proxy sub mode.

Device(config-coap-proxy)# no ?
ip-list             Configure IP-List
max-endpoints       maximum number of endpoints supported
port-unsecure       Specify a port number to use
port-dtls           Specify a dtls-port number to use
resource-discovery  Resource Discovery Server
security            CoAP Security features

------------------------------------------------------------------------------------------------

This example shows how you can configure multiple IPv4/IPv6 static-endpoints on the coap proxy.

Device(config)# coap endpoint ipv4 1.1.1.1
Device(config)# coap endpoint ipv4 2.1.1.1
Device(config)# coap endpoint ipv6 2001::1

------------------------------------------------------------------------------------------------

This example shows how you can display the COAP protocol details.

Device# show coap version
CoAP version 1.0.0
RFC 7252

------------------------------------------------------------------------------------------------

Device# show coap resources
Link format data =
</>
</1.1.1.6/cisco/context>
</1.1.1.6/cisco/actuator>
</1.1.1.6/cisco/sensor>
</1.1.1.6/cisco/lldp>
</1.1.1.5/cisco/context>
</1.1.1.5/cisco/actuator>
</1.1.1.5/cisco/sensor>
</1.1.1.5/cisco/lldp>
</cisco/flood>
</cisco/context>
</cisco/showtech>
</cisco/lldp>

------------------------------------------------------------------------------------------------

Device# show coap globals
Coap System Timer Values :
Discovery  : 120 sec
Cache Exp  : 5 sec
Keep Alive : 120 sec
Client DB  : 60 sec
Query Queue: 500 ms
Ack delay  : 500 ms
Timeout    : 5 sec

Max Endpoints      : 10
Resource Disc Mode : POST

------------------------------------------------------------------------------------------------

Device# show coap stats
Coap Stats :
Endpoints : 2
Requests : 20
Ext Queries : 0

------------------------------------------------------------------------------------------------

Device# show coap endpoints
List of all endpoints :

Code : D - Discovered , N - New
#      Status         Age(s)    LastWKC(s)    IP
-------------------------------------------------------------------------
1      D             10        94               1.1.1.6
2      D             6         34               1.1.1.5

Endpoints - Total : 2 Discovered : 2 New : 0

------------------------------------------------------------------------------------------------

Device# show coap dtls-endpoints
#     Index State  String State     Value   Port IP
---------------------------------------------------------------
1     3     SSLOK       3           48969   20.1.1.30
2     2     SSLOK       3           53430   20.1.1.31
3     4     SSLOK       3           54133   20.1.1.32
4     7     SSLOK       3           48236   20.1.1.33

------------------------------------------------------------------------------------------------

This example shows all options available to debug the COAP protocol.

Device# debug coap ?
all       Debug CoAP all
database  Debug CoAP Database
errors    Debug CoAP errors
events    Debug CoAP events
packet    Debug CoAP packet
trace     Debug CoAP Trace
warnings  Debug CoAP warnings

Monitoring COAP Proxy Server

To display the COAP protocol details, use the commands in the following table:

Commands to Display to COAP specific data

show coap version

Shows the IOS COAP version and the RFC information.

show coap resources

Shows the resources of the switch and those learnt by it.

show coap endpoints

Shows the endpoints which are discovered and learnt.

show coap globals

Shows the timer values and end point values.

show coap stats

Shows the message counts for endpoints, requests and external queries.

show coap dtls-endpoints

Shows the dtls endpoint status.

Commands to Clear COAP Commands

clear coap database

Clears the COAP learnt on the switch, and the internal database of endpoint information.

To debug the COAP protocol, use the commands in the following table:

Commands to Debug COAP protocol

debug coap database

Debugs the COAP database output.

debug coap errors

Debugs the COAP errors output.

debug coap events

Debugs the COAP events output.

debug coap packets

Debugs the COAP packets output.

debug coap trace

Debugs the COAP traces output.

debug coap warnings

Debugs the COAP warnings output.

debug coap all

Debugs all the COAP output.

Note

If you wish to disable the debugs, prepend the command with a "no " keyword.

Feature Information for COAP

The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.

Feature Information for COAP

Feature Name

Releases

Feature Information

COAP

Cisco IOS Release 15.2(7)E3k

The COAP protocol is designed for use with constrained devices. COAP works in the same way on constrained devices as HTTP works on servers in accessing information.

Chapter 8. Configuring 2-event Classification

- Information about 2-event Classification

- Configuring 2-event Classification

- Example: Configuring 2-Event Classification

- Additional References

- Feature History and Information for 2-event Classification

Information about 2-event Classification

When 2-event classification is configured and a class 4 device is detected, IOS allocates 30W without any CDP or LLDP negotiation. This means that even before the link comes up the class 4 power device gets 30W.

Once 2-event is enabled, the port resets automatically. Power budget allocation for a class-4 device will be 30W if 2-event classification is enabled on the port, else it will be 15.4W.

Configuring 2-event Classification

To configure the switch for a 2-event Classification, perform the steps given below:

Procedure

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

- Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

interface interface-id

Example:

Device(config)# interface gigabitethernet 2/0/1

Specifies the physical port to be configured, and enters interface configuration mode.

Step 4

power inline port 2-event

Example:

Device(config-if)# power inline port 2-event

Configures 2-event classification on the switch.

Step 5

end

Example:

Device(config-if)# end

Returns to privileged EXEC mode.

Example: Configuring 2-Event Classification

This example shows how you can configure 2-event classification.

Device> enable
Device# configure terminal
Device(config)# interface gigabitethernet 2/0/1
Device(config-if)# power inline port 2-event
Device(config-if)# end

Additional References

Related Documents

Related Topic

Document Title

For complete syntax and usage information for the commands used in this chapter.

Consolidated Platform Command Reference, Cisco IOS Release 15.2(7)Ex (Catalyst Micro Switches)

MIBs

MIB

MIBs Link

All the supported MIBs for this release.

To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL:

http://www.cisco.com/go/mibs

Technical Assistance

Description

Link

The Cisco Support website provides extensive online resources, including documentation and tools for troubleshooting and resolving technical issues with Cisco products and technologies.

To receive security and technical information about your products, you can subscribe to various services, such as the Product Alert Tool (accessed from Field Notices), the Cisco Technical Services Newsletter, and Really Simple Syndication (RSS) Feeds.

Access to most tools on the Cisco Support website requires a Cisco.com user ID and password.

http://www.cisco.com/support

Feature History and Information for 2-event Classification

The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.

Feature Information for 2-event Classification

Feature Name

Releases

Feature Information

2-event Classification

Cisco IOS Release 15.2(7)E3k

This feature was introduced.

Full Cisco Trademarks with Software License

THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL ARE SUBJECT TO CHANGE WITHOUT NOTICE. ALL STATEMENTS, INFORMATION, AND RECOMMENDATIONS IN THIS MANUAL ARE BELIEVED TO BE ACCURATE BUT ARE PRESENTED WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. USERS MUST TAKE FULL RESPONSIBILITY FOR THEIR APPLICATION OF ANY PRODUCTS.

THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED WITH THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED WARRANTY, CONTACT YOUR CISCO REPRESENTATIVE FOR A COPY.

The Cisco implementation of TCP header compression is an adaptation of a program developed by the University of California, Berkeley (UCB) as part of UCB's public domain version of the UNIX operating system. All rights reserved. Copyright © 1981, Regents of the University of California.

NOTWITHSTANDING ANY OTHER WARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE OF THESE SUPPLIERS ARE PROVIDED “AS IS" WITH ALL FAULTS. CISCO AND THE ABOVE-NAMED SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE.

IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING, WITHOUT LIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF CISCO OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental.

All printed copies and duplicate soft copies of this document are considered uncontrolled. See the current online version for the latest version.

Cisco has more than 200 offices worldwide. Addresses and phone numbers are listed on the Cisco website at www.cisco.com/go/offices.

Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: https://www.cisco.com/c/en/us/about/legal/trademarks.html. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1721R)