Sunteți pe pagina 1din 177

&RPSXWHU1HWZRUNV

$PLU0HKPRRG

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


1
2000

&RXUVH2XWOLQH

%DVLFVRI'DWD&RPPXQLFDWLRQ
%DVLFVRI&RPSXWHU1HWZRUNV
26,5HIHUHQFH0RGHO ,QWHUQHW/D\HUV
'DWD7UDQVPLVVLRQ )ORZFRQWURO
7UDQVPLVVLRQ0HGLD *XLGHG 8QJXLGHG 
/$1 :$1
:LUHOHVV7HFKQRORJLHV
(UURUGHWHFWLRQ 5HFRYHU\
/RJLFDODGGUHVVLQJ,3Y,3Y
,QWHUQHW3URWRFROV$53,&037&38'3
5RXWLQJSURWRFROV
&RQJHVWLRQFRQWURO 4R6
1HWZRUN6HFXULW\

McGraw-Hill  The McGraw-Hill Companies, Inc., 2004
2
Lecture 1

Introduction

Based on Data communication &


Networks, Behrouz A Forouzan

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


3

1.1 Data Communication

&RPSRQHQWV

'DWD5HSUHVHQWDWLRQ

'LUHFWLRQRI'DWD)ORZ

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


4
Five components of data communication

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


5

DATA REPRESENTATION

TEXT

NUMBERS

IMAGES

VIDEO

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


6
Direction Of Data Flow

Simplex

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


7

Half-duplex

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


8
Full-duplex
GGGGGGGGGGGGG

