0% found this document useful (0 votes)
22 views52 pages

Computer Networks Computer Networks: Taiz University, 2022 Taiz University, 2022

Uploaded by

alshamiripooi100
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views52 pages

Computer Networks Computer Networks: Taiz University, 2022 Taiz University, 2022

Uploaded by

alshamiripooi100
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 52

Computer Networks

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 rst section introduces data communications and de nes their


components and the types of data exchanged.
 The second section introduces networks and de nes their criteria and
structures. It also introduces the network topologies.
 The third section discusses di erent types of networks: LANs, WANs, and
internetworks (internets). It also introduces the Internet, the largest
internet in the world.
 The fou h section covers a brief history of the Internet.
 The h section covers standards and standards organizations. The
section covers Internet standards and Internet administration.
Data Communications
A communication between individuals means a sharing of information. The
common term for remote communication is telecommunication, which means
a far communication (tele means 'far' in Greek). However information can be
presented in several forms. The word data is used for the form of information
the pa ies are agreed upon and used for communications.
Data communications are the exchange of data between two or more
communication devices via some kind of transmission medium. The
transmission medium can be a wire cable or an air. The communicating
devices made up of a combination of hardware and so ware. However, for a
communication to be occurred, these communicating devices must be a pa
of a communication system. The e ciency of data communication systems is
based on four common characteristics:
The e ciency of data communication systems is based on four common
characteristics:
o The system must deliver data to the correct destination.
o The system must correctly deliver the data. This means that, the incorrect
data that have been altered through transmission process must be
discarded.
o The system must deliver data as they are produced, in the same order and
without signi cant delay.
o Other prope y related to the time is a Ji er.
The Communications Concept

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

The components of data communication system


Communications System Components
 The sender is the device that sends the data message such as a computer,
workstation, telephone device and camera.
 The receiver is the device that receives the data message such as a
computer, workstation, telephone device and camera.
 A communication between sender and receiver needs to be controlled
using some prede ned set of agreements or rules. This set of rules that
govern data communications is called a protocol is a set of rules that.
 The message is the data to be exchanged. The data can be represented in
several forms. Popular forms of data include text, numbers, pictures, audio,
and video.
 The transmission medium is the physical path by which a message travels
from sender to receiver. It can be a single link such as a twisted-pair wire,
ber-optic cable, radio waves or a complicated system such as a network,
an internetwork or the Internet.
Data
Representation
Data Representation
 Text: In computer and data communications, text is represented as a bit
pa ern, which is a sequence of bits (0s or 1s). The process of representing
symbols is called coding. For example, the American Standard Code for
Information Interchange (ASCII), developed in the United States. It
represented 127 characters for Basic Latin characters and the extended
ASCII codes (character code 128- 255). The Unicode uses 32 bits to
represent a symbol or character used in any language in the world. For
compatibility, the rst 127 characters in Unicode are also referred to as
Basic Latin.
 Numbers: As in the text data, numbers are also represented by bit pa erns.
However, a code such as ASCII is not used to represent numbers. To
simplify mathematical operations, the number is directly conve ed to a
binary number. Binary code decimal is an example of number
representation.
 Images: Images are also represented by bit pa erns. The unit of the digital
image is called pixel. In its simplest form, an image is composed of a matrix
of pixels. Note that the size of the pixel depends on the resolution. In fact,
the high resolution means a smaller size of the pixel. The clearness of the
image is based on the resolution. However, the increase of resolution
increases the need for memory. Since the pixel is the basic unit of an image,
the each pixel is assigned a bit pa ern. The size and the value of the pa ern
depend on the image type.
o For black-and-white,Data
a 1-bitRepresentation
pa ern is enough to represent a pixel. With
gray scale image, the size of the bit pa ern has to be increased to
include gray scale.
o Colored image: There are several methods to represent color images. For
example, one method is called red, green, and blue (RGB). In RGN, each
color is made of a combination of three primary colors: red, green, and
blue. The intensity of each color is measured, and a bit pa ern is
assigned to it. Another method is called yellow, cyan, and magenta (YCM)
. In this method each color is made of a combination of yellow, cyan, and
magenta colors.
 Audio: Audio refers to the recording, broadcasting, or receiving of sound or
music. Usually, audio is continuous and hence it is conve ed to continuous
electronic signal using microphone. In this way we create a continuous
signal.
 Video: Video refers to the recording, broadcasting, or receiving of a
