Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

51
Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ

Transcript of Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Page 1: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Computer Networks 1

(Mạng Máy Tính 1)

Lectured by: Dr. Phạm Trần Vũ

Page 2: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Lecture 3: Networking Technologies

Reference:

Chapter 4 - “Computer Networks”,

Andrew S. Tanenbaum, 4th Edition, Prentice Hall, 2003.

Page 3: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Faculty of Computer Science and Engineering - HCMUT

Content

Channel Allocation Problem

Multiple Access Protocols

Page 4: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Faculty of Computer Science and Engineering - HCMUT

Two types of transmission technology

Point-to-Point Link Broadcast Link

Page 5: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Faculty of Computer Science and Engineering - HCMUT

Channel AllocationProblem

Who's first?

Page 6: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Faculty of Computer Science and Engineering - HCMUT

Channel AllocationProblem

Static Method Dynamic Method

Page 7: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Faculty of Computer Science and Engineering - HCMUT

Static Channel Allocation in LANs and MANs

KEY: Each user is assigned with a equal-portion of the bandwidth

Plus:1. Simple2. No interference

Minus:1. Ineffective bandwidth utilization 2. Some users will be denied in high traffic

Page 8: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Faculty of Computer Science and Engineering - HCMUT

Dynamic Channel Allocation in LANs and MANs

1. Station Model2. Single Channel Assumptions3. Collision Assumption4. Continuous Time vs Slotted Time5. Carrier Sense vs No Carrier Sense

Key assumptions

Page 9: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Faculty of Computer Science and Engineering - HCMUT

Multiple Access Protocols

ALOHA

Carrier Sense Multiple Access

Protocols

Collision-Free Protocols

Page 10: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Faculty of Computer Science and Engineering - HCMUT

ALOHA

Idea: Users can transmit whenever they have data to send

Two types of ALOHA:Pure ALOHASlotted ALOHA

The main difference between them is time and time and time

Aloha!!

Page 11: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Faculty of Computer Science and Engineering - HCMUT

Pure ALOHA

continuous timeno global time synchronization

frame

Send & then wait for collision

collision?

end

no

wait a random time

yes

Page 12: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Faculty of Computer Science and Engineering - HCMUT

Pure ALOHA – vulnerableperiod

t – frame time, to – starting time

Page 13: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Faculty of Computer Science and Engineering - HCMUT

Slotted ALOHA

1. Time is divided to equal intervals (slots)2. Need time synchronization

3. Frames can only be transmitted at starts of time slots

Page 14: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Faculty of Computer Science and Engineering - HCMUT

Slotted ALOHA – who's next?

Page 15: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Faculty of Computer Science and Engineering - HCMUT

Channel utilization

Page 16: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Faculty of Computer Science and Engineering - HCMUT

CSMA with Collision Detection (CSMA/CD)

Idea: A station stop transmitting its frame immediately after a collision is detected to save time and bandwidth

This is the basis of Ethernet LAN

How?

But: half-duplex

Page 17: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Faculty of Computer Science and Engineering - HCMUT

Propagation Delay & CD

Page 18: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Faculty of Computer Science and Engineering - HCMUT

Collision-free ProtocolsThe basic bit-map control

Idea: At the contention period, all station announce their needs to transmit. And then at the transmission period all registered stations take turn to send their frames.

Drawback: suffer n bits delay in contention period

Page 19: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Faculty of Computer Science and Engineering - HCMUT

Collision-Free ProtocolsThe binary countdown protocol

Unique binary station addresses with the same length

Rules:•Compete by “OR” with other bits in the same order•If there is a “0 to 1 transformation” in the result → give up

Page 20: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Faculty of Computer Science and Engineering - HCMUT

The Adaptive Tree Walk Protocol

Distributed Depth-first tree walk

Page 21: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Faculty of Computer Science and Engineering - HCMUT

The Adaptive Tree Walk Protocol - improvement

At heavy traffic, skip nodes father nodes 1,2,3,...

Number of nodes at level i: 2^i

Assume that, p is number of ready stations. Then k = p/2^i is number of ready stations per node at level i

Optimal: k = 1 or p/2^i= 1 from this

i = log2(p)

Page 22: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Faculty of Computer Science and Engineering - HCMUT

Wavelength Division MA Protocols (WDMA)

To allow multiple transmissions the spectrum is divided into channels (wavelength bands)

Total internal reflection:

n1>n2i1>ilimit

Page 23: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Faculty of Computer Science and Engineering - HCMUT

WDMA

Each station is assigned two channels: control & data and two transmitters and two receivers1. A fixed-wavelength receiver for listening to its own control channel.2. A fixed-wavelength transmitter for outputting data frames.3. A tunable transmitter for sending on other stations' control channels.4. A tunable receiver for selecting a data transmitter to listen to.

