Monday, August 15, 2011

An Alternative to Cross-over Cable -- Auto MDI-X

Before we discuss about Auto MDI-X , Let me first clarify what is MDI and MDI-X

MDI(Media Dependent Interface): An Ethernet port typically used on NIC of a computer.
Examples  : Personal Computers,Workstations,Servers and Routers.

MDI-X(Media Dependent Interface-Cross over): An Ethernet port typically used on network devices. Examples : Hubs and Switches.

There is no hard rule that Computers have MDI interfaces and Switches have MDI-X interfaces. But it is general known convention.

MDI vs MDI-X :

  • Straight through cable is used to connect between MDI and MDI-X interfaces. Refer Fig 1
  • Cross over cable is used to connect between MDI to MDI (or) MDI-X to MDI-X interfaces. Refer Fig 2
They say that a picture is more than 1000 words:


                              Fig 1: Straight through MDI to MDI-X connection for 10BASE-T


                             Fig 2 :  Cross over MDI to MDI connection

 Enough about the backgroud , lets come back to actual feature

Auto MDI-X:

To connect two ports of same configuration (MDI to MDI or MDI-X to MDI-X),an ethernet cross over cable is needed. But Auto MDI-X automatically detects the required cable connection type and configures the appropriately.

Note: For Auto MDI-X to operate correctly , the speed and duplex settings must be set to "auto".

Got bored with theory , lets jump into configuration

By default Auto-MDIX is enabled on the switches. We can verify this with the following cli:

switch1#show controll ethernet fa0/0 phy | i MD

Auto-MDIX      :  On   [AdminState=1   Flags=0x00052248]

Note: If we hard set the speed/duplex , Auto-MDIX will be turned off automatically. Lets verify this

switch1(config)#int fa0/0
switch1(config-if)#speed 100

switch1#show controll ethernet fa0/0 phy | i MD

Auto-MDIX      :  Off   [AdminState=1   Flags=0x00010A48]

The following table tells us when the link will be up/down.

sw1
sw2

MDIX Speed/Duplex MDIX Speed/Duplex Link Status
on auto on auto up
on auto on hard-set up
on auto off auto up
on auto off hard-set up
on hard-set on auto up
on hard-set on hard-set down
on hard-set off auto down
on hard-set off hard-set down
off auto on auto up
off auto on hard-set down
off auto off auto down
off auto off hard-set down
off hard-set on auto up
off hard-set on hard-set down
off hard-set off auto up
off hard-set off hard-set down

Simple condition for the link to be up: at least one side needs to have auto-MDIX enabled along with auto-negotiation of speed and duplex, otherwise the link will be down.


1 comment: