LACP allows the switches to bundle the ports with same speed/duplex mode. This requires SW1 to know the current speed/duplex of gig1/gig2 on SW2 .
1) How does SW1 determine the speed/duplex of the gig1 /gig2 on SW 2 and vice versa? LACP ensures ports with same speed/duplex are bundled . When I look at the capture for LACP, I do not see any info about the speed/duplex being carried in LACP message so how does SW1 determine the speed /duplex of the gig1/gig2 on SW2?
Link speed and duplex negotiation is done seperately per interface outside the scope of LACP.
For GigE it will usually be done via autonegotiation where each links announces it's capabilities and agrees on the best match. Usually 1G/full-duplex today. You can force speed/duplex but it not recommended today.
There will be differences when looking at fiber transceivers where they will only run a specific speed and link will not come up if the other end doesn't match.
First when the interface is up with an agreed speed/duplex LACP PDUs will be sent out on the link in question.
@sarahr202 - LACP active (802.3ad) standard does not allow for mix-match of different speed/duplex ports into a bundle. So if the interfaces for a LACP bundle have different mis-match, then LACP will not come up. This is sort of a pre-check before LACP negotiation even occurs. In a plain Juniper AE this mis-match should be allowed, but if also set with 802.3ad, then this is not allowed.
Speed/Duplex and Lacp negotiation are different parameters.
Speed/Duplex: This negotiation is taken care by a ethgernet Auto-negotiation feature. Auto-negotiation is the feature that allows a port on a switch or router, to communicate with the device on the other end of the link to determine the optimal duplex mode and speed for the connection.
Do remeber that Auto-negotiation is just like another protocol, an it only works if it’s running on both sides of the link.
So if one side of a link is running auto-negotiation, and the other side of the link is not, auto-negotiation CANNOT determine the speed and duplex configuration of the other side.
If auto-negotiation is running on the other side of the link, the two devices decide then decide on the best speed and duplex mode. Each interface advertises the speeds and duplex modes at which it can operate, and the best match is selected (higher speed and full duplex are preferred).Once this is set lacp can function.