Networking Fundamentals

Layer 7 (Application) Services
Layer 7 services make it possible for identical or non-identical applications running on
different systems to use a network to exchange information. Services defined by this layer
include file transfer, message handling, and remote management. For example, various types and versions of e-mail software can use the same Layer 7 protocols to exchange messages over the Internet.

Layer 6 (Presentation) Services
Layer 6 services are responsible for various forms of data conversion. This layer negotiates
and establishes a common form for data representation, which includes character code
translations, data compression, and message encryption.
Layer 5 (Session) Services
Layer 5 services are responsible for synchronizing and managing data transfer between
network devices. For example, a Layer 5 protocol can direct a device to start, stop, restart, or abandon data transfer activity.

Layer 4 (Transport) Services
Layer 4 services make it possible to assign various levels of quality to the data transfer
process. When a connection is being established between network devices, the Layer 4
protocol can be used to select a particular class of service. This layer can also monitor the
transfer for billing purposes, ensure that the appropriate service quality is maintained, and generate an alert if this quality has been compromised.

Layer 3 (Network) Services
Layer 3 services are responsible for internetwork data transfer (e.g., between five Ethernet
networks linked using the Internet). If multiple routes exist between the networks, a Layer 3 protocol can choose the most appropriate one, based on such criteria as message priority, route congestion, or route cost.
Layer 2 (Data Link) Services
Layer 2 services are responsible for intranetwork data transfer (e.g., between devices on an
Ethernet network). Some of the functions of a Layer 2 protocol include device identification and managed access to a shared transmission channel.

Layer 1 (Physical) Services
Layer 1 services are responsible for the transfer of bits over various media.

Broken down: Message output at the sending system

OUTGOING
MESSAGE
A software application running in the sending system directs a
message to Layer 7.

Layer 7
(Application)
Layer 7 is responsible for:
  Organizing the message into blocks of data.

[AH][D ATA ]

[APDU]
An application header (AH) is added to each block, forming an
application protocol data unit (APDU). The AH is used to
identify the:
  Sending application.
  Destination application.

Message output at the sending system, continued

Layer 6
(Presentation)
Layer 6 is responsible for:
  Translating the character code used by the sending system to
that used by the receiving system, if necessary.
  Compressing the data to improve transfer efficiency, if
necessary.
  Encrypting the data for security, if necessary.

[PH][APDU]

[PPDU]
A presentation header (PH) is added to each APDU received
from Layer 7, forming a presentation protocol data unit (PPDU).
The PH is used to:
  Provide details on any encoding, compression, or encryption
used.

Layer 5
(Session)
Layer 5 is responsible for:
  Marking the first and last block of data.
  Including a special marker with the last block of data to
allow the destination system to send a reply (if necessary).

[SH][PPDU]

[SPDU]
A session header (SH) is added to each PPDU received from
Layer 6, forming a session protocol data unit (SPDU). The SH is
used to:
  Indicate any markers accompanying the data blocks.

Message output at the sending system, continued

Layer 4
(Transport)
Layer 4 is responsible for:
  Dividing each block into segments.
  Tracking the sequence of the segments.

[TH][SPDU]

[TPDU]
A transport header (TH) is added to each segment, forming a
transport protocol data unit (TPDU):
  Each TPDU includes a sequence number and verification
bits for error detection.
  A copy of each TPDU is kept by the sending device, which
is used if retransmission is required. When the receiving
device acknowledges receipt of the TPDU, the sender’s
copy is discarded.

Layer 3
(Network)
Layer 3 is responsible for:
  Breaking the TPDU into fragments, if necessary, to conform
to the limitations of the network.

[NH][TPDU]

[NPDU]
A network header (NH) is added to each TPDU or fragment,
forming a network protocol data unit (NPDU):
  Each NPDU includes a sequence number and a destination
address.
  An NPDU is referred to as a datagram or packet.

Message output at the sending system, continued

Layer 2
(Data Link)
Layer 2 is responsible for:
  Adding a header and a trailer to each NPDU, forming a
frame.
  Creating a copy of the frame in the sending device, in
case retransmission is required.

[Header][NPDU]  A data link header is added, containing:
  Framing, addressing, and control information.

[Header][NPDU][Trailer] A data link trailer is added, containing:
  A frame check sequence (FCS) for error detection and
optionally, additional framing information.

Layer 1
(Physical)
Layer 1 is responsible for:
  Signal encoding and transmission.

OUTGOING BITS ON THE
WIRED OR WIRELESS
TRANSMISSION MEDIUM

Message input at the receiving system:

INCOMING BITS ON THE
WIRED OR WIRELESS
TRANSMISSION MEDIUM

Layer 1
(Physical)
Layer 1 is responsible for:
  Converting the incoming signal into a sequence of bits.

[Header][NPDU][Trailer]

Layer 2
(Data Link)

[NPDU]
Layer 2 is responsible for:
  Removing the header and trailer information.
  Using the FCS to check if the contents were modified
after transmission.

[NH][TPDU]

Layer 3
(Network)

[TPDU]
Layer 3 is responsible for:
  Removing and inspecting the NH.
  Verifying that the values for destination address and
sequence number are correct.
  Waiting for all the datagrams that form a TPDU to
arrive and then assembling the TPDU.

[TH][SPDU]

Layer 4
(Transport)

[SPDU]
Layer 4 is responsible for:
  Removing and inspecting the TH.
  Using the frame check verification bits in the TPDU to
check if the contents were modified after transmission.
  Sending an acknowledgment (if the sequences match) or
discarding the TPDU and requesting a retransmission (if the
sequences do not match).
  Waiting for all the TPDUs that form a block to arrive and
then assembling the block.

[SH][PPDU]

Layer 5
(Session)

