Download as pdf or txt
Download as pdf or txt
You are on page 1of 95

Introduction

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 1: Outline
1.1 DATA COMMUNICATIONS
• Components
• Data Flow
1.2 NETWORKS
• Network Criteria
• Physical Structures
• Type of Connection
• Physical Topology
1.3 NETWORK TYPES
• Local Area Network
• Wide Area Network
• Point-to-Point WAN
• Switched WAN
1.4 THE INTERNET
1.5 STANDARDS AND ADMINISTRATION
1-1 DATA COMMUNICATIONS

Data communications is the exchange of data between


two devices via some form of transmission medium
such as a wire cable.
Components of Communication System

1. Sender
2. Receiver
3. Transmission medium
4. Message
5. Protocol: A protocol is a set of rules that govern data-communications.
Data Flow: Simplex

• For example: The monitor can only accept output.


• Entire-capacity of channel is used to send the data in one direction.

Data Flow: Half-duplex

• Both the stations can transmit as well as receive but not at the same time.
• For example: Walkie-talkies
• Entire-capacity of a channel is used by one of the 2 stations that are transmitting the data.

Data Flow: Full-duplex

• Both stations can transmit and receive at the same time.


• For example: Mobile phones Entire-capacity of a channel is shared by both the stations that
are transmitting the data.
1-2 NETWORKS

A network is the interconnection of a set of devices


capable of communication using media links.
Physical Structures: Type of Connection

1 - Point-to-point
• Only two devices are connected by a dedicated-link.
• Entire-capacity of the link is reserved for transmission between those two devices.

2- Multipoint

• Three or more devices share a single link.


• The capacity of the channel is shared, either
Spatially (space)
or temporally (time)
Physical Structures: Physical Topology
Physical Structures: Mesh Topology

◼ Pros:
◼ Dedicated links
◼ Robustness
◼ Privacy
◼ Easy to identify fault
◼ Cons:
◼ A lot of cabling
◼ I/O ports
◼ Difficult to move
• Number of duplex-mode links n(n-1)/2
• n – 1 input/output (I/O) ports
Figure 1.4 A fully connected mesh topology (five devices)
Physical Structures: Star Topology

◼ Pros:
◼ One I/O port per device
◼ Little cabling
◼ Easy to install
◼ Robustness
◼ Easy to identify fault

◼ Cons:
◼ Single point of failure
Figure 1.5 A star topology ◼ More cabling still required
connecting four stations ◼ Number of nodes in
network depends on
capacity of hub
Physical Structures: Bus Topology

Figure 1.6 A bus topology connecting three stations

◼ Pros: ◼ Cons:
◼ Little cabling ◼ Difficult to modify
◼ Easy to install ◼ Difficult to isolate fault
◼ Break in the bus cable
stops all transmission
◼ Security is very low
Physical Structures: Ring Topology

Figure 1.8 A ring topology


connecting six stations

◼ Pros: ◼ Cons:
◼ Easy to install ◼ Delay in large ring
◼ Easy to identify fault ◼ Break in the ring stops all
transmission
◼ Security is very low
1-3 NETWORK TYPES

• Local Area Network - LAN


• Wide Area Network - WAN
LAN

• LAN is used to connect computers in a single office, building


or campus.
• LAN is usually privately owned network.
• Each host in a LAN has an address that uniquely defines the
host in the LAN.
• LANs use a smart connecting switch.
• Advantages:
1. Resource Sharing
Computer resources like printers and hard disks can be
shared by all devices on the network.
2. Expansion: Nowadays, LANs are connected to WANs to
create communication at a wider level.
Figure 1.8 An isolated LAN in the past and today
WAN

• WAN is used to connect computers anywhere in the world.


• WAN can cover larger geographical area. It can cover cities,
countries and even continents.
• WAN interconnects connecting devices such as switches,
routers, or modems.
• A WAN can be of 2 types:
1. Point-to-Point WAN: a network that connects 2 communicating
devices through a transmission media.
2. Switched WAN: a network with more than two ends.
• The switched WAN can be the backbones that connect the
Internet.
Point-to-Point WAN

Switched WAN
Differences between a LAN and a WAN
LAN WAN
limited in size, spanning an wider geographical span,
office, a building, or a campus spanning a town, a state, a
country, or even the world
interconnects hosts interconnects connecting
devices such as switches,
routers, or modems
privately owned by the created and run by
organization that uses it communication companies and
leased by an organization that
uses it
High speed Low speed
Easy Design & maintenance Difficult Design & maintenance
Figure 1.12 A heterogeneous network made of four WANs and two LANs

internet: inter-network
1-3 THE INTERNET

An internet (note the lowercase i) is two or more


networks that can communicate with each other. The
most notable internet is called the Internet (uppercase I),
and is composed of thousands of interconnected
networks.

The Internet is a communication system that has


brought a wealth of information to our fingertips
and organized it for our use.
Figure 1.15 The Internet today
The Internet today

• Backbones and provider networks are also called


Internet Service Providers (ISPs).
• The backbones are often referred to as international
ISPs;
• The provider networks are often referred to as
national or regional ISPs.
1-5 STANDARDS AND ADMINISTRATION

Internet Standards
An Internet standard is a thoroughly tested
specification that is useful to and adhered to by those
who work with the Internet. It is a formalized
regulation that must be followed.

Internet Administration
Various groups that provide support for the Internet
standards process
Network
Models

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
2.1 PROTOCOL LAYERING
• Scenarios
• Principles of Protocol Layering
• Logical Connections
2.2 TCP/IP PROTOCOL SUITE
• Layered Architecture
• Layers in the TCP/IP Protocol Suite
• Encapsulation and Decapsulation
• Addressing
2.3 THE OSI MODEL
• OSI versus TCP/IP
• Lack of OSI Model’s Success
2-1 PROTOCOL LAYERING
• A protocol defines the rules that both the sender and receiver
and all intermediate devices need to follow to be able to
communicate effectively.
• When communication is simple, we may need only one simple
protocol.
• When communication is complex, we need to divide the task
between different layers.
• We need a protocol at each layer, or protocol layering.
• Protocol layering enables us to divide a complex task into
several smaller and simpler tasks.
• A layer can be defined as a black box with inputs and
outputs, without concern about how inputs are changed to
outputs.
Protocol Layers
Principles of Protocol Layering
First Principle
• If we want bidirectional communication, we need to make each
layer able to perform 2 opposite tasks, one in each direction.
Second Principle
• The two objects under each layer at both sites should be identical.

Logical
Connections
2-2 TCP/IP PROTOCOL SUITE

• TCP/IP is a protocol-suite used in the Internet today.


• Protocol-suite refers a set of protocols organized in different layers.
• It is a hierarchical protocol made up of interactive layers, each of
which provides a specific functionality.
Layered Architecture
• Let us assume that computer A communicates with computer B.
• As the Figure 2.5 shows, we have five communicating devices:

1) Source host(computer A)
2) Link-layer switch in link 1
3) Router
4) Link-layer switch in link 2
5) Destination host
(computer B).
Layered Architecture
• Each device is involved with a set of layers depending on the
role of the device in the internet
• The two hosts are involved in all five layers.
• The source host:
✓ creates a message in the application layer
✓ sends the message down the layers so that it is physically sent to the
destination host.
• The destination host:
✓ receives the message at the physical layer
✓ deliver the message through the other layers to the application layer.
Layered Architecture
• The router is involved in only three layers; there is no
transport or application layer.
• A router is involved in n combinations of link and physical
layers, where n = number of links the router is connected to.
• The reason is that each link may use its own data-link or
physical protocol.
• A link-layer switch is involved only in two layers: i) data-link
and ii) physical.
Layers in the TCP/IP Protocol Suite

• As shown in the figure 2.6, the duty of the application,


