Unconfirmed Data Down MIC generation

Hello everyone. I have some troubles with understanding one thing. Can someone help. The thing is, when receiving the Unconfirmed Data Up, from LoRa sensor, the Network server generates response, the Unconfirmed Data Down. The picture shows it after the base64 conversion with comments.

Question

The message doesn’t have Fport and FRMPayload as seems, meaning only MHDR with piggybacked FOpts. Then my question is how the MIC is calculated ? If according lorawan specification document, to calculate MIC need to have also Fport and FRMPayload.

Last confusing thing, is how the values in FOpts field are assigned ? Need to use CID, however the massage shown above doesnt have only 0x02 - 0x0A, 0x0D, 0x80 - 0xFF values, like in lorawan specification document. Could someone explain how MAC commands are assigned ?

Then my question is how the MIC is calculated ?

In simple terms, by initializing the CMAC engine according to spec, and running the modified algorith on the entirety of the packet up to where the MIC would be added.

how the values in FOpts field are assigned

Various MAC commands/responses have implicit lengths given in the spec.

So you have:

06 - a device status request, no further payload
03 - lindadrreq commanding datarate/power 50 channel mask ff 00 and redudancy 01

Thank you for help. Much appreciation.