--,p--------~-- area network simulation program.pdf · dengan kepujian (kejuruteraan elektronik dan...

24
LOCAL AREA NETWORK SIMULATION PROGRAM GOH BENG HUAT Tesis Dikemukakan Kepada Fakulti Kejuruteraan, Universiti Malaysia Sarawak Sebagai Memenuhi Sebahagian daripada Syarat Penganugerahan Sarjana Muda Kejuruteraan Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi) 1999/2000

Upload: phungmien

Post on 24-Mar-2019

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: --,p--------~-- area network simulation program.pdf · Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi) ... an explosive growth in the use of networking in the business

--,p--------~-- ........... -~---~.~.-

LOCAL AREA NETWORK SIMULATION PROGRAM

GOH BENG HUAT

Tesis Dikemukakan Kepada Fakulti Kejuruteraan, Universiti Malaysia Sarawak

Sebagai Memenuhi Sebahagian daripada Syarat Penganugerahan Sarjana Muda Kejuruteraan

Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi) 1999/2000

Page 2: --,p--------~-- area network simulation program.pdf · Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi) ... an explosive growth in the use of networking in the business

~P"".---·········--

Tesis (Ijazah Pertama)

Tesis Dikemukakan Kepada Fakulti Kejuruteraan, Universiti Malaysia Sarawak

Sebagai Memenuhi Sebahagian Daripada Syarat Penganugerahan Sarjana Muda Kejuruteraan

Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi) 1999/2000

Page 3: --,p--------~-- area network simulation program.pdf · Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi) ... an explosive growth in the use of networking in the business

,........ ------..p---­

DEDICATION

Dedicated to my beloved family

II

Page 4: --,p--------~-- area network simulation program.pdf · Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi) ... an explosive growth in the use of networking in the business

ACKNOWLEDGEMENT

First, I would like to thank my beloved family especially my mother and

father for their support during the years when I was studying in UNIMAS.

Many thanks are also to my supervisor, Mr. Ng Liang Yew for his support

and advice in completing the thesis. With his guidance and understanding,

I have acquired knowledge and skill that would be invaluable to my

engineering career.

Sincere appreciation to the Dean of Engineering Faculty, Dr. Mohamad

Kadim Suaidi for his support in the final year projects and also his perfect

leadership in the faculty. Thanks to the entire faculty staffs that provided

us with all the facilities and equipments to complete this thesis.

Finally, I would like to thank my partner, Fong Siew Seong, co­

programmer of this LAN simulation software, who worked very hard to

make this software a success.

------ Goh Beng Huat

IIII

Page 5: --,p--------~-- area network simulation program.pdf · Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi) ... an explosive growth in the use of networking in the business

""

ABSTRACT

This paper presents a program used in the simulation of a Local

Area Network (LAN), which is written in Visual Basic 6.0 and runs in

Windows 98 Operating System. The main objective would be to analyze the

performance of a LAN using simulation and introduce some basic

understanding of the functionality and how the various types of LAN work.

In the simulation program, Ethernet (CSMAjCD), Token Ring, Token

Bus and the Star topology is simulated. The simulation focuses on the

access method, which is the Carrier Sense Multiple Access with Collision

Detection (CSMAjCD) and Token-Passing. The performance of the LAN is

evaluated by its channel utilization and transfer delay. Both the output

would depend on the information provided by the user during the

simulation. The simulation program is modeled according to an event

driven simulation, which detects which event would occur earlier and allow

that event to be executed.

IV

Page 6: --,p--------~-- area network simulation program.pdf · Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi) ... an explosive growth in the use of networking in the business

..

ABSTRAK

Kertas ini mempersembahkan satu program yang boleh digunakan

untuk mensimulasi "Local Area Network (LAN)". Program ini dituliskan

dalam "Visual Basic 6.0" dan digunakan di dalam "Windows 98 Operating

System". Tujuan utama kertas ini ialah untuk menganalisa prestasi

sesuatu LAN dengan menggunakan cara simulasi dan memberi pengenalan

kepada operasi sertajenis-jenis LAN yang sedia ada.

Dalam program simulasi, "Ethernet (CSMAjCD)", "Token Ring",

"Token Bus" dan "Star LAN" disimulasikan. Simulasi ini menumpukan

perhatian pada cara-cara penghantaran maklumat seperti "Carrier Sense

Multiple Access with Collision Detection (CSMAjCD)" dan "Token-Passing".

Prestasi sesuatu LAN boleh dikaji dari segi penggunaan rangkaian dan

