You are on page 1of 96

Chapter IV

Network Layer Models

1
Layered Models
The Benefit of Using Layered Models
• To visualize the interaction between various protocols, it is common to use a
layered model.
• A layered model depicts the operation of the protocols occurring within each layer,
as well as the interaction with the layers above and below it.
• There are benefits to using a layered model to describe network protocols and
operations.
• Using a layered model:?????????????
• Assists in protocol design, because protocols that operate at a specific layer have defined
information that they act upon and a defined interface to the layers above and below.
• Fosters competition because products from different vendors can work together.
• Prevents technology or capability changes in one layer from affecting other layers above
and below.
• Provides a common language to describe networking functions and capabilities.
2
Protocol and Reference model
• There are two basic types of networking models: protocol models and reference
models.
• A protocol model provides a model that closely matches the structure of a particular
protocol suite.
• The hierarchical set of related protocols in a suite typically represents all the
functionality required to interface the human network with the data network.
• 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.
• A reference model is not intended to be an implementation specification or to provide
a sufficient level of detail to define precisely the services of the network architecture.
• The primary purpose of a reference model is to aid in clearer understanding of the
functions and process involved. 3
• 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.
• Although the TCP/IP and OSI models
are the primary models used when
discussing network functionality,
designers of network protocols,
services, or devices can create their
own models to represent their
products.
• Ultimately, designers are required to
communicate to the industry by
relating their product or service to
either the OSI model or the TCP/IP
model, or to both. 4
Network standards and OSI model
• Rapid growth of computer networks caused compatibility
problems
• ISO(International standard organization) recognized the problem
and released the OSI model in 1984
• OSI stands for Open Systems Interconnection and consists of 7
Layers
• The use of layers is designed to reduce complexity and make
standardization easier
• It ensures greater compatibility and interoperability between
various types of network technologies.
• 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.
5
• The OSI Reference Model is composed of seven layers, each
specifying particular network functions.
• The process of breaking up the functions or tasks of networking into
layers reduces complexity.
• Each layer provides a service to the layer above it in the protocol
specification.
• Each layer communicates with the same layer’s software or
hardware on other computers.
• The lower 4 layers (transport, network, data link and physical —
Layers 4, 3, 2, and 1) are concerned with the flow of data from end
to end through the network.
• The upper three layers of the OSI model (application, presentation
and session—Layers 7, 6 and 5) are orientated more toward services
to the applications.
• Data is Encapsulated with the necessary protocol information as it
moves down the layers before network transit.
6
OSI Reference model
 The OSI Reference Model is a
“reference guide” for
understanding network
functionality.
 Each of the 7 layers
(numbered from bottom to top)
represents one step in the
process of sending data
packets from a source to a
destination.

7
Physical layer???????
• The physical layer is responsible for movements of individual bits
from one hop (node) to the next.
• The physical layer is also concerned with the following:
• Physical characteristics of interfaces and medium.
• The physical layer defines the characteristics of the interface
between the devices and the transmission medium.
• It also defines the type of transmission medium.
• Representation of bits.
• The physical layer data consists of a stream of bits (sequence of
Os or 1s) with no interpretation.
• To be transmitted, bits must be encoded into signals--electrical or
optical.
• The physical layer defines the type of encoding (how Os and 1s
are changed to signals).
8
• Data rate.???
• The transmission rate-the number of bits sent each second is also
defined by the physical layer. In other words, the physical layer
defines the duration of a bit, which is how long it lasts.
• Synchronization of bits.?????
• The sender and receiver not only must use the same bit rate but
also must be synchronized at the bit level. In other words, the
sender and the receiver clocks must be synchronized.
• Line configuration. ???/
• The physical layer is concerned with the connection of devices to
the media.
• In a point-to-point configuration, two devices are connected
through a dedicated link.
• In a multipoint configuration, a link is shared among several
devices.

9
• Physical topology.
• The physical topology defines how devices are connected to
make a network. Devices can be connected by using
• a mesh topology (every device is connected to every other
device),
• a star topology (devices are connected through a central
device),
• a ring topology (each device is connected to the next, forming a
ring),
• a bus topology (every device is on a common link),
• or a hybrid topology (this is a combination of two or more
topologies).

10
• Transmission mode.
• The physical layer also defines the direction of transmission
between two devices: simplex, half-duplex, or full-duplex.
• In simplex mode, only one device can send; the other can only
receive.
• The simplex mode is a one-way communication.
• In the half-duplex mode, two devices can send and receive, but
not at the same time.
• In a full-duplex (or simply duplex) mode, two devices can send
and receive at the same time.
Physical layer devices ?????
 NIC
 Repeaters
 Hubs

