Thursday, December 10, 2009

auto-sense MDI/MDI-X and auto-negotiating questions

SkyHi @ Thursday, December 10, 2009
I had a couple of questions, so after a half an hour of google inestigating, I have come to some conclusions so I need to confirm/deny my thoughts. Here they are (correct me if I am mistaken):

1) MDI & MDI-X - to my knowledge those are are types of ethernet ports - MDI-X is crossed MDI. Ex: if I have one device with MDI port and one device with MDI-X port, then I need a straight cable. If both are MDI, then I need a crossover cable. If both are MDI-X, I guess crossover cable?

2) If the above is correct, then does it mean that connection between any two network devices (NIC, hub, switch, router, etc) needs crossed lines (1 -> 3 & 2 -> 6)

3) NIC's have MDI interface, while routers, switches and hubs have MDI-x interface. Is this always true,  are there exceptions, and if there are, how would I know if port is MDI or MDI-X?

4) Newer switches/routers have autosense ports, which means that you can put any type of cable (crossover or straight), and it will detect and cross lines it if necessary. Are there any speed penalties while sending packets if I use straight cable between 2 routers - I guess no.

5) auto-negotiating - it means that it detects speed of connected network devices and automatically sets transmision speed of both devices to same speed (lower one). what is the benefit of this? What will happen if device doesn't have auto-negotiating feature?

1) Yes but most devices today are autosensing and determine the correct configuration.

2) same as 1

3)Switches and Hubs are usually MDI-x but routers are normally MDI

4) No, speed is still the same

5)If one device isn't capable of auto or hard set to a speed/duplex then the auto device can easily detect the speed of the other interface and sets itself accordingly. The downside is on duplex because there is not a good way to determine whether the other device can handle half or full so in most cases defaults to half.  In order for this to work correctly both devices need to be able to "Auto-Negotiate". This way you don't have to manually set speed/duplex on every port.

Hope this helps
B
Accepted Solution

 

11/20/07 01:01 PM, ID: 20323191
In the past when you connected a device other than a PC into a Cisco switch, you always wanted to hard code the speed and duplex and not use the auto feature as they never performed correctly. Today switches from Cisco have been greatly improved where the AUto detect actually works and is preferred over hard setting speed/duplex. In fact there have been instances where hardcoding the port actually resulted in errors.

The MDI-X is auto sensing on most of the new Cisco switches, but the preferred method on a switch if connecting two switches together is to disable MDI-x and use a crossover between them.

 

11/20/07 05:04 PM, ID: 20324767
Tnaks guys for the answers. I am a little confused now by this statement:

>>  Switches and Hubs are usually MDI-x but routers are normally MDI

Does this mean (assuming that if switch & router don't have auto sense feature)

nic (mdi) to switch (mdi-x) needs straighthrough cable
nic (mdi) to router (mdi) needs crossover cable (like nic (mdi) to nic (mdi) does)
router (mdi) to switch (mdi-x)  needs straighthrough cable

since in question two I say

>> 2) If the above is correct, then does it mean that connection between any two network devices (NIC, hub, switch, router, etc) needs crossed lines (1 -> 3 & 2 -> 6)

Goran

 

11/21/07 06:58 AM, ID: 20328095
No don't over-complicate it. Forget MDI. A hub(please don't use one) or a switch connects all other network devices using plain straight through cabling. The only times where a crossover will be needed is if you are connecting two non switched devices to each other, say a PC to a router(without a built in switch) or a network printer to a PC, or PC to PC. The only other time you would use a crossover to a switch is to connect another switch to it.
Assisted Solution

 

11/21/07 09:09 AM, ID: 20329206
Well, I knew most of those (didn't know the one pc to printer), I just like to understand things and not to learn them as they are. :) One thing you didn't mention is switch to router and router to router - is it crossover too, and is there any general rule about what port number should I use when connecting switches and routers.

Goran

 

11/21/07 09:36 AM, ID: 20329457
Router is considered the same as a PC, unless it has a built in switch like most SOHO routers, in that case, they can use either a straight or a crossover. Router to Router is crossover, same as a PC, with above exceptions.

Reference: http://74.125.155.132/search?q=cache:yA-Dc5i5_QIJ:www.experts-exchange.com/Hardware/Networking_Hardware/Q_22971248.html+mdix&cd=25&hl=en&ct=clnk&gl=ca