kelewatan penghantaran. Kedua-dua nilai yang didapati bergantung

kepada maklumat yang diberikan oleh pengguna semasa menjalankan

simulasi. Program simulasi ini ditulis dengan menggunakan model

simulasi acara yang mengesan acara yang akan berlaku dan menjalankan

acara tersebut.

v

I

Page 7: --,p--------~-- area network simulation program.pdf · Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi) ... an explosive growth in the use of networking in the business

TABLE OF CONTENTS

Abstract

Abstrak

Table of contents

Lists of table

Lists of figure

Chapter 1

Introduction

1.1 Thesis overview

1.2 Objectives

1.3 Thesis outline

Chapter 2

Basic Concept of Data Communication

2.1 Introduction

2.2 Line Configuration

2.2.1 Point-to-point configurations

2.2.2 Multipoint configurations

2.3 Communication Modes

~.3.1 Simplex l\lode

2.3.2 Half-Duplex Mode

2.3.3 Full-Duplex Mode

2.4 Local Area Network Topology

2.4.1 Bus Topology

2.4.2 Ring Topology

VI

iv

v

vi

x

xi

1

1

2

2

4

4

4

4

5

6

6

7

7

8

8

9

I

Page 8: --,p--------~-- area network simulation program.pdf · Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi) ... an explosive growth in the use of networking in the business

,.

2.4.3 Star Topology 10

2.5 Transmission Medium 11

2.5.1 Twisted Pair Cabling 11

2.5.1.1 Unshielded Twisted Pair Cabling (UTP) 11

2.5.1.2 Screened Twisted Pair (ScTP) 13

2.5.1.3 Shielded Twisted Pair Cabling (STP) 14

2.5.2 Coaxial Cabling 14

2.5.2.1 Thicknet 15

2.5.2.2 Thinnet 16

2.5.2.3 CATV 16

2.5.2.4 Twinax 17

2.5.3 Optical fiber 17

2.5.3.1 Single Mode Fiber 18

2.5.3.2 Multimode Fiber 19

Chapter 3

Local Area Network (LAN) 20

3.1 Introduction 20

3.2 Open Systems Interconnection 21

3.2.1 N -Layer Service 22

3.2.2 Peer-to-Peer Protocol 23

3.2.3 Er~capsul<?_tion 0? LnJ

3.2.4 OSI Reference Model 24

3.3 IEEE 802 Reference Model 28

3.3.1 Logical Link Control 30

3.3.2 Medium Access Control 32

3.3.2.1 MAC Techniques 32

VII

I

Page 9: --,p--------~-- area network simulation program.pdf · Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi) ... an explosive growth in the use of networking in the business

3.3.2.2 MAC Frame Format 35

3.4 Ethernet 37

3.4.1 Access Method: CSMAi CD 37

3.5 Token Ring 39

3.6 Token Bus 43

Chapter 4

Simulation of Token Passing LAN 45

4.1 Overview 45

4.2 Operation of Simulation 45

.1 Flowchart 46

4.2.2 Assumptions Made In The Simulation 48

4.3 Performance Evaluation 49

4.3.1 Channel Utilization 49

4.3.2 Transfer Delay 51

Chapter 5

LAN Simulation Software Development 53

5.1 Introduction 53

5.2 Operating Simulation Program 53

5.3 Input and Output Variables 55

54 Dpsrriptjon of the Simulation Program Source Code 57

LAN Simulation Result 82

Chapter 6

HTML Help System 84

6.1 Introduction 84

VIII

I

Page 10: --,p--------~-- area network simulation program.pdf · Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi) ... an explosive growth in the use of networking in the business

6.2 About MICROSOFT HTML Help . 85

6.2.1 Converting WinHelp Projects to HTML Help 85

6.2.2 Microsoft HTML Help Components 86

6.3 Creatlng The LAN Simulation HTML Help System 87

6.4 Hook Up the HTML Help to the LAN Simulation

Program 96

Chapter 7

Conclusion and Further Works 100

IX

I

Page 11: --,p--------~-- area network simulation program.pdf · Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi) ... an explosive growth in the use of networking in the business

LIST OF TABLES

Table Page

6.1 HTML Conversions by New Project Wizard 86

x

Page 12: --,p--------~-- area network simulation program.pdf · Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi) ... an explosive growth in the use of networking in the business

,.." 'jiiIi#lIIII""'---~

Figure

2.1

2.2

2.3

2.4

2.5

2.6

2.7

2.8

