The attack on the soldiers reportedly took place in the town situated in the nation's northeastern Borno state on Friday. Daesh has reportedly published pictures of burned barracks and dead bodies it claims belonged to the soldiers, a Reuters report says.
Photos said to detail outcomes from the attack were shared by netizens.
The security situation in Nigeria has deteriorated significantly due to numerous internal conflicts and a surge of activity by Boko Haram* in the country. Militants have reportedly killed thousands of people and prompted mass internal displacement of Nigerians from areas affected by the group's activities.
Boko Haram is an Islamist militant group which has pledged allegiance to Daesh, operating in the western and central regions of Africa.
*Daesh (also known as ISIS/ISIL/IS) is a terrorist group banned in Russia and many other countries. Boko Haram is affiliated with Daesh.