< Home

mdi

Function

The mdi command configures the medium dependent interface (MDI) mode of an Ethernet electrical interface.

The undo mdi command restores the default MDI mode of an Ethernet electrical interface.

By default, an Ethernet electrical interface automatically identifies the network cable type.

Format

mdi { across | auto | normal }

undo mdi

Parameters

Parameter

Description

Value

across

Sets the MDI mode of an Ethernet electrical interface to across.

-

auto

Sets the MDI mode of an Ethernet electrical interface to auto. An Ethernet electrical interface automatically identifies the network cable type.

-

normal

Sets the MDI mode of an Ethernet electrical interface to normal.

-

Views

Ethernet interface view, GE interface view, XGE interface view, MultiGE interface view, 25GE interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Twisted pairs used to connect Ethernet devices include:

  • Straight-through cable: connects devices of different types, such as a switch and a PC or a switch and a router.
  • Crossover cable: connects devices of the same type, such as two switches, two routers, or two PCs.

Generally, if two interfaces are connected with a twisted-pair cable, the receive pin on the local end must be connected to the transmit pin on the remote end and the transmit pin on the local end must be connected to the receive pin on the remote end so that a link can be Up. According to pin assignment, twisted-pair cables are classified into straight-through and crossover cables. The device must support negotiation and crossover of receive and transmit pins so that Ethernet electrical interfaces can support the two types of twisted-pair cables. The device supports the following medium dependent interface (MDI) modes: auto, normal, and across.

Generally, when interfaces at both ends work in auto mode, devices can communicate regardless of whether the straight-through or crossover cable is used. Set the MDI mode to normal or across only when the device cannot identify the network cable type. When configuring an MDI mode on an interface, pay attention to the following points:
  • When a straight-through cable is used, the local and remote interfaces must use different MDI modes, for example, across mode on one end and normal mode on the other end.
  • When a crossover cable is used, the local and remote interfaces must use the same MDI mode. For example, both ends must use the across or normal mode, or at least one end uses the auto mode

Electrical interfaces support the MDI type configuration.

The XGE electrical interfaces on the ES5D21X02T01 card of the S5720-EI, and ES5D21X08T00 card of the S5730-HI, S5731-H, and S5731S-H can only use the auto MDI type.

The MDI type can be configured on an optical interface that has a GE copper module installed. Before installing a GE copper module on a 25GE optical interface, you need to run the port mode ge command to configure the interface to work at the rate of 1 Gbit/s.

Example

# Set the MDI mode of GE0/0/1 to across.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] mdi across
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >