What is Network layer? | Definition from TechTarget
What is the network layer?
Located at Layer 3 of the Open Systems Interconnection (OSI) communications model, the primary function of the network layer is to move data into and through other networks. Network layer protocols accomplish this goal by packaging data with correct network address information, selecting the appropriate network routes and forwarding the packaged data up the stack to the transport layer (Layer 4).
Existing protocols that generally map to the OSI network layer include the IP portion of the Transmission Control Protocol/Internet Protocol (TCP/IP) model — both IPv4 and IPv6 — as well as NetWare Internetwork Packet Exchange/Sequenced Packet Exchange (IPX/SPX). Nearly all enterprise networks use the TCP/IP stack, as well as cellular data networks, including 3G, 4G LTE and most recently, 5G networks.
The routing information contained within a packet includes the source address of the sending host and the eventual destination host address of the remote host. This information is contained within the network layer header that encapsulates network frames at the data link layer (Layer 2). The key difference — and importance — between transport information contained at Layer 2 when compared to transport information contained at the network layer is that the information can move beyond the local network to reach hosts in remote network locations or different network segments. The following network topology diagram depicts devices in one IP subnet using Layer 3 routing to communicate with devices in a second IP subnet.
How Layer 3 of the OSI model works