ArticleslgStudy

computer science

Medium-dependent interface

Medium-dependent interface is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Medium-dependent interface rather than just read about it. In short: A medium-dependent interface (MDI) describes the interface (both physical and electrical/optical) in a computer network from a physical-layer implementation to the physical medium used to carry the transmission. Ethernet over twisted pair also defines a medium-dependent interface – crossover (MDI-X) interface.

Medium-dependent interface — main illustration
Medium-dependent interface — illustration

Key takeaways

  • Medium-dependent interface belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Medium-dependent interface to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Medium-dependent interface from memory before moving on to harder problems.

Reference excerpt

A medium-dependent interface (MDI) describes the interface (both physical and electrical/optical) in a computer network from a physical-layer implementation to the physical medium used to carry the transmission. Ethernet over twisted pair also defines a medium-dependent interface – crossover (MDI-X) interface. Auto–MDI-X ports on newer network interfaces detect if the connection would require a crossover and automatically choose the MDI or MDI-X configuration to complement the other end of the link.

Ethernet

The popular Ethernet family defines common medium-dependent interfaces. For 10BASE5, connection to the coaxial cable was made with either a vampire tap or a pair of N connectors. For 10BASE2, the connection to the coaxial cable was typically made with a single BNC connector to which a T-piece was attached. For twisted-pair cabling 8P8C, modular connectors are used (often called RJ45 in this context). For fiber, a variety of connectors are used depending on manufacturer and physical space availability. With 10BASE-T and 100BASE-TX, separate twisted pairs are used for the two directions of communication. Since twisted pair cables are conventionally wired pin to pin (straight-through), there are two different pinouts used for the medium-dependent interface. These are referred to as MDI and MDI-X (medium-dependent interface crossover). When connecting an MDI port to an MDI-X port, a straight-through cable is used, while to connect two MDI ports or two MDI-X ports, a crossover cable must be used. Conventionally, MDI is used on end devices and routers while MDI-X is used on hubs and switches. Some hubs and switches have an MDI uplink port (often switchable) to connect to other hubs or switches without a crossover cable.

MDI vs. MDI-X The terminology generally refers to variants of the Ethernet over twisted pair technology that use a female 8P8C port connection on a computer or other network device. The X refers to the fact that transmit wires on an MDI device must be connected to receive wires on an MDI-X device. Straight-through cables connect pins 1 and 2 (transmit) on an MDI device to pins 1 and 2 (receive) on an MDI-X device. Similarly, pins 3 and 6 are receive pins on an MDI device and transmit pins on an MDI-X device. The general convention is for network hubs, bridges and switches to use the MDI-X configuration, while all other nodes such as personal computers, workstations, servers and routers use an MDI interface. Some routers and other devices had an uplink/normal switch to go back and forth between MDI and MDI-X on a specific port. The requirement of connecting the transmitter of one side to the receiver on the other side and vice versa makes it necessary to always have an odd number of crossovers between two devices, with an MDI-X port containing an internal crossover. Thus, connecting MDI to MDI-X requires a straight-through cable (one crossover in total). Connecting MDI to MDI (no crossover) or MDI-X to MDI-X (two crossovers) requires a(nother) crossover in the cable to get an odd number. When using more complicated setups through multiple patch panels in structured cabling, the connection can use multiple patch and building cable segments. It is a good idea to have all necessary crossovers on one side, i.e., either on the central hub/switch or on each secondary hub/switch.

Automatic MDI-X

