0% found this document useful (0 votes)
22 views29 pages

Lecture 3

1) Protocols and layering is the main structuring method used to divide up network functionality. Each layer provides encapsulated services to the higher layer. 2) Encapsulation is the mechanism used for layering, where each lower layer wraps the higher layer content and adds its own header. This creates messages that flow through the layers. 3) Layering provides advantages like information hiding, which allows different systems to interconnect using different link layer protocols, as long as they support the same higher layer protocols.

Uploaded by

Ale Moreno
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views29 pages

Lecture 3

1) Protocols and layering is the main structuring method used to divide up network functionality. Each layer provides encapsulated services to the higher layer. 2) Encapsulation is the mechanism used for layering, where each lower layer wraps the higher layer content and adds its own header. This creates messages that flow through the layers. 3) Layering provides advantages like information hiding, which allows different systems to interconnect using different link layer protocols, as long as they support the same higher layer protocols.

Uploaded by

Ale Moreno
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

ECE534/634 Communication Networks

CSC424 Computer Networks

Protocols and Layers

1
Previously …
1. Network-application interfaces define how apps use
the network
– Sockets are widely used in practice
– Lets apps talk to each other via hosts; hides the details of
the network

2. Network-network interfaces define how nodes work


together
– Traceroute can peek in the network

2
Client-Server Example Using Sockets

Client (host 1) Time Server (host 2)


1: socket
1: socket 2: bind
connect 3: listen
4: accept*
5: connect*
request 6: recv*
7: send
8: recv* reply
9: send
disconnect
10: close 10: close *= call blocks

3
Protocols and Layers
• The network does much for apps
– Make and break connections
– Find a path through the network
– Transfers information reliably
– Transfers arbitrary length information
– Send as fast as the network allows
– Shares bandwidth among users
– Secures information in transit
– Let many new hosts be added
– …

• Need a form of modularity to help manage complexity and


support reuse

4
Protocols and Layers
• Protocols and layering is the main structuring method used to
divide up network functionality
– Each instance of a protocol talks virtually to its peer using the protocol
– Each instance of a protocol uses only the services of the lower layer

Instance of protocol X Peer instance


Protocol X
X X

Service provided by Protocol Y


Lower layer instance
(of protocol Y)
Y Y

Node 1 Node 2
5
Protocols and Layers
• Set of protocols in use is called a protocol stack

6
Protocols and Layers
• Protocols you’ve probably heard of
– TCP, IP, 802.11, Ethernet, HTTP, SSL, DNS, … and
many more
Browser

• An example protocol stack HTTP


– Used by a web browser on TCP
a host that is wirelessly IP
connected to the Internet 802.11

7
Encapsulation
• Encapsulation is the mechanism used to effect
protocol layering
– Lower layer wraps higher layer content, adding its
own information to make a new message for delivery
• What should be added
– Protocol information
– Some functionalities may include proper data
sequencing, error detection and control, flow control,
congestion control, routing information, etc.

8
Encapsulation
• Message “on the wire” begins to look like an onion
– Lower layers are outermost

HTTP
HTTP
TCP HTTP T
TCP

IP TCP HTTPa T
IP

802.11 IP TCP HTTPa Ta 802.11

9
Encapsulation
802.11 IP TCP HTTPa Ta

Highest Layer

Lowest Layer

10
Encapsulation
HTTP HTTP

TCP TCP

IP IP

802.11 802.11
(wireless)

802.11 IP TCP HTTP Taa

Normally draw message like this: each layer adds its own header

802.11 IP TCP HTTP


11
Practice can be more complicated
802.11 IP TCP HTTP

• Trailers
– Control information added in the end

• Information can be transformed in diverse ways


– Encryption or compression

• Long messages divided into many small messages

12
De-encapsulation

SMTP HTTP DNS

TCP UDP

IP ARP

Type value Ethernet

Ethernet IP TCP HTTP

13
Advantage of Layering
• Information hiding and reuse
Browser Server Browser Server

HTTP HTTP HTTP HTTP