2.9

2.10

2.11

2.12

2.13

3 .1'

3.2

3.3

3.4

3

3.6

3.7

3.8

3.9

4.1

LIST OF FIGURES

Page

Point-to-point 5

Multipoint 5

Simplex '7 I

Half-Duplex 7

Full-Duplex 8

Bus Topology 9

Ring Topology 10

Star Topology 11

UTP Cable 12

ScTP Cable Illustration 13

Coaxial Cable 15

Thicknet Cable 15

Thinnet Cable 16

N-Layer Service 22

Encapsulation 24

OSI Reference Model

IEEE 802 Protocol Layers Compared to OS1

Model 29

Scope of LAN Protocols 31

LLC Layer and MAC Frame 32

Generic MAC Frame Format 36

Evolution of CSMAjCD 39

Mechanism of Token Ring 43

Flow chart of the simulation program 48

XI

I

Page 13: --,p--------~-- area network simulation program.pdf · Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi) ... an explosive growth in the use of networking in the business

5.1 Token Ring Simulation 54

5.2 Example of Token Ring Simulation Result 82

5.3 Example of Token Bus Simulation Result 83

6.1 Converting WinHelp Project 85

6.2 Create a New Help Project File 89

6.3 List of HTML Files Created 90

6.4 Add/Remove HTML topic files from a project file 91

6.5 Create New Contents File 92

6.6 Created Content File 93

6.7 Create New Index File 94

6.8 Created Index File 95

6.9 Compile Project File Button 96

XII

I

Page 14: --,p--------~-- area network simulation program.pdf · Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi) ... an explosive growth in the use of networking in the business

"--' -,..-"i----~·

CHAPTER 1

INTRODUCTION

1.1 Thesis Overview

Local area network (LAN) has been gaining wide spread popularity in

the infonnation age. Over the years, LAN has become a necessity. There is

an explosive growth in the use of networking in the business community

and education sector. Many organizations have given priority to the sharing

of infonnation. LAN has managed to address the issue of infonnation

sharing. With LAN, infunnation sharing is no longer restricted by

geographical boundaries. Communication becomes possible between two

person situated far apart. The main issue surrounding a LAN would be the

speed of its transmission and also its intended use.

As LAN is being used in almost every field, configuration for each

LAN is different. Therefore, the need to provide network analyst with the

ability to evaluate a LAN configuration before implementing the real thing

becomes more critical. With this in mind, the LAN simulation program was

created.

Perfonnance evaluation of LAN has been a significant subject of

research in the last decade. At present, LAN traffic consists of various

kinds of data from simple text to multimedia hypertext. High accurate

traffic estimation and analysis of behaviors are very important for the

construction of Local Area Network (LAN) at a large-scale workstation

system.

In evaluating the performance of a LAN, three kinds of methods can

be used: (1) by an experiment with actual LAN, (2) by an analytical

modeling, and (3) by a simulation modeling. An experiment by an actual

Page 15: --,p--------~-- area network simulation program.pdf · Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi) ... an explosive growth in the use of networking in the business

LAN is not practical for the system consisting of many workstations. An

analytical modeling is useful for evaluation of LAN that processes low traffic

while the simulation modeling which is presented in this paper, uses

computer programs to relate input and output variables of the system.

In this paper, the simulation program created enables users of the

simulation program to evaluate the LAN for different configuration of its

parameters. By entering a value for the parameters, the channel utilization

and the transfer delay will be simulated and displayed. Additional interface

have been incorporated into the program so that it would be more user

friendly. The value of the parameters entered by the user can be saved and

reopened. Information on cable type such as optical fiber, coa.xial cable,

unshielded twisted pair and shielded twisted pair can be stored in the

program. The final feature of this simulation program is an HTML Help

System, which provides information of LAN and how to use the simulation

program.

1.2 Objectives

The objective of creating this LAN Simulator is to provide a platform

for network analyst to analyze and evaluate the performance of the LAN.

Apart from that, LAN Simulator is aimed at providing users with a tool to

see the effects on the performance of the LAN for various values of

important para..'Ileters.

1.3 Thesis Outline

In Chapter 2, the basic data communication principles are discussed, as

these principles would be used in a LAN. These principles basically covers

2

Page 16: --,p--------~-- area network simulation program.pdf · Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi) ... an explosive growth in the use of networking in the business

line configuration, communication modes, LAN topology and transmission

medium.

In Chapter 3, the operation of a LAN is analyzed. The analysis includes OSI

