Sei sulla pagina 1di 91

CHAPTER-4

INTERNETWORKING MODELS
(THE LAYERED ARCHITECTURE)

Contents:
 Introduction
 Protocols and reference models
 The OSI models
 The TCP/IP model
 Network application
•Web, DHCP, DNS, Mail
Communication and Layer Architecture

• A network is a combination of hardware and software that


sends data from one location to another.
• The hardware consists of the physical equipment that carries
signals from one point of the network to another.
• The software consists of instruction sets that make possible
the services that we expect from a network
• For example, the task of sending an e-mail from one point in
the world to another can be broken into several tasks, each
performed by a separate software package.
• Each software package uses the services of another software
package. At the lowest layer, a signal, or a set of signals, is
sent from the source computer to the destination computer.
Layered Tasks
• We use the concept of layers in our daily life. As an example,
let us consider two friends who communicate through postal
mail.
• The process of sending a letter to a friend would be complex
if there were no services available from the post office.
Layered Tasks
• A communication architecture is a strategy for connecting
host computers and other communicating equipment.
• It defines necessary elements for data communication
between devices.
• A communication architecture, therefore, defines a standard
for the communicating hosts.
• Separating communication functions adds flexibility, for
example, we do not need to modify the entire host software to
include more communication devices.
Layered Tasks
• Layer architecture simplifies the network design.
• It is easy to debug network applications in a layered
architecture network.
• The network management is easier due to the layered
architecture.
• Network layers follow a set of rules, called protocol.
• The protocol defines the format of the data being exchanged,
and the control and timing for the handshake between layers.
Principles of Layered Model
• The problem:
– Complexity of networked systems
• The solution:
– Decomposition into independent subsystems
• Layered network model
– Introduced by IBM
– Standardized by ITU and ISO
– Method universally adopted
Layers with TCP/IP and OSI Model
• The benefits of using a layered model
–Benefits include
• assists in protocol design
• fosters competition
• changes in one layer do not affect other layers
• provides a common language
Pros & Cons of layering
Protocols & Reference Models
• There are two basic types of networking models:
1. Protocol models
2. Reference models.
 A protocol model provides a model that closely matches the
structure of a particular protocol suite.
Ex. The TCP/IP model is a protocol model because it describes the
functions that occur at each layer of protocols within the TCP/IP suite.
 A reference model provides a common reference for maintaining