[PPDU]
Layer 5 is responsible for:
  Removing and inspecting the SH.
  Noting any opening, closing, or reply markers present in the
header.

[PH][APDU]

Layer 6
(Presentation)

[APDU]
Layer 6 is responsible for:
  Removing and inspecting the PH.
  Decrypting the data, if it has been encrypted.
  Decompressing the data, if it has been compressed.

Message input at the receiving system, continued

[AH][D ATA ]

Layer 7
(Application)
Layer 7 is responsible for:
  Removing and inspecting the AH.
  Converting the blocks of data into a message.
  Passing the message to the application for which it is
intended.

INCOMING
MESSAGE
A software application running in the receiving system
processes the message.

Types of Messaging
Most network messaging can be described as one-to-one communications, where the sending
device addresses an outgoing message for delivery to a single receiver. In some cases,
however, a message must be directed to a group of devices or all devices on the network. This
is also referred to as one-to-many or one-to-all communications.
Most network devices are capable of issuing three types of messages:
  Unicast
  Broadcast
  Multicast
Unicast Messaging
In unicast messaging, or unicasting, each message is addressed to one recipient

unicast

If a device needs to send the same message to multiple destinations, it must
perform a replicated unicast—the same transmission is repeated for each destination

With unicasting there is no risk of sending a message to an unintended recipient, since the
network directs each frame to the device corresponding to the unicast destination address.
This process is also referred to as a point-to-point transfer. However, generating multiple
frames containing identical data is an inefficient use of network resources and requires
additional processing in the sending device.

repunicast

Broadcast Messaging
In broadcast messaging, or broadcasting, each frame contains a special sequence of bits in the address to indicate that the destination is all devices (referred to as the broadcast domain). Such transfers are also referred to as point-to-multipoint—the sending
device transmits a broadcast frame once and the network directs the frame to all other
devices.
This method is most efficient in cases when all network devices require the message being
broadcast. However, if this is not the case, a destination device not requiring the message
wastes processing resources—it must read and subsequently discard the incoming frame.
When the number of discarded frames exceeds the number required, the broadcast is
considered to be an inefficient use of network resources.

broadcast

Multicast Messaging
In multicast messaging, or multicasting, the network delivers a transmitted message to a
select number of devices—not all devices as in the case of a broadcast. The sending device
transmits the message once to a special multicast group address and the network directs the message only to those devices that are listed as members of the group. Multicasting can be described as selective or directed broadcasting. It is the intelligent form of point-to-multipoint message transfer. Network switches and routers must be enabled to process multicast messages, otherwise they will be broadcast.

multicast

Types of Addressing:
A typical organizational network consisting of multiple interconnected LANs uses two types of addresses to transfer messages between all devices, as follows:
Every device on a LAN must have a unique address for successful message delivery over
the LAN’s broadcast domain. Since there are multiple LANs connected to each other through an internetwork, each network must have a unique address for successful message delivery over the internetwork.

A comparison can be made between these two types of addresses and the addresses used to identify a building in a city. For example, 8610 Hidden River Parkway is the equivalent of a unique device address on a network, while 8610 Hidden River Parkway, Tampa is the
equivalent of the combined device and network address on an internetwork.

NOTE:  Other types of addresses are also used on networks to identify various resources
(e.g., communications channels, protocols, application service ports).

Local Area Network (LAN) Addressing
As described previously, LANs are used to interconnect PCs and other network devices in a
geographically limited area, typically not exceeding a single building. Devices are linked using any combination of cabling and wireless systems. The role of the LAN is to enable users to access resources (e.g., devices, software programs, data files) that are not directly connected to or stored on their stations.

The size and complexity of an organizational network determines the number of times a
message is processed by network access devices (e.g., switches, wireless access points
[WAPs]) before reaching its destination. The endpoint of a message is a specific device,
which can be uniquely identified by an address assigned to its network interface card (NIC).
The term medium access control (MAC) address is often used to describe the unique address of a device. Alternate terms used to describe MAC addresses include:
  Layer 2 address.
  Data Link layer address.
  NIC address.
  Hardware address.
  Device address.

Internetwork Addressing
The role of an internetwork is to enable communications between devices connected to two or more separate networks. An internetwork can span a small or large geographic area, connecting LANs that belong to the same or different organizations.
A small internetwork can connect LANs on different floors of a building. The largest
internetwork in existence is the Internet, which is global in scope and serves as a universal
resource for message transfer between all types of networks (or between remote stations and networks.

An internetwork like the Internet links all types of similar or dissimilar networks
(e.g., Ethernet LANs, mobile telephone networks). In order to uniquely identify each device on any network connected to the Internet in a consistent manner, an address called the Internet protocol (IP) address is assigned to the network interface of each device. This public IP address uniquely identifies both the device and the network to which the device is connected.

NOTES: Non-unique private IP addresses may also be assigned to devices for internal use.
Such addresses cannot be used to send messages over the Internet.

The terms network identification (netid) and host identification (hostid) can be
used to describe the two parts of an IP address. In such cases, netid identifies the
LAN broadcast domain and hostid identifies the device within the LAN broadcast
domain.

Using the same format for all addresses on an internetwork makes it possible to link together all types of devices and networks. If necessary, any device can be reconfigured to take the place of any other (e.g., in the event of a breakdown or an upgrade) through a reassignment of the IP address.

The term IP address is often used to describe the internetwork address of a device, since IP is used globally to link to the Internet. Alternate terms used to describe IP addresses include:
  Internet address.
  Layer 3 address.
  Network layer address.
  Subnet address.
  Internetwork address.
  Routing address.

NOTE:  IP addresses are the most common—but not the only—means of network/device
identification. Other network address systems can also be used on non-IP
internetworks.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

assyrian technical blog