0% found this document useful (0 votes)
14 views

Data Communication Lecture 2

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Data Communication Lecture 2

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 69

Chapter 2.

Network Models

1. Layered Tasks
2. The OSI Model
3. Layers in the OSI Model
4. TCP/IP Protocol Suite
5. Addressing

2-1
Layered Model: Sending a Letter

2-2
OSI Model
• ISO is the organization. OSI is the model

2-3
Interaction between layers in the OSI model
• Layer and interface

2-4
An exchange using the OSI model:
Encapsulation

Headers are added


to the data at layers
6, 5, 4, 3, and 2.
Trailers are usually
added only at layer 2.

5
An exchange using the OSI model

6
An exchange using the OSI model
• Encapsulation with header and possibly trailer

2-7
Physical Layer
• The physical layer is responsible for movements of individual bits
from one hop (node) to the next
• Mechanical and electrical specification, the procedures and functions

2-8
Physical Layer: Duties
• Physical characteristics of interfaces and media
• Representation of bits
• Encoded into signals – electrical or optical
• Data rate
• Synchronization of bits
• Line configuration
• Physical topology
• Transmission mode

2-9
Data Link Layer
• The data link layer is responsible for moving frames from
one hop (node) to the next
• Transform the physical layer to a reliable (error-free) link

2-10
Data Link Layer: Duties
• Framing
• Physical addressing
• Flow control
• Error control
• Access control

2-11
Hop-to-Hop Delivery

2-12
Network Layer
• The network layer is responsible for the delivery of packets
from the source host to the destination host

2-13
Network Layer: Duties
• Logical addressing and routing

2-14
Transport Layer
• The transport layer is responsible for delivery of a message
from one process to another

2-15
Transport Layer: Duties
• Service-point (port) addressing
• Segmentation and reassembly
• Connection control
• Flow control
• Error control

2-16
Reliable Process-to-Process Delivery of a Message

2-17
Session Layer
• Session layer is responsible for dialog control and
synchronization

2-18
Presentation Layer
• Presentation layer is responsible for translation,
compression, and encryption

2-19
Application Layer
• Application layer is responsible for providing services to
the user

2-20
Application Layer: Services

• Network virtual terminal


• Mail services
• File transfer, access, and management
• Directory services

2-21
Summary of Layers

2-22
TCP/IP and OSI Model

2-23
TCP/IP Protocol Suite
• Host-to-network : Physical and data link layer
• No specific protocol
• Network layer
• IP(Internet Protocl), ARP(Address Resolution Protocol),
RARP(Reverse ARP), ICMP(Internet Control Message Protocol),
IGMO(Internet Group Message Protocol)
• Transport layer
• TCP(Transmission Control Protocol), UDP(User Datagram
Protocl), SCTP(Stream Control Transmission Protocol),
• Application Layer
• Combined session, presentation, and application layers

2-24
OSI vs TCP/IP model
• TCP/IP model given prior to OSI model (in 1970s)
• OSI model would be better – not the case in real world
afterwards
• TCP/IP protocol suite became the dominant commercial
architecture because it was used and tested extensively in
the Internet
• Big companies operated only on the TCP/IP suite
• Hence OSI was never fully implemented – thus the lack of
success of the OSI model

2-25
Addressing
• Four levels of addresses in TCP/IP protocols
• Physical (link), logical (IP, network), port, and specific addresses

2-26
Relationship of Layers and
Addresses

2-27
Physical Address
• A node with physical address 10 sends a frame to a node with physical
address 87. The two nodes are connected by a link (bus topology
LAN). As the figure shows, the computer with physical address 10 is
the sender, and the computer with physical address 87 is the receiver.

07:01:02:01:2C:4B
A 6-byte (12 hexadecimal digits) physical address.

2-28
Logical (IP) Address

• The physical addresses will change from hop to hop, but the logical
addresses usually remain the same 2-29
Port Address
• The physical addresses change from hop to hop, but the logical and
port addresses usually remain the same

2-30
Port address

a port address is a 16-bit address


represented by one decimal number
as shown below.

753 --- A 16-bit port address

2-31
Specific Address
• Some application have user-friendly addresses that are designed for that
specific address
• Example 1: e-mail address: [email protected]
• Defines the recipient of an e-mail
• Example 2: URL (Universal Resource Locator) : www.cse.univdhaka.edu
• Used to find a document on the WWW

2-32
TCP/IP Protocol
VERSIONS and Addressing

33
Versions:
• Version 4 (current): 32-bit IP
address
• Version 5
• Version 6 (in promotion): 128-bit
IP address