TCP TCP TCP TCP


or
IP IP IP IP

Ethernet Ethernet 802.11 802.11

14
Advantage of Layering
• Using information hiding to connect different systems

Browser Server

HTTP HTTP

TCP IP TCP HTTP TCP

IP IP IP IP

802.11 802.11 Ethernet Ethernet

802.11 IP TCP HTTP Ethernet IP TCP HTTP

15
Advantage of Layering
• Using information hiding to connect different systems

Browser Server

HTTP HTTP

TCP IP TCP HTTP TCP

IP IP IP IP

802.11 802.11 Ethernet Ethernet

802.11 IP TCP HTTP Ethernet IP TCP HTTP

16
Disadvantage of Layering
• Adds overhead
– But minor for long messages

• Hides information
– App might care whether it is running over wired or
wireless!

17
Still not know
• What functionality should we implement at
which layer?
– Key design questions
• The number of layers should be large
• The number of layers should be small
• Changes made in one layer should not need changes in
other layers.
• Each layer should provide encapsulated services to the
next higher layer
– Reference models provide frameworks that guide
us
18
OSI “7 layer” Reference Model
• A principled, international standard, to connect systems
– Influential, but not used in practice

(Open Systems Interconnection)

-Provides functions needed by users


-Converts different representations
-Manages task dialogs
-Provides end-to-end delivery
-Sends packets over multiple links
-Sends frames of information
-Sends bits as signals
19
Internet Reference Model
• A four layer model based on experience; omits
some OSI layers and uses IP as the network
layer
OSI Reference Internet Reference
Model Model

-Programs that use network service


-Provides end-to-end data delivery
-Send packets over multiple networks
-Send frames over a link
20
Internet Reference Model
• Examples of common protocols in each layer

7 Application SMTP HTTP RTP DNS

4 Transport TCP UDP

3 Internet IP

2/1 Link Ethernet 4G


Cable DSL 802.11

IP TCP UDP Ethernet 802.11 HTTP STMP


21
Layer-based Names
• For units of data • For devices in the
network
Layer Unit of Data
Application Message – Physical: Repeater (or
Transport Segment hub)
Network Packet – Link: Switch (or bridge)
Link Frame – Network: Router
Physical Bit

22
A Note About Layers
• They are guidelines, not strict
– May have multiple protocols working together in
one layer
– May be difficult to assign a specific protocol to a
layer

23
Reference Model used in this Course
• Mostly follow the Internet
– A little more about the Physical layer
7 Application -Programs that use network service
4 Transport -Provides end-to-end data delivery
3 Internet -Send packets over multiple networks
2 Link -Send frames over a link
1 Physical -Send bits using signals

24
Lecture Progression
• Bottom-up through the layers
Application -HTTP, DNS, CDNs
Transport -TCP, UDP
Internet -IP, NAT, BGP
Link -Ethernet, 802.11
Physical -Wires, fiber, wireless

25
Physical Layer
• Concerns how signals are used to transfer
message bits over a link
– Wires etc. carry analog signals
– We want to send digital signals

10110… …10110

Signal
A Simple Model of “Link”
Message

Message

• An abstraction of a physical channel


– Rate (or bandwidth, capacity, speed) in bits/sec
– Propagation delay in seconds, related to length
(propagation delay)

• Broadcast? Error rate? Broadcast Error rate


Wire No Low
Wireless Yes High
Message Latency
• Latency is the delay to send a message over a link
– Transmission delay: time to put M-bit message “over
the wire” M/R

– Propagation delay: time for bits to propagate across


the link D = Length/c

– Combining together L = M/R + D

• (A third kind: queuing delay: waiting time for a message


to be sent since it is ready)

28
Latency Examples
• “Dialup” with a telephone modem:
– D = 5ms, R = 56 kbps, M = 1500 bytes
L = 5ms + 1500*8/56e3 = 219 ms

• Broadband cross-country link:


– D = 100ms, R = 10 Mbps, M = 1500 bytes
L = 100ms + 1500*8/10e6 = 101 ms

29

You might also like