Ethernet Interface Commands on Cisco IOS XR Software
This module describes the Cisco IOS XR commands used to configure the Ethernet interfaces.
Note This module does not include the commands for Management Ethernet interfaces. To configure a Management Ethernet interface for routing or modify the configuration of a Management Ethernet interface, use the commands described in the Management Ethernet Interface Commands on Cisco IOS XR Software module earlier in this document.
carrier-delay
To delay the processing of hardware link down notifications, use the carrier-delay command in interface configuration mode.
carrier-delay {down milliseconds [up milliseconds] | up milliseconds [down milliseconds]}
Syntax Description
down milliseconds |
Length of time, in milliseconds, to delay the processing of hardware link down notifications. Range is from 0 through 65535. |
up milliseconds |
Length of time, in milliseconds, to delay the processing of hardware link up notifications. Range is from 0 through 65535. |
Defaults
No carrier-delay is used, and the upper layer protocols are notified as quickly as possible when a physical link goes down.
Command Modes
Interface configuration
Command History
|
|
Release 3.2 |
This command was first introduced on the Cisco CRS-1 router and Cisco XR 12000 Series Router. |
Release 3.3.0 |
No modification. |
Release 3.4.0 |
The msec keyword was replaced by the down keyword, and the value of the milliseconds argument was increased to 0 through 65535. The up keyword was added, and the value of the milliseconds argument was set at 0 through 65535. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
When you delay the processing of hardware link down notifications, the higher layer routing protocols are unaware of a link until that link is stable.
If the carrier-delay down milliseconds command is configured on a physical link that fails and cannot be recovered, link down detection is increased, and it may take longer for the routing protocols to re-route traffic around the failed link.
In the case of very small interface state flaps, running the carrier-delay down milliseconds command prevents the routing protocols from experiencing a route flap.
Note Enter the show interface command to see the current state of the carrier-delay operation for an interface. No carrier-delay information is displayed if carrier-delay has not been configured on an interface.
Examples
The following example shows how to delay the processing of hardware link down notifications:
RP/0/RP0/CPU0:router(config-if)# carrier-delay down 10
The following example shows how to delay the processing of hardware link up and down notifications:
RP/0/RP0/CPU0:router(config-if)# carrier-delay up 100 down 100
Related Commands
|
|
dampening |
Limits propagation of transient or frequently changing interface states on Interface Manager (IM) clients. |
clear mac-accounting (Ethernet)
To clear Media Access Control (MAC) accounting statistics, use the clear mac-accounting command in EXEC mode.
clear mac-accounting {GigabitEthernet | TenGigE | FastEthernet} interface-path-id [location node-id]
Syntax Description
{GigabitEthernet | TenGigE | FastEthernet} |
Type of Ethernet interface whose MAC accounting statistics you want to clear. Enter GigabitEthernet, TenGigE, or FastEthernet. Note Fast Ethernet interfaces are available only on the Cisco XR 12000 Series Router. |
interface-path-id |
Physical interface or virtual interface. Note Use the show interfaces command to see a list of all interfaces currently configured on the router. For more information about the syntax for the router, use the question mark (?) online help function. |
location node-id |
(Optional) Clears MAC accounting statistics for the designated node. The node-id argument is entered in the rack/slot/module notation. |
Defaults
No default behavior or values
Command Modes
EXEC
Command History
|
|
Release 2.0 |
This command was first introduced on the Cisco CRS-1 router. |
Release 3.0 |
No modification. |
Release 3.2 |
This command was first supported on the Cisco XR 12000 Series Router. |
Release 3.3.0 |
No modification. |
Release 3.4.0 |
No modification. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
For the interface-path-id argument, use the following guidelines:
•If specifying a physical interface, the naming notation is rack/slot/module/port. The slash between values is required as part of the notation. An explanation of each component of the naming notation is as follows:
–rack: Chassis number of the rack.
–slot: Physical slot number of the line card.
–module: Module number. A physical layer interface module (PLIM) is always 0.
–port: Physical port number of the interface.
•If specifying a virtual interface, the number range varies, depending on interface type.
|
|
interface |
read, write |
basic-services |
read, write |
Examples
The following example shows how to clear all MAC accounting statistics for the TenGigE port at 1/0/0/1:
RP/0/RP0/CPU0:router# clear mac-accounting TenGigE 0/1/5/0 location 1/0/0/1
Related Commands
duplex full (Fast Ethernet)
To configure full-duplex operation on a Fast Ethernet interface, use the duplex full command in interface configuration mode. To return the system to the default duplex operation, use the no form of the duplex full command.
duplex full
no duplex full
Syntax Description
This command has no arguments or keywords.
Defaults
If autonegotiation is disabled on an interface, then the default duplex operation is full duplex.
Command Modes
Interface configuration
Command History
|
|
Release 2.0 |
This command was introduced on the Cisco CRS-1 router. |
Release 3.0 |
No modification. |
Release 3.2 |
No modification. |
Release 3.3.0 |
No modification. |
Release 3.4.0 |
No modification. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
The duplex full command automatically replaces the duplex half command if half duplex was previously configured on your router.
Note The duplex full command and the duplex half command cannot be configured simultaneously.
Examples
The following example shows how to set the Fast Ethernet interface at full duplex:
RP/0/RP0/CPU0:router(config)# interface FastEthernet 0/2/0/0
RP/0/RP0/CPU0:router(config-if)# duplex full
Related Commands
duplex half (Fast Ethernet)
To configure half-duplex operation on a Fast Ethernet interface, use the duplex half command in interface configuration mode. To return the system to the default duplex operation, use the no form of the duplex half command.
duplex half
no duplex half
Syntax Description
This command has no arguments or keywords.
Defaults
If autonegotiation is disabled on an interface, then the default duplex operation is full duplex.
Command Modes
Interface configuration
Command History
|
|
Release 2.0 |
This command was introduced on the Cisco CRS-1 router. |
Release 3.0 |
No modification. |
Release 3.2 |
No modification. |
Release 3.3.0 |
No modification. |
Release 3.4.0 |
No modification. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
The duplex half command automatically replaces the duplex full command if full duplex was previously configured on your router.
Note The duplex half command and the duplex full command cannot be configured simultaneously.
Examples
The following examples shows how to set the Fast Ethernet interface at half duplex:
RP/0/RP0/CPU0:router(config)# interface mgmteth 0/RP0/CPU0/0
RP/0/RP0/CPU0:router(config-if)# duplex half
Related Commands
flow-control
To enable the sending of flow-control pause frames, use the flow-control command in interface configuration mode. To disable flow control, use the no form of this command.
flow-control {bidirectional | egress | ingress}
no flow-control ingress {bidirectional | egress | ingress}
Syntax Description
bidirectional |
Enables flow-control for egress and ingress direction. |
egress |
Pauses egress traffic if IEEE 802.3x PAUSE frames are received. |
ingress |
Sends IEEE 802.3x PAUSE frames in case of congestion with ingress traffic. |
Defaults
If autonegotiate is enabled on the interface, then the default is negotiated.
If autonegotiate is disabled on the interface, then the sending of flow-control pause frames is disabled for both egress and ingress traffic.
Command Modes
Interface configuration
Command History
|
|
Release 3.0 |
This command was introduced on the Cisco CRS-1 router. |
Release 3.2 |
This command was first supported on the Cisco XR 12000 Series Router. |
Release 3.3.0 |
No modification. |
Release 3.4.0 |
No modification. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
Note When you explicitly enable the sending of flow-control pause frames, the value you configured with the flow-control command overrides any autonegotiated value. This prevents a link from coming up if the value you set with the flow-control command conflicts with the allowable settings on the other end of the connection.
Note The flow-control command is supported on Gigabit Ethernet, TenGigE, and FastEthernet interfaces only; the flow-control command is not supported on Management Ethernet Interfaces.
Note The flow-control command syntax options may vary, depending on the type of PLIM or SPA that is installed in your router.
Examples
The following example shows how to enable the sending of flow-control pause frames for ingress traffic on the TenGigE interface 0/3/0/0:
RP/0/RP0/CPU0:router(config)# interface TenGigE 0/3/0/0
RP/0/RP0/CPU0:router(config-if)# flow-control ingress
Related Commands
|
|
show interfaces |
Displays statistics for all interfaces configured on the router. |
interface FastEthernet
To enter interface configuration mode for a Fast Ethernet interface, use the interface FastEthernet command in global configuration mode. To delete a Fast Ethernet interface configuration, use the no form of this command.
interface FastEthernet interface-path-id
no interface FastEthernet interface-path-id
Syntax Description
interface-path-id |
Physical interface or virtual interface. Note Use the show interfaces command to see a list of all interfaces currently configured on the router. For more information about the syntax for the router, use the question mark (?) online help function. |
Defaults
No default behavior or values
Command Modes
Global configuration
Command History
|
|
Release 3.3.0 |
This command was introduced on the Cisco XR 12000 Series Router. |
Release 3.4.0 |
No modification. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
For the interface-path-id argument, use the following guidelines:
•If specifying a physical interface, the naming notation is rack/slot/module/port. The slash between values is required as part of the notation. An explanation of each component of the naming notation is as follows:
–rack: Chassis number of the rack.
–slot: Physical slot number of the line card.
–module: Module number. A physical layer interface module (PLIM) is always 0.
–port: Physical port number of the interface.
•If specifying a virtual interface, the number range varies, depending on interface type.
Examples
The following example shows how to enter interface configuration mode for a Fast Ethernet interface:
RP/0/RP0/CPU0:router(config)# interface FastEthernet 0/2/0/0
RP/0/RP0/CPU0:router(config-if)#
Related Commands
|
|
show interfaces |
Displays statistics for all interfaces configured on the router. |
interface GigabitEthernet
To enter interface configuration mode for a Gigabit Ethernet interface, use the interface GigabitEthernet command in global configuration mode. To delete a Gigabit Ethernet interface configuration, use the no form of this command.
interface GigabitEthernet interface-path-id
no interface GigabitEthernet interface-path-id
Syntax Description
interface-path-id |
Physical interface or virtual interface. Note Use the show interfaces command to see a list of all interfaces currently configured on the router. For more information about the syntax for the router, use the question mark (?) online help function. |
Defaults
No default behavior or values
Command Modes
Global configuration
Command History
|
|
Release 3.2 |
This command was introduced on the Cisco XR 12000 Series Router. |
Release 3.3.0 |
No modification. |
Release 3.4.0 |
No modification. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
For the interface-path-id argument, use the following guidelines:
•If specifying a physical interface, the naming notation is rack/slot/module/port. The slash between values is required as part of the notation. An explanation of each component of the naming notation is as follows:
–rack: Chassis number of the rack.
–slot: Physical slot number of the line card.
–module: Module number. A physical layer interface module (PLIM) is always 0.
–port: Physical port number of the interface.
•If specifying a virtual interface, the number range varies, depending on interface type.
Examples
The following example shows how to enter interface configuration mode for a Gigabit Ethernet interface:
RP/0/0/CPU0:router(config)# interface GigabitEthernet 0/4/0/0
RP/0/0/CPU0:router(config-if)#
Related Commands
|
|
show interfaces |
Displays statistics for all interfaces configured on the router. |
interface TenGigE
To enter interface configuration mode for a 10-Gigabit Ethernet interface, use the interface TenGigE command in global configuration mode. To delete a 10-Gigabit Ethernet interface configuration, use the no form of this command.
interface TenGigE interface-path-id
no interface TenGigE interface-path-id
Syntax Description
interface-path-id |
Physical interface or virtual interface. Note Use the show interfaces command to see a list of all interfaces currently configured on the router. For more information about the syntax for the router, use the question mark (?) online help function. |
Defaults
No default behavior or values
Command Modes
Global configuration
Command History
|
|
Release 2.0 |
This command was introduced on the Cisco CRS-1 router. |
Release 3.0 |
No modification. |
Release 3.2 |
This command was first supported on the Cisco XR 12000 Series Router. |
Release 3.3.0 |
No modification. |
Release 3.4.0 |
No modification. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
For the interface-path-id argument, use the following guidelines:
•If specifying a physical interface, the naming notation is rack/slot/module/port. The slash between values is required as part of the notation. An explanation of each component of the naming notation is as follows:
–rack: Chassis number of the rack.
–slot: Physical slot number of the line card.
–module: Module number. A physical layer interface module (PLIM) is always 0.
–port: Physical port number of the interface.
•If specifying a virtual interface, the number range varies, depending on interface type.
Examples
The following example shows how to enter interface configuration mode for a 10-Gigabit Ethernet interface:
RP/0/RP0/CPU0:router(config)# interface TenGigE 0/1/0/0
RP/0/RP0/CPU0:router(config-if)#
Related Commands
|
|
show interfaces |
Displays statistics for all interfaces configured on the router. |
l2protocol (Ethernet)
To configure Layer 2 protocol tunneling and protocol data unit (PDU) filtering on an Ethernet interface, use the l2protocol command in Layer 2 transport configuration mode. To disable a Layer 2 protocol tunneling and Layer 2 protocol data units configuration, use the no form of this command.
l2protocol {cdp | pvst | stp | vtp} {[tunnel] experimental bits | drop}
no l2protocol
Syntax Description
cdp |
Configures Cisco Discovery Protocol (CDP) tunneling and data unit parameters for the Ethernet interface. |
pvst |
Configures VLAN spanning tree protocol tunneling and data unit parameters. |
stp |
Configures spanning tree protocol tunneling and data unit parameters for the Ethernet interface. |
vtp |
Configures VLAN trunk protocol tunneling and data unit parameters. |
tunnel |
Tunnels the packets associated with the specified protocol. When you specify the tunnel keyword, the packet destination MAC address is re-written with an alternative address before that packet is sent over a pseudowire. After the packet comes through the other end of the pseudowire, the alternative address reverts to the original destination MAC address. |
experimental bits |
Replaces the experimental bits in the MPLS header with the 802.1p bits from the MAC header and vice-versa. |
drop |
Drops packets associated with the specified protocol. |
Command Default
All Layer 2 protocol data units are forwarded through the network without modification.
Command Modes
Layer 2 transport configuration
Command History
|
|
Release 3.4.0 |
This command was first introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
Note The l2protocol command is available only when Layer 2 transport port mode is enabled on the interface with the l2transport command.
Examples
The following example shows how to configure an Ethernet interface to drop CDP packets:
RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# interface TenGigE 0/0/0/1
RP/0/RP0/CPU0:router(config-if)# l2transport
RP/0/RP0/CPU0:router(config-if-l2)# l2protocol cdp drop
Related Commands
|
|
l2transport (Ethernet) |
Enables Layer 2 transport port mode on an Ethernet interface and enters Layer 2 transport configuration mode. |
show interfaces |
Displays statistics for all interfaces configured on the router or for a specific node. |
l2transport (Ethernet)
To enable Layer 2 transport port mode on an Ethernet interface and enter Layer 2 transport configuration mode, use the l2transport command in interface configuration mode for an Ethernet interface. To disable Layer 2 transport port mode on an Ethernet interface, use the no form of this command.
l2transport
no l2transport
Syntax Description
This command has no arguments or keywords.
Defaults
No default behavior or values
Command Modes
Interface configuration
Command History
|
|
Release 3.4.0 |
This command was first introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
When you issue the l2transport command in interface configuration mode, the CLI prompt changes to "config-if-l2," indicating that you have entered the Layer 2 transport configuration submode. In the following sample output, the question mark (?) online help function displays all the commands available under Layer 2 transport configuration submode for an Ethernet interface:
RP/0/RP0/CPU0:router#configure
RP/0/RP0/CPU0:router(config)# interface GigabitEthernet 0/1/5/0
RP/0/RP0/CPU0:router(config-if)#l2transport
RP/0/RP0/CPU0:router(config-if-l2)#?
commit Commit the configuration changes to running
describe Describe a command without taking real actions
exit Exit from this submode
no Negate a command or set its defaults
service-policy Configure QoS Service policy
show Show contents of configuration
RP/0/RP0/CPU0:router(config-if-l2)#
Note The l2transport command is mutually exclusive with any Layer 3 interface configuration.
Examples
The following example shows how to enable Layer 2 transport port mode on an Ethernet interface and enter Layer 2 transport configuration mode:
RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)#interface GigabitEther 0/2/0/0
RP/0/RP0/CPU0:router(config-if)#l2transport
RP/0/RP0/CPU0:router(config-if-l2)#
Related Commands
|
|
show interfaces |
Displays statistics for all interfaces configured on the router or for a specific node. |
show l2vpn xconnect |
Displays brief information on configured xconnects. |
loopback (Ethernet)
To configure an Ethernet controller for loopback mode, use the loopback command in interface configuration mode. To disable loopback, use the no form of this command.
loopback {external | internal | line}
no loopback
Syntax Description
external |
All IPv4 self-ping packets are sent out of the interface and looped back externally before being received on the ingress path. |
internal |
All packets are looped back internally within the router before reaching an external cable. |
line |
Incoming network packets are looped back through the external cable. |
Defaults
Loopback mode is disabled.
Command Modes
Interface configuration
Command History
|
|
Release 3.0 |
This command was introduced on the Cisco CRS-1 router. |
Release 3.2 |
This command was first supported on the Cisco XR 12000 Series Router. |
Release 3.3.0 |
No modification. |
Release 3.4.0 |
No modification. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
The loopback command is available for all Ethernet interface types (Gigabit Ethernet, 10-Gigabit Ethernet, and Fast Ethernet).
Two loopback operation modes are supported for diagnostic purposes: internal and line. In the terminal (internal) loopback, the sent signal is looped back to the receiver. In the facility (line) loopback, the signal received from the far end is looped back and sent on the line. The two loopback modes cannot be active at the same time. In normal operation mode, neither of the two loopback modes is enabled.
Tip Use the loopback external command when an external loopback connector is attached to the interface.
Examples
In the following example, all packets are looped back to the TenGigE controller:
RP/0/RP0/CPU0:router(config)# interface TenGigE 0/3/0/0
RP/0/RP0/CPU0:router(config-if)# loopback internal
mac-accounting
To generate accounting information for IP traffic based on the source and destination Media Access Control (MAC) addresses on LAN interfaces, use the mac-accounting command in interface configuration mode. To disable MAC accounting, use the no form of this command.
mac-accounting {egress | ingress}
Syntax Description
egress |
Generates accounting information for IP traffic based on the destination MAC addresses (egress direction). |
ingress |
Generates accounting information for IP traffic based on the source MAC addresses (ingress direction). |
Defaults
MAC accounting is disabled
Command Modes
Interface configuration
Command History
|
|
Release 3.0 |
This command was first introduced on the Cisco CRS-1 router. |
Release 3.2 |
This command was first supported on the Cisco XR 12000 Series Router. |
Release 3.3.0 |
No modification. |
Release 3.4.0 |
No modification. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
The mac-accounting command calculates the total packet and byte counts for a LAN interface that receives or sends IPv4 packets to or from a unique MAC address.
Examples
The following example shows how to enable MAC accounting for the source MAC address on the ingress direction:
RP/0/RP0/CPU0:router(config-if)# mac-accounting ingress
Related Commands
mac-address (Ethernet)
To set the MAC layer address of an Ethernet interface, use the mac-address command in interface configuration mode. To return the device to its default MAC address, use the no form of this command.
mac-address value1.value2.value3
no mac-address
Syntax Description
value1. |
High 2 bytes of the MAC address in hexadecimal format. Range is from 0 to ffff. |
value2. |
Middle 2 bytes of the MAC address in hexadecimal. Range is from 0 to ffff. |
value3 |
Low 2 bytes of the MAC address in hexadecimal. Range is from 0 to ffff. |
Defaults
The default MAC address is read from the hardware burned-in address (BIA).
Command Modes
Interface configuration
Command History
|
|
Release 2.0 |
This command was introduced on the Cisco CRS-1 router. |
Release 3.0 |
No modification. |
Release 3.2 |
No modification. |
Release 3.3.0 |
No modification. |
Release 3.4.0 |
No modification. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
The MAC address must be in the form of three 4-digit values (12 digits in dotted decimal notation).
The mac-address command is available for all types of line card Ethernet interfaces (Gigabit Ethernet, 10-Gigabit Ethernet, Fast Ethernet) and for the Management Ethernet interface.
Examples
The following example shows how to set the MAC address of a Gigabit Ethernet interface located at 0/1/5/0:
RP/0/RP0/CPU0:router(config)# interface GigabitEthernet 0/1/5/0
RP/0/RP0/CPU0:router(config-if)# mac-address 0001.2468.ABCD
negotiation auto
To enable link autonegotiation on Gigabit Ethernet and Fast Ethernet interfaces, use the negotiation auto command in interface configuration mode. To disable link autonegotiation, use the no form of this command.
negotiation auto
no negotiation auto
Syntax Description
This command has no arguments or keywords.
Defaults
Link autonegotiation is disabled.
Command Modes
Interface configuration
Command History
|
|
Release 3.3.0 |
This command was introduced on the Cisco CRS-1 router and the Cisco XR 12000 Series Router. |
Release 3.4.0 |
No modification. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
The negotiation auto command is available on Gigabit Ethernet and Fast Ethernet interfaces only.
Examples
The following example shows how to enable link autonegotiation on an interface:
RP/0/RP0/CPU0:router(config)# interface FastEthernet 0/0/2/0
RP/0/RP0/CPU0:router(config-if)# negotiation auto
The following example shows how to disable link autonegotiation on an interface:
RP/0/RP0/CPU0:router(config)# interface FastEthernet 0/0/2/0
RP/0/RP0/CPU0:router(config-if)# no negotiation auto
packet-gap non-standard
To change the packet interval for traffic on an interface for improved interoperability with
Cisco Catalyst 6000 series switches, use the packet-gap non-standard command in interface configuration mode. To use the standard packet interval as defined by the IEEE 802.ae specification, use the no form of this command.
packet-gap non-standard
no packet-gap non-standard
Syntax Description
This command has no arguments or keywords.
Defaults
The interface uses the standard packet interval as defined by the IEEE 802.ae specification.
Command Modes
Interface configuration
Command History
|
|
Release 3.0 |
This command was first introduced on the Cisco CRS-1 router. |
Release 3.2 |
This command was first supported on the Cisco XR 12000 Series Router. |
Release 3.3.0 |
No modification. |
Release 3.4.0 |
No modification. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
An interface that is connected to a Cisco Catalyst 6000 series switch may experience packet loss problems that can be resolved by changing the packet interval of traffic from standard (as defined by the IEEE 802.ae specification) to nonstandard using the packet-gap non-standard command.
Note The packet-gap non-standard command is available on 10-Gigabit Ethernet interfaces only.
Examples
The following example shows how to change the packet interval for traffic on an interface from standard to nonstandard:
RP/0/RP0/CPU0:router(config)# interface TenGigE 0/3/0/0
RP/0/RP0/CPU0:router(config-if)# packet-gap non-standard
show controllers (Ethernet)
To display status and configuration information about the Ethernet interfaces on a specific node, use the show controllers command in EXEC mode.
show controllers {GigabitEthernet | TenGigE | fastethernet} interface-path-id [all | bert | internal | mac | phy | stats | xgxs]
Syntax Description
{GigabitEthernet | TenGigE | fastethernet} |
Indicates the type of Ethernet interface whose MAC accounting statistics you want to display. Enter GigabitEthernet, TenGigE, or fastethernet. Note Fast Ethernet interfaces are available only on the Cisco XR 12000 Series Router. |
interface-path-id |
Physical interface or virtual interface. Note Use the show interfaces command to see a list of all interfaces currently configured on the router. For more information about the syntax for the router, use the question mark (?) online help function. |
all |
Displays detailed information for the specified interface. |
bert |
Displays BERT status information for the interface. |
internal |
Displays internal information for the interface. |
mac |
Displays mac information for the interface. |
phy |
Displays physical information for the interface. |
stats |
Displays statistical information for the interface. |
xgxs |
Displays information about the 10 Gigabit Ethernet Extended Sublayer (XGXS). |
Defaults
No default behavior or values
Command Modes
EXEC
Command History
|
|
Release 3.0 |
This command was first introduced on the Cisco CRS-1 router. |
Release 3.2 |
This command was first supported on the Cisco XR 12000 Series Router. |
Release 3.3.0 |
No modification. |
Release 3.4.0 |
No modification. |
Release 3.5.0 |
Added GigabitEthernet and TenGigE keywords and support. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
For the interface-path-id argument, use the following guidelines:
•If specifying a physical interface, the naming notation is rack/slot/module/port. The slash between values is required as part of the notation. An explanation of each component of the naming notation is as follows:
–rack: Chassis number of the rack.
–slot: Physical slot number of the line card.
–module: Module number. A physical layer interface module (PLIM) is always 0.
–port: Physical port number of the interface.
•If specifying a virtual interface, the number range varies, depending on interface type.
Examples
The following example shows the output from the show controllers gigabitEthernet command:
RP/0/0/CPU0:PE6_C12406# show controllers gigabitEthernet 0/4/0/0
good_octets_received: 6008282
good_frames_received: 65020
broadcast_frames_received: 11
multicast_frames_received: 49985
good_octets_sent: 4483774
unrecog_mac_control_received: 0
SERDESGlbCntl: 0x80000800
GlblEPDCntlCfg: 0x0000a033
TxFIFOUrecECCErrCtr: 0x00000000
RxFIFOUrecECCErrCtr: 0x00000000
DeviceGlobalRst: 0x00000000
PL4IOGlblStat: 0x00000002
MACStatus Port0: 0x0000801f
MACControl0 Port0: 0x000c0000
MACControl1 Port0: 0xb1240151
MACControl2 Port0: 0x0d805f60
SERDESCntl Port0: 0x0000501a
RateLimCntl Port0: 0x00000001
CalendarParam: 0x00040004
SPI4SrcDPDeskew: 0x000f2710
SnkCalSeqPrgm: 0x00100404
SPI4SrcMaxBrst: 0x00040004
SPI4IntfBrstLen: 0x0007000f
RxFullWatermarks: 0x01f000c0
RxFIFOXOnOffFCWtrmrk: 0x05000300
Table 28 describes the significant fields shown in the display.
Table 28 show controllers gigabitethernet Field Descriptions
|
|
port |
Identifies the Ethernet port whose information is displayed in the show controllers command output. |
good_octets_received |
The count of received octets that had no errors. |
bad_octets_received |
The count of received octets that had errors. |
good_frames_received |
The count of received frames that had no errors. |
bad_frames_received |
The count of received frames that had errors. |
broadcast_frames_received |
The total number of well-formed broadcast packets received by the port. It excludes packets received with errors or with multicast destination addresses. |
multicast_frames_received |
The total number of well-formed multicast packets received by the port. It excludes packets received with errors or with broadcast destination addresses. |
good_octets_sent |
The count of transmitted octets that had no errors. |
good_frames_sent |
The count of transmitted frames that had no errors. |
broadcast_frames_sent |
The total number of well-formed broadcast packets transmitted by the port. It excludes packets received with errors or with multicast destination addresses. |
multicast_frames_sent |
The total number of well-formed multicast packets transmitted by the port. It excludes packets received with errors or with multicast destination addresses. |
mac_transfer_error |
Register that tracks all MAC transfer errors on the interface. |
excessive_collision |
The total number of packets that failed to be sent after 16 collisions. It includes packets of all destination address types. |
unrecog_mac_control_received |
Number of received MAC control frames that have an opcode different than 00-01. |
fc_sent |
Number of flow control frames sent undersize |
good_fc_received |
Number of good flow control messages received |
rx_over_flow_events |
Indicates the number of times the port RxFifo has reached full level and at least one packet was dropped |
undersize |
Number of undersize frames received (valid packet with length less than 64 bytes). |
fragments |
Number of fragments received on this interface. |
oversize |
Number of oversized frames received on this interface. |
jabber |
Number of jabber packets received (packet length is greater than the MRU, and there is an invalid CRC, and no Rx Error event). |
mac_rcv_error |
Number of Rx Error events seen by the receive side of the MAC (the Rx Error signal/symbol was asserted while the frame is being received). |
bad_crc |
The number of frames received with bad CRC. Note Collisions and late collisions apply to only half duplex mode. |
collisions |
The total number of packets sent without error after having 1 to 15 collisions. It includes packets of all destination address types and excludes packets discarded because of insufficient resources or late collisions |
late_collision |
The total number of packets discarded because of late collisions detected during transmission. It includes all transmit packets that had a collision after the transmission of the packet's 64th byte. The preamble and SFD are not included in the frame's byte count. |
rate_limit_dropped |
Number of frames dropped due to the broadcast/multicast rate limit. |
spi4_rx_frames |
SPI-4/1 receive frame count. This counter increments once for every Start of Packet (SOP) delineation marker sent on the SPI-4.2 receive interface. Note Packets that come from the CPU are not counted. |
spi4_tx_frames: |
SPI-4/1 transmit frame count. This counter increments once for every packet arriving on the SPI-4.2 receive interface. Note Packets that contain certain types of errors and packets sent to the CPU are not counted. |
DeviceID |
Unique number identifying the device. |
RevisionID |
Indicates the revision of the device. |
SideBandFC |
Indicates whether serial sideband flow control is enabled on this port, and the status of ports where flow control is currently active. |
SERDESGlbCntl |
Displays information about SERDES speed and receive (Rx) Gain on this port. |
GlblEPDCntlCfg |
Cisco-specific register that shows whether Ethernet Packet Decoding is enabled. |
TxFIFOUrecECCErrCtr |
Transmit (Tx) FIFO unrecoverable ECC errors counter. This counter increments once per each ECC unrecoverable error. A masked interrupt is optionally generated. |
RxFIFOUrecECCErrCtr |
Receive (Rx) FIFO unrecoverable ECC errors counter. This counter increments once per each ECC unrecoverable error. A masked interrupt is optionally generated. |
DeviceGlobalRst |
Global register that controls device reset state. |
GlobalCfg |
Global register that controls enable, clock modes, and Rx Interface behavior. |
PortTest |
Port diagnostics register. |
PL4IOGlblStat |
Register used during SPI4.2 initialization. |
DeviceTest |
Diagnostic loopback register. |
MACStatus Port0 |
MAC control port register. |
MACControl0 Port0 |
MAC control port register. Indicates whether the port is enabled on this port, and the status of flow control on this port. |
MACControl1 Port0 |
MAC control port1 register. Indicates whether the port is enabled on this port, and the status of flow control on this port. |
MACControl2 Port0 |
MAC control port2 register. Indicates whether the port is enabled on this port, and the status of flow control on this port. |
SERDESCntl Port0 |
SERDES control port register. The following information is displayed: •0 = 50 Ohm •1 = 75 Ohm |
RateLimCntl Port0 |
Rate Limit control port 10 register. |
SysIntMask |
When the matching bit in the mask register is reset, the matching interrupt in the cause register is not included in the sum. |
SysIntCause |
Register that tracks the causes of system interrupts. |
GOPIntMask0 |
GOP interrupt Mask0. When the matching bit in the mask register is reset, the matching cause in the GOP register is not included in the sum. |
GOPIntCause0 |
Register that tracks all GOP interrupts and matches them with the GOP0 register. |
GOPIntMask1 |
GOP interrupt Mask1. When the matching bit in the mask register is reset, the matching cause in the GOP register is not included in the sum. |
GOPIntCause1 |
Register that tracks all GOP interrupts and matches them with the Mask1 register. |
GOPIntMask2 |
GOP interrupt Mask2. When the matching bit in the mask register is reset, the matching cause in the GOP register is not included in the sum. |
GOPIntCause2 |
Register that tracks all GOP interrupts and matches them with the Mask2 register. |
GOPIntMask3 |
GOP interrupt Mask3. When the matching bit in the mask register is reset, the matching cause in the GOP register is not included in the sum. |
GOPIntCause3 |
Register that tracks all GOP interrupts and matches them with the Mask3 register. |
CalendarParam |
Register that determines the value of Calendar_LEN and Calendar M for the sink and source side. |
SPI4SrcDPDeskew |
Register used to control the training pattern generation on the source side. |
SrcClndrCmd |
Register used to program the CALENDAR slots in the calendar report generated by the device. |
SnkCalSeqPrgm |
Register used to program the CALENDAR slots in the calendar report generated by the device. |
SinkControl |
Register used to control the operation of the SPI-4.2 SINK section. |
SPI4SrcMaxBrst |
Register used to determine the system parameters MaxBurst1 and MaxBurst2 on the source side. These values are used by the internal packet scheduler to initiate bursts on the SP-4.2 Rx interface. |
SPI4IntfBrstLen |
Register used to determine the actual length of the data bursts on the SP-4.2 physical interfaces. These values are different than the system parameters MaxBurts1/2, which corresponds to SP-4.2 flow control. |
TxPacketSize |
Maximum transmit packet size for the port, in hexadecimal format. |
RxFullWatermarks |
Determines the internal RxFIFO full thresholds. |
RxFIFOXOnOffFCWtrmrk |
Determines the generation of 802.3x PAUSE frames based on RxFIFO data fill thresholds. |
The following example shows the output from the show controllers tenGigE command:
RP/0/RP0/CPU0:router #show controllers TenGigE 0/3/0/0
Vendor PN: TXN174112013F06
R3.4.0 Final Draft—Cisco Confidential Information
Vendor Date Code: 2004071200
nvr_control_status = 0x0007
sonet_sdh_code_byte_0 = 0x00
sonet_sdh_code_byte_1 = 0x00
sonet_sdh_code_byte_2 = 0x00
sonet_sdh_code_byte_3 = 0x00
Link Alarm Status Registers:
rx_alarm_control = 0x0019
tx_alarm_control = 0x0059
Digital Optical Monitoring:
Transceiver Temp: 34.246 C
Laser Bias Current: 4.8640 mA
Laser Output Power: 0.5059 mW, -3.0 dBm
Receive Optical Power: 0.0000 mW, -inf dBm
Control = 0x2040 Status = 0x0082 Dev ID 0 = 0x0043 Dev ID 1 = 0xa400 Speed Ability =
0x0001 Devices 1 = 0x001a Devices 2 = 0x0000 Control 2 = 0x0006 Status 2 = 0xb541 Tx
Disable = 0x0000 Rx Signal Detect = 0x0000 OUI 0 = 0x0041 OUI 1 = 0xf426
R3.4.0 Final Draft—Cisco Confidential Information
Control = 0x2040 Status = 0x0082 Dev ID 0 = 0x0043 Dev ID 1 = 0xa400 Speed Ability =
0x0001 Devices 1 = 0x001a Devices 2 = 0x0000 Control 2 = 0x0000 Status 2 = 0x8401 PKG ID 0
= 0x0000 PKG ID 1 = 0x0000 Base X Status = 0x0000 Base X Control = 0x0000 Base R Status 1
= 0x0004 Base R Status 2 = 0x0000 Base R jitter seed a0 = 0x0000 Base R jitter seed a1 =
0x0000 Base R jitter seed a2 = 0x0000 Base R jitter seed a3 = 0x0000 Base R jitter seed b0
= 0x0000 Base R jitter seed b1 = 0x0000 Base R jitter seed b2 = 0x0000 Base R jitter seed
b3 = 0x0000 Base R jitter test control = 0x0000 Base R jitter test counter = 0x0000
Control = 0x2040 Status = 0x0002
Dev ID 0 = 0x0043 Dev ID 1 = 0xa400
Speed Ability = 0x0001 Devices 1 = 0x001a Devices 2 = 0x0000 Status 2 = 0x8000 PKG ID 0 =
0x0000 PKG ID 1 = 0x0000 Lane Status = 0x1c0f Test Control = 0x0000
Control = 0x0000 Status = 0x801f
Dev ID 0 = 0x0040 Dev ID 1 = 0x6092
Speed Ability = 0x0001 Devices 1 = 0x001a Devices 2 = 0x0000 Status 2 = 0x8000 PKG ID 0 =
0x0000 PKG ID 1 = 0x0000 Lane Status = 0x1c0f Test Control = 0x0000
Control = 0x0000 Status = 0x801f
Dev ID 0 = 0x0040 Dev ID 1 = 0x6092
Unicast MAC Address entries = 0
MAC (PLA) device is enabled
MAC (PLA) device is in promiscuous mode
MAC (PLA) device loopback is disabled
MAC (PLA) device MTU = 8226
local_regs_id = 0xa6602000 local_regs_inter_stat = 0x00000000 local_regs_inter_stat_alias
= 0x00000000 local_regs_inter_enbl_woset = 0x0000ff00 local_regs_inter_enbl_woclr =
0x0000ff00 local_regs_chip_reset = 0x00000000 local_regs_reset = 0xff000000
local_regs_misc_io = 0x00010000 sn_link_framed = 0x00000001 sn_link_crc_errors =
0x00000000 sn_link_force_reframe = 0x00000000 sn_link_error_reframe = 0x00000001
sn_link_force_error = 0x00000000 sn_link_error_cause = 0x00000000
sn_link_error_interrupt_mask = 0x00000003 channel0_control = 0x000000a6 channel1_control =
0x000000a6 channel2_control = 0x0000008e channel3_control = 0x0000008e channel4_control =
0x0000008e channel5_control = 0x000000a6 channel6_control = 0x000000a6 channel7_control =
show mac-accounting (Ethernet)
To display MAC accounting statistics for an interface, use the show mac-accounting command in EXEC mode.
show mac-accounting {GigabitEthernet | TenGigE | FastEthernet} interface-path-id [location node-id]
Syntax Description
{GigabitEthernet | TenGigE| FastEthernet} |
Indicates the type of Ethernet interface whose MAC accounting statistics you want to display. Enter GigabitEthernet, TenGigE, or FastEthernet. Note Fast Ethernet interfaces are available only on the Cisco XR 12000 Series Router. |
interface-path-id |
Physical interface or virtual interface. Note Use the show interfaces command to see a list of all interfaces currently configured on the router. For more information about the syntax for the router, use the question mark (?) online help function. |
location node-id |
(Optional) Displays detailed MAC accounting information for the specified interface on the specified node. The node-id argument is entered in the rack/slot/module/port notation. |
Defaults
No default behavior or values
Command Modes
EXEC
Command History
|
|
Release 3.0 |
This command was first introduced on the Cisco CRS-1 router. |
Release 3.2 |
This command was first supported on the Cisco XR 12000 Series Router. |
Release 3.3.0 |
No modification. |
Release 3.4.0 |
No modification. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
For the interface-path-id argument, use the following guidelines:
•If specifying a physical interface, the naming notation is rack/slot/module/port. The slash between values is required as part of the notation. An explanation of each component of the naming notation is as follows:
–rack: Chassis number of the rack.
–slot: Physical slot number of the line card.
–module: Module number. A physical layer interface module (PLIM) is always 0.
–port: Physical port number of the interface.
•If specifying a virtual interface, the number range varies, depending on interface type.
Examples
The following example shows the output from the show mac-accounting command, which displays MAC accounting statistics on the specified interface:
RP/0/RP0/CPU0:router# show mac-accounting TenGigE 0/2/0/4 location 0/1/CPU0
000b.4558.caca: 4 packets, 456 bytes
Total: 4 packets, 456 bytes
Table 29 describes the significant fields shown in the display.
Table 29 show mac-accounting Field Descriptions
|
|
Interface |
The interface from which the statistics are generated. |
Input |
Heading for the ingress MAC accounting statistics. The number of MAC accounting entries still available is shown in parentheses. |
Total |
Total statistics for the traffic accounted for by MAC accounting. This excludes any traffic for which there is no MAC address entry, such as non-IP traffic from an unknown MAC source address. |
Related Commands
speed (Fast Ethernet)
To configure the speed for a Fast Ethernet interface, enter the speed command in interface configuration mode. To return the system to autonegotiate speed, use the no form of this command.
speed {10 | 100 | 1000}
no speed
Syntax Description
10 |
Configures the interface to transmit at 10 Mbps. |
100 |
Configures the interface to transmit at 100 Mbps. |
1000 |
Configures the interface to transmit at 1000 Mbps (1 Gbps). |
Defaults
If autonegotiation is enabled on an interface, then the default speed is negotiated.
If autonegotiation is disabled on an interface, then the default speed is the maximum speed allowed on the interface.
Command Modes
Interface configuration
Command History
|
|
Release 2.0 |
This command was introduced on the Cisco CRS-1 router. |
Release 3.0 |
No modification. |
Release 3.2 |
This command was first supported on the Cisco XR 12000 Series Router. |
Release 3.3.0 |
No modification. |
Release 3.4.0 |
No modification. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
Note The speed command is available on Management Ethernet interfaces and Fast Ethernet interfaces only.
Note Keep in mind that both ends of a link must have the same interface speed. A manually configured interface speed overides any autonegotiated speed, which can prevent a link from coming up if the configured interface speed at one end of a link is different from the interface speed on the other end.
Examples
The following example shows how to configure the Fast Ethernet interface to transmit at one gigabit:
RP/0/RP0/CPU0:router(config)# interface FastEthernet 0/0/2/0
RP/0/RP0/CPU0:router(config-if)# speed 1000