Site hosted by Angelfire.com: Build your free website today!

The network layer is the third layer out of seven in the OSI model and the third layer out of five in the TCP/IP model. In the TCP/IP reference model it is called the Internet layer. In all of the models, the network layer responds to service requests from the transport layer and issues service requests to the data link layer. In essence, the network layer is responsible for end to end (source to destination) packet delivery, whereas the data link layer is responsible for node to node (hop to hop) frame delivery. The network layer provides the functional and procedural means of transferring variable length data sequences from a source to a destination via one or more networks while maintaining the quality of service, and error control functions. The network layer deals with transmitting information all the way from its source to its destination - transmitting from anywhere, to anywhere. Here are some things that the network layer needs to address:
The OSI, or Open System Interconnection, model defines a networking framework for implementing protocols in seven layers. Control is passed from one layer to the next, starting at the application layer in one station, proceeding to the bottom layer, over the channel to the next station and back up the hierarchy. Application (Layer 7) This layer supports application and end-user processes. Communication partners are identified, quality of service is identified, user authentication and privacy are considered, and any constraints on data syntax are identified. Everything at this layer is application-specific. This layer provides application services for file transfers, e-mail, and other network software services. Telnet and FTP are applications that exist entirely in the application level. Tiered application architectures are part of this layer. Presentation (Layer 6) This layer provides independence from differences in data representation (e.g., encryption) by translating from application to network format, and vice versa. The presentation layer works to transform data into the form that the application layer can accept. This layer formats and encrypts data to be sent across a network, providing freedom from compatibility problems. It is sometimes called the syntax layer. Session (Layer 5) This layer establishes, manages and terminates connections between applications. The session layer sets up, coordinates, and terminates conversations, exchanges, and dialogues between the applications at each end. It deals with session and connection coordination. Transport (Layer 4) This layer provides transparent transfer of data between end systems, or hosts, and is responsible for end-to-end error recovery and flow control. It ensures complete data transfer. Network (Layer 3) This layer provides switching and routing technologies, creating logical paths, known as virtual circuits, for transmitting data from node to node. Routing and forwarding are functions of this layer, as well as addressing, internetworking, error handling, congestion control and packet sequencing. Data Link (Layer 2) At this layer, data packets are encoded and decoded into bits. It furnishes transmission protocol knowledge and management and handles errors in the physical layer, flow control and frame synchronization. The data link layer is divided into two sub layers: The Media Access Control (MAC) layer and the Logical Link Control (LLC) layer. The MAC sub layer controls how a computer on the network gains access to the data and permission to transmit it. The LLC layer controls frame synchronization, flow control and error checking. Physical (Layer 1) This layer conveys the bit stream - electrical impulse, light or radio signal -- through the network at the electrical and mechanical level. It provides the hardware means of sending and receiving data on a carrier, including defining cables, cards and physical aspects. Fast Ethernet, RS232, and ATM are protocols with physical layer components. RECOMMENDED READING: "The OSI Reference Model — Understanding Layers" in Webopedia's "Did You Know...?" section. "Understanding The Data Link Layer" in Webopedia's "Did You Know...?" section. Image courtesy of The Abdus Salam International Centre for Theoretical Physics.

All About network layer