transport, and network layers is end-to-end.
• However, the duty of the data-link and physical layers is hop-
to-hop. ( A hop is a host or router).
Encapsulation and Decapsulation
Encapsulation and Decapsulation
Encapsulation at the Source Host
1. At the application layer :
• The data to be exchanged is referred to as a message.
• A message normally does not contain any header.
• The message is passed to the transport layer.
2. At the transport layer:
• TL adds its own header to the payload.
• The transport-layer packet is called the segment (in TCP) and the user
datagram (in UDP).
• The segment is passed to the network layer.
3. At the network layer :
• NL adds its own header to the payload.
• The network-layer packet is called a datagram.
• The datagram is passed to the data-link layer.
4. At the Data-Link layer :
• DLL adds its own header to the payload.
• The link-layer packet is called a frame.
• The frame is passed to the physical layer for transmission
Encapsulation and Decapsulation
Decapsulation and Encapsulation at the Router
At the router, we have both encapsulation & encapsulation and because the
router is connected to two or more links.
1) Data-link layer:
✓ receives frame from physical layer
✓ decapsulates the datagram from the frame
✓ passes the datagram to the network layer.
2) The network layer:
✓ inspects the source and destination addresses in the datagram header
✓ consults forwarding table to find next hop to which the datagram is to
be delivered.
✓ The datagram is then passed to the data-link layer of the next link.
3) The data-link layer of the next link:
✓ encapsulates the datagram in a frame and
✓ passes the frame to the physical layer for transmission.
Encapsulation and Decapsulation
Decapsulation at the Destination Host
At the destination host, each layer
✓ decapsulates the packet received from lower layer
✓ delivers the payload to the next-higher layer
Addressing
• We have logical communication between pairs of layers.
• Any communication that involves 2 parties needs 2 addresses:
source address and destination address.
• We need 4 pairs of addresses (Figure 2.9):
2-3 THE OSI MODEL
• OSI (Open Systems Interconnection) model was developed by ISO
(International Organization for Standardization).
• ISO is the organization, OSI is the model.
• Purpose: OSI was developed to allow systems with diff.
platforms to communicate with each other.
• Platform means hardware, software or operating system.
• OSI is a network-model that defines the protocols for network
communications.
• OSI has 7 layers as follows
(Figure 2.11):
• Each layer has specific
duties to perform and has
to co-operate with the
layers above & below it.
OSI vs. TCP/IP
The four bottommost layers in the OSI model & the TCP/IP model are same
(Figure 2.12). However, the Application-layer of TCP/IP model corresponds to
the Session, Presentation & Application Layer of OSI model.
Lack of OSI Model’s Success
• OSI was completed when TCP/IP was fully in place and a lot
of time and money had been spent on the suite; changing it
would cost a lot.
• Some layers in the OSI model were never fully defined.
• When OSI was implemented by an organization in a different
application, it did not show a high enough level of
performance
Chapter 3
Introduction
To Physical
Layer

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 3: Outline
3.1 DESCRIPTION OF PHYSICAL LAYER
3.2 ANALOG AND DIGITAL SIGNALS
3.3 REPRESENTING DATA BY A DIGITAL SIGNAL
3.4 TRANSMISSION IMPAIRMENT
Attenuation Distortion Noise
3.5 PERFORMANCE
Bandwidth Throughput Delay
3.6 TRANSMISSION MEDIA
Guided Media: Wired
Unguided Media: Wireless
Description of Physical Layer
• The physical layer coordinates the functions required to
transmit a bit stream over a physical medium.
• Two devices are connected by a transmission medium (cable or
air).
• The transmission medium does not carry bits; it carries
electrical, electromagnetic, or optical signals.
• The physical layer
✓ receives bits from the data-link layer
✓ sends through the transmission media.
Analog and Digital Signals
Signals can be either analog or digital (Figure 3.2).
1) Analog Signal has infinitely many levels of intensity over a
period of time.
2) Digital Signal can have only a limited number of defined
values
3.2 DIGITAL SIGNALS
• Information can be represented by a digital signal.

