58
1 Network Model (Protocol and Layering) รศ. ดร. อนันต์ ผลเพิ่ม Asso. Prof. Anan Phonphoem, Ph.D. [email protected] http://www.cpe.ku.ac.th/~anan Computer Engineering Department Kasetsart University, Bangkok, Thailand 2017

Network Model (Protocol and Layering)

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Network Model (Protocol and Layering)

1

Network Model (Protocol and Layering)

รศ. ดร. อนันต์ ผลเพิม่

Asso. Prof. Anan Phonphoem, [email protected]

http://www.cpe.ku.ac.th/~anan

Computer Engineering Department

Kasetsart University, Bangkok, Thailand

2017

Page 2: Network Model (Protocol and Layering)

2

Outline

Network Model

Layering Concept

Techniques protocols use

Network Model

Page 3: Network Model (Protocol and Layering)

3

Data Communication

Hi

How are you

doing?

How are youdoing?

Hi

01010001 01010001

Hi

10010001 10010001

How are you

01010100 01010100

doing?

Hi

How are you

doing?

UserComputer

Page 4: Network Model (Protocol and Layering)

4

How can it happen?

A lot of work since user inputs data until the data is transmitted.

Should each application program take care all tasks?

NO

User

Page 5: Network Model (Protocol and Layering)

Communication: App's Viewpoint

Two network applications interact as if there is a dedicate pipe connecting them

But what's going on underneath?

What is inside the "cloud"?5

InternetA

App

B

App

Page 6: Network Model (Protocol and Layering)

6

Computer Communication Model

Modularity

Well-defined interfaces

Well-defined functions and protocol

Page 7: Network Model (Protocol and Layering)

Lord of the Rings

7

http://wallpapercave.com/map-of-middle-earth-wallpaper

Page 8: Network Model (Protocol and Layering)

Lord of the Rings: Light the Beacons

Gondor (by Gandalf) sends a signal to Rohan asking them for military aid

8

Page 9: Network Model (Protocol and Layering)

Question?

How fast is the Beacon of Gondor?Posted by Rhett Allain on July 30,2010http://scienceblogs.om/dotphysics/2010/07/30/how-fast-is-the-beacon-of-gond/

9

Page 10: Network Model (Protocol and Layering)

Question?

Who is the sender and receiver?

How can the delay occur?

How about the acknowledgement from Rohan?

10

Page 11: Network Model (Protocol and Layering)

11

Transmit a letter

Page 12: Network Model (Protocol and Layering)

What Actually Happens

12

Communication takes place thru many layers

Logical communication

Secretary:types a letter

Delivery boy:drops the letter

Secretary:reads and reportsthe message

Delivery boy:takes the letter

Post office:Processes and routes the letter

Postal truck

Page 13: Network Model (Protocol and Layering)

13

Layered (Software) Architecture

•Applications

•Allow interoperability

•Ensure reliable data transmission

•Moving data

•Physical connections

User Support

Transport

Network Support

Network

User

Page 14: Network Model (Protocol and Layering)

14

Open Systems Interconnection(OSI) Model

7 Application

6 Presentation

5 Session

4 Transport

3 Network

2 Data Link

1 Physical

User Support

Transport

Network Support

Network

User

Page 15: Network Model (Protocol and Layering)

OSI Layers in Real World

transmission medium

Reads the

message

Summarizes or

translates letter

Opens letter

Withdraws letter

from mailbox

Checks address

and sorts letter

Unpacks

packages

Unloads

from truck

Handwrites

a message7.Manager

Prepares

final version6.Assistant

Provides address

and packs letter5.Secretary

Delivers letter

to post office4.Driver

Checks address

and sorts letter3.Postal staff

Packs letters

for certain directions2.Postal staff

Loads on truck1.Postal staff

Pictures from Wikipedia

Page 16: Network Model (Protocol and Layering)

16

Old Protocol Stacks

Now they are replaced by TCP/IP

Page 17: Network Model (Protocol and Layering)

17

OSI model “It’s just a model”

7 Application

6 Presentation

5 Session

4 Transport

3 Network

2 Data Link

1 Physical

Applications

TCP/ UDP

IP

Physical

Data Link

TCP/IP

Page 18: Network Model (Protocol and Layering)

18

TCP/IP Protocol Suite (Internet Model)

Applications User service and interface5

Transport Process delivery + Error (TCP/UDP)4

NetworkPacket end-to-end (across network)

3

Data Link2

Physical (mechanical and electrical spec)1

Provide framesNode-to-node (same network segment)

Transmission bit streams

Move packets from source to destination

Reliable end-to-end (whole message)

Page 19: Network Model (Protocol and Layering)

Homework

1. Draw “The Lord of the Rings: Light the Beacons” in term of TCP/IP protocol suite

Explain

the actors for each layer

The protocol used

2. Give another example of communication

Draw diagram and explain in brief

19

Page 20: Network Model (Protocol and Layering)

20

Outline

Network Model

Layering Concept

Techniques protocols use

Layering Concept

Page 21: Network Model (Protocol and Layering)

21

Layering Concept

1. Interfaces between layers (Physical)

2. Peer-to-Peer process (Logical)

Page 22: Network Model (Protocol and Layering)

22

1. Interfaces between layers(Physical)

5

4

3

2

1

Above

Below

Page 23: Network Model (Protocol and Layering)

23

2. Peer-to-Peer process(Logical)

5

4

3

2

1

5

4

3