sequence of images or movie. Actually, the video idea is more complex
than audio. The video composed of audio and moving images. Video can
either be produced as a continuous entity, by a TV camera, or it can be a
sequence of images, each a discrete entity, as in cinema lms, arranged to
convey the idea of motion.
Transmission Medium

Data can be transmi ed between the sender and receiver through a


transmission medium. The common types of transmission medium are direct
links, networks, internetworks and the Internet.

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.

Propagation time = Distance / (Propagation Speed)


 Transmission Time: The time it takes for a station to emit all of the bits of a
message onto the medium is the transmission time. The transmission time of
a message depends on the size of the message and the bandwidth of the
channel.
Transmission time = (Message size) / Bandwidth
 Queuing Time: The third component in latency is the queuing time, the time
needed for each intermediate or end device to hold the message before it
can be processed. The queuing time is not a xed factor; it changes with the
Network Pe ormance

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.)

 Bus topology: Mesh and stare topologies are examples of point-to-point


connections. A bus topology, on the other hand, is multipoint. One long
cable acts as a backbone to link all the devices in a network.

Drop line Drop line Drop line


Cable end Cable end
Tap Tap Tap Tap

 Ring topology: In a ring topology, each device has a dedicated point-to-


point connection with only the two devices on either side of it. A signal is
passed along the ring in one direction, from device to device, until it reaches
its destination. Each device in the ring incorporates a repeater. When a
device receives a signal intended for another device, its repeater
regenerates the bits and passes them along.

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

b. LAN with switch


Network Structures

Wide Area Network


A wide area network (WAN) is also an interconnection of devices capable of
communication. De nitely, there are some di erences between a LAN and a
WAN. While a LAN is normally limited in size, spanning an o ce, a building, or
a campus, a WAN has a wider geographical span, spanning a town, a country,
or even over the world.
 Point-to-Point WAN: A point-to-point WAN is a network that connects two
communicating devices through a transmission media (cable or air).
Examples of these WANs can be discussed in networks interconnecting. The
gure below shows an example of a point-to-point WAN.

Connecting device Connecting device

Transmission medium
Networ Networ
k k

Point-to-point WAN
Network Structures

Wide Area Network (cont)


 Switched WAN: While point-to-point WAN has two ends, a switched WAN
is a network has more than two ends. A switched WAN is used in the
backbone of global communication nowadays. A switched WAN Can be
viewed as a combination of several point-to-point WANs that are
connected by switches. The gure below shows an example of a switched
WAN.

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

Consider a transfer of a le between two hosts. Typical tasks to be pe ormed


are as follow:
 There must be a data bath between source system and destination either
directly or via a communication network.
 The source system must asce ain that the destination system is ready to
receive data.
 The le transfer application on the source must asce ain that the le
receive application on the destination is ready to accept and store the le.
 If the le formats used on the two systems are di erent, one of the two
systems must pe orm a format translation.
It is clear that there must be a level of cooperation between the two computer
systems. We can implement the logic of this task as a single module. Of course,
this complicates the implementation. Therefore, instead of implementing the
logic for the task as a single module, the task is broken up into subtasks, each
of which is implemented separately. In protocol architecture, the modules are
arranged in a ve ical stack of layers.
Network Structures
Principles of Protocol Layering
The following are two principles of protocol layering:
 The rst principle dictates that for bidirectional communication, we need to
make each layer is able to pe orm two opposite tasks, one for each
direction. For example, the second layer task is to encrypt in down direction
and decrypt in the other direction.
 The second principle that we need to follow in protocol layering is that the
two objects under each layer at both sites should be identical. For example,
the object under second layer at both sites should be a ciphe ext le er. The
object under layer 3 at both sites should be a plaintext le er.
As a results to the above two principles, we can think that there are three
logical connections between each layer in both sites as shown in the gure
below
Logical connection
Write/read Write/read

Encrupt/ Logical connection Encrupt/


decrypt decrypt
Send/Receive Logical connection Send/Receive
Network Structures

The OSI Model


Although, the TCP/IP protocol suite is a common model when speaking of the
Internet, but this suite is not the only model de ned. The Open Systems
Interconnection (OSI) reference model was developed by the International
Organization for Standardization (ISO) as a model for a computer protocol
architecture and as a framework for developing protocol standards. It was rst
introduced in the late 1970s.

 The OSI model consists of seven Layer 7 Application


separate but related layers, each of Layer 6 Presentation
which de nes a pa of the process of
Layer 5 Session
moving information across a network
as shown in the gure. Layer 4 Transpo

 Although the OSI model appeared Layer 3 Network


