1

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.

Ron Vince
  • 927
  • 3
  • 12
  • 24
  • 1
    See http://networkengineering.stackexchange.com/questions/6380/osi-model-and-networking-protocols-relationship/6381#6381 – Ron Trunk Oct 01 '14 at 09:55
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide your own answer and accept it. – Ron Maupin Aug 06 '17 at 23:43

2 Answers2

5

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.

richardb
  • 1,628
  • 9
  • 10
0

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.

Peter Green
  • 13,882
  • 2
  • 23
  • 54