# Network layer

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Network_layer
> Markdown URL: https://mediated.wiki/source/Network_layer.md
> Source: https://en.wikipedia.org/wiki/Network_layer
> Source revision: 1346874463
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

Third layer of the OSI model

"Layer 3" redirects here. For the MPEG-1 Audio format, see [MP3](/source/MP3). For the layer in the cerebral cortex, see [Cerebral cortex § Layered_structure](/source/Cerebral_cortex#Layered_structure).

This article includes a list of general references, but it lacks sufficient corresponding inline citations. Please help to improve this article by introducing more precise citations. (October 2009) (Learn how and when to remove this message)

OSI model by layer 7. Application layer NNTP SIP SSI DNS FTP Gopher HTTP (HTTP/3) NFS NTP SMPP SSH SMTP SNMP Telnet DHCP NETCONF more... 6. Presentation layer MIME XDR ASN.1 ASCII TLS PGP more... 5. Session layer Named pipe NetBIOS SAP PPTP RTP SOCKS X.225[1] more... 4. Transport layer TCP UDP SCTP DCCP QUIC SPX more... 3. Network layer IP IPv4 IPv6 ICMP (ICMPv6) IPsec IGMP IPX IS-IS AppleTalk X.25 PLP more... 2. Data link layer ATM ARP SDLC HDLC CSLIP SLIP GFP PLIP IEEE 802 LLC MAC L2TP Frame Relay ITU-T G.hn DLL PPP X.25 LAPB Q.922 LAPF more... 1. Physical layer RS-232 RS-449 ITU-T V-Series I.430 I.431 PDH SONET/SDH PON OTN DSL IEEE 802 IEEE 1394 ITU-T G.hn PHY USB Bluetooth X.21 more... v t e

In the seven-layer [OSI model](/source/OSI_model) of [computer networking](/source/Computer_networking), the **network layer** is **layer 3**. The network layer is responsible for [packet forwarding](/source/Packet_forwarding) including [routing](/source/Routing) through intermediate [routers](/source/Router_(computing)).[2]

## Functions

The network layer provides the means of transferring variable-length [network packets](/source/Network_packet) from a source to a destination [host](/source/Host_(network)) via one or more networks. Within the service layering semantics of the OSI (Open Systems Interconnection) network architecture, the network layer responds to service requests from the [transport layer](/source/Transport_layer) and issues service requests to the data link layer.

Functions of the network layer include:

**[Connectionless communication](/source/Connectionless_communication)**
- For example, [Internet Protocol](/source/Internet_Protocol) is connectionless, in that a data packet can travel from a sender to a recipient without the recipient having to send an acknowledgement. Connection-oriented protocols exist at other, higher layers of the OSI model.

**Host addressing**
- Every host in the network must have a unique address that determines where it is. This address is normally assigned from a hierarchical system. For example, you can be:

- "Fred Murphy" to people in your house,

- "Fred Murphy, 1 Main Street" to Dubliners,

- "Fred Murphy, 1 Main Street, Dublin" to people in Ireland,

- "Fred Murphy, 1 Main Street, Dublin, Ireland" to people anywhere in the world.

- On the Internet, addresses are known as [IP addresses](/source/IP_address) (Internet Protocol).

**Message forwarding**
- Since many networks are partitioned into subnetworks and connect to other networks for wide-area communications, networks use specialized hosts, called gateways or [routers](/source/Router_(computing)), to forward packets between networks.

 Comparison of OSI model to TCP model

## Relation to TCP/IP model

The [TCP/IP model](/source/TCP%2FIP_model) describes the protocols used by the Internet.[3] The TCP/IP model has a layer called the [Internet layer](/source/Internet_layer), located above the [link layer](/source/Link_layer). In many textbooks and other secondary references, the TCP/IP Internet layer is equated with the OSI network layer. However, this comparison is misleading, as the allowed characteristics of protocols (e.g., whether they are connection-oriented or connection-less) placed into these layers are different in the two models.[*[citation needed](https://en.wikipedia.org/wiki/Wikipedia:Citation_needed)*] The TCP/IP Internet layer is in fact only a subset of functionality of the network layer. It describes only one type of network architecture, the Internet.[*[citation needed](https://en.wikipedia.org/wiki/Wikipedia:Citation_needed)*]

## Fragmentation of Internet Protocol packets

The network layer is responsible for [fragmentation and reassembly](/source/IP_fragmentation) for [IPv4](/source/IPv4) packets that are larger than the smallest [MTU](/source/Maximum_Transmission_Unit) of all the intermediate links on the packet's path to its destination. It is the function of [routers](/source/Router_(computing)) to fragment packets if needed, and of [hosts](/source/Host_(network)) to reassemble them if received.

Conversely, [IPv6](/source/IPv6) packets are not fragmented during forwarding, but the MTU supported by a specific path must still be established, to avoid [packet loss](/source/Packet_loss). For this, [Path MTU discovery](/source/Path_MTU_discovery) is used between endpoints, which makes it part of the [Transport layer](/source/Transport_layer), instead of this layer.

## Protocols

The following are examples of protocols operating at the network layer.

- AODV, [Ad hoc On-Demand Distance Vector Routing](/source/Ad_hoc_On-Demand_Distance_Vector_Routing)

- CLNS, [Connectionless-mode Network Service](/source/Connectionless-mode_Network_Service)

- DDP, [Datagram Delivery Protocol](/source/Datagram_Delivery_Protocol)

- EGP, [Exterior Gateway Protocol](/source/Exterior_Gateway_Protocol)

- EIGRP, [Enhanced Interior Gateway Routing Protocol](/source/Enhanced_Interior_Gateway_Routing_Protocol)

- ICMP, [Internet Control Message Protocol](/source/Internet_Control_Message_Protocol)

- IGMP, [Internet Group Management Protocol](/source/Internet_Group_Management_Protocol)

- IPsec, [Internet Protocol Security](/source/IPsec)

- IPv4/IPv6, [Internet Protocol](/source/Internet_Protocol)

- IPX, [Internetwork Packet Exchange](/source/Internetwork_Packet_Exchange)

- LLARP, [Low Latency Anonymous Routing Protocol](https://en.wikipedia.org/w/index.php?title=Low_Latency_Anonymous_Routing_Protocol&action=edit&redlink=1)

- OSPF, [Open Shortest Path First](/source/Open_Shortest_Path_First)

- PIM, [Protocol Independent Multicast](/source/Protocol_Independent_Multicast)

- RIP, [Routing Information Protocol](/source/Routing_Information_Protocol)

## References

1. **[^](#cite_ref-1)** ["X.225 : Information technology – Open Systems Interconnection – Connection-oriented Session protocol: Protocol specification"](https://www.itu.int/rec/T-REC-X.225-199511-I/en). [Archived](https://web.archive.org/web/20210201064044/https://www.itu.int/rec/T-REC-X.225-199511-I/en) from the original on 1 February 2021. Retrieved 10 March 2023.

1. **[^](#cite_ref-2)** ["Layer 3"](http://searchunifiedcommunications.techtarget.com/definition/layer-3). techtarget.com. Retrieved 2017-05-11.

1. **[^](#cite_ref-rfc1122_3-0)** [R. Braden](/source/Bob_Braden), ed. (October 1989). [*Requirements for Internet Hosts -- Communication Layers*](https://www.rfc-editor.org/rfc/rfc1122). Network Working Group. [doi](/source/Doi_(identifier)):[10.17487/RFC1122](https://doi.org/10.17487%2FRFC1122). STD 3. [RFC](/source/Request_for_Comments) [1122](https://datatracker.ietf.org/doc/html/rfc1122). *Internet Standard 3.* Updated by RFC [1349](https://www.rfc-editor.org/rfc/rfc1349), [4379](https://www.rfc-editor.org/rfc/rfc4379), [5884](https://www.rfc-editor.org/rfc/rfc5884), [6093](https://www.rfc-editor.org/rfc/rfc6093), [6298](https://www.rfc-editor.org/rfc/rfc6298), [6633](https://www.rfc-editor.org/rfc/rfc6633), [6864](https://www.rfc-editor.org/rfc/rfc6864), [8029](https://www.rfc-editor.org/rfc/rfc8029) and [9293](https://www.rfc-editor.org/rfc/rfc9293).

- Tanenbaum, Andrew S. (2003). [*Computer networks*](https://archive.org/details/computernetworks00tane_2). [Upper Saddle River, New Jersey](/source/Upper_Saddle_River%2C_New_Jersey): [Prentice Hall](/source/Prentice_Hall). [ISBN](/source/ISBN_(identifier)) [0-13-066102-3](https://en.wikipedia.org/wiki/Special:BookSources/0-13-066102-3).

## External links

- [OSI Reference Model—The ISO Model of Architecture for Open Systems Interconnection](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.136.9497&rep=rep1&type=pdf), Hubert Zimmermann, IEEE Transactions on Communications, vol. 28, no. 4, April 1980, pp. 425 – 432. (PDF-Datei; 776 kB)

---
Adapted from the Wikipedia article [Network layer](https://en.wikipedia.org/wiki/Network_layer) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Network_layer?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
