The power of Software-Defined Network (SDN) is its centralised control intelligence in its next-generation networking architecture. It is possible to expand SDN's control plane to a wide range of underlying networks, from fog to the Internet of Things (IoT). The fog-to-IoT architecture is currently a potential option for real-time data management. However, the majority of fog-to-IoT devices are resource-constrained and widely distributed, which makes them vulnerable to cyber-attacks. It has just developed as a novel cyber foraging strategy to offload heavy workloads from mobile devices to mobile cloudlets that are located close to the end-users. In order to develop wireless fog networks, Wireless Mesh Networks (WMNs) are being examined due to the prevalence of wireless one-hop communication at the network edge. But the distributed hop-by-hop routing protocols used by WMNs to represent a partial view of the network limit the network management and monitoring capabilities that fog networks require on a global scale. As SDN allows centralised control and management of the entire network, it's an excellent fit for fog-based communication systems. Wireless fog networks are not supported by the SDN OpenFlow protocol because it is primarily designed for wired networks. A novel Trust based Identity model for Internet of Things architecture for handling Fog Networks (TbI-IoT-FN) is proposed in this study to provide secure data transmission in the network, which combines the advantages of software-defined networking and Fog computing. A logically centralised network control plane enables the deployment of advanced traffic management and resource management algorithms in software-defined networking. The proposed model is contrasted with the existing model and the results represent that the proposed model exhibits better performance levels.