Network Layer
The Network Layer is Layer 3 of the seven-layer OSI model of computer networking.
The Network Layer is responsible for routing packets delivery including routing through intermediate routers, whereas the Data Link Layer is responsible for Media Access Control, Flow Control and Error Checking.
The Network Layer provides the functional and procedural means of transferring variable length data sequences from a source to a destination host via one or more networks while maintaining the quality of service functions.
Functions of the Network Layer include:
- Connection model: connectionless communication
For example, IP is connectionless, in that a frame can travel from a sender to a recipient without the recipient having to send an acknowledgement. Connection-oriented protocols exist higher at other layers of that model.
- Host addressing
Every host in the network needs to have a unique address which determines where it is. This address will normally be assigned from a hierarchical system, so you can be "Fred Murphy" to people in your house, "Fred Murphy, Main Street 1" to Dubliners, or "Fred Murphy, Main Street 1, Dublin" to people in Ireland, or "Fred Murphy, Main Street 1, Dublin, Ireland" to people anywhere in the world. On the Internet, addresses are known as Internet Protocol (IP) addresses.
- 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 to forward packets between networks. This is also of interest to mobile applications, where a user may move from one location to another, and it must be arranged that his messages follow him. Version 4 of the Internet Protocol (IPv4) was not designed with this feature in mind, although mobility extensions exist. IPv6 has a better designed solution.
Within the service layering semantics of the OSI network architecture the Network Layer responds to service requests from the Transport Layer and issues service requests to the Data Link Layer.