Autonegotiation works at physical layer.

Autonegotiation negotiates speed and duplex.

CSMA/CD is actually physical layer or MAC data link layer (software) implementation?

If autonegotiation is physical layer implementation, how come duplex can be negotiated? Because MAC data link layer is the one that control whether frames to be transmitted or not in half duplex mode.


2 Answers 2


Carrier sense and collision detect are physical layer functions; collision detect works quite differently between a bus based system like 10BASE2 and 10BASE-T. However the MAC layer is the part that uses these functions to decide when to transmit or backoff. Being at the MAC layer doesn't mean it's implemented in software though.

There is a management interface between the MAC layer and the PHY layer containing control and status registers; this, amongst other things, allows the MAC layer to set speed and duplex. If the MAC layer enables autonegotiation, it should read back the result from the status register.

The boundary between the MAC layer and PHY layer for 100Mbit/s and above is the Media Independent Interface, for example the SFP socket. So the PHY layer is on the transceiver, MAC layer on the NIC.

  • Based on your answer regarding management interface and base link code word, does it mean that there is software (firmware) that sits on physical layer which communicates with MAC layer?
    – Ron Vince
    Commented Oct 1, 2014 at 12:22
  • @RonVince It seems unlikely to me that there would be a general purpose microprocessor on the transceiver. There isn't necessarily one on the NIC either.
    – richardb
    Commented Oct 2, 2014 at 9:48
  • Somehow, I think there is microcontroller on both PHY and MAC thus there is program/software. For MAC, its jobs is too intelligent for not having software (VLAN tag, MPLS label, QinQ, buffer, unicast/broadcast address). Reference: 1, 2, 3. Kindly clarify regarding general purpose microprocessor.
    – Ron Vince
    Commented Oct 3, 2014 at 0:52

The PHY is responsible for physically sensing the carrier and detecting the collision.

The MAC is responsible for using that information to decide when to transmit a packet and retransmitting the packet if a collision happens.

The PHY performs the auto-negotiation process.

At least on the implementations I have seen the host processor reads the negotiated settings from the PHY and programs them into the settings registers of the MAC and PHY (some settings, for example speed will need to be configured the same on both MAC and PHY).

How settings are read and written from the MAC and PHY is implementation dependent, typically for separate PHYs an interface called MDIO is used. On integrated MAC/PHY chips the PHY registers may be integrated into the controller's main register map.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.