model, data link protocols, Ethernet, token ring and token bus.

In Chapter 4, the basic principals involving token passing simulation are

presented. It also covers the performance evaluation of a LAN and the flow

of the token passing simulation.

In Chapter 5, information on how to use the simulation program is

provided. The source code of the token ring and token bus is discussed and

explained in detail.

In Chapter 6, guidelines on how to create the HTML Help system for the

simulation program are presented.

In Chapter 7, a conclusion of this paper is presented and suggestion on the

further development is also provided.

3

Page 17: --,p--------~-- area network simulation program.pdf · Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi) ... an explosive growth in the use of networking in the business

,.PI

CHAPTER 2

BASIC CONCEPT OF DATA COMMUNICATION

2.1 Introduction

In understanding the functionality of a LAN, the relations~~lp

between the communicating devices and how the transmission of dcta

operates is required. Basically, data communication involves the gene'al

concept of line configuration, topology and transmission mode. Thc-se

properties would determine the configuration of a LAN.

2.2 Line Configuration

Line configuration basically defines the number of communica[:on

devices that is connected to a physical link. There are two types of l::.1e

configuration, which is point-to-point and multipoint.

2.2.1 Point-to-point configurations

A point-to-point line connects two stations and usuall\' used w:·.-:-n

dedicated user-to-user session is necessary. This configuration provices

better security as the line is only used between a sender and a recei',er,

thus eliminating the possibility of a third party eavesdropping. Apart from

that, the two stations determine the traffic volume in point-to-po:nt

configuration. This can be easily explained as the channel capacity of -::he

link is shared between the two stations.

4

Page 18: --,p--------~-- area network simulation program.pdf · Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi) ... an explosive growth in the use of networking in the business

... ..

Figure 2.1: Point-to-point

2.2.2 Multipoint configurations

A mUltipoint line connects more than two stations together. This

configuration is commonly used in situations where low-speed terminals

communicate with each other or a computer. The stations connected share

the channel capacity of the line. Thus, this creates a more efficient use, as

the link will not be idle if sufficient stations are connected.

Multipoint lines require the use of more elaborate controls than do

point-to-point lines. The stations on the mUltipoint path must be

supervised to provide for allocation and sharing of the line. Sessions must

be interleaved and priorities must be established for the more important

sessions while data link controls are used to control the flow of message in

these sessions.

. ~.

Figure 2.2: Multipoint.

5 I

Page 19: --,p--------~-- area network simulation program.pdf · Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi) ... an explosive growth in the use of networking in the business

~.3 Communication Modes

Communication systems may operate in either a one-way or a two­

way mode. This means that the stations can operate as a sender, receiYer

or both. Transmission, which is confined to one direction, is known as

simplex operation while transmission in both directions is known as duplex

operation. In the context of data communications, an example of one-Kay

communication is a broadcast system in WhICh data is transmItted from a

central station to a number of receive-only stations; there IS no

requirement for a return channel and therefore no interaction exists.

Communications in both directions have wider application. This type

of communication provides the stations with the ability to interact.

Examples of its applications can be seen in home shopping services or

travel agent booking services. Two-way communication is also required if

data is to be retransmitted when errors have been detected and some form

of repeat request has been sent back to the transmitter. This has maJor

applications in networking and is used in packet switching.

2. 3.1 Simplex Mode

Simplex mode allows communication between stations in only one

direction. This means that a station can only operate as a sender or

receiver but not both in the communication. It is limited in terms of its

operational capability but is simple to implement since little is required by

way of a protocol. It has a major limitation in that a receiver cannot directly

indicate to a transmitter that it is experiencing any difficulty in reception.

6 I

Page 20: --,p--------~-- area network simulation program.pdf · Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi) ... an explosive growth in the use of networking in the business

....'

2.3.2 Half-Duplex Mode

Figure 2.3: Simplex

Half~duplex operation can support two-way communication but only

one direction at a time. It means that when a station acts as a sender,

other station must act as a receiver and vice versa. This is typical of

radio systems. If a station is transmitting, it cannot receive from a distant

station at the same time. Some form of protocol is therefore necessary to

ensure that one station is in transmit mode and the other IS In

mode at anyone time as well as to determine when stations should change

state.

Figure 2.4: Half-Duplex

2.3.3 Full-Duplex Mode

Full duplex operation can support simultaneous two-way

communication by using two separate channels, one of each direction of

transmission or using only one channel with signals froin both directions

sharing the channel capacity. This is clearly more costly but is simpler to