For example:
1. 1 can be encoded
as a positive
voltage. 0 can be
encoded as a zero
voltage (Figure
3.17a).
2. A digital signal
can have more
than 2 levels
(Figure 3.17b).
3.4 TRANSMISSION IMPAIRMENT
• Signals travel through transmission media, which are not
perfect.
• The imperfection causes signal-impairment.
• This means that signal at beginning of the medium is not the
same as the signal at end of medium.
• What is sent is not what is received.
• Three causes of impairment are (Figure 3.26):
1. Attenuation
2. Distortion
3. Noise.
Attenuation
As signal travels through the
medium, its strength decreases as
distance increases. To compensate for
this loss, amplifiers are used to
amplify the signal.

Distortion
Distortion means that the
signal changes its form or
shape

Noise
Noise is defined as an external energy that
corrupts a signal.
Four types of noise: 1) Thermal Noise
2) Induced Noise 3) Crosstalk 4) Impulse Noise
3.6 PERFORMANCE

Bandwidth
• Bandwidth refers to the number of bits transmitted in one second in a link.
• Bandwidth of digital signals is calculated in bits per second (bps).

Throughput
• The throughput is a measure of how fast we can actually send data
through a network.
• A link may have a bandwidth of 1000 bps, but we can only send 200 bps
through this link

Delay
• The latency defines how long it takes for an entire message to completely
arrive at the destination from the time the first bit is sent out from the
source.
Propagation Time , Transmission Time , Queuing Time
3.6 TRANSMISSION MEDIA

A transmission medium can be broadly defined as anything that


can carry information from a source to a destination
7.2 GUIDED MEDIA

Guided media, which are those that provide a conduit


from one device to another, include twisted-pair cable,
coaxial cable, and fiber-optic cable.
Twisted-pair Cable

Unshielded Versus Shielded Twisted-Pair Cable


Coaxial Cable
Fiber-Optic Cable
7.3 UNGUIDED MEDIA: WIRELESS
Unguided media transport
electromagnetic waves without
using a physical conductor.
This type of communication is
often referred to as wireless
communication.
Propagation Methods
Radio Waves

Radio waves are used for multicast communications,


such as radio and television, and paging systems.
Microwaves

Microwaves are used for unicast communication such


as cellular telephones, satellite networks,
and wireless LANs.
Infrared

Infrared signals can be used for short-range


communication in a closed area using
line-of-sight propagation
Chapter 4
Introduction
To Data-Link
Layer

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 4: Outline

4.1 INTRODUCTION

4.2 LINK-LAYER ADDRESSING


4-1 INTRODUCTION

The Internet is a
combination of
networks glued
together by connecting
devices (routers or
switches). If a packet is
to travel from a host to
another host, it needs to
pass through these
networks.

9.3
Description of Data Link Layer
• The data-link layer is responsible for delivering data units from
one station to the next without errors.
• The link can be wired LAN/WAN or wireless LAN/WAN.
Nodes and Links
• Communication at the data-link layer is node-to-node.
• A data unit from one point in the Internet needs to pass through
many networks (LANs and WANs) to reach another point.
• Theses LANs and WANs are connected by routers.
• It is customary to refer to the two end hosts and the routers as nodes
and the networks in between as links.

9.5
Data Link Services
The data-link layer provides services to the network layer; it
receives services from the physical layer.

Framing: The data-link layer at each node needs to


encapsulate the datagram received from network layer in a
frame before sending it to the next node. The node also needs
to decapsulate the datagram from the frame and deliver it to
network layer.
Flow Control: Flow control balances the exchange of data
items between a producer and a consumer.

Error Control: The error needs first to be detected. After


detection, it needs to be either corrected at the receiver node
or discarded and retransmitted by the sending node.

9.6
Two Categories of Links
In a point-to-point link, the link is dedicated to the
two devices
In a broadcast link, the link is shared between
several pairs of devices

9.7
Two Sublayers
The data-link layer is divided into two sublayers: data link
control (DLC) and media access control (MAC).

• DLC sublayer deals with all issues common to both


point-to-point and broadcast links
• MAC sublayer deals only with issues specific to
broadcast links