2

1

Page 24: Network Model (Protocol and Layering)

24

Application5

4 Transport

3 Network

2 Data Link

1 Physical

Application5

4 Transport

3 Network

2 Data Link

1 Physical

Direct connection

Identical Message

Page 25: Network Model (Protocol and Layering)

25

Application5

4 Transport

3 Network

2 Data Link

1 Physical

Connection via intermediate nodes

Application5

4 Transport

3 Network

2 Data Link

1 Physical

Network

Lin

kLin

k

Page 26: Network Model (Protocol and Layering)

26

Data Flow in a station

Application5

4 Transport

3 Network

2 Data Link

1 Physical

Hello

Hello543

Hello5432 T

1001101001011101011

4 Hello5

5 Hello

Page 27: Network Model (Protocol and Layering)

27

Data Flow

Page 29: Network Model (Protocol and Layering)

29

Physical Layer

Transmitting individual bits from one node to the next.

Page 30: Network Model (Protocol and Layering)

30

1. Physical Layer

Physical characteristics of interface

Stream of Bits (e.g., 001010100100)

Line config. (e.g., point-to-point)

Topology (e.g., bus, star)

Transmission mode (e.g., half-duplex)

Page 31: Network Model (Protocol and Layering)

31

Data Link Layer

Transmitting frames from one node to the next.

Page 32: Network Model (Protocol and Layering)

32

2. Data Link Layer

Physical addressing

Access control

Error control

Node-to-Node delivery (same network)

Page 33: Network Model (Protocol and Layering)

33

Node-to-node delivery

Page 34: Network Model (Protocol and Layering)

34

2. Data Link Layer Example

Page 35: Network Model (Protocol and Layering)

35

3. Network Layer

Delivery of packets from the source to the final destination

Page 36: Network Model (Protocol and Layering)

36

3. Network Layer

Logical Address

(e.g., IP address:158.108.33.66)

Routing (router, gateway)

Page 37: Network Model (Protocol and Layering)

37

Source-to-destination delivery

Page 39: Network Model (Protocol and Layering)

39

4. Transport Layer

Delivery of a message from one process to another

Page 40: Network Model (Protocol and Layering)

40

4. Transport Layer

Service-point addressing (port number)

Segmentation and assembly

Flow and error control

End-to-end delivery (across network)

Page 41: Network Model (Protocol and Layering)

41

Process-to-process delivery

Page 42: Network Model (Protocol and Layering)

42

Process-to-process delivery

Page 43: Network Model (Protocol and Layering)

43

5. Application Layer

Providing services to the user

Page 44: Network Model (Protocol and Layering)

44

5. Application Layer

User interfaces

Service supports (e.g., mail, FTP)

Page 45: Network Model (Protocol and Layering)

45

TCP/IP Protocol Suite (Internet Model)

Applications User service and interface5

Transport Process delivery + Error (TCP/UDP)4

NetworkPacket end-to-end (across network)

3

Data Link2

Physical (mechanical and electrical spec)1

Provide framesNode-to-node (same network segment)

Transmission bit streams

Move packets from source to destination

Reliable end-to-end (whole message)

Page 46: Network Model (Protocol and Layering)

46

OSI Model

7 Application

6 Presentation

5 Session

4 Transport

3 Network

2 Data Link

1 Physical

User service

Translate format, encrypt

Session manage, checkpoints

Reliable end-to-end (whole message)

Packet end-to-end (across network)

Node-to-node (same network segment)

Physical

Page 47: Network Model (Protocol and Layering)

47

Outline

Network Model

Layering Concept

Techniques protocols useTechniques protocols use

Page 48: Network Model (Protocol and Layering)

48

Techniques Protocols Use

Sequencing Number

for out-of-order delivery

to eliminate duplicate packets

Retransmission lost packets

Avoiding replay caused by excessive delay

Flow control to prevent data overrun

Mechanisms to avoid network congestion

Page 49: Network Model (Protocol and Layering)

49

Sequencing Number

Sender adds sequence no. in the packet

For out-of-order delivery

sorting in the list

To eliminate duplicate packets

discard the new one

Page 50: Network Model (Protocol and Layering)

50

Retransmission lost packets

To guarantee reliable transfer

Positive acknowledgement (ACK)

Retransmission

Retransmission

Page 51: Network Model (Protocol and Layering)

51

Avoiding replay caused by excessive delay

A packet from previous conversation comes late

Just discard the old packet

Detected by a unique ID (e.g. time)

Page 52: Network Model (Protocol and Layering)

52

Flow control to prevent data overrun

Sender / receiver may operate at different speedData is lost

Flow control

Stop-and-go (Stop-and-wait)

Sliding window

Page 53: Network Model (Protocol and Layering)

53

Stop-and-go (Stop-and-wait)

Page 54: Network Model (Protocol and Layering)

54

Sliding window

Page 55: Network Model (Protocol and Layering)

55

Sliding window

Page 56: Network Model (Protocol and Layering)

56

Comparison

Stop-and-go Sliding window

Can you compare throughput ?

Page 57: Network Model (Protocol and Layering)

57

1

25

3

4

6

7

8

Network congestion

Each connection is 3 Mbps

To avoid congestion control the incoming rate

Page 58: Network Model (Protocol and Layering)

58

Summary

Network Model OSI Model

TCP/IP protocol suite

Layering Concept Data flow

functions of each layer

Techniques protocols use Seq.no. / Retransmission / Congestion