a er the TCP/IP protocol suite, the Layer 2 Data link
TCP/IP protocol has not been replaced
Layer 1 Physical
by the OSI model.
Network Structures

TCP/IP protocol suite


TCP/IP is a protocol suite used in the Internet. A protocol suite means a set of
protocols that organized in di erent layers. This protocol suite consists of a
large collection of protocols that have been issued as Internet standards by
the Internet Activities Board (IAB). It is a hierarchical protocol made up of
interactive modules, each of which provides a speci c functionality. Each
module locates in speci c level called layer. The hierarchical protocol means
that each upper level protocol is suppo ed by the services provided by one or
more lower level protocols. TCP/IP consists of a ve-layer model as shown in
the gure below.

Layer 5 Application Application


Layer 4 Transpo Transpo
Layer 3 Internet Internet
Layer 2 Network inte ace Data-link
Layer 1 Hardware devices Physical
Network Structures
TCP/IP Overview
The most widely used suite of protocols is TCP/IP suite. It is a protocol stack
comprising dozens of individual protocols as shown in the gure. TCP/IP is a
pla orm-independent protocol based on open standards. However, this is both a
bene t and a drawback. TCP/IP consumes a signi cant amount of resources and is
relatively easy to hack into because it was designed for ease of use rather than for
security.

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.

OSI Protocols TCP/IP


Application FTP SMTP POP3 Telnet SNMP
Presentation SSL ASCII Application

Session Sockets NetBIOS

Transpo TCP UDP Transpo

Network ICM IGMP IP Network


P
Data link Underling
Underlying
LAN andLAN
WANorTechnology
WAN Data link

Physical Ethernet, Fast Ethernet, FDDI Physical


Network Structures
TCP/IP Details
As we said, to teach the principles of data communication and networks we
use the protocol layering of the Internet and the TCP/IP protocol suite. Hence,
we need to discuss the details of TCP/IP. In this section these details are
discussed in the following ve subsections.
Layered Architecture
To show how the communications in the TCP/IP protocol suite are
accomplished (pe ormed) between two hosts in an internet made up of two
LANs, each with a link-layer switch that are connected by a router, as shown in
gure below.

LAN
A Link 1 Link 2
Router LAN
Link 3 Link 4 B

Figure 2.6 shows a communication system in which computer A


communicates with computer B. The gure shows, ve communicating
devices in this communication system: source host (computer A), the link-
layer switch, link 1, the router, the link-layer switch, link 4, and the destination
host (computer B).
Network Structures

TCP/IP Protocol Layers


we brie y discuss the functions and duties of layers in the TCP/IP protocol
suite. For be er understanding the duties of each layer, we need to think about
the logical connections between layers. The gure below shows logical
connections in our simple internet discussed.

A B
Source Destination
Logical connection
Application Applicatio
Transpo n
Transpo
Network Network
Data-link Data-link
Physical Physical
Switch Router Switch

Logical connections between TCP/IP protocol layers


Network Structures

TCP/IP Protocol Layers (Cont.)

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.

Applicatio Identical object (Message) Applicatio


n n
Transpo Identical object (Segments or user Transpo
Networ Identical data) Identical object Network
k
Data- object(datagrams) (datagrams) Data-
Identical object (frames) Identical object (frames)
link link
Physical Identical object (bits) Identical object (bits) Physical
Host Router Host

Identical objects in the TCP/IP protocol


Network Structures

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

Addressing in the TCP/IP protocol suite


Network Structures

Encapsulation/De-encapsulation

One of the impo ant concepts in protocol layering is encapsulation/


decapsulation. In order for data to traverse a network, it must rst be
encapsulated at the source, and then decapsulated at the destination. In the
source computer, a message goes through the layers to add layer header
information. This information is checked as the message encounters network
devices such as switches or routers. When it is directed towards the
destination computer, the message must go back through those layers so the
end user receives the sent message. The gure shows this concept.

Data encapsulation and decapsulation

Data encapsulation and decapsulation


Network Structures
Encapsulating Data at the Source Host
 At the application layer, the data to be exchanged as a message, that does
not contain any header or trailer, but if it does, header or trailer is included
in the message. The message is passed to the transpo layer.
 The transpo layer takes the message as the payload, and adds the