11
Data Link Layer
• The data link layer is responsible for moving frames from one hop (node) to
the next.
• It makes the physical layer appear error-free to the upper layer (network
layer).
Other responsibilities of the data link layer include the following:
Framing.
• The data link layer divides the stream of bits received from the network layer
into manageable data units called frames.
Physical addressing.
• If frames are to be distributed to different systems on the network, the data
link layer adds a header to the frame to define the sender and/or receiver of
the frame.
• If the frame is intended for a system outside the sender's network, the receiver
address is the address of the device that connects the network to the next one.
12
• Flow control. ??????
• If the rate at which the data are absorbed by the receiver is less than
the rate at which data are produced in the sender, the data link layer
imposes a flow control mechanism to avoid overwhelming the
receiver.
• Error control./???????????
• The data link layer adds reliability to the physical layer by adding
mechanisms to detect and retransmit damaged or lost frames.
• It also uses a mechanism to recognize duplicate frames. Error
control is normally achieved through a trailer added to the end of the
frame.
• Access control. ????????????
• When two or more devices are connected to the same link, data link
layer protocols are necessary to determine which device has control
over the link at any given time.

13
data link layer . . .
Data link layer is actually made up of two sub
layers:-
 The media access control(MAC)
• Framing
• Error control
• Flow control
 The logical link control (LLC)
• Transmission/reception of frames

14
MAC address
• The MAC address is a unique value associated with a network.
Adapter.
• MAC addresses are also known as hardware addresses or
physical addresses.
• They uniquely identify an adapter on a LAN.
• MAC addresses are 12-digit hexadecimal numbers (48 bits in
length).???????????
• MAC addresses are usually written in one of the following two
formats:
MM:MM:MM:SS:SS:SS
MM-MM-MM-SS-SS-SS
• Example of Mac address : 00:A0:C9:14:C8:29

15
Data link layer devices???
 Three devices manipulate data at the data link
layer.
• Bridges
• Switches
• NIC

16
Network Layer

• The network layer is responsible for the delivery of individual packets


from the source host to the destination host.
 Other responsibilities of the network layer include the following:
Logical addressing.
• The physical addressing implemented by the data link layer handles the
addressing problem locally.
• If a packet passes the network boundary, we need another addressing
system to help distinguish the source and destination systems.
• 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. 17
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.
Network layer devices
Three devices operate at network layer ???????
• Routers
• Brouters
• Layer 3 switches

18
Transport Layer
• The transport layer is responsible for the delivery of a message from
one process to another.
Other responsibilities of the transport layer include the following:
Service-point addressing
• Computers often run several programs at the same time.
• For this reason, source-to-destination delivery means delivery not
only from one computer to the next but also from a specific process
(running program) on one computer to a specific process (running
program) on the other.
• The transport layer header must therefore include a type of address
called a service-point address (or port address).
• The network layer gets each packet to the correct computer; the
transport layer gets the entire message to the correct process on that
computer.
19
Segmentation and reassembly.
• A message is divided into transmittable segments, with each segment
containing a sequence number.
• These numbers enable the transport layer to reassemble the message
correctly upon arriving at the destination and to identify and replace
packets that were lost in transmission.
Connection control.
• The transport layer can be either connectionless or connection
oriented.
• A connectionless transport layer treats each segment as an
independent packet and delivers it to the transport layer at the
destination machine.
• A connection oriented transport layer makes a connection with the
transport layer at the destination machine first before delivering the
packets. After all the data are transferred, the connection is
terminated.
20
Flow control?????
• Like the data link layer, the transport layer is responsible for flow
control.
• However, flow control at this layer is performed end to end rather
than across a single link.
Error control???????
• Like the data link layer, the transport layer is responsible for error
control.
• However, error control at this layer is performed process-to-
process rather than across a single link.
• The sending transport layer makes sure that the entire message
arrives at the receiving transport layer without error (damage, loss,
or duplication).
• Error correction is usually achieved through retransmission.

21
Session Layer??????
• The session layer is responsible for dialog control and
synchronization.
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 (one way at a time) or full-duplex (two ways at a
time) mode.
Synchronization
• The session layer allows a process to add checkpoints, or
synchronization points, to a stream of data.
22
Presentation Layer
• The presentation layer is responsible for translation, compression, and
encryption.???????????
Specific responsibilities of the presentation layer include the following:
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.