To connect two ports of the same configuration (MDI to MDI, or MDI-X to MDI-X) with a 10 or 100 Mbit/s connection (10BASE-T or 100BASE-TX), an Ethernet crossover cable is needed to connect the pair that each interface transmits on to the receive conductors of the other interface. The confusion of needing two different kinds of cables for anything but hierarchical star network topologies prompted a more automatic solution. A twisted-pair Ethernet port with automatic MDI-X, or auto MDI-X or auto-crossover, automatically detects the required configuration, MDI or MDI-X, eliminating the need for crossover cables to interconnect switches or to connect network nodes peer-to-peer. As long as it is enabled on either end of a link, either type of cable can be used. For auto MDI-X to operate correctly, the data rate and duplex setting on the interface must be set to auto. Auto MDI-X was developed by Hewlett-Packard engineers Daniel Joseph Dove and Bruce W. Melvin. A pseudo-random–number generator determines whether a network port will start in MDI or MDI-X configuration to begin auto-negotiating the link. When two auto–MDI-X ports are connected together, which is normal for modern products, the algorithm resolution time is typically < 500 ms. However, a ~1.4 second asynchronous timer is used to resolve the extremely rare case (with a probability of less than 1 in 5×1021) of a loop in which each end keeps switching. Subsequently, Dove promoted auto MDI-X within the 1000BASE-T standard and also developed patented algorithms for forced-mode auto MDI-X which allow a link to be automatically established even if the port does not auto-negotiate. This may or may not be implemented on a given device, so occasionally a crossover cable may still be necessary when connecting an auto-MDI-X to an MDI-X (hub or switch) port, especially when autonegotiation is deactivated. Newer routers, hubs and switches (including some 10/100, and all 1-gigabit or 10-gigabit devices in practice) use auto MDI-X for 10/100 Mbit connections to automatically switch to the proper configuration once a cable is connected. Gigabit and faster Ethernet links over twisted pair cable use all four cable pairs for simultaneous transmission in both directions. For this reason, there are no dedicated transmit and receive pairs, and consequently, crossover cables are never required for 1000BASE-T communication. The physical medium attachment sublayer (PMA) provides identification of each pair and usually works over crossover cables as well, even if the pairs are unusually swapped, or if the polarity of a pair is unexpectedly inverted.

See also Differential signalling § Polarity switching – system to correct inversions within a pair Media-independent interface (MII)

References

External links

"Apple products that require an Ethernet crossover cable". Apple support web site. October 22, 2008. Archived from the original on 2014-12-27. Diagram of non-automatic connections between MDI and MDIX devices

Illustrations

Medium-dependent interface: Hub with three MDI-X ports and one switchable port, circa 1998
Hub with three MDI-X ports and one switchable port, circa 1998
Medium-dependent interface: Switch showing one logical port, 16, with two physical ports, one in each conductor arrangement: MDI-X (the norm for a hub or switch), labelled 16x, and MDI, labelled Uplink, for connecting to another hub or switch with a normal straight-through cable
Switch showing one logical port, 16, with two physical ports, one in each conductor arrangement: MDI-X (the norm for a hub or switch), labelled 16x, and MDI, labelled Uplink, for connecting to another hub or switch with a normal straight-through cable
Medium-dependent interface: Straight-through MDI–to–MDI-X connection for 10BASE-T
Straight-through MDI–to–MDI-X connection for 10BASE-T
Medium-dependent interface: MDI to MDI connection with Ethernet crossover cable
MDI to MDI connection with Ethernet crossover cable

Worked examples

Example 1 — a first encounter with Medium-dependent interface

Start with the simplest possible case. Write down what Medium-dependent interface claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Medium-dependent interface before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Medium-dependent interface ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Medium-dependent interface

In research
Medium-dependent interface appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Medium-dependent interface in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Medium-dependent interface is common in secondary-school and first-year university syllabi. It links to neighbouring topics Ethernet, Network architecture, Network protocols, so understanding it makes those chapters shorter.
In everyday life
Look for Medium-dependent interface outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Medium-dependent interface” →

How to study Medium-dependent interface in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Medium-dependent interface means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Medium-dependent interface out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Medium-dependent interface in simple terms?

A medium-dependent interface (MDI) describes the interface (both physical and electrical/optical) in a computer network from a physical-layer implementation to the physical medium used to carry the transmission. Ethernet over twisted pair also defines a medium-dependent interface – crossover (MDI-X…

Why does Medium-dependent interface matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Medium-dependent interface?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Medium-dependent interface.

Tags

  • Ethernet
  • Network architecture
  • Network protocols

Keep exploring