7

Page 21: --,p--------~-- area network simulation program.pdf · Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi) ... an explosive growth in the use of networking in the business

pi j$

operate. Although at first glance full duplex operation appears to be an

obvious choice, it must be remembered that two-way transmission IS not

always necessary. Furthermore, if a transmission is more to one direction,

with little data traffic in the reverse direction of transmission, half-duplex

can also be used.

Figure 2. Full-Duplex

2.4 Local Area Network Topology

Communications networks are designed to facilitate the sharing of

resources as well as to reduce communication costs, increase throughput,

and decrease delay of services. Consequently, the topology of the network is

an important consideration. The topology of a LAN identifies hDlv the

stations (terminal, printers, modem) are interconnected. In this section,

topologies for bus, ring, and star LANs are explained. There are another two

more topology, which is mesh and tree LANs, but the two topology will not

be discussed, as it is not used in the simulation program.

2.4.1 Bus Topology

Both bus topologies are characterized by the use of a multipoint

medium. For the bus, all stations are connected using a tap, d.irectly to a

linear transmission medium, or bus. Data can be transmitted. onto the bus

and received from the bus in full-duplex operation between the station and

the tap. A transmission from any station propagates the length of the

Page 22: --,p--------~-- area network simulation program.pdf · Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi) ... an explosive growth in the use of networking in the business

ps:

medium in both directions and can be received by all other stations. There

is a terminator at each end of the bus to remove any signal from the bus by

absorbing it.

Tet'minatot'

Figure 2.6: Bus Topology

2.4.2 Ring Topology

The network in the nng topology is made of a set of repeaters

connected by point-to-point links in a closed loop. The repeater is capable

of receiving data on one link and transmitting them, bit by bit, on the other

link as fast as they are received, with no buffering at the repeater. Data can

be transmitted in one direction only and all are oriented in the same way as

the links are unidirectional. Thus, the movement of the data is only in one

direction (clockwise or counterclockwise).

Each station attaches to the network at a repeater and can transmit

data onto the network through that repeater. The transmission of data is in

the form of data frames. As a frame circulates past all the other stations,

the destination station recognizes its address and copies the frame into a

local buffer as it goes by. The frame is removed when it circulates until it

returns to the source station. Because multiple stations share the ring,

Page 23: --,p--------~-- area network simulation program.pdf · Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi) ... an explosive growth in the use of networking in the business

psi

medium access control is needed to determine at what time each station

may insert frames.

Figure 2.7: Ring Topology

2.4.3 Star Topology

Each station is directly connected to a common central node, which

can be a hub in the star LAN topology. Typically, each station attaches to a

central node, referred to as the star coupler, via two point-to-point links,

one for transmission in each direction.

There are hvo ways in which a central node can operate. One

approach is for the central node to operate in a broadcast fashion. The

transmission of a frame from one station to the node is retransmitted on all

of the outgoing links. In this case, although the arrangement is physically a

star, it is logically a bus, as all other stations receive the transmission by a

station and only one station is allowed to transmit at a time.

The other method is for the central node to perform the function of a

frame-switching device. Thus, an incoming frame is buffered in the node

and then retransmitted on an outgoing link to the destination station.

10

Page 24: --,p--------~-- area network simulation program.pdf · Dengan Kepujian (Kejuruteraan Elektronik dan Telekomunikasi) ... an explosive growth in the use of networking in the business

.....-..---....,.pt-----~.--...... --~

Figure 2.8: Star Topology

2.5 Transmission Medium

For stations to communicate, a transmission medium is required. In

a LAN, there are three main transmission medium, which are twisted pair

cabling, coaxial cable and optical fiber. Each of these transmission

mediums will be discussed in detail in the following section.

2.5.1 Twisted Pair Cabling

Twisted pair cables are so named because pairs of wires are tKisted

around one another. Each pair consists of two insulated copper \,-ires

nvisted together. The wire pairs are twisted because it helps reduce cross

talk and noise susceptibility. High quality twisted pair cables have about 1

to 3 twists per inch. For best results, the twist rate should \-ary

significantly between pairs in a cable. There are three types for this cabling,

which are Unshielded Twisted Pair (UTP) , Screened Twisted Pair (ScTP),

and Shielded Twisted Pair (STP).

2.5.1.1 Unshielded Twisted Pair Cabling (UTP)

In unshielded twisted pair (UTP) cabling, it is a twisted pair cabling

that contains no shielding. UTP cabling most commonly includes 4 pairs of

11