Fast Internet requires safe and reliable data transmission across optical fibres. In spite of its importance as a means of transferring data channel and providing access to billions of people throughout the globe, optical fibres are susceptible to a broad range of abnormalities brought on by hostile physical assaults (such as optical eavesdropping (fibre tapping)) and hard failures (such as fibre cutting). Such irregularities may cause disruptions in networks, leading to significant monetary and data losses, threaten the privacy of data carried across optical networks, and eventually decrease network performance. Using multilayer software-defined network communication and a machine learning model, this research presents a unique approach to detecting abnormalities in optoelectronic devices. In this scenario, an optical device was tracked via a software-defined communication network. A Markov convolutional decision model based on multiple-layer perceptrons is then used to conduct the anomaly analysis. Several empirical studies are conducted on the average accuracy, average mean square error, feasibility, prediction rate, and average accuracy of different data collected by network monitoring. Averages were attained for 98% accuracy, 67% mean square error, 73% feasibility, 63% prediction rate, and 82% precision for the suggested method.