9.8
4-2 LINK-LAYER ADDRESSING
• The source and
destination IP addresses
define the two ends but
cannot define which
links the datagram
should pass through.
• We need another
addressing mechanism
in a connectionless
internetwork: the link-
layer addresses of the
two nodes
• A link-layer address is
sometimes called a link
address, sometimes a
physical address, and
sometimes a MAC These two addresses are changed every time
address the frame moves from one link to another.
9.9
Three Types of addresses
The addresses in the most common LAN, Ethernet, are 48
bits (six bytes) that are presented as 12 hexadecimal digits
separated by colons.
A3:34:45:11:92:F1 BB:3A:EF:00:0A:CA
Some link-layer protocols define three types of addresses:
unicast, multicast, and broadcast.

• Unicast Address: one-to-one communication. The second


digit needs to be an even number. A2:34:45:11:92:F1
• Multicast Address: one-to-many communication. The
second digit needs to be an odd number.
A3:3B:CC:00:A9:56
• Broadcast Address: one-to-all communication. The address
is FF:FF:FF:FF:FF:FF

9.10
Address Resolution Protocol ARP
• Anytime a node has an IP datagram to send to another
node in a link, it has the IP address of the receiving node.
• However, the IP address of the next node is not helpful in
moving a frame through a link; we need the link-layer
address of the next node.
• This is the time when the Address Resolution Protocol
(ARP) becomes helpful.

Figure 9.6: Position of ARP in TCP/IP protocol suite


9.11
Address Resolution Protocol ARP
• ARP accepts an IP address from the IP protocol, maps the address to
the corresponding link-layer address, and passes it to the data-link
layer.
• Anytime a host or a router needs to find the link-layer address of
another host or router in its network, it sends an ARP request
packet.
• The packet includes the link-layer and IP addresses of the sender and
the IP address of the receiver.
• Because the sender does not know the link-layer address of the
receiver, the query is broadcast over the link using the link-layer
broadcast address.
• Every host or router on the network receives and processes the ARP
request packet, but only the intended recipient recognizes its IP
address and sends back an ARP response packet.
• The response packet contains the recipient’s IP and link-layer
addresses. The packet is unicast directly to the node that sent the
request packet
9.12
Address Resolution Protocol ARP

9.13
Figure 9.7: ARP operation
Chapter 5
Introduction to
Network
Layer

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 5: Outline

5.1 DESCRIPTION OF NETWORK LAYER


5.2 NETWORK-LAYER SERVICES
• Packetizing
• Routing and Forwarding
• Datagram Approach Connectionless Service
5.3 IPv4 ADDRESSES
• Address Space
• Classful Addressing
• DHCP
• NAT
5.1 Description of Network Layer
• The network layer is responsible for the source-to-destination
delivery of a packet across multiple network links..
• The network layer is also responsible for routing the packet.
• The routers choose the best route for each packet.

TCP/IP model defines


4 protocols:
1. IP (Internet Protocol)
2. ARP (Address
Resolution Protocol)
3. ICMP (Internet
Control Message
Protocol)
4. IGMP (Internet Group
Message Protocol)
5.1 Description of Network Layer

The role of the network-


layer is to move packets
from a sending-host to a
receiving-host.

Figure 18.1: Communication at the network layer


5.2 NETWORK-LAYER SERVICES

Packetizing
The first duty of the network layer is definitely
packetizing: encapsulating the payload in a network-
layer packet at the source and decapsulating the payload
from the network-layer packet at the destination.
Routing and Forwarding
• Forwarding: refers to transferring a packet from
incoming-link to outgoing-link within a router.
• Forwarding is a router-local action.
//////////////////////////////////////////////////////////////////////////////////////
• Routing: means determining the path taken by
packets from a sender to a receiver.
• Routing is a network-wide process.
• The Protocol that determine the paths are
referred to as routing protocol.
• Each router has a forwarding-table.
Routing and Forwarding

Forwarding Send the packet


value out of interface 2
B Data B Data

How forwarding is done?