23
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 its 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.

24
Application Layer
 The application layer is responsible for providing services to the user.
 Specific services provided by the application layer include the
following:
Network virtual terminal
• A network virtual terminal is a software version of a physical terminal,
and it allows a user to log on to a remote host.
• To do so, the application creates a software emulation of a terminal at
the remote host.
• The user's computer talks to the software terminal which, in turn, talks
to the host, and vice versa.
• The remote host believes it is communicating with one of its own
terminals and allows the user to log on
25
File transfer, access, and management
• This application allows a user to access files in a remote host (to make changes
or read data), to retrieve files from a remote computer for use in the local
computer, and to manage or control files in a remote computer locally.
Mail services.
• This application provides the basis for e-mail forwarding and storage.
Directory services.
• This application provides distributed database sources and access for global
information about various objects and services.
Upper layer devices
• There are only a few upper layer devices
• They fall into a class of devices called gateways??????????????
• A gateway translates one type of network data into another.
• Gateways can be either hardware or software 26
TCP/IP Model
• The first layered protocol model
for internetwork communications
was created in the early 1970s
and is referred to as the Internet
model.
• It defines four categories of
functions that must occur for
communications to be successful.
• The architecture of the TCP/IP
protocol suite follows the
structure of this model.
• Because of this, the Internet
model is commonly referred to as
27
the TCP/IP model.
• Most protocol models describe a vendor-specific protocol stack.
• However, since the TCP/IP model is an open standard, one company
does not control the definition of the model.
• The definitions of the standard and the TCP/IP protocols are discussed
in a public forum and defined in a publicly-available set of documents.
• These documents are called Requests for Comments (RFCs).
• They contain both the formal specification of data communications
protocols and resources that describe the use of the protocols.
• The RFCs also contain technical and organizational documents about
the Internet, including the technical specifications and policy
documents produced by the Internet Engineering Task Force (IETF).

28
TCP/IP model development
• The late-60s The Defense Advance Research Projects Agency (DARPA)
originally developed Transmission Control Protocol/Internet Protocol
(TCP/IP) to interconnect various defense department computer networks.
• The Internet, an International Wide Area Network, uses TCP/IP to connect
networks across the world.
4 layers of the TCP/IP model
 Layer 4: Application
 Layer 3: Transport
 Layer 2: Internet
 Layer 1: Network access

It is important to note that some of the layers in the TCP/IP model have
the same name as layers in the OSI model. Do not confuse the layers of
the two models.

29
The network access layer
• Concerned with all of the issues that an IP packet
requires to actually make the physical link.
• All the details in the OSI physical and data link
layers.
 Electrical, mechanical, procedural and functional
specifications.
 Data rate, Distances, Physical connector.
 Frames, physical addressing.
 Synchronization, flow control, error control.

30
The internet layer
• Send source packets from any network on the
internetwork and have them arrive at the
destination independent of the path and networks
they took to get there.
 Packets, Logical addressing.
 Internet Protocol (IP).
 Route , routing table, routing protocol.

31
The transport layer
• The transport layer deals with the quality-of-
service issues of reliability, flow control, and
error correction.
 Segments, data stream, datagram.
 Connection oriented and connectionless.
 Transmission control protocol (TCP).
 User datagram protocol (UDP).
 End-to-end flow control.
 Error detection and recovery.

32
TCP/IP Reference Model (cont)
• Transport layer (layer 3)
 Allows end-to-end communication
 Connection establishment, error control, flow control
 Two main protocols at this level
• Transmission control protocol (TCP),
– Connection oriented
» Connection established before sending data
» Reliable
• user datagram protocol (UDP)
– Connectionless
» Sending data without establishing connection
» Fast but unreliable

33
The application layer
• Handles high-level protocols, issues of
representation, encoding, and dialog control.
• The TCP/IP combines all application-related
issues into one layer, and assures this data is
properly packaged for the next layer.
 FTP, HTTP, SMNP, DNS ...
 Format of data, data structure, encode …
 Dialog control, session management …

34
TCP/IP protocol stack????????

35
TCP/IP Reference Model?????????

Layer Protocols
HTTP TELNET FTP SMTP SNMP
Application
TCP UDP
Transport
IP ICMP
Internet

ETHERNET PACKET RADIO


Network Access
(Host-to-network)