transpo layer header to the payload, which contains the identi ers of the
source and destination application programs that want to communicate
plus some more information that is needed for the end-to-end delivery of
the message, such as information needed for ow, error control, or
congestion control. The result is the transpo -layer packet, which is called
the segment (in TCP) and the user datagram (in UDP). The transpo layer
then passes the packet to the network layer.
• The network layer takes the transpo -layer packet as payload (data) and
adds its own header to the payload. The header contains the addresses of
the source and destination hosts and some more information used for error
checking of the header, fragmentation information, and so on. The result is
the network-layer packet. The network layer then passes the packet to the
data-link layer.
• The data-link layer takes the network-layer packet as payload and adds its
own header, which contains the link-layer addresses (MAC) of the host or
Network Structures
Decapsulating and Encapsulation at the Router
A router acts as a gateway to send packets to the correct network. Routers have a
network layer, a data link layer, and a physical layer. At the router, we have both
decapsulation and encapsulation because the router is connected to two or more
links as shown in the gure.
A er the set of bits are delivered to the data-link layer, this layer decapsulates the
datagram from the frame and passes it to the network layer. The network layer only
inspects the source and destination addresses in the datagram header and consults
its forwarding table to nd the next hop to which the datagram is to be delivered.
The contents of the datagram are changed by the network layer in the router only to
fragment the datagram if it is too big to be passed through the next link. The
datagram is then passed to the data-link layer of the next link. The data-link layer of
the next link encapsulates the datagram in a frame and passes it to the physical layer
Decapsulating
for transmission.
at the Destination Host
Data decapsulation is the process of removing the address information from the
data and extracting the message within. Decapsulation contains the same layers as
encapsulation, but they are in the reverse order, and each layer undoes what was
done in the corresponding layer in the source. Hence, at the destination host, each
layer only decapsulates the packet received, removes the header, and delivers the
payload to the next-higher layer protocol until the message reaches the application
layer. It is necessary to say that decapsulation in the host involves error checking.
Connecting
Devices
Network Structures
Connecting Devices
Hosts in networks normally operate together and use some shared resources of
the network. In fact, we need to use connecting devices to connect hosts
together to make a network or to connect networks together to make an
internet. Several di erent connecting devices can be used, which can operate
in di erent layers of the OSI or Internet model based the function of the
interconnecting device.
HILI subcommi ee (IEEE802.1) of the IEEE identi ed the possible internetworking
scenarios that are: a single LAN, two LANs connected together (LAN-LAN), A LAN
connected to a WAN (LAN-WAN) and Two LANs connected through a WAN (LAN-WAN-
LAN).
Hence, we discuss the kinds of connecting devices: hubs, link-layer switches,
routers and gateways. Hubs today operate in the rst layer of the Internet
model. Link-layer switches operate in the rst two layers (physical and data-
link layers). Routers operate in the rst three layers as shown in Figure 1.10.
Network Structures
1 Hubs
A hub is a generic term, but commonly refers to a multipo repeater, which is
a device operates only in the physical layer. The stations connect to the hub
with RJ-45 connector having maximum segment length is 100 meters. It is
operates as logical bus, which broadcasts the signal of the frame to all other
po s. Signals that carry information within a network can travel a xed
distance before a enuation weakens the signal. A repeater receives a signal
and, before it becomes too weak or corrupted, regenerates the original bit
pa ern. Then, the repeater sends the regenerated signal.
Figure 1.11 shows conceptual example for the function of the hub. In this
example, when a packet from station A to station D arrives at the hub, the hub
regenerates the original signal of the frame and broadcasts it. Only the station
D which is the destination receives the frame. All other stations discard it.
Network Structures
2 Link-Layer Switches
A link-layer switch (or switch) operates in both the physical and the data-link
layers. Hence at physical-layer device, the switch regenerates the signal it
receives and at link-layer, the switch can check the MAC addresses of the
source and destination contained in the frame. It functions like a logical star
with the possibility of the communication of separate signals between any pair
of po lines. As a consequence, each po of a switch operates on separate
collision domain. Moreover, each po has dedicated bandwidth.
Let us use the same example we used in case of the hub. In Figure 1.12, we have
a LAN with three hubs and ve stations that are connected using a link-layer
switch. If a frame destined for station 72:29:B1:34:54:58 arrives at po 1, the
link-layer switch consults its table to nd the sending out po . According to its
table, frames destined for 72:29:B1:34:54:58 should be sent out only through
po 4.
Network Structures

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.15: A system and its graph representation

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.

Figure 1.22: Two switches in a backbone using VLAN so ware

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.

You might also like