Computer Networks Computer Networks: Taiz University, 2022 Taiz University, 2022
Computer Networks Computer Networks: Taiz University, 2022 Taiz University, 2022
Lecture 1
Dr. Abdulmalek Akqobaty
Taiz University, 2022
Data communication
Principles
Introduction to Data Communication
Data communication and networks have found ways to our business and
personal communication. People have application to communicate with other
people all over the world to discuss their social, scienti c and business
problems. This lecture is divided into ve sections.
The concept of the data communication is that, two or more pa ies (sender
and receiver or receivers), using some rules refer to as protocol, can exchange
data through a communication medium. In other words, sender and receiver
need a data communication system to exchange data. This data
communications system has ve components: sender, receiver, transmission
medium, message and protocol as shown in Figure 1.1. The following are
de nitions of these ve components: Sender, receiver, protocol, message and
transmission medium.
Source Destination
Rule 1: Rule 1:
Rule 2: Rule 2:
Protocol Protocol
::::: Message :::::
Rule N: Rule N:
Sender Receiver
Direct Link
Direct link can be either wired or wireless. Data transmission between the two
devices can be simplex, half-duplex, or full-duplex.
In simplex mode, the communication is unidirectional. Only one of the two
devices on a link can transmit and the other can only receive.
In half-duplex mode, each station can both transmit and receive, but not at
the same time. In this mode, when one device is sending, the other can only
receive. Walkie-talkies and CB (citizens band) radios are examples of half-
duplex systems.
In full-duplex mode, which is also called duplex mode, both stations can
transmit and receive simultaneously. One common example of full-duplex
communication is the telephone network. This mode is used when
communication in both directions is required all the time.
Networks
Network
A network is the interconnection of a set of devices capable of
communication. In this de nition, a device can be a host (end system) such as
a large computer, desktop, laptop, workstation, cellular phone, or security
system. Also, a device can be a connecting device such as a router, which
connects the network to other networks, a switch, a modem (modulator-
demodulator), and so on. In simplex mode, the communication is
unidirectional. Only one of the two devices on a link can transmit and the
other can only receive.
Network Principle
A network must be able to meet a number of principles. The most impo ant
of these principles are pe ormance, reliability, and security.
Pe ormance refers to measures of service quality of a network as seen by
the customer. It can be measured in many ways, including speed,
bandwidth, error rate, throughput and latency and so on. The pe ormance
of a network depends on a number of factors, including the number of
users, the type of transmission medium, the capabilities of the connected
hardware, and the e ciency of the so ware. Pe ormance is o en
evaluated by two networking metrics: throughput and delay.
Reliability is concerned with the ability of a network to carry out a desired
operation such as "communication". In addition to accuracy of delivery,
network reliability is measured by the frequency of failure, the time it takes
a link to recover from a failure, and the network’s robustness in a
catastrophe.
Network security consists of the policies adopted to protect data from
unauthorized access, protecting data from damage and alteration, and
implementing policies and procedures for recovery from breaches and data
losses.
Network
Pe ormance
Network Pe ormance
One impo ant issue in networking is the pe ormance of the network.
Network pe ormance refers to measures of service quality of a network.
There are many di erent ways to measure the pe ormance of a network, as
each network is di erent in nature and design.
Bandwidth
One characteristic that measures network pe ormance is bandwidth.
However, the term can be used in two di erent contexts with two di erent
measuring values: bandwidth in he z and bandwidth in bits per second.
In networking, the term bandwidth is used in two contexts.
The bandwidth in he z refers to the range of frequencies in a composite
signal or the range of frequencies that a channel can pass.
The bandwidth in bits per second refers to the speed of bit transmission in
a channel or link.
Throughput
The throughput is a measure of how fast we can actually send data through a
network. Although, both bandwidth and throughput in bits per second, they
are di erent.
Bandwidth is the maximum data rate of the link.
The throughput is the actual data rate of the link. In networking, the term
bandwidth is used in two contexts.
Network Pe ormance
Delay
The delay (or latency) de nes as the time that is need the entire message to
completely arrive at the destination from the time the rst bit is sent out from
the source. We can say that delay is made of four components: propagation
time, transmission time, queuing time and processing delay.
Propagation Time: Propagation time measures the time required for a bit to
travel from the source to the destination. The propagation speed of
electromagnetic signals depends on the medium and on the frequency of the
signal.
Ji er
Another pe ormance issue that is related to delay is ji er. The ji er is a
problem if di erent packets of data encounter di erent delays and the
application using the data at the receiver site is time-sensitive, such as an
audio and video data. If the delay for the rst packet is 20 ms, for the second
is 45 ms, and for the third is 40 ms, then the real-time application that uses
the packets endures ji er.
Network
Structure
Network Structures
Network Structures
To go on in discussing networks, their types, standards and model, we need to
de ne some network a ributes.
Types of Connection
As a de nition, network is two or more devices connected through links. A
link is a communications pathway that transfers data from one device to
another. For two devices to communicate, they must be connected in some
way to the same link at the same time of the communication. The two
possible types of connections are point-to-point and multipoint.
A point-to-point connection provides a dedicated link between two devices.
The entire capacity of the link is reserved for transmission between those
two devices. Most point-to-point connections use an actual length of wire
to connect the two ends.
Link
a. Point-to-point
A multipoint (multidrop) connection is one in which more than two speci c
devices share a single.
Link
Mainfram b. Multipoint
e
Network Structures
Network Topology
The term Network topology refers to the way in which a network is laid out
physically. The topology of a network is the geometric representation of the
relationship of all the links and nodes to one another. The basic topologies possible
are: mesh, star, bus and ring.
Mesh topology: In a mesh topology, n = 5 and 10 Links
every device has a dedicated point-to-
point link to every other device in the
network. The term dedicated means
that the link carries tra c only between
the two devices it connects.
Star topology: In a star topology, as
shown in Figure 1.4, each device (node,
or hub) has a dedicated point-to-point Hub
link only to a central controller, usually a
hub. A star topology does not allow
direct tra c between devices. The
controller acts as an exchange: If one
device wants to send data to another, it
sends the data to the controller, which
n = 4 and 4 Links
then relays the data to the other
connected device.
Network Topology (cont.)
Repeate Repeater
Repeate r Repeate
r Repeate Repeate r
r r
Network
Types
Network Structures
Network Types
Networks are categorized according to some criteria such as size,
geographical coverage, and ownership. In this section we discuss the two
main types of networks, LANs and WANs, then, we de ne switching, which is
used to connect networks to form an internetwork (a network of networks).
Finally we discuss the Internet.
Local Area Network
A local area network (LAN) is usually, private network, and connects some
hosts in a single o ce, building, or campus. Based on the needs of an
organization, a LAN size can be as simple as sharing some devices such as
printer or Internet access in an o ce's network.
H: Host H1 H2 H3 H4 H5 H6
Cable end
Tap
a. LAN with common cable
s
H: Host H1 H2 H3
Switch
H4 H5 H6
Transmission medium
Networ Networ
k k
Point-to-point WAN
Network Structures
Networ Networ
k k
Connecting device Connecting device
Transmission medium
Networ Network
k
Networ Networ
Transmission medium
k k
Connecting device Connecting device
Networ Networ
k k
Switched WAN
Network
Model
Network Structures
Network Model
Here, we introduce the concept of a protocol layering architecture, its need,
concept and principles. We, then, examine the most impo ant of such
architecture, the TCP/IP protocol suite model. TCP/IP is an Internet-based
layering architecture and is the framework for developing a complete range of
computer communications standards. In addition, we brie y introduce the
other well-known architecture, the Open Systems Interconnection (OSI)
reference model. Finally, we compare between the two models.
Protocol Layering
In data communication and networking, a protocol de nes the rules that
both the sender and receiver and all intermediate devices need to follow to
be able to communicate e ectively.
A simple communication needs simple protocol, but when the
communication is complex, we may need to divide the task between
di erent layers, and we need a protocol at each layer, or protocol layering.
Network Structures
Need for Protocol Layering
To provide security, TCP/IP can use secured links between systems by using VPN.
VPN links are encrypted to add privacy, con dentiality, and authentication and to
maintain data integrity. To o er secure links, VPN uses Point-to-Point Tunneling
Protocol (PPTP), Layer 2 Tunneling Protocol (L2TP), and Internet Protocol Security
(IPSec). Also, for protocol-level security, a TCP wrapper application can be used as a
rewall restricting access to po s and resources based on user IDs or system IDs. A
TCP wrappers is a form of po -based access control.
Network Structures
Comparing OSI and TCP/IP
The OSI model and the TCP/IP models were both created independently. The
TCP/IP network model represents reality in the world, whereas the OSI mode
represents an ideal. On other words, the TCP/IP network model matches the
standard layered network model as it should. The gure below shows the
relationship between the OSI model and the TCP/IP model.
LAN
A Link 1 Link 2
Router LAN
Link 3 Link 4 B
A B
Source Destination
Logical connection
Application Applicatio
Transpo n
Transpo
Network Network
Data-link Data-link
Physical Physical
Switch Router Switch
The second principle in protocol layering states that, the two objects under
each layer at both sites should be identical. The gure below the identical
objects below each layer for each device in the small Internet.
Layers Addressing
The second principle in protocol layering states that, the two objects under
each layer at both sites should be Any communication that between two
pa ies needs addresses of both source and destination. Even that we have
ve layers, we only need four addresses for the top four layers because the
unit of data exchange at the physical layer is a bit, that cannot have an address.
The last gure shows the addressing at each layer.
Layers Addresses
Application Names
Transpo Po number 4
Network Logical address
Data link Link-Layer address 2
Physical
Encapsulation/De-encapsulation
Loop Problem
The existence of redundant switch creates what is called loop problem, which
is undesirable. Note that, loops can be created only when two or more
broadcast LANs (LANs that use hubs) are connected by more than one switch.
The concept of loop problem as illustrated with the help of LANs connected by
two switches is shown by the example in Figure 1.14.
Network Structures
The IEEE speci cation requires that switches use the spanning tree algorithm to
Spanning
avoid a loop Tree Algorithm
in the system. In graph theory, a spanning tree is a graph in which there is
no loop. In a switched LAN, this means creating a topology in which each LAN can be
reached from any other LAN through one path only.
We use Figure 11.11 to shows a system with four LANs and four switches. The
spanning tree algorithm involves the following three steps:
Every switch has a built-in ID, which normally is a unique serial number. The switch
broadcasts this ID so that all switches know which one has the smallest ID. The
switch with the smallest ID is selected as the root switch (the root of the tree) as
shown in Figure 1.15 .
The algorithm tries to nd the sho est path, which is a path with the sho est cost,
from the root switch to every other switch or LAN. The sho est path can be
found by computing the total cost from the root switch to the destination. Figure
1.16 shows the sho est paths using the Dijkstra algorithm to select the sho est
path.
Finally, the combination of the sho est paths from the root switch to all other
nodes creates the sho est tree. The sho est tree for the example is shown in
Figure 1.16.
To overlay the spanning tree, we need to mark the po s that are pa of the spanning
tree as forwarding po s, which forward a frame that the switch receives. Also, we
need to mark those po s that are not pa of the spanning tree as blocking po s,
which block the frames received by the switch. Figure 1.17 shows the logical systems
Network Structures
Spanning Tree Algorithm
Figure 1.16: Finding the spanning Figure 1.17: Blocking po s a er using the
tree algorithm
Network Structures
3ARouters
router is a three-layer device, which operates in the physical, data-link, and
network layers. Like hub, as a physical-layer device, the router regenerates the
signal it receives. As a link-layer device, like switch, the router checks the
physical addresses of the source and destination, which is contained in the
frame. As a network-layer device, a router checks the network-layer
addresses.
There are three major characteristics over a hub or a switch. First, a router has
a physical (called MAC) address and logical (called IP) address for each of its
inte aces. Second, a router acts only on those packets in which the link-layer
destination address matches the address of the inte ace at which the packet
arrives. Finally, A router changes the link-layer address of the packet (both
source and destination) when it forwards the packet but it keep the network
layer address unchanged. To clarify the concept, Figure 1.18 shows and
example for the use of router.
Network Structures
4 Gateways
Up another layer from network layer, we nd transpo gateways. These
connect two computers that use di erent connection-oriented transpo
protocols. For example, suppose a computer using the connection-oriented
TCP/IP protocol needs to talk to a computer using a di erent connection-
oriented transpo protocol called SCTP. The transpo gateway can copy the
packets from one connection to the other, reforma ing them as need be. A
gateway also works on application layer as shown in Figure 1.19. Application
layer gateways understand the format and contents of the data and can
translate messages from one format to another. Like switch, gateway is
somewhat of a general term. It refers to a forwarding process that runs at a
high layer. As a consequence, it is known as an application layer relay. For
example, an email gateway could translate Internet messages into SMS
messages for mobile phones. This prope y has made it suitable for use in
Firewalls.
Network Structures
5 Vi ual LANS
In response to customer needs for more exibility, network vendors began
working on a way to connect users entirely using so ware techniques. The
resulting concept was called a vi ual local area network (VLAN) as a local area
network con gured by so ware. It has been standardized by the IEEE 802
commi ee and is now widely deployed in many organizations. VLANs are
based on VLAN-aware switches. To set up a VLAN-based network, the
network administrator decides the number of VLANs, the computers of each
VLAN, and the names of the VLANs. O en the VLANs are (informally) named
by colors.
Figure 1.21 shows an example. The whole idea of VLAN technology is to divide
a LAN into logical, instead of physical, segments.
Vi ual LANS
The example, in Figure 1.22, provides a good con guration for an organization
with more than one separated buildings. In this con guration, each building
normally can be installed whit its own switched LAN that is connected to a
backbone. Note that, some people in the rst building and some other in the
second building can be grouped in same work group even if they are connected
to di erent physical LANs.
Note that, our previous examples showed that a VLAN de nes the required
broadcast domains. VLANs group stations from one or more physical LANs into
the broadcast domains. The stations in a VLAN communicate with each other
as they are in a physical network.
Network Structures
Switches Data Exchange
In a multi-switched backbone as in Figure 1.22, each switch needs to know the
stations belong to each VLAN. Moreover it needs also the membership of
stations connected to other switches in the network. For example, switch 1
must know the membership of stations connected to switch 2, and switch 2
must know membership of stations connected to switch 1. Three methods
have been devised to exchange this information: table maintenance, frame
tagging, and time division multiplexing.
In table maintenance method, when a station sends a broadcast frame to its
group members, the switch creates an entry in a table and records station
membership to its VLAN. The switches send their tables to each other
periodically for updating their data.
In frame tagging method, an extra header is added to the MAC frame to
de ne the destination VLAN, hence when a frame is traveling between
switches, the frame tag is used by the receiving switches to determine the
VLAN that has to receive the broadcast message.
In time-division multiplexing (TDM) method, the communication link
between switches is divided into time-shared channels. For example, if the
total number of VLANs in a backbone is four, each trunk is divided into four
channels. The tra c sent for VLAN 1 travels in channel 1, the tra c sent to
VLAN 2 travels in channel 2, and so on. The receiving switch can determine
Network Structures
Switches Data Exchange
To create VLANs the network administrator uses the VLAN so ware to assign the
stations into di erent VLANs at setup. In order to assign stations in VLANs, vendors
use di erent characteristics such as inte ace numbers, po numbers, MAC
addresses, IP addresses, IP multicast addresses, or a combination of two or more of
these characteristics.
Some VLAN vendors use a switch inte ace numbers characteristic to group
stations in VLAN. For example, the administrator can de ne that stations
connecting to po s 1, 3, 4, 5, and 8 belong to VLAN 1 and so on.
Some VLAN vendors use the 48-bit MAC address characteristic to create VLANs.
For example, addresses B2:41:82:61:56:11 and E4:44:73:AA:73:21 belong to VLAN 1,
and so on.
Some vendors use the 32-bit IP address characteristic to group stations in VLANs.
For example, the administrator can de nes that stations with IP addresses
211.134.111.22, 211.134.111.56, 211.134.111.66, and 211.134.111.76 belong to VLAN1.
Some VLAN vendors use the multicast IP address characteristic to de ne VLANs.
Because VLANs works in the data-link layer, multicasting at the IP layer is
translated to multicasting at the data-link layer.
Recently, the so ware available from some vendors allows to combine all
mentioned characteristics. The administrator can choose one or more of
characteristics during the installation of the so ware. In addition, administrator
can recon gure the so ware to change the se ings.