The port media type command determines whether an interface configuration item belongs to an optical or electrical interface.
The undo port media type command restores the default settings.
Parameter |
Description |
Value |
---|---|---|
copper |
Determines that the interface configuration item belongs to a combo interface or GE interface that is equipped with a copper module and works as an electrical interface. |
- |
fiber |
Determines that the interface configuration item belongs to a combo interface or GE interface that is equipped with a copper module and works as an optical interface. |
- |
This command only distinguishes optical interface configuration and electrical interface configuration, and is not configurable.
If you have specified the interface attributes (such as auto-negotiation, speed, and full-duplex mode) on a combo interface, the system automatically generates this command to determine whether an interface configuration item belongs to the optical interface or electrical interface. After this command is generated, the configuration for the other interface type (such as optical interface) will not be lost if the combo interface works as an electrical interface.
For example, after you run the display this command on a combo interface, the interface configuration is as follows:
#
interface GigabitEthernet0/0/1
port media type copper
undo negotiation auto
speed 100
port media type fiber
undo negotiation auto
#
The command output shows that there are two configuration items undo negotiation auto and speed 100 when the combo interface works as an electrical interface and one configuration item undo negotiation auto when the combo interface works as an optical interface.