Professional Documents
Culture Documents
Communications
Tenth Edition
by William Stallings
• Control
information for
Semantics coordination and
error handling
• Speed matching
Timing and sequencing
A Simple Protocol Architecture
These execute on
computers that
support multiple
simultaneous
applications
Communication Layers
Concerned with the exchange of
Network access layer data between a computer and the
network to which it is attached
Communication tasks
are organized into three Collects mechanisms in a common
Transport layer
relatively independent layer shared by all applications
layers:
Network access
Applications
Computer A
1 2 3 4
( ) ( ) ( ) ( )
Transport
Communications Port, or
Network access network Service access
point (SAP)
Computer C Applications
1 2 3
( ) ( ) ( )
Transport
Network address
Network access
Computer B
port 4 1
( )
2
( )
"to port 2 on computer B"
Application layer
from to data
1 2
( )
to app layer.
"to computer B"
from to from to data
A B 1 2
Communications
Network
Entity Y data
1 2
( ) ( )
from to data
1 2
( )
"this is to me"
from to from to data
A B 1 2
Internet Layer
Uses the
Implemented Internet
in end Protocol (IP)
systems and to provide
routers routing
function
Host-to-Host (Transport) Layer
TCP
• May provide
reliable end-to-end
service or merely • Most commonly
an end-to-end used protocol to
delivery service provide this
without reliability functionality
mechanisms
Transmission
Transmission
Control
Protocol
Application Layer
Contains the logic needed to support the various user
applications
A separate module is needed for each different type of
application that is peculiar to that application
Host A Host B
App X App Y
App Y App X
Port
1 2 3 2 4 6
Logical connection
(TCP connection)
TCP TCP
Global internet
IP address IP
NAP 1 NAP 2
Network 1 Network 2
Physical Physical
Ip and
PORT
Each host on a subnetwork must
have a unique global internet
address
Each process with a host must
have an address (known as a
port) that is unique within the
host
Tcp Which
port.
IP which
device
going Application
User data
Network byte stream
what Next
stepis
Router read TCP
TCP
network header segment
and change
Othe read
and keep
IP IP
header datagram
Network Network-level
header packet
Bit 9 4 8 16 31
Source port Destination port
Sequence number
20 Octal
Acknowledgment number
Header
Reserved Flags Window
Length
Checksum Urgent pointer
Options + Padding...
Bit 0 16 31
Source Port Destination port
8 Octls
Bit: 0 4 8 14 16 19 31
20 octets
Time to Live Protocol Header Checksum
Source Address
Destination Address
Options + Padding
Bit: 0 4 10 12 16 24 31
Source Address
40 octets
Destination Address
20 octets
Time to Live Protocol Header Checksum
Source Address
Destination Address
Options + Padding
Bit: 0 4 10 12 16 24 31
Source Address
40 octets
Destination Address
TCP UDP
IP
Physical
Layer
Request Request
Indication Indication
Response
Confirm
Multimedia
Human-computer interaction involving text, graphics, voice and video. Multimedia
also refers to storage devices that are used to store multimedia content.
Streaming media
Refers to multimedia files , such as video clips and audio, that begin playing
immediately or within seconds after it is received by a computer from the Internet
or Web. Thus, the media content is consumed as it is delivered from the server
rather than waiting until an entire file is downloaded.
TECHNOLOGIES
Quality of service
Protocols
Communications/networking
Synchronization
Compression
User interface
Database
Operating system
Computer architecture
MEDIA TYPE
MM e-mail
Collaborative work systems
MM conferencing
Streaming audio/video
VoIP
APPLICATION
Educational systems
• Electronic books with a multimedia
component, simulation and modeling
applets, and other teaching support
systems
Multimedia Technologies
Sometechnologies that are relevant to the
support of multimedia applications are:
Communicatio
Protocols for Quality of
Compression ns/networking
watch video service (QoS)
3gb for hd /h
Can deal
JPG for still Refers to the
with priority,
images transmission
RTP delay
same and
constraints,
resolution networking
delay
technologies
variability
that can
constraints,
support
MPG for and other
high-volume SIP
video similar
multimedia
requirement
traffic
s
Sockets Programming
Conceptwas developed in the 1980s in the UNIX
environment as the Berkeley Sockets Interface
De facto standard application programming interface (API)
Basis for Window Sockets (WinSock)
Enables communication between a client and server
process
May be connection oriented or connectionless
The Socket
type
(AF_UNIX, AF_INET, AF_INET6)
Type of socket to be opened (stream, datagram,
raw)
Table
2.4
protocol Protocol to be used on socket (UDP, TCP, ICMP)
bind( ) Bind a socket to a sockfd Socket to be bound to the port address
port address localaddress Socket address to which the socket is bound
addresslength Length of the socket address structure
listen( ) Listen on a socket sockfd Socket on which the application is to listen
for inbound queuesize Number of inbound requests that can be queued
connections at any time
accept( ) Accept an
inbound
sockfd Socket on which the connection is to be
accepted Core
connection remoteaddress Remote socket address from which the
connection was initiated
addresslength Length of the socket address structure
Socket
Connect sockfd Socket on which the connection is to be
Functions
connect( )
outbound to a opened
server remoteaddress Remote socket address to which the
connection is to be opened
addresslength Length of the socket address structure
send( ) Send and receive sockfd Socket across which the data will be sent or read
recv( )
data on a stream data Data to be sent, or buffer into which the read
read( ) socket (either data will be placed
write( ) send/recv or datalength Length of the data to be written, or amount of
read/write can be data to be read
used)
sendto( ) Send and receive sockfd Socket across which the data will be sent or read
recvfrom( ) data on a data Data to be sent, or buffer into which the read
datagram socket data will be placed (Table can be found
datalength Length of the data to be written, or amount of on page 78 in
data to be read textbook)
close( ) Close a socket sockfd Socket which is to be closed
Server Client
socket() Open communication
endpoint
Register well-known
bind()
address with system
blocks until
connection Open communication
from client socket() endpoint
connection
accept() creates
establishment Set up connection
a new socket to connect()
to server
serve the new
client request
data (request)
receive() send() Send/receive data
process
request
data (reply)
send() receive() Send/receive data