Page 24: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Faculty of Computer Science and Engineering - HCMUT

WDMA

Require global time synchronization for both channels

Page 25: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Faculty of Computer Science and Engineering - HCMUT

Wireless LAN Protocols

CSMA is not appropriate

Interference at the receiver, not at the sender

Hidden station problem

Exposed station problem

Page 26: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Faculty of Computer Science and Engineering - HCMUT

Wireless LAN Protocols - MACA

A sends RTS to B and begins transmission only after receiving CTS reply from B

Page 27: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Faculty of Computer Science and Engineering - HCMUT

Wireless LAN Protocols - MACA

1. C doesn't see CTS and thus is free to send its RTS

2. C and B may want to send RTS at the same time so cause collision.

Page 28: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

Faculty of Computer Science and Engineering - HCMUT

Wireless LAN Protocols - MACAW

Improvements:

1. ACK frame after each successful data frame

2. Use CSMA for RTS frame

Page 29: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

29

Ethernet

Ethernet Cabling

Manchester Encoding

The Ethernet MAC Sublayer Protocol

Switched Ethernet

Fast Ethernet

Gigabit Ethernet

Page 30: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

30

Ethernet Cabling

The most common kinds of Ethernet cabling.

Page 31: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

31

Ethernet Cabling (2)

Three kinds of Ethernet cabling.

(a) 10Base5, (b) 10Base2, (c) 10Base-T.

Page 32: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

32

Ethernet Cabling (3)

Cable topologies. (a) Linear, (b) Spine, (c)

Tree, (d) Segmented.

Page 33: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

33

Using voltage to encode binary code: 0 volts ~ 0 bit and 5 volts ~ 1 bit

0001000 = 10000000 or 01000000,

because the difference between an idle

sender (0 volts) and a 0 bit (0 volts) is

ambiguous -1 and +1? out of synchronization, long

sequence of 0 or 1

Manchester Encoding

Page 34: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

34

Using two voltages to encode one bit: 1 ~ high – low; 0 ~ low - high

010 = (-1,1)(1,-1)(-1,1)

Plus: every bit has a transition in the middle →

determine bit boundary & sync

Minus: double bandwidth, 10Mbs ~ 20 mil

changes per second

Manchester Encoding

Page 35: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

35

Differential Manchester encoding

1 bit ~ absence;0 bit ~ presence of a transition at

the start of the interval. In both cases, there is a

transition in the middle.

Plus: complex equipment

Minus: better noise immunity. (the 802.5 token ring)

All Ethernet systems use Manchester encoding

due to simplicity.(+ 0.85 volts; - 0.85 volts)

Page 36: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

36

Manchester Encoding

(a) Binary encoding, (b) Manchester encoding,

(c) Differential Manchester encoding.

Page 37: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

37

Ethernet MAC Sublayer Protocol

http://en.wikipedia.org/wiki/MAC_address

Page 38: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

38

Ethernet MAC Sublayer Protocol

Unicast: 1 receiver

Multicast: group of receivers

Broadcast: all

281,474,976,710,656 possible MAC addresses

Page 39: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

39

802.3 Ethernet frame structure

Page 40: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

40

802.3 Ethernet frame structure

Header: source and destination MAC

address; Ethertype protocol identifier field;

optional IEEE 802.1Q VLAN tag

Frame check sequence: 32-bit CRC (cyclic

redundancy check)

Page 41: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

42

Switched Ethernet

A simple example of switched Ethernet.

Page 42: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

43

Fast Ethernet

802.3u vs 802.12

802.3u: backward compatible unforeseen problems technology change period

Ideas: keep all the old stuffs

reduce the bit time from 100 nsec to 10 nsec

Page 43: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

44

Fast Ethernet

The original fast Ethernet cabling.

Page 44: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

45

Gigabit Ethernet

(a) A two-station Ethernet. (b) A multistation Ethernet.

Page 45: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

46

Gigabit Ethernet (2)

Gigabit Ethernet cabling.

Page 46: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

47

Wireless LAN Protocols

Hidden station problem

Exposed station problem

A wireless LAN. (a) A transmitting B. (b) B

transmitting A.

Page 47: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

48

The 802.11 MAC Sublayer

Protocol (1)

The use of virtual channel sensing using CSMA/CA

Page 48: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

49

The 802.11 MAC Sublayer

Protocol (2)

A fragment burst.

Page 49: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

50

The 802.11 Frame Structure

The 802.11 data frame.

Page 50: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

51

802.11 Services

• Association

• Disassociation

• Reassociation

• Distribution

• Integration

Distribution Services

Page 51: Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ.

52

802.11 Services

• Authentication

• Deauthentication

• Privacy

• Data Delivery

Intracell Services