34
IP Addresses:
Classful Addressing
An IP address is a
32-bit
address.
The IP addresses
are
unique.
One IP address points to one computer.
But a computer may have many IP addresses.
Address Space
…………..
addr1 …………..
addr15
addr2 ………….. …………..
…………..
addr41 addr226
addr31
………….. …………..
RULE:
…………..
addr1 …………..
If a protocol uses N bits to
addr15
define an…………..
addr2 address, …………..
N
the address space is 2
…………..
because each bitaddr41
can have addr226
two
addr31
different values (0 and
………….. 1)
…………..
and N bits can have 2N values.
The address space of IPv4 is
232
or
4,294,967,296.
Binary Notation

01110101 10010101 00011101


11101010
Figure 4-1
Dotted-decimal notation
Hexadecimal Notation

0111 0101 1001 0101 0001 1101 1110


1010
75 95 1D EA

0x75951DEA
Example 1

Change the following IP address from


binary notation to dotted-decimal notation.
10000001 00001011 00001011 11101111

Solution

129.11.11.239
Example 2

Change the following IP address from


dotted-decimal notation to binary notation.
111.56.45.78

Solution

01101111 00111000 00101101


01001110
Example 3

Find the error, if any, in the following IP


address:
111.56.045.78

Solution

There are no leading zeroes in


dotted-decimal notation (045).
Example 3 (continued)

Find the error, if any, in the following IP


address:
75.45.301.14

Solution

In dotted-decimal notation,
each number is less than or
equal to 255; 301 is outside this range.
Example 4

Change the following IP addresses from


binary notation to hexadecimal notation.
10000001 00001011 00001011 11101111

Solution

0X810B0BEF or 810B0BEF16
CLASSFUL
ADDRESSING
In classful addressing,
the address space is
divided into five classes:
A, B, C, D, and E.
Figure 4-3

Finding the class in binary notation


Figure 4-4
Finding the address class
Example 5

How can we prove that we have


2,147,483,648 addresses in class A?
Solution

In class A, only 1 bit defines the class.


The remaining 31 bits are available
for the address. With 31 bits,
we can have 231 or 2,147,483,648 addresses.
Example 6

Find the class of the address:


00000001 00001011 00001011 11101111

Solution

The first bit is 0. This is a class A address.


Example 6 (Continued)

Find the class of the address:


11000001 10000011 00011011 11111111

Solution

The first 2 bits are 1; the third bit is 0.


This is a class C address.
Figure 4-5

Finding the class in decimal notation


Example 7

Find the class of the address:


227.12.14.87

Solution

The first byte is 227 (between 224 and 239);


the class is D.
Example 7 (Continued)

Find the class of the address:


193.14.56.22

Solution

The first byte is 193 (between 192 and 223);


the class is C.
Netid and hostid

Network identity (network ID) is a portion of the


TCP/IP address that is used to identify individuals
or devices on a network such as a local area
network or the Internet. ... A network ID is also
known as network identification or NetID.
Netid and hostid
IP addressing (Classful Addressing)

4-61
The number of addresses in
a class C block
is smaller than
the needs of most organizations.
Class D addresses
are used for multicasting;
there is only
one block in this class.

Class E addresses are reserved


for special purposes;
most of the block is wasted.
Network Addresses
The network address is the first address.

The network address defines the network to the


rest of the Internet.
Given the network address, we can find the
class of the address, the block, and the range of
the addresses in the block
In classful addressing,
the network address
(the first address in the block)
is the one that is assigned
to the organization.
Example 9

Given the network address 17.0.0.0, find the


class, the block, and the range of the
addresses.

Solution

The class is A because the first byte is between


0 and 127. The block has a netid of 17.
The addresses range from 17.0.0.0 to
17.255.255.255.
Example 10

Given the network address 132.21.0.0, find


the class, the block, and the range of the
addresses.

Solution

The class is B because the first byte is between


128 and 191. The block has a netid of
132.21. The addresses range from
132.21.0.0 to 132.21.255.255.
Example 11

Given the network address 220.34.76.0, find


the class, the block, and the range of the
addresses.

Solution

The class is C because the first byte is between


192 and 223. The block has a netid of 220.34.76.
The addresses range from 220.34.76.0
to 220.34.76.255.
Unicast, Multicast, and
Broadcast Addresses
Unicast communication is one-to-one.

Multicast communication is one-to-many.

Broadcast communication is one-to-all.


Thank you!!! ☺

2-69

You might also like