CN Book 2017-3-11
CN Book 2017-3-11
CN Book 2017-3-11
The OSI model is composed of seven ordered layers: physical (layer1), data link (layer 2),
network (layer 3), transport (layer 4), session (layer 5), presentation (layer 6), and application (layer
7). Figure 2.3 show s the layers involved when a message is sent from device A to device B.
Peer-to-Peer Processes
Layers 1,2, and 3 – physical, data link, and network – are the network support layers; Layers 5,6,
and 7 – session, presentation, and application – can be thought of as the user support layers; Layer
4, the transports layer, links the two subgroups and ensures that what the lower layers have
transmitted is in a form that the upper layers .
Physical layer
1
It deals with the mechanical and electrical specifications of the interface and transmission
medium. It defines the procedures and functions. The physical layer is responsible for movements
of individual bits from one hop (node) to the next.
Framing. The data link layer divides the stream of bits received from the network layer into
manageable data units called frames.
Physical addressing. The data link layer adds a header to the frame to define the sender and/or
receiver of the frame.
Network Layer
The network layer is responsible for the delivery of individual packets from the source host
to the destination host.
Logical addressing. The physical addressing implemented by the data link layer handles the
addressing problem locally. If a packet passes the network boundary. The network layer adds a
header to the packet coming from the upper layer that, among other things, includes the logical
addresses of the sender and receiver.
Routing. When independent networks or links are connected to create internetworks (network of
networks) or a large network, the connecting devices (called routers or switches) route or switch the
packets to their final destination. One of the functions of the network layer is to provide this
mechanism.
Transport Layer
The transport layer is responsible for process-to-process delivery of the entire message. A
process is an application program running on a host. Whereas the network layer oversees source-
to-destination delivery of individual packets, it does not recognize and relationship between those
packets. It treats each are independently, as though each piece belonged to a separate message,
whether or not it does. The transport layer, on the other hand, ensures that the whole message
arrives intact and in order, overseeing both error control and flow control at the source-to-
destination level. The transport layer is responsible for the delivery of a message from one process
to another.
2
Session Layer
The session layer is the network dialog controller. It establishes, maintains, and
synchronizes the interaction among communication systems. The session layer is responsible for
dialog control and synchronization.
Dialog control. The session layer allows two systems to enter into a dialog. It allows the
communication between two processes to take place in either half-duplex (one way at a time) or
full-duplex (two way at a time) mode.
Synchronization. The session layer allows a process to add checkpoints, or synchronization
points, to a stream of data. For example, if a system is sending a file of 2000 pages, it is advisable
to insert checkpoints after every 100 pages to ensure that each 100-page unit is received and
acknowledged independently. In this case, if a crash happens during the transmission of page 523,
the only pages that need to be resent after system recovery are pages 501 to523. Pages previous to
501 need not be resent.
Presentation Layer
The presentation layer is concerned with the syntax and semantics of the information
exchange between two systems. The presentation layer is responsible for translation, compression,
and encryption.
Translation. The processes (running programs) in two systems are usually exchanging
information in the form of character strings, numbers, and so on. The information must be changed
to bit streams before being transmitted. Because different computers use different encoding
systems, the presentation layer is responsible for interoperability between these different encoding
methods. The presentation layer at the sender changes the information from its sender-dependent
format into a common format. The presentation layer at the receiving machine changes the
common format into its receiver-dependent format.
3
Encryption. To carry sensitive information, a system must be able to ensure privacy. Encryption
means that the sender transforms the original information to another form and sends the resulting
message out over the network. Decryption reverses the original process to transform the message
back to it original form.
Compression. Data compression reduces the number of bits contained in the information. Data
compression becomes particularly important in the transmission of multimedia such as text, audio,
and video.
Application Layer
The application layer enables the user, whether human or software, to access the network.
It provides user interfaces and support for services such as electronic mail, remote file access and
transfer, shared database management, and other types of distributed information services. The
application layer is responsible for providing services to the user.
Summary of Layers
4
TCP/IP PROTOCOL SUITE:
The TCP/IP Protocol suite was developed prior to the OSI model. Therefore, the layers
in the TCP/IP Protocol suite do not exactly match those in the OSI model. The original TCP/IP
Protocol suite was defined as having four layers :host-to-network, internet, transport and
application. However, when TCP/IP is compared to OSI, we can say that the host-to-network
layer is equivalent to the combination of the physical and data link layers. The internet layer
is equivalent to the network layer, and application layer is roughly doing the job of the
session, presentation and application layers with the transport layers in TCP/IP taking care of
part of the duties of the session layer.
The three top most layers in the OSI model, are represented in TCP/IP by a single layer
called the application layer .
Internetworking Protocol(IP)
The Internetworking Protocol(IP) is the Transmission mechanism used by the TCP/IP
Protocol. It is an unreliable and connectionless Protocol a best-effort delivery service. The term
best-effort means that IP provides no error checking or tracking.
IP transports data in packets called Datagrams, each of which is transported
separately. Datagrams can travel along different routes and can arrive out of sequence or be
5
duplicated. IP does not keep track of the routes and has no facility for recording Datagrams
once they arrive at their destination.
Address Resolution Protocol
Address Resolution Protocol(ARP) is a typical physical network ,such as a LAN,
each device on a link is identified by a physical or station address, usually imprinted on the
network interface card (NIC).ARP is used to find the physical address of then node when its
Internet address is known.
Reverse Address Resolution Protocol
The Reverse Address Resolution Protocol(RARP) allows a host to discover its Internet
address when it knows only its physical address.
Internet Control Message Protocol
The Internet Control Message Protocol (ICMP) is mechanism used by hosts and
gateways to send notification of datagram problems back to the sender. ICMP sends query and
error reporting messages.
Internet Group Message Protocol
The Internet Group Message Protocol (IGMP) is used to facilitate the simultaneous
transmission of message to a group of recipients.
Transport Layer
IP is host-to-host protocol, meaning that it can deliver a packet from one physical
device to another. UDP and TCP are transport level protocols responsible for delivery of a
message from a process to another process.
User Datagram Protocol
The User Datagram Protocol (UDP) is the simpler of the two standard TCP/IP
Transport Protocols. It is a process to process protocol that adds only port addresses,
checksum error control, and length information to the data from the upper layer .
Transmission Control Protocol
TCP is a reliable stream transport protocol. The term stream, in this context, means
connection-oriented: A connection must be established between both ends of a transmission
before either can transmit data .
At the sending end of each transmission, TCP divides a stream of data into smaller
units called segments. Each segment includes a sequence number for recording after a
receipt, together with an acknowledgement number for the segments received. Segments are
carried across the internet inside of IP datagrams . At the receiving end, TCP collects each
datagram as it comes in and recorders the transmission based on sequence numbers
Stream Control Transmission protocol: The Stream Control Transmission protocol
(SCTP) provides support for newer applications such as voice over the internet.
6
The actual mail transfer is done through message transfer agents. To send mail, a system must
have the client MTA, and to receive mail, a system must have a server MTA. The formal
protocol that define the MTA client and server in the Internet is called the Simple Mail
Transfer Protocol (SMTP).
FTP
File Transfer Protocol is the standard mechanism provided by TCP/IP for copying a file from
one host to aother. FTP uses two well-known TCP ports : Port 21 is used for the control
connection, and port 20 is used for the data connection.
HTTP
Hypertext Transfer Protocol is a protocol used to access data on the World Wide Wed. HTTP
functions as a combination of FTP and SMTP. It is similar to FTP because it transfers files and
uses the services of TCP. However it is much simpler than FTP because it uses only one TCP
connection. There is no separate control connection, only data are transferred between the
client and server.
DNS
Domain Name System client/server program can support an e-mail program to find the IP
address of an e-mail recipient. A user of an e-mail program may know the e-mail address of the
recipient. The DNS client program sends a request to a DNS server to map the e-mail address
to corresponding IP address.
7
Ex: Domain Name System – wonderful.com, IP – 200.200.200.5
SNMP
Simple Network Management Protocol uses the concept of manager and agent. That is a
manager usually a host, controls and monitors a set of agents, usually routers.
Manager (host) runs the SNMP client program, agent (router) runs the SNMP server
program. Management is achieved through simple interaction between a manager and an
agent.
Agent keeps performance information in a database. The manger has access to the
values in the database. For example, a router can store the number of packets received and
forwarded. The manager can fetch and compare the values of these two variables to see if the
router is congested or not.
TELNET
TErminal NETwork. It establishes the connection to a remote system in such a way that the
local terminal appears to be a terminal at the remote system.
When a user wants to access an application program or utility located on a remote
machine, uses the remote-login. TELNET client and server programs come into use. The user
sends the keystrokes to the terminal driver, where the local operating system accepts the
characters but does not interpret them. The characters are sent to the TELNET client, which
transforms the characters to a universal character set called network virtual terminal (NVT)
characters and delivers them to the local TCP/IP.
The commands or text in NVT form, travel through the Internet and arrive at the
TCP/IP stack at the remote machine. Here the characters are delivered to the operating system
and passed to the TELNET server, which changes the characters to the corresponding
8
characters understandable by the remote computer using the software called a
pseudoterminal driver software.