GENERAL: MDIX and Auto-Negotiation

Evening,

I've had the unhappy pleasure of dealing with a couple of ISP's recently. Both for some reason insisted that I disable auto-negotiation and force my uplinks to 1000Mbps and Full Duplex. Now I've always been of the opinion that a Gig interface is going Auto Negotiate, everytime, without exception. So, I pushed back.

The deal with gigabit ethernet over copper is that there is a negotiation of a Master and a Slave and without auto-negotiation this never takes place. More than that, during the negotiation the device does a sort of sanity check on speed. As it ramps up the devices check they can support 10M, then 100M then they hit 1000M. If they cannot support 1000M but can support 100M then the speed ramps down...it's a beautiful thing.

Of course older 10/100 auto-negotiation was a nightmare and we've all got stories we can tell about how badly that works, even between kit from the same vendor! With 10/100 I'm telling you guys now, disable auto-neg on your network hardware. For end devices like PC's who cares, but for critical kit like servers, routers, firewalls, inter-switch connections and WAN links - nail the speed and duplex on both ends.

So, what happened with the ISP's? Well they told me it's 1000/Full or nothing ;-( Now lets add some salt into my already gaping wound. My colleague had connected the remote end to the ISP cross-connect. When I forced the speed and duplex the remote link went down! Ouch - by what had happened? Well what happened was my colleague had used a straight through cable for a switch to switch link.

One of the clever tricks in modern switch ports is the ability to automatically detect if the cable needs to be crossed over (a switch to switch connection) or a straight through (edge device to switch). This technique is called MDIX or Media Dependant Interface X (Cross) over. So what happened to me? Well one of the drawbacks with disabling my ethernet auto negotiation was that it also breaks MDIX.

ethernet cross over cable
Ethernet Crossover Cable
ethernet straight through cable
Ethernet Straight Through Cable

So I'm hosed and it's now time to jump in the car and drive 300miles.

One last thing before I leave this tale is the response from the ISP. This was my complete interface configuration.

switchport trunk encapsulation dot1q
switchport mode trunk
switchport trunk allowed vlans 1117
speed 1000
duplex full

Ah, said the ISP. I asked you to disable auto-negotation. Please add the line 'switchport nonegotiate'.

Well, the ISP had a point about the command requirement but it has nothing to do with speed or duplex negotiation. On a Cisco switch, the ports if left in the default mode will attempt to converse with connected devices to work out if they are to trunk or not. The command 'switchport nonegotiate' simply stops this process.

I usually like to end on a moral issue but frankly I don't have one except don't be afraid to push back on the ISP. They are bigger than you and you will lose but who cares, get stuck in and you might learn something.

Cheers all,
Rich

© 2011 defaultrouteuk.com

Cisco, IOS, CCNA, CCNP, CCIE are trademarks of Cisco Systems Inc.
JunOS, JNCIA, JNCIP, JNCIE are registered trademark of Juniper Networks Inc.