36
Rules that govern communication
• All communication, whether face-to-face or over a network, is
governed by predetermined rules called protocols.
• These protocols are specific to the characteristics of the conversation.
• In our day-to-day personal communication, the rules we use to
communicate over one medium, like a telephone call, are not
necessarily the same as the protocols for using another medium, such
as sending a letter.
• Think of how many different rules or protocols govern all the
different methods of communication that exist in the world today.
• Successful communication between hosts on a network requires the
interaction of many different protocols.
• A group of inter-related protocols that are necessary to perform a
communication function is called a protocol suite.
• These protocols are implemented in software and hardware that is
loaded on each host and network device.
37
• One of the best ways to visualize how all of the protocols interact on a
particular host is to view it as a stack.
• A protocol stack shows how the individual protocols within the suite are
implemented on the host.
• The protocols are viewed as a layered hierarchy, with each higher level
service depending on the functionality defined by the protocols shown in
the lower levels.
• The lower layers of the stack are concerned with moving data over the
network and providing services to the upper layers, which are focused on
the content of the message being sent and the user interface.
• Using layers to describe face-to-face communication
For example, consider two people communicating face-to-face.
• As the figure shows, we can use three layers to describe this activity.
• At the bottom layer, the physical layer, we have two people, each with a
voice that can utter words aloud.
• At the second layer, the rules layer, we have an agreement to speak in a
common language.
38
• At the top layer, the content
layer, we have the words
actually spoken-the content of
the communication.
• Were we to witness this
conversation, we would not
actually see "layers" floating in
space.
• It is important to understand
that the use of layers is a
model and, as such, it provides
a way to conveniently break a
complex task into parts and
describe how they work.
39
Network Protocols
• At the human level, some communication rules are formal and
others are simply understood, or implicit, based on custom and
practice.
• For devices to successfully communicate, a network protocol suite
must describe precise requirements and interactions.
• Networking protocol suites describe processes such as:
• The format or structure of the message
• The method by which networking devices share information about
pathways with other networks
• How and when error and system messages are passed between
devices
• The setup and termination of data transfer sessions 40
• Individual protocols in a protocol suite may be vendor-specific and
proprietary.
• Proprietary, in this context, means that one company or vendor controls
the definition of the protocol and how it functions.
• Some proprietary protocols can be used by different organizations with
permission from the owner.
• Others can only be implemented on equipment manufactured by the
proprietary vendor.
• Other protocols are freely available for public use.

41
Protocol Suits And industry Standards
• Often, many of the protocols that comprise a protocol suite reference other widely
utilized protocols or industry standards.
• A standard is a process or protocol that has been endorsed by the networking industry
and ratified by a standards organization, such as the Institute of Electrical and
Electronics Engineers (IEEE) or the Internet Engineering Task Force (IETF).
• The use of standards in developing and implementing protocols ensures that products
from different manufacturers can work together for efficient communications.
• If a protocol is not rigidly observed by a particular manufacturer, their equipment or
software may not be able to successfully communicate with products made by other
manufacturers.
• In data communications, for example, if one end of a conversation is using a protocol
to govern one-way communication and the other end is assuming a protocol describing
two-way communication, in all probability, no information will be exchanged.

42
The Interaction of protocols
• An example of the use of a protocol
suite in network communications is
the interaction between a web
server and a web browser.
• This interaction uses a number of
protocols and standards in the
process of exchanging information
between them.