Networking Interface
OSI Network-Layer Services and Protocols Two types of OSI network-layer services are available: Connectionless Network Service (CLNS) and Connection-Oriented Network Service (CONS). CLNS uses a datagram data transfer service and does not require a circuit to be established before data is transmitted. In contrast, CONS does require a circuit to be established before transmitting data. While CLNS and CONS define the actual services provided to the OSI transport layer entities that operate immediately above the network layer, Connectionless Network Protocol (CLNP) and Connection-Oriented Network Protocol (CONP) name the protocols that these services use to convey data at the network layer. CLNP is the OSI equivalent of IP. Knowledge of OSI network addressing is the next step toward an understanding of routing. OSI network addresses are variable-length entities designed to handle networks of virtually any type and size. OSI addressing encompasses two primary concepts: Network Service Access Points (NSAPs) and Network Entity Titles (NETs). NSAPs specify usage points at which network-layer services can be acquired. If there are multiple network-layer service users (for example, OSI transport protocols Transport Protocol 3 [TP-3] and Transport Protocol 4 [TP-4]) in a particular ES, then that ES will have multiple NSAP addresses. In contrast, NETs specify network-layer entities or processes. NET entities represent the active agents that operate within the network layer to carry out assigned functions. CLNP is a network-layer entity and would therefore have an associated NET. NSAP and NET structure is very similar; in fact, in an ES, they typically differ only in the last byte, called the selector. The NSAP selector is used to distinguish between logical entities on the host (a transport entity in an ES or a network entity in an IS). NSAPs are hierarchical addresses consisting of two parts: an initial domain part (IDP) and a domain-specific part (DSP). The IDP consists of authority and format identifier (AFI) and initial domain identifier (IDI) parts. The AFI provides information about the structure and content of the IDI and DSP fields, including whether the IDI is of variable length and whether the DSP uses decimal or binary notation. The IDI further specifies an entity that can assign values to the DSP portion of the address. IP Addresses
ISO/OSI Network Model The standard model for networking protocols and distributed applications is the International Standard Organization's Open System Interconnect (ISO/OSI) model. It defines seven network layers. Layer 1 - Physical Physical layer defines the cable or physical medium itself, e.g., thinnet, thicknet, unshielded twisted pairs (UTP). All media are functionally equivalent. The main difference is in convenience and cost of installation and maintenance. Converters from one media to another operate at this level. Layer 2 - Data Link Data Link layer defines the format of data on the network. A network data frame, aka packet, includes checksum, source and destination address, and data. The largest packet that can be sent through a data link layer defines the Maximum Transmission Unit (MTU). The data link layer handles the physical and logical connections to the packet's destination, using a network interface. A host connected to an Ethernet would have an Ethernet interface to handle connections to the outside world, and a loopback interface to send packets to itself. Ethernet addresses a host using a unique, 48-bit address called its Ethernet address or Media Access Control (MAC) address. MAC addresses are usually represented as six colon-separated pairs of hex digits, e.g., 8:0:20:11:ac:85. This number is unique and is associated with a particular Ethernet device. Hosts with multiple network interfaces should use the same MAC address on each. The data link layer's protocol-specific header specifies the MAC address of the packet's source and destination. When a packet is sent to all hosts (broadcast), a special MAC address (ff:ff:ff:ff:ff:ff) is used. Layer 3 - Network NFS uses Internetwork Protocol (IP) as its network layer interface. IP is responsible for routing, directing datagrams from one network to another. The network layer may have to break large datagrams, larger than MTU, into smaller packets and host receiving the packet will have to reassemble the fragmented datagram. The Internetwork Protocol identifies each host with a 32-bit IP address. IP addresses are written as four dot-separated decimal numbers between 0 and 255, e.g., 129.79.16.40. The leading 1-3 bytes of the IP identify the network and the remaining bytes identifies the host on that network. The network portion of the IP is assigned by InterNIC Registration Services, under the contract to the National Science Foundation, and the host portion of the IP is assigned by the local network administrators, locally by noc@indiana.edu. For large sites, usually subnetted like ours, the first two bytes represents the network portion of the IP, and the third and fourth bytes identify the subnet and host respectively. Even though IP packets are addressed using IP addresses, hardware addresses must be used to actually transport data from one host to another. The Address Resolution Protocol (ARP) is used to map the IP address to it hardware address. Layer 4 - Transport Transport layer subdivides user-buffer into network-buffer sized datagrams and enforces desired transmission control. Two transport protocols, Transmission Control Protocol (TCP) and User Datagram Protocol (UDP), sits at the transport layer. Reliability and speed are the primary difference between these two protocols. TCP establishes connections between two hosts on the network through 'sockets' which are determined by the IP address and port number. TCP keeps track of the packet delivery order and the packets that must be resent. Maintaining this information for each connection makes TCP a stateful protocol. UDP on the other hand provides a low overhead transmission service, but with less error checking. NFS is built on top of UDP because of its speed and statelessness. Statelessness simplifies the crash recovery. Layer 5 - Session The session protocol defines the format of the data sent over the connections. The NFS uses the Remote Procedure Call (RPC) for its session protocol. RPC may be built on either TCP or UDP. Login sessions uses TCP whereas NFS and broadcast use UDP. Layer 6 - Presentation External Data Representation (XDR) sits at the presentation level. It converts local representation of data to its canonical form and vice versa. The canonical uses a standard byte ordering and structure packing convention, independent of the host. Layer 7 - Application Provides network services to the end-users. Mail, ftp, telnet, DNS, NIS, NFS are examples of network applications. TCP/IP Network Model Although the OSI model is widely used and often cited as the standard, TCP/IP protocol has been used by most Unix workstation vendors. TCP/IP is designed around a simple four-layer scheme. It does omit some features found under the OSI model. Also it combines the features of some adjacent OSI layers and splits other layers apart. The four network layers defined by TCP/IP model are as follows. Layer 1 - Link This layer defines the network hardware and device drivers. Layer 2 - Network This layer is used for basic communication, addressing and routing. TCP/IP uses IP and ICMP protocols at the network layer. Layer 3 - Transport Handles communication among programs on a network. TCP and UDP falls within this layer. Layer 4 - Application End-user applications reside at this layer. Commonly used applications include NFS, DNS, arp, rlogin, talk, ftp, ntp and traceroute. Address Resolution
IP Routing
OSI 7 Layers Reference Model For Network Communication Open Systems Interconnection (OSI) model is a reference model developed by ISO (International Organization for Standardization) in 1984, as a conceptual framework of standards for communication in the network across different equipment and applications by different vendors. It is now considered the primary architectural model for inter-computing and internetworking communications. Most of the network communication protocols used today have a structure based on the OSI model. The OSI model defines the communications process into 7 layers, which divides the tasks involved with moving information between networked computers into seven smaller, more manageable task groups. A task or group of tasks is then assigned to each of the seven OSI layers. Each layer is reasonably self-contained so that the tasks assigned to each layer can be implemented independently. This enables the solutions offered by one layer to be updated without adversely affecting the other layers. Subnetworks
The True Story Of Network Layering And The Origin Of The OSI Model Despite the success of the Internet in replacing all the previous attempts to build a global computer communication system, some engineers haven't updated their thinking from old descriptions of networks. instead they still cling to the outdated 7-layer reference model that was invented by ISO instead of the 5-layer reference model that was invented for the Internet. Interestingly, engineers who insist on using the older model cannot identify single protocol at layers 5 and 6. But... because they learned the model somewhere in school, they desparately hope that the extra layers must be useful. As a result, they incorrectly classify applications as as layer 7 instead of layer 5. Researchers have begun looking into the origins and uses of the OSI 7-layer reference model to determine why a cumbersome and inaccurate model has had such staying power. They have recently uncovered some surprising facts. We have know for a long time that the model was the work of a group. We did not know, however, that the group met late one night in a bar and began making fun of American pop cluture. As it turns out, they started scribbling names of the seven dwarfs from the Disney movie on a paper cocktail napkin, and somebody joked that seven was a really good number for network layers. The next morning at the standards committee meeting, the group passed around the cocktail napkin and generally agreed that that they had discovered something fundamental the previous night while they were drunk. By the end of the day, they had renamed the seven layers (with names that sounded more scientific), and produced the basic model. Here's the lineup and a bit of explanation: Layer Dwarf Name Explanations -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- 1 Sleepy Physical The group new that physical connections are boring, and figured it might as well assign the physical layer to dwarf ``Sleepy''. As it happens, a Layer 1 protocol specification does indeed put everyone to sleep (just try reading one late at night). 2 Sneezy Link If you monitor a network and watch the pattern of packets emitted by a computer, you'll immediately understand the relationship between link-layer protocols and ``Sneezy''. 3 Happy Network Everyone's happy with the network layer. Well... to be honest, the only network layer protocol that makes everyone's happy is the Internet Protocol. Unfortunately, the Internet protocol isn't part of OSI, and wasn't really built to follow the OSI model (the model didn't include internetworking). But, the designers had good intentions. 4 Doc Transport This one's obvious -- it definitely takes a Ph.D. to understand the subtleties of a transport layer protocol. 5 Dopey Session Yep, even the designers realized that having a separate session layer is a dopey idea. They decided to follow Disney's approach of adding comic relief, so they stuck in a completely unnecessary layer and laughed about it. 6 Bashful Presentation Another little joke. The designers realized that sooner or later someone would create a presentation layer protocol. However, the group decided to classify such protocols as too ``bashful'' to appear in public. So, even if a presentation protocol is produced, no one gets to see it. 7 Grumpy Application Programmers who design network applications are incredibly grumpy -- they complain about the efficiency of other layers, the fundamental abstractions of the network, the long hours, the difficulty of debugging, and the API they are forced to use. And users add to the grumpiness because users never complain about protocols at other layer; they only complain about applications.
Gateways
The Internetwork Protocol (IP) The IP (Internet Protocol) is a protocol that uses datagrams to communicate over a packet-switched network. The IP protocol operates at the network layer protocol of the OSI reference model and is a part of a suite of protocols known as TCP/IP. The Internetwork Protocol (IP) [RFC791] provides a best effort network layer service for connecting computers to form a computer network. Each computer is identified by one or more gloablly unique IP addresses. The network layer PDUs are known as either "packets" or "datagrams". Each packet carries the IP address of the sending computer and also the address of the intended recipient or recipients of the packet. Other management information is also carried. The IP network service transmits datagrams between intermediate nodes using IP routers. The routers themselves are simple, since no information is stored concerning the datagrams which are forwarded on a link. The most complex part of an IP router is concerned with determining the optimum link to use to reach each destination in a network. This process is known as "routing". Although this process is computationally intensive, it is only performed at periodic intervals. An IP network normally uses a dynamic routing protocol to find alternate routes whenever a link becomes unavailable. This provides considerable robustness from the failure of either links or routers, but does not guarentee reliable delivery. Some applications are happy with this basic service and use a simple transport protocol known as the User Datagram Protocol (UDP) to access this best effort service. Most Internet users need additional functions such as end-to-end error and sequence control to give a reliable service (equivalent to that provided by virtual circuits). This reliability is provided by the Transmission Control Protocol (TCP) which is used end-to-end across the Internet. In a LAN environment, the protocol is normally carried by Ethernet, but for long distance links, other link protocols using fibre optic links are usually used. Other protocols associated with the IP network layer are the Internet Control Message The Metric Value
The Internet Control Message Protocol
Resolving Hostname
Resolving Hostname Page.2