1. Firstly, a router examines the header-value of an arriving packet.
2. Then, the router uses the header-value to index into the forwarding-table.
3. Finally, the router forwards the packet.
Datagram Approach
Connectionless Service
• Network-layer protocol treats each packet independently,
with each packet having no relationship to any other packet.
• The packets in a message may or may not travel the same
path to their destination.
5.3 IPv4 ADDRESSES

• The identifier used in the IP layer of the TCP/IP


protocol suite to identify the connection of each
device to the Internet is called the Internet address
or IP address.
• An IPv4 address is a 32-bit address that uniquely
and universally defines the connection of a host or a
router to the Internet.
• The IP address is the address of the connection, not
the host or the router.
Address Space
• An address space is the total number of addresses
used by the protocol.
• IPv4 uses 32-bit addresses, which means that the
address space is 2^32 or 4,294,967,296 (more than
four billion).
Figure 18.17: Hierarchy in addressing
Classful Addressing

• To accommodate both small and large networks,


three fixed-length prefixes were designed instead of
one (n = 8, n = 16, and n = 24).
• The whole address space was divided into five
classes (class A, B, C, D, and E).
• This scheme is referred to as classful addressing.
• Although classful addressing belongs to the past, it
helps us to understand classless addressing,
discussed later.
Figure 18.18: Occupation of the address space in classful addressing

Number of Network blocks Number of Hosts in each block


• Class A: 2^7 • Class A: 2^24
• Class B: 2^14 • Class B: 2^16
• Class C: 2^21 • Class C: 2^8
Class A block Class B block Class C block
120.0.0.0 130.10.0.0 200.20.100.0
120.0.0.1 130.10.0.1 200.20.100.1
120.0.0.2 130.10.0.2 200.20.100.2
120.0.0.3 130.10.0.3 .
.. .. .
120.0.0.255 130.10.0.255 .
200.20.100.255
120.0.1.0 130.10.1.0
120.0.1.1 130.10.1.1
120.0.1.2 130.10.1.2
.. ..
120.0.1.255 130.10.1.255

120.0.2.0 130.10.2.0
120.0.2.1 130.10.2.1
120.0.2.2 130.10.2.2
.. ..
120.0.2.255 130.10.2.255
. .
. .
120.255.255.255 130.10.255.255
Address Mask
The address mask is a 32-bit number in which the prefix bits
are set to 1s and the suffix bits are set to 0s.
It is used to find the network address

Class A mask Class B mask


255.0.0.0 255.255.0.0
120 . 30 . 10 . 1
/8 130 . 10 . 25 . 3 /16
AND 255 . 0 . 0 . 0 AND 255 .255. 0 . 0

120 . 0 . 0 . 0 130 . 10 . 0 . 0

Class C mask
255.255.255.0
200. 20 .100 .50 /24
AND 255 .255.255. 0

200. 20 .100 .0
Special Addresses
• This-host Address The only address in the block 0.0.0.0/32 is
called the this-host address.
• Limited-broadcast Address The only address in the block
255.255.255.255/32 is called the limited-broadcast address.
• Loopback Address The block 127.0.0.0/8 is called the
loopback address. A packet with one of the addresses in this
block as the destination address never leaves the host
• Private Addresses Four blocks are assigned as private
addresses: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16
DHCP

• After a block of addresses are assigned to an


organization, the network administration can manually
assign addresses to the individual hosts or routers.
• However, address assignment in an organization can be
done automatically using the Dynamic Host
Configuration Protocol (DHCP).
• DHCP is an application-layer program, using the client-
server paradigm, that actually helps TCP/IP at the
network layer.
Figure 18.27: Operation of DHCP
NAT

• In most situations, only a portion of computers in a small


network need access to the Internet simultaneously.
• A technology that can provide the mapping between the private
and universal addresses, and at the same time support virtual
private networks is Network Address Translation (NAT).
• The technology allows a site to use a set of private addresses for
internal communication and a set of global Internet addresses
(at least one) for communication with the rest of the world.
Figure 18.29: NAT
Figure 18.30: Address translation
Figure 18.31: Translation
Table 18.1: Five-column translation table

You might also like