The different protocols work together to ensure that the messages are received and
understood by both parties.
Examples of these protocols are:
Application Protocol:
Hypertext Transfer Protocol (HTTP) is a common protocol that governs the way
that a web server and a web client interact. 43
• HTTP defines the content and formatting of the requests and responses
exchanged between the client and server.
• Both the client and the web server software implement HTTP as part of the
application.
• The HTTP protocol relies on other protocols to govern how the messages are
transported between client and server
Transport Protocol:
• Transmission Control Protocol (TCP) is the transport protocol that manages the
individual conversations between web servers and web clients.
• TCP divides the HTTP messages into smaller pieces, called segments, to be
sent to the destination client.
• It is also responsible for controlling the size and rate at which messages are
exchanged between the server and the client. 44
Internetwork Protocol:
• The most common internetwork protocol is Internet Protocol (IP). IP is
responsible for taking the formatted segments from TCP, encapsulating them into
packets, assigning the appropriate addresses, and selecting the best path to the
destination host.
Network Access Protocols:
• Network access protocols describe two primary functions, data link management
and the physical transmission of data on the media.
• Data-link management protocols take the packets from IP and format them to be
transmitted over the media.
• The standards and protocols for the physical media govern how the signals are
sent over the media and how they are interpreted by the receiving clients.
• Transceivers on the network interface cards implement the appropriate standards
45
for the media that is being used.
Technology Independent protocols
• Networking protocols describe the
functions that occur during
network communications.
• In the face-to-face conversation
example, a protocol for
communicating might state that in
order to signal that the
conversation is complete, the
sender must remain silent for two
full seconds.
• However, this protocol does not
specify how the sender is to
remain silent for the two seconds.
• Protocols generally do not
describe how to accomplish a
46
particular function.
• By describing only what functions are required of a particular
communication rule but not how they are to be carried out, the
implementation of a particular protocol can be technology-independent.
• Looking at the web server example, HTTP
• Does not specify what programming language is used to create the browser,
• Doesn’t specify which web server software should be used to serve the web
pages,
• What operating system the software runs on, or
• The hardware requirements necessary to display the browser.
• It also does not describe how the server should detect errors,
• Although it does describe what the server should do if an error occurs.
• This means that a computer - and other devices, like mobile phones or
PDAs - can access a web page stored on any type of web server that uses
any form of operating system from anywhere on the Internet.
47
Application Layer protocols
• The application layer in TCP/IP is equivalent to the combined session,
presentation, and application layers in the OSI model.
• Many protocols are defined at this layer such as HTTP, SMTP,
POP3 , FTP, DNS, Telnet ,DHCP
• Application layer protocols provide the rules for communication
between applications
Protocols
• Define process on either end of the communication
• Define the type of message
• Define the syntax of message
• Define the meaning of any informational fields
• Define how messages are sent and expected response
• Define interaction with the next lower layer 48
Application Layer protocols??????
 Application Layer TCP/IP protocols: specify the format and control
information necessary for many of the common Internet
communication

 DNS: is used to resolve Internet names to IP addresses

 HTTP: is used to transfer files that make up the Web pages of the
World Wide Web

 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

 FTP: is used for interactive file transfer between systems 49


HTTP
• Short for Hypertext Transfer Protocol, is the underlying protocol
used by the world wide web.
• HTTP defines how messages are formatted and transmitted, and
what actions web servers and browsers should take in response to
various commands
• For example, when you enter a URL in your browser, this actually
sends an HTTP command to the Web server directing it to fetch
and transmit the requested Web page.

50
An HTTP conversation????????
Client Server
• I would like to open
a connection • OK

• GET <file location>


• Send page or error message

• Display response
• Close connection
• OK

HTTP is the set of rules governing the format and content of the
conversation between a Web client and server
51
HTTP

 HTTP protocol and how it supports delivery of web pages


 Request(URL)-->web browser establish conn.-->web service (using HTTP)
 Web browser (Request, accept, interpret, format & present data (plain text,
HTML, plug-in))

• http://www.bdu.edu.et
• http://www.google.com

• Reading: HTTP protocol message types GET, POST, PUT 52


SMTP – Simple Mail Transfer Protocol
• SMTP is used when email is delivered from an email
client to an email server or when email is delivered from
one email server to another
• Most e-mail systems that send mail over the Internet use
SMTP to send messages from one server to another; the
messages can then be retrieved with an e-mail client using
either POP or IMAP
• This is why you need to specify both the POP or IMAP
server and the SMTP server when you configure your e-
mail application.

53
SMTP
• SMTP clients and servers
have two main components

– User Agents – Prepares the


message, encloses it in an
envelope.

– Mail Transfer Agent –


Transfers the mail across the
internet.

– Analogous to the postal


system in many ways

54
Post Office Protocol Version 3 (POP3)
• A protocol used to retrieve e-mail from a mail server.
• most e-mail applications (sometimes called an e-mail client)
use the POP protocol, although some can use the newer
IMAP (Internet Message Access Protocol).
• There are two versions of POP. The first, called POP2,
became a standard in the mid-80's and requires SMTP to send
messages.
• The newer version, POP3, can be used with or without
SMTP.

55
POP and SMTP protocols, and how they support e-mail services ????????????

56
 POP and SMTP protocols, and how they support e-mail services
 Like HTTP they define client/server processes

 Mail User Agent (MUA), or e-mail client


 allows messages to be sent and places received messages into the
client's mailbox,
 both of which are distinct processes.
 to receive e-mail messages from an e-mail server, the e-mail client can
use POP
 Sending e-mail from either a client or a server uses message formats