consistency within all types of network protocols and services.
•Is not intended to be an implementation specific
•Doesn’t provide a sufficient level of detail
Ex. The Open Systems Interconnection (OSI) model is the most
widely known internetwork reference model. It is used for:
• data network design,
• operation specifications, and
• troubleshooting.
The OSI Reference Model
• International standard organization (ISO) established a
committee in 1977 to develop an architecture for computer
communication.
• Open Systems Interconnection (OSI) reference model is the
result of this effort.
• In 1984, the Open Systems Interconnection (OSI) reference
model was approved as an international standard for
communications architecture.
• Term “open” denotes the ability to connect any two systems
which conform to the reference model and associated
standards.
• The OSI model is now considered the primary Architectural
model for inter-computer communications.
The OSI Reference Model
• The OSI model describes how information or data makes its
way from application programmes (such as spread sheets)
through a network medium (such as wire) to another
application programme located on another network.
• The OSI reference model divides the problem of moving
information between computers over a network medium into
SEVEN smaller and more manageable problems.
• This separation into smaller more manageable functions is
known as layering.
The Seven Layer
The Application Layers
Application Layer
–Layer seven, is the top layer of both the OSI and TCP/IP
models.
–It is the layer that provides the interface between the
applications we use to communicate and the underlying network
over which our messages are transmitted.
–Application layer protocols are used to exchange data
between programs running on the source and destination hosts.
–The application layer is responsible for supporting network
applications. ): It includes many protocols (HTTP to, SMTP, and
FTP….
The Application Layers
• The TCP/IP protocol suite was developed prior to the
definition of the OSI model,
–The TCP/IP application layer protocols fit roughly into the
framework of the top three layers of the OSI model:
• Application, Presentation and Session layers.
The Application Layers
• Among the application protocols are:
–Domain Name Service Protocol (DNS) is used to resolve
Internet names to IP addresses.
–Hypertext Transfer Protocol (HTTP) is used to transfer files
that make up the Web pages of the World Wide Web.
–Simple Mail Transfer Protocol (SMTP) is used for the
transfer of mail messages and attachments.
–Telnet, a terminal emulation protocol, is used to provide
remote access to servers and networking devices.
–File Transfer Protocol (FTP) is used for interactive file
transfer between systems..
The Presentation Layer
• Presentation layer concerned on the syntax and semantics of the
information exchanged between 2 systems.
• The Presentation Layer has three primary functions:
–Coding and conversion: of Application layer data to ensure
that data from the source device can be interpreted by the
appropriate application on the destination device.
–Compression of the data in a manner that can be
decompressed by the destination device. Data compression is used
to reduce the number of bits contained in the information.
–Encryption of the data for transmission and the decryption of
data upon receipt by the destination.
Cont..
Examples include:
–QuickTime
•QuickTime is an Apple specification for video and audio,
–Motion Picture Experts Group (MPEG).
•MPEG is a standard for video compression and coding.
–Graphics Interchange Format (GIF), Joint (JPEG)
•GIF and JPEG are compression and coding standards for
graphic images,
•TIFF is a standard coding format for graphic images.
The Session Layer
• The Session Layer create and maintain dialogs between
source and destination applications.
• It establishes, maintains, and synchronizes the interaction
among communicating systems.
• The Session layer handles the exchange of information to
initiate dialogs, keep them active, and to restart sessions that
are disrupted or idle for a long period of time.
• Most applications, like web browsers or e-mail clients,
incorporate functionality of the OSI layers 5, 6 and 7.
The Session Layer
 Specific responsibilities of the session layer include the
following:
 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 or full-duplex
mode.
 Synchronization. The session layer allows a process to add
checkpoints, or synchronization points, to a stream of data.
Transport Layer
• The transport layer is responsible for process-to-process
delivery of the entire message.
• 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.
• There are two common transport protocols, TCP and UDP
• TCP provides a connection-oriented service
• The UDP protocol provides a connection less service.
• It provides for logical communication between application
processes running on different hosts. By logical communication,
we mean that from an application’s perspective, it is as if the
hosts running the processes were directly connected.
Transport Layer Role and Services
• Major functions of the transport layer and the role it plays in
data networks.
• Tracking individual
communication
• Segmenting data and
managing each piece
• Reassembling the segments
• Identifying the different
applications
Cont..
 Segmenting data
• The role of segments in the transport layer and the two
principle ways segments can be marked for reassembly.
Cont..
 Reassembling segments and Identifying the application
• Any in-directional piece of data should be reconstructed in a
complete data useful to the application layer.
•The protocol in the transport layer describe how to transport
layer header information is used to reassemble the data pieces in
to streams to be passed to the application layer.
•In order to identify the target application T.L assigns
applications with identifier .
• Port number is used in the T.L header to indicate to which
application that piece of data is associated.
–NB: The T.L PDU(protocol data unit) is called segment.
Roles and Services of TCP/IP in T.L
Cont..
 Supporting Reliable Communication
Cont..
• How TCP sequence numbers are used to reconstruct the
data stream with segments placed in the correct order –
same order delivering.
Cont..
 Connection oriented
Conversation
• The Transmitting device first
establishes a connection oriented
session with its peer system, which is
called a call setup or three way
handshake.
• Data is then transferred; when the
transfer finished, a call termination
takes place.
• So what happen when the machine
receives a flood of datagrams too
quickly for it to process?
Cont..
• The first connection agreement segment is a request for
synchronization .
• The second and third segments acknowledge the request and
establish connection parameters-the rules –between hosts. The
segments request that the receiver's sequencing is
synchronized here as well. So that a bidirectional connection
is formed.
• The final segment is also an acknowledgment. It notifies the
destination host that the connection agreement has been
accepted and that the actual connection has been established.
Data transfer can be begin.
Cont..
 Managing TCP Sessions
• The mechanisms in TCP that manage the interrelationship
between window size, data loss and congestion during a
session –Flow control.
UDP(user datagram protocol)
• The characteristics of the UDP protocol and the types of
communication for which it is best suited.
Cont..
• The process specified by the UDP protocol to reassemble
PDUs at the destination device.
Cont..
• why an application developer would ever
choose to build an application over UDP
rather than over TCP. Isn’t TCP always
preferable, since TCP provides a reliable
data transfer service, while UDP does not?
• No, many applications are better suited for
UDP for the following reasons;
- Finer application-level control over
what data is sent, and when.
-No connection establishment.
-No connection state.
-Small packet header overhead.
Cont..
• Finer application-level control over what data is sent, and when.
Under UDP, as soon as an application process passes data to
UDP, UDP will package the data inside a UDP segment and
immediately pass the segment to the network layer. TCP, on
the other hand, has a congestion-control mechanism that
throttles the transport-layer TCP sender when one or more
links between the source and destination hosts become
excessively congested.
• No connection establishment. As we discuss, TCP uses a three-
way handshake before it starts to transfer data. UDP just
blasts away without any formal preliminaries. Thus UDP does
not introduce any delay to establish a connection. This is
probably the principal reason why DNS runs over UDP rather
than TCP—DNS would be much slower if it ran over TCP.
HTTP uses TCP rather than UDP, since reliability is critical for
Web pages with text.
Cont..
• No connection state. TCP maintains connection state in the end
systems. This connection state includes receive and send
buffers, congestion-control parameters, and sequence and
acknowledgment number parameters. UDP, on the other
hand, does not maintain connection state and does not track
any of these parameters. For this reason, a server devoted to a
particular application can typically support many more active
clients when the application runs over UDP rather than TCP.
• Small packet header overhead. The TCP segment has 20 bytes of
header overhead in every segment, whereas UDP has only 8
bytes of overhead.
Network Layer
 The network layer is responsible for the source-to-destination
delivery of a packet, possibly across multiple networks (links).
 The network layer is responsible for the delivery of individual
packets from the source host to the destination host.
 The network layer is responsible for routing datagrams from one
host to another. It has two components.
•The IP protocol (the only one protocol)
•Routing protocols that determine the routes
 Layer 3 uses four basic processes:
• Addressing
• Encapsulation
• Routing
• DE capsulation
Cont..
Network Layer Protocols-Addressing
N.L must provide a mechanism for unique addressing these end
devices if individual piece of data are to be directed to an end device.
Network Layer Protocols
Protocols implemented at the Network layer that carry user data
include:
 Internet Protocol version 4 (IPv4)-common
With IPv4 each packet has 32 bit source address and 32bit destination
address in the layer 3 header.
 Internet Protocol version 6 (IPv6)-being deployed
With IPv4 each packet has 128 bit source address and 128 bit
destination address in the layer 3 header.
 Novell Internetwork Packet Exchange (IPX)
 AppleTalk
 Connectionless Network Service (CLNS/DECNet) Network Layer
Protocols-Addressing
IPv4 Addresses
• An IPv4 address is a 32-bit address that uniquely and
universally defines the connection of a device (for example, a
computer or a router) to the Internet.
• IPv4 addresses are unique and universal.
• They are unique in the sense that each address defines one,
and only one, connection to the Internet.
• Two devices on the Internet can never have the same address
at the same time.
Address Space
• A protocol such as IPv4 that defines addresses has an address
space. An address space is the total number of addresses used
by the protocol.
• If a protocol uses N bits to define an address, the address
space is 2N
• because each bit can have two different values (0 or 1) and N
bits can have 2Nvalues.
• IPv4 uses 32-bitaddresses, which means that the address
space is 232or4,294,967,296 (more than 4 billion).
• This means that, theoretically, if there were no restrictions,
more than 4 billion devices could be connected to the Internet.
• We will see shortly that the actual number is much less
because of the restrictions imposed on the addresses.
Notations
There are two prevalent notations to show an IPv4 address: binary
notation and dotted-decimal notation.
 Binary Notation
• In binary notation, the IPv4 address is displayed as 32 bits. Each
octet is often referred to as a byte. So it is common to hear an IPv4
address referred to as a 32-bit address or a 4-byte address. The
following is an example of an IPv4 address in binary notation:
01110101 100101010001110100000010
 Dotted-Decimal Notation
• To make the IPv4 address more compact and easier to read,
Internet addresses are usually written in decimal form with a decimal
point (dot) separating the bytes. The following is the dotted-decimal
notation of the above address:
117.149.29.26
Cont..
Example 1:
Cont..
• Example 2: Change the following IPv4 addresses from binary
notation to dotted-decimal notation.

• Solution:
We replace each group of 8 bits with its equivalent decimal number and
add dots for separation.
Cont..
• Example 3:
Cont..
• Example4:
Classful Addressing
• IPv4 addressing, at its inception, used the concept of classes.
This architecture is called classful addressing.
• In classful addressing, the address space is divided into five
classes: A, B, C, D, and E. Each class occupies some part of the
address space.
• Classes in binary and dotted-decimal notation
Cont..
Example 5: Find the class of each address.
a.00000001 000010110000101111101111
b.11000001100000110001101111111111
c.14.23.120.8
d.252.5.15.111
Solution
a. The first bit is 0. This is a class A address
b. The first 2 bits are 1; the third bit is 0. This is a class Caddress.
c. The first byte is 14; the class is A.
d. The first byte is 252; the class is E.
Classful Addressing
• When an organization requested a block of addresses, it was
granted one in class A, B, or C.
• Class A addresses were designed for large organizations with
a large number of attached hosts or routers.
• Class B addresses were designed for midsize organizations
with tens of thousands of attached hosts or routers.
• Class C addresses were designed for small organizations with
a small number of attached hosts or routers.
• A block in class A address is too large for almost any
organization. This means most of the addresses in class A
were wasted and were not used.
• A block in class B is also very large, probably too large for
many of the organizations that received a class B block.
• A block in class C is probably too small for many
organizations.
Netid Hostid
• In classful addressing, an IP address in class A, B, or C is
divided into netid and hostid.
• These parts are of varying lengths, depending on the class of
the address.
• In class A, one byte defines the netid and three bytes define
the hostid.
• In class B, two bytes define the netid and two bytes define the
hostid.
• In class C, three bytes define the netid and one byte defines
the hostid.
Classify and Define IPv4 Addresses

Network address: is the


address by which we
refer to the network.
Broad cast address: is a
special address used to
send data to all hosts in
the network.
It uses the highest
address in the network
range.
Host address: Every end
device requires a unique
address to deliver a
packet to the host.
Network Prefixes
• The prefix length is the number of bits in the address that
gives us the network portion.
• For example, in 172.16.4.0 /24, the /24 is the prefix length
• it tells us that the first 24 bits are the network address.
Cont..
 Classify and Define IPv4 Addresses
• Determine the network, broadcast and host addresses for a
given address and prefix combination.
Mask
• Determine the network portion of the host address and the
role of the subnet mask.
• How the subnet mask is used to create and specify the
network and host portions of an IP address.
• Subnet mask: is also another technique which is used to
differentiate a network from host portion. It uses all ones in
the network portion and zeros in the host portion.
Cont..
• Use the subnet mask and ANDing process to extract the
network address from the IP address.
Mask
• Use ANDing logic to determine an outcome
Mask
• Although the length of the netid and hostid(in bits) is
predetermined in classful addressing, we can also use a mask
(also called the default mask), a 32-bit number made of
contiguous 1s followed by contiguous 0s. The masks for
classes A, B, and C are shown below
• The mask can help us to find the netid and the hostid. For
example, the mask for a class A address has eight 1 s, which
means the first 8 bits of any address in class A define the
netid; the next 24 bits define the hostid.
Classless Addressing
• The flaws in classful addressing scheme combined with the
fast growth of the Internet led to the near depletion of the
available addresses.
• Yet the number of devices on the Internet is much less than
the 232address space.
• One solution that has alleviated the problem is the idea of
classless addressing.
• To overcome address depletion and give more organizations
access to the Internet, classless addressing was designed and
implemented.
• In this scheme, there are no classes, but the addresses are still
granted in blocks.
Classless Addressing
Address Blocks
• In classless addressing, when an entity, small or large, needs
to be connected to the Internet, it is granted a block (range) of
addresses.
• The size of the block (the number of addresses) varies based
on the nature and size of the entity.
• For example, a household may be given only two addresses; a
large organization may be given thousands of addresses.
• An ISP, as the Internet service provider, may be given
thousands or hundreds of thousands based on the number of
customers it may serve.
Restriction
• To simplify the handling of addresses, the Internet authorities
impose three restrictions on classless address blocks:
1.The addresses in a block must be contiguous, one after
another.
2.The number of addresses in a block must be a power of 2 (1,
2, 4, 8 .... ).
3.The first address must be evenly divisible by the number of
addresses.
Restriction
• The above figure shows a block of addresses, in both binary
and dotted-decimal notation, granted to a small business that
needs 16 addresses.
• We can see that the restrictions are applied to this block.
• The addresses are contiguous.
• The number of addresses is a power of 2 (16 = 24),
• The first address is divisible by 16.
• The first address, when converted to a decimal number, is
3,440,387,360, which when divided by 16results in
215,024,210.
Classless Addressing Mask
• A better way to define a block of addresses is to select any
address in the block and the mask.
• As we discussed before, a mask is a 32-bitnumber in which
the n leftmost bits are 1sand the 32 -n rightmost bits are 0s.
• However, in classless addressing the mask for a block can take
any value from 0 to 32. It is very convenient to give just the
value of n preceded by a slash (CIDR –Classless Inter domain
Routing notation).
• The address and the/n notation completely define the whole
block (the first address, the last address, and the number of
addresses).
Subnetting
• What happens if you wanted to take one network address and
create six networks from it? You would have to perform what
is called subnetting, which allows you to take one larger
network and break it into many smaller networks.
• There are many reasons to perform subnetting. Some of the
benefits of subnetting include the following:
–Reduced network traffic
–Optimized network performance
–Simplified management
–Facilitated spanning of large geographical distances
Subnetting
• Reduced network traffic We all appreciate less traffic of any kind.
Networks are no different. Without trusty routers, packet traffic
could grind the entire network down to a near standstill. With
routers, most traffic will stay on the local network; only packets
destined for other networks will pass through the router. Routers
create broadcast domains. The smaller broadcast domains you
create, the less network traffic on that network segment.
• Optimized network performance This is a result of reduced
network traffic.
• Simplified management It’s easier to identify and isolate network
problems in a group of smaller connected networks than within one
gigantic network.
• Facilitated spanning of large geographical distances Because
WAN links are considerably slower and more expensive than LAN
links, a single large network that spans long distances can create
problems in every area listed above. Connecting multiple smaller
networks makes the system more efficient.
Cont..
• Example. Subnet 192.168.10.0=Network address and
• 255.255.255.192=Subnet mask answer the following questions.
1. How many subnets does the subnet mask produce?
2. How many valid hosts per subnet?
3. What are the valid subnets?
4 What are the valid hosts in each subnet?
5. What is the broadcast address of each subnet?
Subnetting-Binary Method
• Solution:
• 192=11000000 Two bits for subnetting, 6 bits for defining the
hosts in each subnet.
• the only two valid subnets are 01000000=64 (all host bits off)
or 10000000=128 (all host bits off)
• Subnet 64
Subnetting-Binary Method
• Subnet 128
Subnetting-Alternative Method
Subnetting-Alternative Method
Practice
Classify and Define IPv4 Addresses
 In an IPv4 network, the host can communicate in one of three
different ways.
1. Unicast: Process of sending packet from one host to an
individual host.
2. Multi-cast: Process of sending a packet from one host to a
selected group.
3. Broad cast: Process of sending from one host to all hosts in
the network.
Encapsulation
• When a host transmits data across a network to another
device, the data is encapsulated with protocol information at
each layer of the OSI model. Each layer communicates only
with its peer layer on the receiving device. To communicate
and exchange information, each layer uses what are called
Protocol Data Units (PDUs).
• PDUs hold the control information attached to the data at
each layer of the model, which is typically attached to the
header of the data field but can also be in the trailer, or end of
the data field.
• During encapsulation layer 3 receives layer 4 PDU and adds a
layer 3 header or label, to create layer 3 PDU called a packet.
The packet should contain along with other information, the
address of the host to which it is being sent(destination
address) and source address.
Routing and De-capsulation
 Routing:
Next to encapsulation the N.L must provide services to
direct these packets to their destination host. Routing refers
to the network-wide process that determines the end-to-
end paths that packets take from source to destination.
 De-capsulation
Finally when the packet arrives on the destination host ,it
examines the destination address to verify that the packet was
addressed to this device.
• If the address is correct the packet is DE capsulated by the
network layer and the T.L PDU contained in the packet is
passed up to the appropriate device at T.L.
Data Link Layer
• The data link layer transforms the physical layer, a raw
transmission facility, to a reliable link. It makes the physical
layer appear error-free to the upper layer (network layer).
• The data link layer is responsible for moving frames
from one hop (node) to the next.
• DLL provides two basic services
1. Allows the upper layers to access the media using techniques
such as framing.
2. Controls how data is placed in to the media and is received
from the media using the technique such as media access control
and error detection.
Data Link Layer –Roles
• The role the Data Link layer plays in linking the software and
hardware layers.
Data Link Sub layers
Data Link Layer – Media access control(MAC)

• Data Link layer protocols are required to control media


access.MAC provides DLL addressing and de-limating of
data according to the physical signaling requirements of the
medium and type of DLL protocol in use.
Media Access Control Necessity
• Explain the necessity for controlling access to the media.
Media Access Control Techniques
• Two media access control methods for shared media and the
basic characteristics of each.
Data Link Layer – Logical link control
• Logical Link Control(LLC):
places information in the frame that
identifies which network layer protocol
is being used for the frame.
This information allows multiple layer 3
protocols such as IP and IPx, to utilize
the same network interface and media.
• DLL PDU is called frame. It contains
Data which is N.L packet, header which
contains control information and is
located in the beginning of the PDU,
and Trailer which contains control
information which is added at the end of
the PDU.
Ethernet Frame
Point-to-Point Protocol Frame
802.11 Wireless Frame
Data Link Layer Standards
Physical Layer Protocols & Services
• The physical layer moves the individual bits within the frame
from one node to the next.(e.g., twisted-pair copper wire, sigle
mode fiber optics).
Physical Layer Protocols & Services
• The role of bits in representing a frame as it is transported
across the local media.
Physical Layer Media
Physical Layer Protocols & Services
• Who establishes and maintains standards for the Physical
layers compared to those for the other layers of the network.
Physical Layer Standards
Physical Layer Protocols & Services
• Hardware components associated with the Physical layer that
are governed by standards.
Physical Layer Signaling and Encoding

• Individual bits are encoded onto the Physical layer and the
basic encoding techniques.
Physical Layer Fundamental Principles
Physical Layer Signaling and Encoding

Potrebbero piacerti anche