The Internet of Things (IoT) is what we have as a great breakthrough in the 5G network. Although the 5G network can support several Internet of Everything (IoE) services, 6G is the network to fully support that. This paper is a survey research presenting the 5G and IoT technology and the challenges coming, with the 6G network being the new alternative network coming to solve these issues and limitations we are facing with 5G. A reference to the Control Plane and User Plane Separation (CUPS) is made with IPv4 and IPv6, addressing which is the foundation of the network slicing for the 5G core network. In comparison to other related papers, we provide in-depth information on how the IoT is going to affect our lives and how this technology is handled as the IoE in the 6G network. Finally, a full reference is made to the 6G network, with its challenges compared to the 5G network.