and command strings defined by the SMTP protocol
 Usually an e-mail client provides the functionality of both protocols
within one application
57
Telnet??????????????????
 Telnet protocol and its uses in examining and managing networks
 Provides a standard method of emulating text-based terminal devices
over the data network
 A connection using Telnet is called a Virtual Terminal (VTY) session,
or connection
 Telnet uses software to create a virtual device that provides the same
features of a terminal session with access to the server (CLI).
 To support Telnet client connections, the server runs a service called the
Telnet daemon
 On a Microsoft Windows PC, Telnet can be run from the command
prompt.
 Other common terminal applications that run as Telnet clients are
 HyperTerminal, Minicom, and TeraTerm. 58
59
File Transfer Protocol (FTP)
• The protocol for exchanging files over the Internet.
• FTP works in the same way as HTTP for transferring Web pages
from a server to a user's browser and SMTP for transferring
electronic mail across the Internet in that, like these technologies,
FTP uses the Internet's TCP/IP protocols to enable data transfer.
• FTP is most commonly used to download a file from a server using
the Internet or to upload a file to a server (e.g., uploading a Web
page file to a server).
• Two connections between the client and the server:
 First connection to the server on TCP port 21
 control traffic, consisting of client commands and server
replies
 Second connection to the server over TCP port 20
 actual file transfer and is created every time there is a file
transferred.
 The file transfer can happen in either direction
 client can download (pull)
 the client can upload (push) 60
61
DHCP protocol
 DHCP protocol and its uses in enabling devices to obtain ip address & other info
from a DHCP server
 allows a host to obtain an IP address dynamically when it connects to the network
 How
 The DHCP server is contacted and an address requested
 The DHCP server chooses an address from a configured range of addresses
called a pool and
 assigns ("leases") it to the host for a set period.
 On larger networks, or where the user population changes frequently, DHCP is
preferred
 DHCP distributed addresses are not permanently assigned to hosts but are only
leased for a period of time
 DHCP makes it possible for you to access the Internet using wireless hotspots at
airports or coffee shops
 As you enter the area, your laptop DHCP client contacts the local DHCP server via
a wireless connection. The DHCP server assigns an IP address to your laptop.
 DHCP can pose a security risk because any device connected to the network can
receive an address
62
DHCP

63
 DHCP protocol

 How it works

 client broadcasts a DHCP DISCOVER packet to identify any available


DHCP servers on the network
 A DHCP server replies with a DHCP OFFER, which is a lease offer
message with an assigned
 IP address,

 subnet mask,

 DNS server, and

 default gateway information as well as the duration of the lease

 Once the client receives the offer, it will respond with a DHCP Request,
indicating that it will accept the offered protocol information. 64
• Finally, the server responds with a DHCP ACK, acknowledging
the clients acceptance of offered protocol information.
 If the offer is no longer valid - perhaps due to a time-out or another
client allocating the lease - then the selected server will respond
with a DHCP NAK message (Negative Acknowledgement)
 If a DHCP NAK message is returned, then the selection process
must begin again with a new DHCP DISCOVER message being
transmitted.

65
 DHCP protocol???????????
 How it works
 Once the client has the lease, it must be renewed prior to the lease
expiration through another DHCP REQUEST message.

66
DNS???????????
• Short for Domain Name System (or Service or Server), an Internet service
that translates domain names into IP addresses.
• Because domain names are alphabetic, they're easier to remember.
• The Internet however, is really based on IP addresses.
• Every time you use a domain name, therefore, a DNS service must translate
the name into the corresponding IP address.
• For example, the domain name www.example.com might translate to
198.105.232.4.
• The DNS system is, in fact, its own network. If one DNS server doesn't know
how to translate a particular domain name, it asks another one, and so on,
until the correct IP address is returned.

67
Features of the DNS protocol and it supports DNS services

• Convert the numeric address into a simple, recognizable name.

68
DNS protocol and How it supports DNS services
 Easier to remember www.cisco.com than 198.132.219.25
 If the number is changed the domain name will remain www.cisco.com,
it’s transparent
 DNS uses a distributed set of servers to resolve the names associated
with these numbered addresses.
 When configuring a network device
 We provide the DNS server address
 Usually the ISP provides the address
 OS have nslookup
 allows the user to manually query the name servers to resolve a
given host name
 used to troubleshoot name resolution issues and to verify the current
