Network Models: Ambo University Woliso Campus Technology and Informatics School Department of Computer Science
Network Models: Ambo University Woliso Campus Technology and Informatics School Department of Computer Science
Network Models
1
Network Models
Computer networks are created by different
entities.
Standards are needed so that these heterogeneous
networks can communicate with one another.
The two best-known standards are the OSI model
and the TCP/IP model.
Protocols are sets of instructions designed and
coded by programmers.
2
The OSI Model
It was developed by the International Organization for
Standardization (ISO).
It is a model for a computer protocol architecture
and as a framework for developing protocol
standards.
An ISO standard that covers all aspects of network
communications is the Open Systems Interconnection
(OSI) model.
Comprises of seven layers
3
Advantages of OSI
Network communication is broken into smaller,
more manageable parts.
Allows different types of network hardware and
software to communicate with each other.
All layers are independent and changes does not
affect other layers.
Easier to understand network communication.
4
Why layered communication?
To reduce complexity of communication task by
splitting it into several layered small tasks
• assists in protocol design
• foster competition
• changes in one layer do not affect other layers
• provides a common language
5
Summary of OSI Layers
6
LAYER 7: APPLICATION
7
LAYER 6: PRESENTATION
session, regulating which side transmits, plus when and how long
it transmits (Full duplex)
Synchronization: Allows processes to add check points. E.g.
Insert check point at every 100 pages of 2000 pages file to ensure
that each 100-page unit is received & acknowledged.
9
LAYER 4: TRANSPORT
It regulates information flow to ensure process-to- process connectivity
between host applications reliably and accurately
Adds service point address or Port address
Segmentation & Re-assembly: SEGMENTS data from sending node
and reassembles data on receiving node
Flow control / Error control at Source to destination level
Connection oriented transport service ensures that data is delivered
error free, in sequence with no losses or duplications
Establishes, maintains and terminates virtual circuits
Connection oriented / Connectionless:
-TCP (Reliable, provides guaranteed delivery),
-UDP (Unreliable, less overhead, reliability can be provided by
the Application layer)
Provides multiplexing: the support of different flows of data to
10
different applications on the same host
LAYER 3: NETWORK
11
LAYER 2: DATA LINK
Packages raw bits from the physical layer into FRAMES
The data link layer provides reliable transit of data across a
physical link by using the Media Access Control (MAC)
addresses
Source & Destination ( address of device that connects one Network
to next) address
Flow Control: refers to a set of procedures used to restrict the amount of
data that the sender can send before receiving an acknowledgement
Error Control: refers to both error detection and error correction
13
Data Link- Layer 2
e.g. of a simple data frame.
The sender ID represents the address of the computer that is sending the
information.
The destination ID represents the address of the computer to which the
information is being sent.
The control information is used for frame type, and routing information.
The cyclical redundancy check (CRC) provides error correction and
verification.
14
Layer 1: Physical Layer
Physical Layer
Define physical characteristics of network. E.g. wires,
connector, voltages, data rates, Asynchronous, Synchronous
Transmission
Handles bit stream or binary transmission
Used to maintain, activate and deactivate physical link.
For receiver it reassembles bits and send to upper layer for
frames.
For Sender it convert frames
into bit stream and send on
transmission medium.
15
Properties of Physical Layers
Deals with bit stream.
Transmits raw bit stream over physical cable
defines cables, cards, and physical aspects
defines NIC attachments to hardware, how cable is
attached to NIC
defines techniques to transfer bit stream to cable
Layer 1 Device: Repeater, Hub, Multiplexer
16
Physical layer physical
connection
18
Data Encapsulation
Data Encapsulation is the process of adding a header to
wrap/envelop the data that flows down the OSI model.
The 5 Steps of Data Encapsulation are:
1. The Application, Presentation and Session layers create DATA
from users' input.
2. The Transport layer converts the DATA to SEGMENTS
3. The Network layer converts the Segments to Packets (datagram)
4. The Data Link layer converts the PACKETS to FRAMES
5. The Physical layer converts the FRAMES to BITS.
19
OSI Reference Model
The TCP/IP protocol suite was developed prior to the OSI model.
Therefore, the layers in the TCP/IP protocol suite do not match
exactly with those in the OSI model.
21
Layers in the TCP/IP Protocol Suite
b. Categorization into
Five layers
22
The key features of a protocol
In the context of data networking, a protocol is a formal set of
rules and conventions that governs how computers exchange
information over a network medium.
The peer layers communicate by means of formatted blocks of
data that obey a set of rules or conventions known as a
protocol. The key features of protocol are:
Syntax – Syntax.-refers to the structure or format of the data,
meaning the order in which they are presented.
Semantics - control info. & error handling
Timing - speed matching & sequencing-decides when data
should be sent and how fast they can be sent.
23
OSI and TCP/IP similarities
Similarities include:
Both have layers.
services.
Both have comparable transport and network layers.
application layer.
TCP/IP combines the OSI data link and physical layers into the
TCP/IP protocols are the standards around which the Internet developed,
26
TCP/IP Process/Application layer
These process integrate the various activities and duties
spanning the focus of the OSI’s corresponding top three
layers (Application, Presentation, and Session).
Controls user-interface specifications.
27
TCP/IP Host-to-Host/Transport layer
The Host-to-Host layer parallels the functions of the OSI’s
Transport layer, defining protocols for setting up the level of
transmission service for applications.
It tackles issues like creating reliable end-to-end
communication and ensuring the error-free delivery of data.
It handles packet sequencing and maintains data integrity.
28
TCP/IP INTERNET LAYER
The Internet layer corresponds to the OSI’s Network
layer, designating the protocols relating to the logical
transmission of packets over the entire network.
It takes care of the addressing of hosts by giving them
an IP (Internet Protocol) address and handles the
routing of packets among multiple networks.
29
TCP/IP NETWORK ACCESS LAYER
30
Some TCP/IP Protocols
31
Some of application layer
protocols and their functions
32
Application layer protocol- Simple Mail
Transfer Protocol (SMTP)
Governs the transmission of mail messages and attachments
SMTP is used in the case of outgoing messages
More powerful protocols such as POP3 and IMAP4 are
needed and available to manage incoming messages
POP3(Post Office Protocol version 3) is the older protocol
IMAP4(Internet Mail Access Protocol version 4) is the
more advanced protocol
33
Application layer protocol- Telnet
Telnet is a protocol used to log on to remote hosts using the
TCP/IP protocol suite.
Using Telnet, a TCP connection is established and keystrokes
on the user’s machine act like keystrokes on the remotely
connected machine.
Often, Telnet is used to connect two dissimilar systems (such as
PCs and UNIX machines).
Through Telnet, you can control a remote host over LANs and
WANs such as the Internet.
For example, network managers can use Telnet to log on to a
router from a computer elsewhere on their LAN and modify the
router’s configuration.
34
Application layer protocol- File Transfer Protocol (FTP)
35
36
37
Trivial File Transfer Protocol (TFTP)
Trivial File Transfer Protocol (TFTP) is stock version of FTP,
but it’s the protocol of choice if you know exactly what you
want and where to find it because it’s fast and so easy to use!
But TFTP doesn’t offer the abundance of functions that FTP
does because it has no directory-browsing abilities,
meaning that it can only send and receive files
39
SNMP
40
Hypertext Transfer Protocol (HTTP)
It’s used to manage communications between web
browsers and web servers and opens the right resource
when you click a link, wherever that resource may actually
reside.
In order for a browser to display a web page, it must find
the exact server that has the right web page, plus the exact
details that identify the information requested.
The browser can understand what you need when you enter
a Uniform Resource Locator (URL), which we usually refer
to as a web address, e.g. http://www.lammle.com/forum and
http://www.lammle.com/blog.
Each URL defines the protocol used to transfer data, the
name of the server, and the particular web page on that
41
server.
42
Hypertext Transfer Protocol Secure
(HTTPS)
Hypertext Transfer Protocol Secure (HTTPS) is also known
as Secure Hypertext Transfer Protocol.
It uses Secure Sockets Layer (SSL).
Sometimes you’ll see it referred to as SHTTP or S-HTTP,
which were slightly different protocols, but since Microsoft
supported HTTPS, it became the de facto standard for
securing web communication.
But no matter-as indicated, it’s a secure version of HTTP
that arms you with a whole bunch of security tools for
keeping transactions between a web browser and a
server secure.
43
Domain Name Service (DNS)
The Domain Name System (DNS) is a directory lookup
service that provides a mapping between the name of a host
on the Internet and its numerical address.
Domain Name Service (DNS)-resolves hostnames- to IP
addresses specifically, Internet names, such as www.au.edu.et
But you don’t have to actually use DNS. You just type in the
IP address of any device you want to communicate with and
find the IP address of a URL by using the Ping program.
44
Domain Name System (DNS)
Resolves domain names to IP addresses and vice
versa
•An IP address identifies hosts on a network and the
Internet as well, but DNS was designed to make our
lives easier.
•The IP address would change and no one would know
what the new one was.
•DNS allows you to use a domain name to specify an IP
www.amu.edu.et 10.1.0.15
address. DNS Server
45
Domain Name
A domain name is represented by a series of
character strings, called labels, separated by dots.
Each label represents a level in the domain naming
hierarchy.
E.g In the domain name www.google.com, com is
the top-level domain (TLD), google is the second-
level domain, and www is the third-level domain.
Each second-level domain can contain multiple
third level domains.
E.g In addition to www.google.com, Google also
owns the following domains: news.google.com,
46 maps.google.com, and mail.google.com.
DNS cont’d…
The very last section of the domain is called its top-
level domain (TLD) name
15-47
Top-level domains, including some relatively new ones
48
Dynamic Host Configuration Protocol
(DHCP)
Dynamic Host Configuration Protocol (DHCP) assigns IP
addresses to hosts dynamically.
It allows for easier administration and works well in small
to very large network environments.
Many types of hardware can be used as a DHCP server,
including a Cisco router.
A DHCP address conflict occurs when two hosts use the
same IP address. This sounds bad, and it is!
49
A lot of information a DHCP server can provide to a host
when the host is requesting an IP address from the DHCP
server.
Here’s a list of the most common types of information a
DHCP server can provide:
IP address
Subnet mask
Domain name
Default gateway (routers)
DNS server address
50
This is the four-step process a client takes to receive an IP
address from a DHCP server:
1. The DHCP client broadcasts a DHCP Discover
message looking for a DHCP server (Port 67).
2. The DHCP server that received the DHCP Discover
message sends a layer 2 unicast DHCP Offer message
back to the host.
3. The client then broadcasts to the server a DHCP Request
message asking for the offered IP address and possibly
other information.
4. The server finalizes the exchange with a unicast DHCP
Acknowledgment message.
Etc….
51
Some of Transport layer
protocols and their functions
52
TCP(Transmission Control Protocol)
TCP: takes large blocks of information from an
application and breaks them into segments.
It numbers and sequences each segment to keep the
order the application intended.
After these segments are sent on the transmitting host,
TCP waits for an acknowledgment of the receiving
end’s.
Retransmitting any segments that aren’t acknowledged.
It is Connection oriented means that a virtual connection
is established before any user data is transferred.
53
TCP cont’d..
TCP can also recognize duplicate messages and will
discard them appropriately.
If the sending computer is transmitting too fast for the
receiving computer, TCP can employ flow control
mechanisms to slow data transfer.
TCP can also communicates delivery information to the
upper-layer protocols and applications it supports.
All these characteristics makes TCP an end-to-end
reliable transport protocol.
54
TCP SEGMENT FORMAT
15-55
Some of fields in TCP segment
Source port : This is the port number of the application on
the host sending the data.
Destination port: This is the port number of the application
requested on the destination host.
Sequence number: A number used by TCP that puts the
data back in the correct order or retransmits missing or
damaged data during a process called sequencing.
Acknowledgment number: The value is the TCP octet that
is expected next.
56
Cont’d…
58
UDP cont’d…
59
UDP cont’d…
NOTE:
Since UDP assumes that the application will use its own
reliability method, it doesn’t use any itself.
This presents an application developer with a choice
when running the Internet Protocol stack: TCP for
reliability or UDP for faster transfers.
TCP sequences the segments so they get put back
together in exactly the right order, which is something
UDP just can’t do.
60
UDP in short
Minimum overhead.
Used to send short messages.
Not reliable as TCP (out of order, missing datagram, duplicate
datagram).
Lack of flow control and error control
Faster and efficient
Communication takes place using ports.
Header contains following information:
Source port number (16 bits)
Destination port number (16 bits)
Total length(16 bits)
checksum(16 bits)
61
62
63
Some of Internet or Network layer protocols and
their functions
64
Internet Protocol (IP) (Layer 3 protocol)
Used for data communication in packet switched network
Unreliable and connectionless (no specific path)
Unreliable
Data corruption
Packet lost
Out of order
Packet called Datagram
Internetworking computers
Internet Protocol versions: IPv4, IPv6
65
IP
66
Cont’d…
Source & destination IP address (32 bits each): contain IP
address of sender and intended recipient.
Options (variable length): Mainly used to record a route, or
timestamps, or specify routing.
Identification: copied into fragment, allows destination
to know which fragments belong to which datagram
Fragment Offset (12 bits): specifies the offset in the
original datagram of the data being carried in the
fragment
Measured in units of 8 bytes starting at 0
Flags (3 bits): control fragmentation
67
ARP Protocol (layer 3)
Stands for address resolution protocol
Finding physical address from logical address
Host or router transmit IP datagram packet containing
logical address obtained from DNS.
Query is broadcast but reply is uncast.
Request contains sender and receiver IP plus sender
physical address.
Reply contains physical address of the receiver.
68
Cont’d…
Reverse of ARP=RARP
Finding logical address from physical address
Request broadcast to network reply is uncast.
Based on client/server protocol.
69
70
ICMP (Internet Control Message Protocol)(Layer 3)
Used to report errors with delivery of IP data.
E.g. if particular service or host not reachable or to check
routers are correctly routing .
Ping tool uses ICMP to check host is reachable and how
long it takes to reach.
ICMP message is delivered in IP packet.
Error reporting not error correction.
Two types of messages
Error reporting message
Problems with router or host e.g. destination unreachable, time exceeded,
parameters problem
Query message
71 Help in getting specific information. e.g. neighbors
ICMP Errors
Network Errors:
Host or network unreachable
Network congestion message:
When router buffers too many packets, and don’t
process with same speed as received, generates
source quench message. Too many messages results
congestion.
Time exceed
ICMP timeout message is generated when host is
unreachable.
72
IGMP Layer 3
Internet Group Management Protocol
IGMP-is used to facilitate the simultaneous
transmission of a message to a group of recipients.
Protocol that manages group membership.
Provides information to multicast routers about
the membership status of hosts.
Routers use IGMP to determine which hosts
belong to a multicast group
Hosts use IGMP to join or leave a multicast
group.
73