Cisco Networking: OSI Model Layer 3 – Network
The network layer of the Open System Interconnection (OSI) model routes the data from one location to another, or across several defined networks. A network is a series of devices that are connected to a single physical medium, or broadcast domain.
If a network represents interconnected devices moving signals between one another, the network layer moves data between these networks of interconnected devices, dubbed an internetwork. This can be done on a small scale (separating data on a network of a dozen computers) or on a large scale (separating data for an international corporation across the globe).
The global Internet represents doing this on a very large scale, and its name is a contraction of the word internetwork.
Because data needs to move between networks, there must be an underlying protocol to support network identification and a manner of identifying paths between networks, which can be done manually or automatically using a compatible protocol.
A protocol is a set of standards or rules that all participants must adhere to. When dignitaries from different countries meet, they follow mutually agreed upon protocols for dealing with each other. In the case of the network, the participants are the networking devices (such as computers, routers, and switches), while the protocols are the rules which have been agreed upon to communicate with each other.
Most of the hardware level protocols (like Ethernet standards) are managed by IEEE, while the Internet Engineering Task Force (IETF) manages the TCP/IP suite of protocols.
The network layer does not care much about the type of data it is moving, the path it takes, or the different media that it moves over. Typically, you are allowed to change physical media types at this layer. To connect different network types, you need an interconnection device that supports data links for different network types.
Such a device includes different media connections on either side and, like the router in the following figure, can connect gigabit Ethernet on one side of the device to something foreign, such as Token Ring, on the other side.
Just as the data link layer has addresses that it uses to identify other devices with which your computer communicates, these are hard to understand addresses and they are only valid for the current network segments (the area between two routers). This area between routers is also referred to as a data link because it is the only place where the local devices can communicate with each other, using MAC addresses (or data link layer addresses).
The network layer of the OSI model also uses addresses, but these are network layer addresses and their specific format is based on the network layer protocol being used. Internet Protocol (IP) represents a common network layer protocol.
At the network layer, IP uses IP addresses to determine which two devices are communicating. The relationship between the network layer and the data link layer is that all communication over a data link will always be performed using data link (MAC) addresses, so as the network layer sends data down to the data link layer, it must also tell the data link layer what the destination MAC address is for this data.
To accomplish this, IP makes use of the Address Resolution Protocol (ARP) to resolve the required MAC addresses for the IP address targets with which it wants to communicate.