status of the name servers
• nslookup bdu.edu.et 69
70
Transport layer protocols
• The two most common Transport layer protocols of TCP/IP protocol suite are

 Transmission Control Protocol (TCP)


 User Datagram Protocol (UDP)
• Both protocols manage the communication of multiple applications. The
differences between the two are the specific functions that each protocol
implements.
Transmission Control Protocol (TCP)
 Creates a reliable connection between two computers
 a connection-oriented protocol
 TCP guarantees delivery of data and also guarantees that packets will be
delivered in the same order in which they were sent
 Operates in the transport layer of OSI model 71
UDP(User Datagram Protocol)
• belongs to the Transport layer of the OSI model
• Unlike TCP, however, UDP is a connectionless transport service.
• In other words, UDP offers no assurance that packets will be received in
the correct sequence.
• It can be useful in situations in which a great volume of data must be
transferred quickly, such as live audio or video transmissions over the
Internet
• The pieces of communication are called datagrams
 Applications that use UDP include:
 Domain Name System (DNS)
 Video Streaming
 Voice over IP (VoIP)
 Applications that use TCP are:
 Web Browsers
 E-mail
 File Transfers 72
TCP and UDP Header Lines

73
Fields belonging to a TCP segment
• Source port—Indicates the port number at the source node. One example
is port 80, which is typically used to accept Web page requests from the
HTTP protocol.
• Destination port—Indicates the port number at the destination node. The
Destination port field is 16 bits long.
• Sequence number —Identifies the data segment’s position in the stream
of data segments already sent. The Sequence number field is 32 bits long.
• Acknowledgment number (ACK)—Confirms receipt of the data via a
return message to the sender. The Acknowledgment number field is 32
bits long.
• TCP header length —Indicates the length of the TCP header. This field is
four bits long.
74
• Checksum??????? —Allows the receiving node to determine
whether the TCP segment became corrupted during transmission.
The Checksum field is 16 bits long.
• Options —Specifies special options, such as the maximum
segment size a network can handle. The size of this field can vary
between 0 and 32 bits
• Data —Contains data originally sent by the source node.
• Reserved ??????—A 6-bit field reserved for later use
• Window —Indicates how many bytes the sender can issue to a
receiver while acknowledgment for this segment is outstanding
• Urgent pointer —Indicates a location in the data field where
urgent data resides. This field is 16 bits long.
75
 Port Addressing (>netstat)
 Role of Port Numbers in the TCP and UDP protocols
 keep track of the various apps that are communicating
 differentiate segments and datagram for each apps
 How Port Numbers are assigned
 Depending on whether the message is a request or a response
 While server processes have static port numbers assigned to them, clients
dynamically choose a port number for each conversation
 Port Addressing
 Server Side /Statically assigned/
 Client Side /Dynamically assigned/
 When a client application sends a request to a server application, the
destination port contained in the header is the port number that is assigned to
the service daemon running on the remote host
 E.g: HTTP request to a server uses
 Destination port 80 / 8080
 Source randomly generated 49152
76
 The Internet Assigned Numbers Authority (IANA) assigns port numbers
 IANA is responsible for assigning various addressing standards

77
 Port Addressing: Types
 Well Known Ports (0 to 1023)
 reserved for services and apps
 Registered Ports (1024 to 49151)
 assigned to user processes or apps
 Dynamic or Private/Ephemeral Ports (49152 to 65535)
 assigned dynamically to client apps when initiating a connection
 Some applications may use both TCP and UDP.
 For example, the low overhead of UDP enables DNS to serve many
client requests very quickly.
 Sometimes, however, sending the requested information may require the
reliability of TCP. In this case, the well known port number of 53 is
used by both protocols with this 78
79
 Server process in TCP
 Role of port numbers in establishing TCP sessions and directing
segments to destination & source

80
• UDP characteristics & types of communication for which it is
best suited

81
• Datagram Reassembly

82
Network layer protocols
Internet Protocol (IP)
 Provides addressing scheme.
 IP specifies the format of packets, also called datagrams, and the
addressing scheme.
 Most networks combine IP with a higher-level protocol called
Transmission Control Protocol (TCP), which establishes a
virtual connection between a destination and a source.
 The current version of IP is IPv4.
 A new version, called IPv6 is under development.
 Network Layer Protocols:
 Internet Protocol version 4 (IPv4)
 The most widely-used version of IP
 is used to carry user data over the Internet
 Internet Protocol version 6 (IPv6) & others
 developed and being implemented in some areas.