(IIHFWLYHQHVVRIGDWDFRPPXQLFDWLRQ
 'HOLYHU\
 $FFXUDF\
 7LPHOLQHVV

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


9

1.2 Computer Networks

:K\GRZHQHHGWR1HWZRUN




 &RPPXQLFDWLRQ
 6KDULQJ 6HUYLFHV$SSOLFDWLRQV
+DUGZDUHILOHV 

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


10
1.2 Computer Networks


1HWZRUN&ULWHULD
BB3HUIRUPDQFH
BB5HOLDELOLW\
BB6HFXULW\
3K\VLFDO6WUXFWXUHV
BB7\SHVRIFRQQHFWLRQ
BB3K\VLFDO7RSRORJLHV
&DWHJRULHVRI1HWZRUNV
McGraw-Hill The McGraw-Hill Companies, Inc., 2004
11

Types Of Connection

Point-to-point connection

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


12
Multipoint connection

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


13

Network Topology
Categories of topology

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


14
Mesh Topology
Fully connected mesh topology (for five devices)

Dedicated point to
point link
n(n-1)/2 links for n
nodes
Device needs n-1
ports
Easy fault
isolation
Privacy & Security

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


15

Star topology

Each device connected to a central controller


Device needs only 1 ports
Easy installation & Reconfiguration
Robustness
Rely on central device

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


16
Bus topology

Multipoint
Backbone connects all devices
Support limited number of devices
Fault isolation is difficult
Adding new devices difficult

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


17

Ring topology

Each devices link with its immediate neighbor


Each device acts as a repeater
Easy to install and reconfigure
Adding new devices requires changing two connections

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


18
Categories of networks

Network Category determine by its


Size
Its ownership
Distance it covers
Physical Architecture

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


19

LAN

Link devices in single office,


building, campus
LAN size limited to few
kilometers
LAN can give up to 100Mbps
Resources shared b/w personal
computers or workstation

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


20
LAN (Continued)

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


21

MAN
MAN design to extend over an entire city
Multiples LANs could be connected into a MAN
MAN uses local telephone lines or privately owned

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


22
WAN
Provides long distance transmission of data, voice,,
video etc
WAN usally use public , leased or private lines or
combination

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


23

Learning Outcomes :


BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB

BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB

BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB

BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB

BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB

BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB

BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


24
Signals

25

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Note:

To be transmitted, data must be


transformed to electromagnetic
signals.

26

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


3.1 Analog and Digital

Analog and Digital Data

Analog and Digital Signals

Periodic and Aperiodic Signals

27

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Note:
Signals can be analog or digital. Analog
signals can have an infinite number of
values in a range; digital signals can have
only a limited number of values.
Comparison of analog and digital signals

28

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Note:

In data communication, we commonly


use periodic analog signals and
aperiodic digital signals.

29

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

3.2 Analog Signals

Sine Wave
Phase
Examples of Sine Waves
Time and Frequency Domains
Composite Signals
Bandwidth
30

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Sine Wave , Amplitude

31

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Note:

Frequency and period are inverses of


each other.

Period and frequency

32

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Note:
Frequency is the rate of change with respect to
time.
Change in a short span of time means high
frequency.
Change over a long span of time means low
frequency.

If a signal does not change at all, its


frequency is zero.
If a signal changes instantaneously, its
frequency is infinite.
33

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Note:

Phase describes the position of the


waveform relative to time zero.

Relationships between different phases

34

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Example 2
A sine wave is offset one-sixth of a cycle with respect
to time zero. What is its phase in degrees and radians?

Solution
We know that one complete cycle is 360 degrees.
Therefore, 1/6 cycle is
S /360 rad = 1.046 rad
(1/6) 360 = 60 degrees = 60 x 2S

35

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Figure 3.6 Sine wave examples

36

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Note:

An analog signal is best represented in


the frequency domain.

37

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Time and frequency domains

38

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Note:

A single-frequency sine wave is not


useful in data communications; we
need to change one or more of its
characteristics to make it useful.
When we change one or more
characteristics of a single-frequency
signal, it becomes a composite signal
made of many frequencies.
39

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

40

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Note:

The bandwidth is a property of a


medium: It is the difference between
the highest and the lowest frequencies
that the medium can
satisfactorily pass.

41

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Bandwidth

42

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Example 3
If a periodic signal is decomposed into five sine waves
with frequencies of 100, 300, 500, 700, and 900 Hz,
what is the bandwidth? Draw the spectrum, assuming all
components have a maximum amplitude of 10 V.

Solution
B = fh  fl = 900  100 = 800 Hz
The spectrum has only five spikes, at 100, 300, 500, 700,
and 900

43

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Example 3

44

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


3.3 Digital Signals

Bit Interval and Bit Rate

45

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

A digital signal

46

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Example 6
A digital signal has a bit rate of 200 bps. What is the
duration of each bit (bit interval)

Solution
The bit interval is the inverse of the bit rate.
Bit interval = 1/ 200 s = 0.005 s

47

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Bit rate and bit interval

48

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Digital versus analog

49

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Note:

A digital signal is a composite signal


with an infinite bandwidth.

The bit rate and the bandwidth are


proportional to each other.

50

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


&RXUVH&RPSXWHU1HWZRUNV
$PLU0HKPRRG

26, ,QWHUQHW
0RGHOV
51

0F*UDZ+LOO 7KH0F*UDZ+LOO&RPSDQLHV,QF

/D\HUHG7DVNV

6HQGHU5HFHLYHUDQG&DUULHU

+LHUDUFK\

6HUYLFHV
52

0F*UDZ+LOO 7KH0F*UDZ+LOO&RPSDQLHV,QF
6HQGLQJDOHWWHU

53

0F*UDZ+LOO 7KH0F*UDZ+LOO&RPSDQLHV,QF

26,5HIHUHQFH0RGHO

54

0F*UDZ+LOO 7KH0F*UDZ+LOO&RPSDQLHV,QF
,QWHUQHW0RGHO

55

0F*UDZ+LOO 7KH0F*UDZ+LOO&RPSDQLHV,QF

3HHUWRSHHUSURFHVVHV

56

0F*UDZ+LOO 7KH0F*UDZ+LOO&RPSDQLHV,QF
$QH[FKDQJHXVLQJWKH,QWHUQHWPRGHO

57

0F*UDZ+LOO 7KH0F*UDZ+LOO&RPSDQLHV,QF

3K\VLFDOOD\HU

58

0F*UDZ+LOO 7KH0F*UDZ+LOO&RPSDQLHV,QF
1RWH

7KHSK\VLFDOOD\HULVUHVSRQVLEOHIRU
WUDQVPLWWLQJLQGLYLGXDOELWVIURPRQH
QRGHWRWKHQH[W
0DMRUGXWLHVRISK\VLFDOOD\HU
3K\VLFDO&KDUDFWHULVWLFVRILQWHUIDFHPHGLD
5HSUHVHQWDWLRQRIELWV
'DWD5DWH
6\QFKURQL]DWLRQRIELWV

59

0F*UDZ+LOO 7KH0F*UDZ+LOO&RPSDQLHV,QF

'DWDOLQNOD\HU

7KHGDWDOLQNOD\HULVUHVSRQVLEOHIRU
WUDQVPLWWLQJIUDPHVIURPRQHQRGHWR
WKHQH[W

60

0F*UDZ+LOO 7KH0F*UDZ+LOO&RPSDQLHV,QF
12'(7212'('(/,9(5<

61

0F*UDZ+LOO 7KH0F*UDZ+LOO&RPSDQLHV,QF

'DWDOLQNOD\HU

0DMRUGXWLHVRIGDWDOLQNOD\HU
)UDPLQJ
3K\VLFDO$GGUHVVLQJ
)ORZ&RQWURO
(UURU&RQWURO
$FFHVV&RQWURO

62

0F*UDZ+LOO 7KH0F*UDZ+LOO&RPSDQLHV,QF
([DPSOH

$QRGHZLWKSK\VLFDODGGUHVVVHQGVDIUDPHWRDQRGHZLWKSK\VLFDO
DGGUHVV7KHIUDPHFRQWDLQVSK\VLFDODGGUHVVLQWKHKHDGHU

63

0F*UDZ+LOO 7KH0F*UDZ+LOO&RPSDQLHV,QF

1HWZRUNOD\HU

7KHQHWZRUNOD\HULVUHVSRQVLEOHIRUWKH
GHOLYHU\RISDFNHWVIURPWKHRULJLQDOVRXUFH
WRWKHILQDOGHVWLQDWLRQ

64

0F*UDZ+LOO 7KH0F*UDZ+LOO&RPSDQLHV,QF
6RXUFHWRGHVWLQDWLRQGHOLYHU\

65

0F*UDZ+LOO 7KH0F*UDZ+LOO&RPSDQLHV,QF

1HWZRUNOD\HU

0DMRUGXWLHVRIQHWZRUNOD\HU
6RXUFHWRGHVWLQDWLRQGHOLYHU\
/RJLFDO$GGUHVVLQJ
5RXWLQJ

66

0F*UDZ+LOO 7KH0F*UDZ+LOO&RPSDQLHV,QF
([DPSOH
,Q )LJXUH  ZH ZDQW WR VHQG GDWD IURP D QRGH ZLWK
QHWZRUN DGGUHVV $ DQG SK\VLFDO DGGUHVV  ORFDWHG RQ
RQH /$1 WR D QRGH ZLWK D QHWZRUN DGGUHVV 3 DQG
SK\VLFDO DGGUHVV  ORFDWHG RQ DQRWKHU /$1 %HFDXVH
WKH WZR GHYLFHV DUH ORFDWHG RQ GLIIHUHQW QHWZRUNV ZH
FDQQRW XVH SK\VLFDO DGGUHVVHV RQO\ WKH SK\VLFDO
DGGUHVVHVRQO\KDYHORFDOMXULVGLFWLRQ:KDWZHQHHGKHUH
DUH XQLYHUVDO DGGUHVVHV WKDW FDQ SDVV WKURXJK WKH /$1
ERXQGDULHV 7KH QHWZRUN ORJLFDO  DGGUHVVHV KDYH WKLV
FKDUDFWHULVWLF

67

0F*UDZ+LOO 7KH0F*UDZ+LOO&RPSDQLHV,QF

)LJXUH([DPSOH

68

0F*UDZ+LOO 7KH0F*UDZ+LOO&RPSDQLHV,QF
7UDQVSRUWOD\HU

7KHWUDQVSRUWOD\HULVUHVSRQVLEOHIRU
GHOLYHU\RIDPHVVDJHIURPRQHSURFHVV
WRDQRWKHU

69

0F*UDZ+LOO 7KH0F*UDZ+LOO&RPSDQLHV,QF

5HOLDEOHSURFHVVWRSURFHVVGHOLYHU\RIDPHVVDJH

70

0F*UDZ+LOO 7KH0F*UDZ+LOO&RPSDQLHV,QF
7UDQVSRUWOD\HU

0DMRUGXWLHVRIWUDQVSRUWOD\HU
3URFHVVWR3URFHVVGHOLYHU\RIPHVVDJH
3RUW$GGUHVVLQJ
6HJPHQWDWLRQ
&RQQHFWLRQ&RQWURO

71

0F*UDZ+LOO 7KH0F*UDZ+LOO&RPSDQLHV,QF

$SSOLFDWLRQOD\HU
7KHDSSOLFDWLRQOD\HULVUHVSRQVLEOHIRU
SURYLGLQJVHUYLFHVWRWKHXVHU

72

0F*UDZ+LOO 7KH0F*UDZ+LOO&RPSDQLHV,QF
6XPPDU\RIGXWLHV

73

0F*UDZ+LOO 7KH0F*UDZ+LOO&RPSDQLHV,QF

26,0RGHO

$FRPSDULVRQ

74

0F*UDZ+LOO 7KH0F*UDZ+LOO&RPSDQLHV,QF
26,PRGHO

75

0F*UDZ+LOO 7KH0F*UDZ+LOO&RPSDQLHV,QF

6HVVLRQ/D\HU
,WDFWVDVDQHWZRUNGLDORJFRQWUROOHU

,WHVWDEOLVKHVPDLQWDLQDQG6\QFKURQL]H
WKHLQWHUDFWLRQEZV\VWHP

76

0F*UDZ+LOO 7KH0F*UDZ+LOO&RPSDQLHV,QF
3UHVHQWDWLRQ/D\HU

,WKDQGOHVWKH6\QWD[ 6HPDQWLFVRIWKH
LQIRUPDWLRQH[FKDQJHEZV\VWHPV
7KHPDLQWDVNSHUIRUPHGLQWKLVOD\HUDUH
'DWD7UDQVODWLRQ
(QFU\SWLRQ
'HFU\SWLRQ
&RPSUHVVLRQ


0F*UDZ+LOO 7KH0F*UDZ+LOO&RPSDQLHV,QF
77

Computer Networks 7RSLF


%\$PLU0HKPRRG

LAN:
Part1: Media &
Connecting devices

78

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Classes of Transmission Media

79

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Twisted-pair cable

80

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Categories of unshielded twisted-pair cables

Category Bandwidth Data Rate Digital/Analog Use

1 very low < 100 kbps Analog Telephone

2 < 2 MHz 2 Mbps Analog/digital T-1 lines

3 16 MHz 10 Mbps Digital LANs

4 20 MHz 20 Mbps Digital LANs

5 100 MHz 100 Mbps Digital LANs

6 (draft) 200 MHz 200 Mbps Digital LANs

7 (draft) 600 MHz 600 Mbps Digital LANs

81

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Coaxial cable

Table Categories of coaxial cables

Category Impedance Use

RG-59 75 : Cable TV

RG-58 50 : Thin Ethernet


Thick
RG-11 50 :
Ethernet 82

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Bending of light ray

Optical fiber

83

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Electromagnetic spectrum for wireless


communication

Radio waves (multicast) communications, such as radio,


television, and paging systems.
Microwaves (unicast) communication such as cellular
telephones, satellite networks, and wireless LANs.
Infrared signals used for short-range communication in a
closed area using line-of-sight propagation.

84

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Connecting Devices

Repeaters

Hubs

Bridges

Two or Three Layer Switches


Router
85

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Connecting devices

86

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Repeater

87

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Note:

A repeater connects segments of a


LAN.

A repeater forwards every frame; it


has no filtering capability.

A repeater is a regenerator,
not an amplifier.

88

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Function of a repeater

89

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Hubs

A Hub is a multiport repeater.

90

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Note:

A bridge has a table used in filtering


decisions.

A bridge does not change the physical


(MAC) addresses in a frame.

91

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Bridge

92

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Learning bridge

93

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

SWITCH

A two layer switch is multiport bridge


with better performance .

A two layer switch performs at


physical & data link layer .

A three layer switch works at network


layer it is a kind of router .
94

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Summary
There are two types of transmission
media used in LAN & WAN.
Guided & Unguided.
Connecting Devices used in LAN
Repeater or Hub
Bridges
Two or Three Layer switch
Router

95

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Computer Networks , Topic 4 part 2


By Amir Mehmood

LAN: Part 2
Ethernet

96

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Generations of Ethernet

1 Traditional Ethernet (10 Mbps)

2 Fast Ethernet (100 Mbps)

3 Gigabit Ethernet (1000 Mbps)

97

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Three generations of Ethernet

98

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Traditional Ethernet (10 Mbps)

MAC Sublayer
Physical Layer
Physical Layer Implementation

99

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

MAC Sublayer
It received data from upper layer & frames it.
It passes the frames to PLS sublayer for
encoding.
Access Method
Traditional Ethernet uses CSMA/CD as access
method .

100

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Minimum and maximum length

101

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Ethernet addresses in hexadecimal notation

Unicast, multicast and broadcast addresses

Unicast address define only one recipient.

Multicast address define a group of receivers.

In broadcast the recipient are all the nodes in the network


102

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Physical layer for 10 Mbps Ethernet

103

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Pysical Layer Signaling


PLS sublayer encodes and decodes data

Attachment Unit Interface Medium Attachment Unit (MAU)

MAU is medium dependent

It create appropriate signal for


each particular medium

104

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Categories of Traditional Ethernet

105

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

10Base 5: Thick Ethernet


10Base 5 uses bus topology and thick coaxial cable

Connection of a station to the medium using


10Base5

106

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


10Base 2: Thin Ethernet

10Base 2 uses bus topology and thin coaxial cable


Connection of stations to the medium using
10Base2

107

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

10Base T: Twisted Pair Ethernet

10Base T uses a physical star topology and twisted


pair cable (UTP or STP)

Connection of stations to the medium using


10Base-T

108

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


10Base F: Fiber Link Ethernet

10Base F uses a star topology and Fiber optics


cable

Connection of stations to the medium using


10Base-FL

109

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Fast Ethernet (100 Mbps)

MAC Sublayer
Physical Layer
Physical Layer Implementation

110

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Fast Ethernet physical layer

Reconciliation sublayer replaces PLS


PHY performs encoding & decoding which is
medium depandent.
111

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Medium Independent Interface (MII)

MII operates at both 10 and 100 Mbps


Provides parallel data path between PHY & RS

112

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Fast Ethernet implementations

113

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

100Base-TX implementation

100Base TX uses two pair of twisted pair cable in a


star topology

114

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Encoding and decoding in 100Base-TX

To achieve 100 Mbps data rate uses improved


encoding & decoding scheme
Multiline transmission three level (MLT-3)
encoding is used

115

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Figure 14.25 100Base-FX implementation

100Base FX uses two pair of fiber-optic cable in a


star topology

116

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Figure 14.26 Encoding and decoding in 100Base-FX

To maintain synchronization the encoder first


perform block encoding 4B/5B.
The data rate are then encoded into signal using
NRZ-I (Nonreturn to zero Invert)

117

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Figure 14.27 100Base-T4 implementation

100Base T4 uses four pair of UTP in a star topology


for transmitting 100mbps

118

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Figure 14.28 Using four wires in 100Base-T4

119

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

14.3 Gigabit Ethernet

MAC Sublayer
Access Method

Physical Layer

Physical Layer Implementation

120

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Gigabit Ethernet

Access Method
Gigabit Ethernet uses two approaches for medium
access 1) Half duplex using CSMA/CD.
2) Full duplex no need for CSMA/CD
Reconciliation Sublayer sends 8 bit parallel
data to Physical sublayer
GMII is a a specification that defines how RS is
connected to PHY sublayer.

121

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Physical layer in Gigabit Ethernet

122

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Gigabit Ethernet implementations

123

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Computer Networks , Topic 4 part 3


By Amir Mehmood

Wireless
LANs & Virtual LAN

124

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


15.1 IEEE 802.11

Architecture

Physical Layer

MAC Layer

Addressing Mechanism

125

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Architecture
Architecture defines two kinds of services
1) Basic Service Set (BSS) 2)Extended Service Set (ESS)

BSS
BSS consists of Wireless Stations & possibly a
central base station known as access point(AP)

126

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Extended Service Set (ESS)

ESS is made up of two or more BSSs with AP.


BSS connected through distribution system(wired LAN)

127

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

FHSS (Frequency hopping spread spectrum)

FHSS sender sends one carrier frequency for short time.


Then hops to another frequency for same time, and so on
After N hops cycle it repeats the process.
if bandwidth of signal is B, allocated spectrum is N*B.

128

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


DSSS (Direct Sequence Spread Spectrum)

DSSS each bit sends replace by sequence of bits(chipcode)


If N is the number of bits in chip code then data rate is
N *data rate of original bit stream.

129

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

MAC Layer (CSMA/CA and NAV)

Wireless LAN cannot use original implementation of CSMA/CD.


It uses NAV (Network Allocation Vector) for collision avoidance

130

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Addressing mechanism: case 1

A frame is going from A to B in a BSS without passing


through the distribution system

131

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Addressing mechanism: case 2

MAC frame is coming from distribution system through


AP and to going to station B.

132

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Addressing mechanism: case 3

MAC frame is going from a station to the distribution


system through AP.

133

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Addressing mechanism: case 4

MAC frame is destined from A to B from one AP to


another in wireless distribution system.

134

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Bluetooth

Bluetooth is a wireless LAN technology design to


connect different devices in an ad hoc network

Architecture

135

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Architecture
Bluetooth defines two types of networks:
piconets and scatternet
A piconet can have upto 8 stations one master and the rest are
slaves.
All slaves synchronize their clock & hopping sequence with master

136

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Scatternet

Piconets can be combined to form what is called scatternet.


A slaves can become a master in another piconet.

137

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Figure 15.17 Bluetooth layers

Baseband layer is roughly equivalent to MAC sub layer.


Radio layer is roughly equivalent to Physical sub layer.
Bluetooth devices are low power & short range (10m)

138

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Single-slave communication

139

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Figure 15.19 Multiple-slave communication

140

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Virtual LANs

VLANs create broadcast domains.


VLAN is configured by a software not
through physical wiring.

141

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

A switch connecting three LANs

142

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


A switch using VLAN software

143

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Two switches in a backbone using VLAN software

144

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Summary

Summarize this topic based on your learning through the lecture:

______________________________________________

______________________________________________

______________________________________________

______________________________________________

______________________________________________

______________________________________________

145

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Computer Networks , Topic 5


By Dr Adnan Nadeem

Internetworking,
& IP addressing

146

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Internetworks

Need For Network Layer

Internet As A Packet-Switched Network

Internet As A Connectionless Network

147

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Links in an internetwork

148

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Network layer in an internetwork

149

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Network layer at the source

150

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Network layer at a router

151

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

NNetwork layer at the destination

152

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Switching

Circuit switching: a physical link is dedicated


between source & destination.
Data is send as a stream of bits without packetizing.
153

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Datagram approach

Packet switching: Data is transmitted in discrete


units of variable length block called packets.

154

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Note:

Switching at the network layer in the


Internet is done using the datagram
approach to packet switching.

155

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Addressing
Internet Address
Classful Addressing
Subnetting

Classless Addressing
Dynamic Address Configuration

156

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Note:

An IP address is a 32-bit address.

The IP addresses are unique


and universal.

157

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Dotted-decimal notation

158

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Example 1
Change the following IP addresses from binary notation to dotted-
decimal notation.
a. 10000001 00001011 00001011 11101111
b. 11111001 10011011 11111011 00001111

Solution
We replace each group of 8 bits with its equivalent decimal
number (see Appendix B) and add dots for separation:
a. 129.11.11.239
b. 249.155.251.15

159

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Example 2
Change the following IP addresses from dotted-decimal notation to
binary notation.
a. 111.56.45.78
b. 75.45.34.78

Solution
We replace each decimal number with its binary equivalent
(see Appendix B):

a. 01101111 00111000 00101101 01001110


b. 01001011 00101101 00100010 01001110

160

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Note:

In classful addressing, the address


space is divided into five classes: A, B,
C, D, and E.

161

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Finding the class in binary notation

162

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Example 3
Find the class of each address:
a. 00000001 00001011 00001011 11101111
b. 11110011 10011011 11111011 00001111

Solution
See the procedure in Figure 19.11.

a. The first bit is 0; this is a class A address.


b. The first 4 bits are 1s; this is a class E address.

163

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Finding the class in decimal notation

Class A,B &C are use for unicast communication


Class D for multicast communication.
Class E address are reserved for special purposes.

164

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Example 4
Find the class of each address:
a. 227.12.14.87
b. 252.5.15.111
c. 134.11.78.56

Solution
a. The first byte is 227 (between 224 and 239); the class is D.
b. The first byte is 252 (between 240 and 255); the class is E.
c. The first byte is 134 (between 128 and 191); the class is B.

165

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Netid and hostid

166

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Figure 19.14 Blocks in class A

167

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Note:

Millions of class A addresses are


wasted.

168

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Figure 19.15 Blocks in class B

169

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Note:

Many class B addresses are wasted.

The number of addresses in class C is


smaller than the needs of most
organizations.

170

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Figure 19.16 Blocks in class C

171

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Network address

In classful addressing, the network


address is the one that is assigned to
the organization.

172

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Example 5
Given the address 23.56.7.91, find the network address.

Solution
The class is A. Only the first byte defines the netid. We can find the network
address by replacing the hostid bytes (56.7.91) with 0s. Therefore, the
network address is 23.0.0.0.

173

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Example 6
Given the address 132.6.17.85, find the network address.

Solution
The class is B. The first 2 bytes defines the netid. We can find the network
address by replacing the hostid bytes (17.85) with 0s. Therefore, the
network address is 132.6.0.0.

Example 7
Given the network address 17.0.0.0, find the class.

Solution
The class is A because the netid is only 1 byte.
174

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Note:

A network address is different from a


netid. A network address has both
netid and hostid,
with 0s for the hostid.

175

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Figure 19.18 Sample internet

176

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Note:

IP addresses are designed with two


levels of hierarchy.

A network with two levels of hierarchy

177

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Figure 19.20 A network with three levels of hierarchy (subnetted)

178

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Addresses in a network with and without
sSubnetting

179

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Figure 19.22 Hierarchy concept in a telephone number

180

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Table 19.1 Default masks
In Dotted-
Class In Binary Using Slash
Decimal

A 11111111 00000000 00000000 00000000 255.0.0.0 /8

B 11111111 11111111 00000000 00000000 255.255.0.0 /16

C 11111111 111111111 11111111 00000000 255.255.255.0 /24

181

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Note:

The network address can be found


by applying the default mask to any
address in the block (including itself).
It retains the netid of the block and
sets the hostid to 0s.

182

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Example 8
A router outside the organization receives a packet with destination
address 190.240.7.91. Show how it finds the network address to
route the packet.

Solution
The router follows three steps:
1. The router looks at the first byte of the address to find the
class. It is class B.
2. The default mask for class B is 255.255.0.0. The router ANDs
this mask with the address to get 190.240.0.0.
3. The router looks in its routing table to find out how to route the
packet to this destination. Later, we will see what happens if
this destination does not exist. 183

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Figure 19.23 Subnet mask

184

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Example 9
A router inside the organization receives the same packet with
destination address 190.240.33.91. Show how it finds the
subnetwork address to route the packet.

Solution
The router follows three steps:
1. The router must know the mask. We assume it is /19, as shown in
Figure 19.23.
2. The router applies the mask to the address, 190.240.33.91. The subnet
address is 190.240.32.0.
3. The router looks in its routing table to find how to route the packet to
this destination. Later, we will see what happens if this destination does
not exist.

185

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Example 10
In a class A subnet, we know the IP address of one of the hosts and
the mask as given below: IP address: 25.34.12.56
Masks : 255.255.0.0, Find the network address

Solution

186

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Example 11
For each of the following subnet masks used in class B, finds the
number of 1s that defines the subnet. A) 255.255.192.0
B) 255.255.224.0 , C) 255.255.0.0

Solution

187

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Super netting

Super netting is a concept where two or


more nework address space are combine to
create a larger network.

For Example an organization is assigned two


class C address for 400 computers
They can consider two Class C addresses
List network address and default mask
Super net two network addresses to create a
combined network address 188

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Dynamic Address Configuration

The computer connects to internet must


have
Its IP address
Its Mask (default or subnet)
The IP address of the router
The IP address of the name server

189

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

DHCP (Dynamic Host Configuration Protocol )

It configure the host dynamically


It is a client server program
Its server has two databases
1st binds physical address to IP address
2nd makes it dynamic

190

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


DHCP

It configure the host dynamically


It is a client server program
Its server has two databases (1st binds
physical address to IP address & 2nd
makes it dynamic).

191

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Summary

Summarize this topic based on your learning through the lecture:

______________________________________________

______________________________________________

______________________________________________

______________________________________________

______________________________________________

______________________________________________

192

McGraw-Hill The McGraw-Hill Companies, Inc., 2004


Computer Networks, Topic 8
By Amir Mehmood

Network Routing
& Routing Protocols

193

Routing

The network Routing handles the delivery


of the packets from source to final
destination by selecting the best possible
path between them.

194
Next hop & Network Specific Routing

195

Static Vs Dynamic Routing

A host or router keeps the routing table


contains entries for each destination to route
IP packets.

In static routing the table contains manual entries


for each destination.
Routing table cannot be updated in static routing.
Dynamic routing table is updated periodically using
dynamic routing protocols.
Dynamic routing can adapt to the changes in the
network automatically. 196
Dynamic Routing Protocols
Function(s) of Dynamic Routing Protocols:
Dynamically share information between routers.
Automatically update routing table when topology changes.
Determine best path to a destination.

197

Dynamic Routing Protocols


The purpose of a dynamic routing protocol is to:
Discover remote networks
Maintaining up-to-date routing information
Choosing the best path to destination networks
Ability to find a new best path if the current path is no
longer available

198
Classifying Routing Protocols
Dynamic routing protocols are grouped according to characteristics.
Examples include:
RIP
IGRP
EIGRP
OSPF
BGP

Autonomous System is a group of routers under the control of a


single authority.

199

Classifying Routing Protocols


Types of routing protocols:
Interior Gateway Protocols (IGP)
Exterior Gateway Protocols (EGP)

200
Classifying Routing Protocols

Interior Gateway Routing Protocols (IGP)


Used for routing inside an autonomous system &
used to route within the individual networks
themselves
Examples: RIP, EIGRP, OSPF
Exterior Routing Protocols (EGP)
Used for routing between autonomous systems
Example: BGPv4

201

Approaches to Routing Distance-vector


Each node (router or host) exchange information
with neighboring nodes
Neighbors are both directly connected to same network
Node maintains vector of link costs for each directly
attached network and distance and next-hop vectors
for each destination
Used by Routing Information Protocol (RIP)
Requires transmission of lots of information by each
router
Distance vector to all neighbors
Contains estimated path cost to all networks in
configuration
Changes take long time to propagate
202
Approaches to Routing Link-state
Designed to overcome drawbacks of distance-vector
When router initialized, it determines link cost on each
interface
Advertises set of link costs to all other routers in topology
Not just neighboring routers
From then on, monitor link costs
If significant change, router advertises new set of link costs
Each router can construct topology of entire configuration
Can calculate shortest path to each destination network
Router constructs routing table, listing first hop to each
destination
Router does not use distributed routing algorithm
Open shortest path first (OSPF) protocol uses link-state routing.
203

Classifying Routing Protocols


IGP: Comparison of Distance Vector & Link
State Routing Protocols
Distance vector
Routes are advertised as vectors
of distance & direction
Incomplete view of network
topology
Generally, periodic updates
Link state
Complete view of network
topology is created
Updates are not periodic
204
Link State Routing

205

Routing Protocols Metrics


o Metrics is a value used by a routing protocol to
determine which routes are better than others
Metrics used in IP routing protocols
Bandwidth
Cost
Delay
Hop count
Load
Reliability

206
Routing Information Protocol (RIP)(1)

o RIP has two versions RIPv1 & RIPv2


o RIP is a distance vector routing protocol
o Use hop count only as routing metrics
o Prevents routing loop by limiting the
number of hops in a path (maximum 16
hops)
o In RIP router transmits full updates after
every 30 seconds

207

RIP Message Format

oTwo Message Types

Request (sent by devices after initialization to request


a unicast copy of a neighbors routing table
Response (sent by RIP speaking devices by
broadcasting every 30 seconds to IP 255.255.255.255)

oSend via UDP/520 up to 25 routes per packet that


include IP network, metric, but no subnet mask

208
OSPF (Open shortest path first)

o OSPF is a link state routing algorithm


o Interior routing protocol operates within an
autonomous systems
o It gathers link state information & construct
network topology map to route packets
o It detects changes in network topology and
adapt accordingly

209

OSPF (Open shortest path first)

oEach router maintain database, reflects


network topology
oIt uses distributed, replicated database
model describes complete routing topology
o It uses link state advertisements (LSA)
carry local piece of routing topology
oDistribution of LSAs using reliable flooding

210
Sample AS

211

Directed Graph of AS reflecting


network topology

212
Border Gateway Protocol (BGP)
Border Gateway Protocol is the interdomain routing
protocol for the Internet for routing between
autonomous systems
Inter domain routing is normally based on policies
Currently in version 4 (1995)
Network administrators can specify routing policies
BGP is a distance vector protocol (However, routing
messages in BGP contain complete routes)

Uses TCP to transmit routing messages

213

Border Gateway Protocol (BGP)


An autonomous system uses BGP to advertise its
network address(es) to other ASs
BGP helps an autonomous system with the
following:
1. Collect information about reachable networks
from neighboring ASs
2. Disseminate the information about reachable
networks to routers inside the AS and to
neighboring ASs
3. Picks routes if there are multiple routes available

214
BGP Basics ...
Each AS originates a set of NLRI (Network
Layer Reach ability Information)
NLRI is exchanged between BGP peers
Can have multiple paths for a given prefix
Picks the best path and installs in the IP
forwarding table
Policies applied (through attributes)
influences BGP path selection

215

BGP Peers

A C

AS 100 AS 101
220.220.8.0/24 220.220.16.0/24
B D

BGP speakers E
are called peers
AS 102
Peers in different ASs
220.220.32.0/24
are called External Peers
eBGP TCP/IP
Peer Connection
Note: eBGP Peers normally should be directly connected. 216
BGP Peers

A C

AS 100 AS 101
220.220.8.0/24 220.220.16.0/24
B D

BGP speakers are E


called peers
AS 102
Peers in the same AS
220.220.32.0/24
are called Internal Peers
iBGP TCP/IP
Peer Connection
Note: iBGP Peers dont have to be directly connected. 217

BGP Peers

A C

AS 100 AS 101
220.220.8.0/24 220.220.16.0/24
B D

BGP Peers exchange e E


Update messages
containing Network Layer AS 102
Reachability Information 220.220.32.0/24

(NLRI)
BGP Update
Messages
218
Summary

Summarize this topic based on your learning through the lecture:

______________________________________________

______________________________________________

______________________________________________

______________________________________________

______________________________________________

______________________________________________

219

Computer Networks 7RSLF


%\$PLU0HKPRRG


Network Layer
Protocols ARP,IPv4
IPv6,ICMP

220
20-1 NETWORK LAYER PROTOCOL

In this topic, we discuss network layer protocol, ARP,


IPv4, IPv6, ICMP

Topics discussed in this section:


ARP RARP
ARP,
IPv4
IPv6 and its transition from IPv4

221

Overview

TCP UDP Transport


Layer

ICMP IP IGMP Network


Layer

Network
ARP Access
RARP Link Layer

Media
222
Types of Mapping

Two types of mapping: static and dynamic


Static Mapping
Table is used to associate an IP with a MAC address
Tables stores on each machine
Tables needs to be updated periodically to accommodate changes

Dynamic Mapping
A protocol is used to find IP address corresponding to the MAC or vice
versa
Two protocols are ARP (IP to MAC) and RARP (MAC to IP)

223

ARP and RARP

Note:
The Internet is based on IP addresses
Data link protocols (Ethernet, FDDI, ATM) may have
different (MAC) addresses
The ARP and RARP protocols perform the translation
between IP addresses and MAC layer addresses

ARP Ethernet MAC


IP address
address
(32 bit)
(48 bit)
RARP
224
Processing of IP packets by network device drivers

IP Output IP Input

Put on IP IP destination = multicast Put on IP


Yes
input queue or broadcast ? input queue
No
Yes
IP destination of packet Ethernet
IP datagram
= local IP address ? Driver
loopback
Driver No: get MAC
ARP demultiplex
address with ARP
ARP
Packet Ethernet Frame

Ethernet

225

Address Translation with ARP

ARP Request:
Argon broadcasts an ARP request to all stations on the
network: What is the hardware address of Router137?

226
Address Translation with ARP

ARP Reply:
Router 137 responds with an ARP Reply which contains the
hardware address

227

20-2 IPv4

The Internet Protocol version 4 (IPv4) is the delivery


mechanism used by the TCP/IP protocols.

Topics discussed in this section:


Datagram
Fragmentation
Checksum
Options
228
Position of IPv4 in TCP/IP protocol suite

229

IPv4 datagram format

Service defines QoS


Identification, Flags
& offset is for
fragmentation
TTL controls
maximum number of
hops
Protocol: defines
protocol that use the
services of IP layer
Checksum is used
for error detection

230
Table 20.1 Types of service

231

Encapsulation of a small datagram in an Ethernet frame

232
Protocol field and encapsulated data
IP datagram encapsulate data from several higher
level protocols
This field specify the protocol use by IP datagram

233

Table 20.4 Protocol values

234
Maximum transfer unit (MTU)

235

Table 20.5 MTUs for some networks

236
Flags used in fragmentation

237

IPv6

The network layer protocol in the TCP/IP protocol


suite is currently IPv4. Although IPv4 is well designed,
data communication has evolved since the inception of
IPv4 in the 1970s. IPv4 has some deficiencies that
make it unsuitable for the fast-growing Internet.

Topics discussed in this section:


Advantages
Packet Format
Extension Headers
238
IPv6 advantages over IPv4

Larger address space


IPv6 is 128 as compare to IPv4 32 bits, this increase
the address space
Better Header format
Options field is separated from the base header this
speeds up the routing process
Support for Security
Support for resource allocation (support for real
time audio & video)

239

IPv6 datagram header and payload

240
Format of an IPv6 datagram

241

Next header codes for IPv6

242
Comparison between IPv4 and IPv6 packet headers

243

Comparison between IPv4 options and IPv6 extension headers

244
20-4 TRANSITION FROM IPv4 TO IPv6

Because of the huge number of systems on the


Internet, the transition from IPv4 to IPv6 cannot
happen suddenly. It takes a considerable amount of
time before every system in the Internet can move from
IPv4 to IPv6. The transition must be smooth to prevent
any problems between IPv4 and IPv6 systems.

Topics discussed in this section:


Dual Stack
Tunneling
Header Translation
245

Three transition strategies

246
Dual stack

247

Tunneling strategy

248
Header translation strategy

249

Header translation

250
Internet Control Message
Protocol (ICMP)

ICMP use to communicate IP status and error


messages between source and routers

251

ICMP (Basic Functionality)

ICMP is provided within IP which


generates error messages to help IP
layers(best effort delivery)
Function of ICMP
a node recognizing a transmission problem
(TTL exceed, destination unreachable, etc.)
generates ICMP messages
ICMP provides some useful diagnostics about
network operation (ping, traceroute)

252
Basic Ideas
ICMP error messages never generates
due to:
ICMP error message selves
Broadcast, multicast
Others fragments, except first fragment
This to prevent broadcast storm
What are broadcast storm
a large number of broadcast datalink
frames transmitted nearly simultaneous
from several hosts
LAN may have been brought to standstill
253

Error reporting and error correction


When datagram delivery errors
occur, ICMP is used to report
these errors back to the
ICMP X
source of the datagram. msg
source
destination

Example
Workstation 1 is sending a datagram to Workstation 6
Fa0/0 on Router C goes down
Router C then utilizes ICMP to send a message back to Workstation 1
indicating that the datagram could not be delivered.
ICMP does not correct the encountered network problem.
Router C knows only the source and destination IP addresses of the
datagram, not know about the exact path the datagram took to Router
C, therefore, Router C can only notify Workstation 1 of the failure
ICMP reports on the status of the delivered packet only to the source
254

device.
Types of Error handle in ICMP
Five types of errors are handled through ICMP
Destination unreachable
When router cannot route datagram to destination then its is
discarded & host sends a destination unreachable message
Source quench (flow and congestion control)
It informs source that datagram is discarded
Its warns source of congestion in the path
Time exceeded (TTL =0 or Packet does not arrive on time )
Parameter Problem
Redirection (to update routing table of a host )

255

ICMP Query Messages


ICMP diagnose network problem through query messages
Echo request & reply
PING sends echo request to remote host which returns echo
reply to sender
Time-stamp request & reply
Determine round trip time for IP datagram travel b/w two
machines
Address Mask request reply
request sub network address mask & router sends reply
Router solicitation and advertisement
host wants to know routers connected to its network
which router are alive

256
Summary:

_______________________________________

_______________________________________

_______________________________________

_______________________________________

_______________________________________

_______________________________________

_______________________________________

257

McGraw-Hill The McGraw-Hill Companies, Inc., 2004

Computer Networks , Topic 8,9


By Amir Mehmood

Process to Process Delivery


TCP,UDP

258
PROCESS-TO-PROCESS DELIVERY

The transport layer is responsible for process-to-


process deliverythe delivery of a packet, part of a
message, from one process to another. Two processes
communicate in a client/server relationship

Topics discussed in this section:


Client/Server Paradigm
Multiplexing and Demultiplexing
Connectionless Versus Connection-Oriented Service
Reliable Versus Unreliable
Three Protocols
259

The transport layer is responsible for


process-to-process delivery.
Types of data deliveries

260
Port numbers

Port number is a transport layer address to identify


from multiple process running on destinations

261

IP addresses versus port numbers

262
IANA Internet Assigned Number Authority ranges

Socket address

263

Multiplexing and Demultiplexing

264
Error control

265

Position of UDP, TCP, and SCTP in TCP/IP suite

266
USER DATAGRAM PROTOCOL (UDP)

The User Datagram Protocol (UDP) is called a


connectionless, unreliable transport protocol. It does
not add anything to the services of IP except to provide
process-to-process communication instead of host-to-
host communication.
Topics discussed in this section:
Well Known Ports for UDP
Well-Known
User Datagram
Checksum
UDP Operation
Use of UDP
267

Connection less Vs Connection oriented

268
Well-known ports used with UDP

269

Example 23.1

In UNIX, the well-known ports are stored in a file called


/etc/services. Each line in this file gives the name of the
server and the well-known port number. The following
shows the port for FTP. Note that FTP can use port 21
with either UDP or TCP.

SNMP uses two port numbers (161 and 162), each for a
different purpose.

270
User datagram format

271

Note

UDP length
= IP length IP headers length

272
Figure 23.10 Pseudoheader for checksum calculation

273

Example 23.2

Figure 23.11 shows the checksum calculation for a very


small user datagram with only 7 bytes of data. Because
the number of bytes of data is odd, padding is added for
checksum calculation. The pseudoheader as well as the
padding will be dropped when the user datagram is
delivered to IP.

274
Checksum calculation of a simple UDP user datagram

275

Queues in UDP

276
TCP

TCP is a connection-oriented protocol; it creates a


virtual connection between two TCPs to send data. In
addition, TCP uses flow and error control mechanisms
at the transport level.

Topics discussed in this section:


TCP Services
TCP Features
Segment
A TCP Connection
Flow Control
Error Control
277

Table 23.2 Well-known ports


p used byy TCP

278
Stream delivery

Sending and receiving buffers

279

TCP segments

The bytes of data being transferred in each


connection are numbered by TCP.
The numbering starts with a randomly
generated number. 280
Example 23.3

The following shows the sequence number for each


segment:

281

The value in the sequence number field of a


segment defines the number of the first data
byte contained in that segment.

The value of the acknowledgment field in a


segment defines the number of the next byte a
party expects to receive.
The acknowledgment number is cumulative.

282
TCP segment format

283

Control field

Description
p off fflags
g in the control field
f

284
Connection establishment using three-way handshaking

285

A SYN segment cannot carry data, but it


consumes one sequence number.

A SYN + ACK segment cannot


carry data, but does consume one
sequence number.

An ACK segment, if carrying no data,


consumes no sequence number.

286
Data transfer

287

Connection termination using three-way handshaking

288
Note
The FIN segment consumes one
sequence number if it does
not carry data.

The FIN + ACK segment consumes


one sequence number if it
does not carry data.

289

Sliding window

290
Note

A sliding window is used to make


transmission more efficient as well as
to control the flow of data so that the
destination does not become
overwhelmed with data.
TCP sliding windows are byte-oriented.

291

Summary:

_______________________________________

_______________________________________

_______________________________________

_______________________________________

_______________________________________

_______________________________________

_______________________________________

292
Computer Networks , Topic 10
By Amir Mehmood

Congestion Control &


Quality of Services

293

Announcement:

Final Lab viva on 3rd November 2011


Last two topics left for the course

294
Traffic descriptors

295

Three traffic profiles

296
CONGESTION

Congestion in a network may occur if the load on the


networkthe number of packets sent to the network
is greater than the capacity of the networkthe
number of packets a network can handle. Congestion
control refers to the mechanisms and techniques to
control the congestion and keep the load below the
capacity.

Topics discussed in this section:


Network Performance

297

Queues in a router

298
Packet delay and throughput as functions of load

299

CONGESTION CONTROL

Congestion control refers to techniques and


mechanisms that can either prevent congestion, before
it happens, or remove congestion, after it has
happened. In general, we can divide congestion
control mechanisms into two broad categories: open-
loop congestion control (prevention) and closed-loop
congestion control (removal).

Topics discussed in this section:


Open Loop Congestion Control
Open-Loop
Closed-Loop Congestion Control
300
Congestion control categories

Open-loop policies prevents congestion before it happens


Closed-loop policies alleviate congestion after it happens

301

Backpressure method for alleviating congestion

Congested router informs the previous upstream router to reduce


the rate of outgoing packets

302
QUALITY OF SERVICE

Quality of service (QoS) is an internetworking issue


that has been discussed more than defined. We can
informally define quality of service as something a
flow seeks to attain.

Topics discussed in this section:


Flow Characteristics
Flow Classes

303

Flow characteristics

Jitter is the variation in delay for packets belonging to same


flow

304
TECHNIQUES TO IMPROVE QoS

In this section, we discuss some techniques that can


be used to improve the quality of service. We briefly
discuss four common methods: scheduling, traffic
shaping, admission control, and resource reservation.

Topics discussed in this section:


Scheduling
Traffic Shaping
Resource Reservation
Admission Control
305

FIFO queue

306
Priority queuing

307

Weighted fair queuing

308
Traffic Shaping
Traffic shaping is a mechanism to control amount and the data
rate of the traffic sent to network, leaky bucket, token bucket

Leaky bucket

309

A leaky bucket algorithm shapes bursty traffic into fixed-


rate traffic by averaging the data rate.
It may drop the packets if the bucket is full
Leaky bucket implementation

310
Token bucket

The token bucket allows bursty traffic at a regulated


maximum rate.

311

INTEGRATED SERVICES

Two models have been designed to provide quality of


service in the Internet: Integrated Services and
Differentiated Services. We discuss the first model
here.

312
Integrated Services is a flow-based QoS
model designed for IP.

Path messages

313

Resv messages

Reservation merging

314
Reservation merging

315

DIFFERENTIATED SERVICES

Differentiated Services (DS or Diffserv) was


introduced by the IETF (Internet Engineering Task
Force) to handle the shortcomings of Integrated
Services.

Topics discussed in this section:


DS Field

316
Note

Differentiated Services is a class-based


QoS model designed for IP.

317

DS field

-DS field contains two sub fields


-DSCP (Differentiated Service Code Point)
It defines the per hop behaviour for
each node that received the packet

-CU 2 bit subfield is not currently used

318
Traffic conditioner
To implement DS each nodes uses traffic conditioners
such as
Meter : checks if incoming flow matches the neighbor
traffic profile
Marker :either mark or down-mark a packet based on
information received by meter

319

Summary:

_______________________________________

_______________________________________

_______________________________________

_______________________________________

_______________________________________

_______________________________________

_______________________________________

320
Computer Networks , Topic 11
By Amir Mehmood

Introduction to Network
Security

321

Background
Information Security requirements have changed
in recent times
traditionally provided by physical and
administrative mechanisms
computer use requires automated tools to
protect files and other stored information
Intrusion detection & prevention methods use to
protect networks from attackers
use of networks and communications links
requires measures to protect data during
transmission

322
Definitions
Computer Security - generic name for the
collection of tools designed to protect data
and to thwart hackers
Network Security - measures to protect data
during their transmission & network services
and resources
Internet Security - measures to protect data
during their transmission over a collection of
interconnected networks
(William Stallings )

323

Security Trends

324
Aspects of Security
consider 3 aspects of information
security:
security attack
security mechanism
security service

325

Security Attack
any action that compromises the security of
information owned by an organization
information security is about how to prevent attacks,
or failing that, to detect attacks on information-
based systems
often threat & attack used to mean same thing
have a wide range of attacks
can focus of generic types of attacks
passive
active
326
Passive Attacks

327

Active Attacks

328
Security Service
enhance security of data processing systems and
information transfers of an organization
intended to counter security attacks
using one or more security mechanisms
often replicates functions normally associated
with physical documents
which, for example, have signatures, dates; need
protection from disclosure, tampering, or destruction;

329

Security Services
X.800:
a service provided by a protocol layer of
communicating open systems, which ensures
adequate security of the systems or of data
transfers

RFC 2828 (internet Security Glossary):


a processing or communication service provided by
a system to give a specific kind of protection to
system resources
330
Security Services (X.800)
Authentication - assurance that the communicating
entity is the one claimed
Access Control - prevention of the unauthorized use
of a resource
Data Confidentiality protection of data from
unauthorized disclosure
Data Integrity - assurance that data received is as
sent by an authorized entity
Non-Repudiation - protection against denial by one
of the parties in a communication

331

Security Mechanism
feature designed to detect, prevent, or
recover from a security attack
no single mechanism that will support all
services required
however one particular element underlies
many of the security mechanisms in use:
cryptographic techniques
hence our focus on this topic

332
Model for Network Security

333

Model for Network Security


using this model requires us to:
1. design a suitable algorithm for the security
transformation
2. generate the secret information (keys) used by
the algorithm
3. develop methods to distribute and share the
secret information
4. specify a protocol enabling the principals to use
the transformation and secret information for a
security service
334
Model for Network Access Security

335

Model for Network Access Security


using this model requires us to:
1. select appropriate gatekeeper functions to
identify users
2. implement security controls to ensure only
authorised users access designated information
or resources
trusted computer systems may be useful to
help implement this model

336
Summary
Background & definitions
Aspects of security attacks, services,
mechanisms
models for network (access) security

337

Computer Networks , Topic 12


By Amir Mehmood

Security attributes
& basics of
Cryptography
338
Key Security Attributes

Alice

secure secure
Bob sender receiver
channel

339

Key Security Attributes

Confidentiality
Integrity
Authentication
Availability
Non Reputation

340
Confidentiality
It ensures that information content cannot
be revealed by unauthorized entities.
It is a Process of concealing information on
the network. Alice

It prevents eavesdropping.

secure secure
Bob sender receiver
channel

Sam Snoop

341

Integrity
It ensures data packets are unaltered during
transition from source to destination.
Attackers can violate data integrity through
insertion, substitution, deletion or forging .
Different ways of maintaining integrity.

342
Authentication
It is a process that allows node to verify the
identity of the communicating node.
Two types of authentications
Alice
1)Entity authentication
2)Data authentication

Packet
secure secure
Bob sender receiver
Packet Alice receive
Packet

Sam
343

Availability
It ensuring that system resources and
services are available for use by authorized
users of the system.
Intruders can deny services through Alice
denial of services attacks

secure secure
Bob sender receiver
System resources Alice receive
& services Packet

344
Non Repudiation
It ensures a entity in a dispute cannot falsely
deny its action.
Non repudiation service prevents the sender
from denying sending a message which
he sent earlier Alice

Receiver cannot claim to have received


the message falsely
secure secure
Bob sender receiver
channel
Alice falsely
claim to have
received packet
345

Key Concepts in cryptography

Cryptosystems
Encryption & decryption
Cryptography
Crypto analysis
Cryptology

346
Cryptosytems
z Crypto system or a cipher system is the method
of disguising messages so that only certain
people can see through the disguise
z The original message is called the plain text.
z The disguised message is called a cipher text.
z The message is disguised using ENCRYPTION

347

Cryptosytems
z The message is received on the receiver side by
means of DECRYPTION
z The people who are supposed to be able to see
through the disguise are called recipients .
z The people who are not supposed to be able to
see through the disguise are called enemies ,
opponents ,interlopers or third parties

348
ENCRYPTION
Encryption means any procedure to convert
plain text into cipher text .
Procedure is usually a whole collection of
algorithms. The algorithms are labeled ; the
labels are called keys. For instance Caesars use
shift by n Encryption .
Decryption
Decryption means any procedure to convert
cipher text into plaintext.
Cipher text is decrypted by applying the
procedure or algorithm . For instance if shift by n
is used then it will be decrypt in the same way
349

Example
the message ( plain text) is written in 8 columns and 4 rows
CIPHER TEXT
PLAIN TEXT

DO*E
O*B*
* I EA

DO*NOT*G N* * T

O* I * WI LL OWT2

* BE* THER T I H*

E * AT 2 *L E *
GLR *

350
Cryptography

Cryptography is the art of creating and using


cryptosystems.
Cryptography is the art or science of keeping
messages secret
Cryptography deals with Security Standards
Methods, Principals for Security
Cryptography deals with all aspects of secure
messaging, authentication, electronic money,
and other applications.
351

Crypto analysis

Cryptanalysis is the art of breaking cryptosystems-


--seeing through the disguise.
Classical cryptanalysis involves an interesting
combination of analytical reasoning, application
of mathematical tools, Pattern finding, patience,
determination, and luck
Crypto analysis attacks : cipher-text only, know-
plaintext, chosen-plaintext & chosen-ciphertext

352
Cryptology

Cryptology is the study of both cryptography and


cryptanalysis.

Cryptology is the branch of mathematics that


studies the mathematical foundations of
cryptographic methods

353

Summary
Summarize this topic based on your learning
through the lecture:
______________________________________________

______________________________________________

______________________________________________

______________________________________________

______________________________________________

______________________________________________

354

S-ar putea să vă placă și