Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
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
2018
2
Outline
◼ Network Model
◼ Layering Concept
◼ Techniques protocols use
Network Model
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
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
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
6
Computer Communication Model
◼ Modularity
◼ Well-defined interfaces
◼ Well-defined functions and protocol
Lord of the Rings
7
http://wallpapercave.com/map-of-middle-earth-wallpaper
Lord of the Rings: Light the Beacons
◼ Gondor (by Gandalf) sends a signal to Rohan asking them for military aid
8
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
Question?
◼ Who is the sender and receiver?
◼ How can the delay occur?
◼ How about the acknowledgement from Rohan?
10
11
Transmit a letter
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
13
Layered (Software) Architecture
•Applications
•Allow interoperability
•Ensure reliable data transmission
•Moving data
•Physical connections
User Support
Transport
Network Support
Network
User
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
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
16
Old Protocol Stacks
Now they are replaced by TCP/IP
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
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)
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
20
Outline
◼ Network Model
◼ Layering Concept
◼ Techniques protocols use
Layering Concept
21
Layering Concept
1. Interfaces between layers (Physical)
2. Peer-to-Peer process (Logical)
22
1. Interfaces between layers(Physical)
5
4
3
2
1
Above
Below
23
2. Peer-to-Peer process(Logical)
5
4
3
2
1
5
4
3
2
1
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
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
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
27
Data Flow
29
Physical Layer
Transmitting individual bits from one node to the next.
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)
31
Data Link Layer
Transmitting frames from one node to the next.
32
2. Data Link Layer
◼ Physical addressing
◼ Access control
◼ Error control
◼ Node-to-Node delivery (same network)
33
Node-to-node delivery
34
2. Data Link Layer Example
35
3. Network Layer
Delivery of packets from the source to the final destination
36
3. Network Layer
◼ Logical Address
(e.g., IP address:158.108.33.66)
◼ Routing (router, gateway)
37
Source-to-destination delivery
39
4. Transport Layer
Delivery of a message from one process to another
40
4. Transport Layer
◼ Service-point addressing (port number)
◼ Segmentation and assembly
◼ Flow and error control
◼ End-to-end delivery (across network)
41
Process-to-process delivery
42
Process-to-process delivery
43
5. Application Layer
Providing services to the user
44
5. Application Layer
◼ User interfaces
◼ Service supports (e.g., mail, FTP)
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)
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
47
Outline
◼ Network Model
◼ Layering Concept
◼ Techniques protocols useTechniques protocols use
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
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
50
Retransmission lost packets
◼ To guarantee reliable transfer
◼ Positive acknowledgement (ACK)
◼ Retransmission
Retransmission
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)
52
Flow control to prevent data overrun
◼ Sender / receiver may operate at different speed➔Data is lost
◼ Flow control
◼ Stop-and-go (Stop-and-wait)
◼ Sliding window
53
Stop-and-go (Stop-and-wait)
54
Sliding window
55
Sliding window
56
Comparison
Stop-and-go Sliding window
Can you compare throughput ?
57
1
25
3
4
6
7
8
Network congestion
Each connection is 3 Mbps
To avoid congestion ➔ control the incoming rate
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