83
 IPv6 will operate alongside IPv4 and may replace it in the future
 Basic Characteristics and Role of IPv4 protocol
 Connectionless - No connection is established before sending
data packets
 Best Effort (unreliable) - No overhead is used to guarantee
packet delivery
 Media Independent - Operates independently of the medium
carrying the data

84
 Basic Characteristics and Role of IPv4 protocol
 Connectionless Service & its implication
 Does not require initial exchange of information b\n end host
 Low overhead of IP

85
 Basic Characteristics and Role of IPv4 protocol
 Best Effort Service & its implication
 IP protocol does not burden the IP service with providing
reliability
 Unreliable means simply that IP does not have the capability to
manage, and recover from, undelivered or corrupt packets.

86
 Basic Characteristics and Role of IPv4 protocol
 Media Independent & its implication
 Transport of IP packets is not limited to any particular medium.
 Except the maximum size of PDU(Protocol Data Unit) that
each medium can transport
 Referred to as MTU (Maximum Transmission Unit)

87
IP Service
• IP supports the following services:
• one-to-one (unicast)
• one-to-all (broadcast)
• one-to-several (multicast)

unicast
broadcast multicast

• IP multicast also supports a many-to-many service.


• IP multicast requires support of other protocols (IGMP, multicast routing)
88
 IPv4 Packet Header & its role
 A Typical IPv4 Packet

89
 IPv4 Packet Header & its role
 Fields in the header & their function
 fields contain binary values that the IPv4 services reference as
they forward packets across the network.
 The 6 key fields of IPv4 packet header
 IP Source Address- 32-bit value represent L3 source address
 IP Destination Address- 32-bit value represent L3 Destination
 Time-to-Live (TTL)- 8-bit value that indicates the remaining "life"
of the packet (E.g. ICMP packet TTL: 128)
 Type-of-Service (ToS)-contains an 8-bit binary value that is used to
determine the priority of each packet.
 Protocol- 8-bit binary value indicates the data payload type that the
packet is carrying. Enables the L3 to pass the data to the appropriate
upper-layer protocol (E.g. 01 ICMP, 06 TCP & 17 UDP)
 Fragment Offset- identifies the order in which to place the packet
fragment in the reconstruction
90
Other IPv4 Header Fields
• Version - Contains the IP version number (4)
• Header Length (IHL) - Specifies the size of the packet header.
• Packet Length - This field gives the entire packet size, including
header and data, in bytes.
• Identification - This field is primarily used for uniquely
identifying fragments of an original IP packet
• Header Checksum - The checksum field is used for error
checking the packet header.
• Options - There is provision for additional fields in the IPv4
header to provide other services but these are rarely used.

91
Network layer Protocols. . .
Address Resolution Protocol(ARP)??????????????
 Address Resolution Protocol is used to translate 32 bits IP addresses to 48
bits Ethernet addresses.
 ƒ A host’s physical address is determined by broadcasting its IP address to
all machines.
 ƒThe machine with matching IP address, in broadcast message, sends its
hardware address to the machine originating broadcast.

92
Network layer Protocols…
Reverse Address Resolution Protocol(RARP)???????????
• Reverse Address Resolution Protocol is used to get the 32 bits Source
IP address, knowing the 48 bits Hardware address.
• It is reverse of ARP, hence named Reverse Address Resolution Protocol.
• A diskless workstation broadcasts RARP Request to find its IP Address
at the time of boot up.
• diskless workstation—workstations that do not contain hard disks, but
rely on a small amount of read-only memory to connect to a network.

93
RARP operation

94
Network layer protocol….
Internet Control Message Protocol (ICMP)?????????
• ICMP (Internet Control Message Protocol) is a Network layer
protocol that reports on the success or failure of data delivery.
• It can indicate when part of a network is congested, when data
fails to reach its destination, and when data has been
discarded because the allotted time for its delivery (its TTL)
expired.
• ICMP announces these transmission failures to the sender,
but ICMP cannot correct any of the errors it detects; those
functions are left to higher-layer protocols, such as TCP.
• However, ICMP’s announcements provide critical information
for troubleshooting network problems. 95
Network layer Protocols…
IGMP (Internet Group Management Protocol)
• Operates at the Network layer and manages multicasting.
• Multicasting is a transmission method that allows one node to
send data to a defined group of nodes .
• Multicasting can be used for teleconferencing or
videoconferencing over the Internet, for example.
• Routers use IGMP to determine which nodes belong to a certain
multicast group and to transmit data to all nodes in that group

96

You might also like