Professional Documents
Culture Documents
CH 02 - DCC10e
CH 02 - DCC10e
Communications
Tenth Edition
by William Stallings
To transfer data
several tasks must
be performed:
• Control information
Semantics for coordination and
error handling
These execute on
computers that
support multiple
simultaneous
applications
Communication Layers
Network address
Network access
Computer B
1 2 t
( ) ( ) or
sp
"to port 2 on computer B" an
Tr
from to data
1 2
k
( ) or
t w ss
e e
"to computer B" N acc
a
dat from to from to data
to A B 1 2
m 2
fro
to 1
m B
fro
A
Communications
Network
fr A
om
Computer B
to
n
B
io
fr 1
at
om
ic
Entity Y p pl
data A
to
2
1 2
da
t
( ) ( ) or
ta
sp
an
from to data Tr
1 2
k
( ) or
t w ss
"this is to me" e e
N acc
from to from to data
A B 1 2
Transport
Transfer of data between
end points. May provide TCP, UDP
error control, flow control,
congestion control, reliable
delivery.
Internet ICMP,
OSPF,
Shield higher layers from
RSVP
details of physical network IPv4, IPv6 ARP
configuration. Provides
routing. May provide QoS,
congestion control.
Network Access/
Data Link
Logical interface to network Ethernet, WiFi, ATM, frame relay
hardware. May be stream or
packet oriented. May
provide reliable delivery.
Physical
Transmission of bit stream;
specifies medium, signal Twisted pair, optical fiber, satellite,
encoding technique, data terrestrial microwave
rate, bandwidth, and
physical connector.
Internet Layer
networks
Internet Layer
Uses the
Internet
Implemented in
Protocol (IP)
end systems and
to provide
routers
routing
function
Host-to-Host (Transport) Layer
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
TCP TCP
header segment
IP IP
header datagram
Network Network-level
header packet
Sequence Number
20 octets
Acknowledgement Number
Header
Reserved Flags Window
length
Options + Padding
Bit: 0 16 31
• Alternative to TCP
• Does not guarantee delivery, preservation of sequence,
or protection against duplication
• Enables a procedure to send messages to other
procedures with a minimum of protocol mechanism
• Adds port addressing capability to IP
• Used with Simple Network Management Protocol
(SNMP)
• Includes a checksum to verify that no error occurs in
the data
0 7
Byte1
Byte2
Byte3
Byte4
Byte5
etc.. etc...
1 OCTET = 8-bits= 1 BYTE
Byte5
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
• Used to send files from one system to another under user command
• Both text and binary files are accommodated
Quality of service
Protocols
Communications/networking
Synchronization
Compression
User interface
Database
Operating system
M ics
n
ph
d
io
un
xt
ot
ra
Computer architecture
So
Te
G
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
• Some technologies that are relevant to the
support of multimedia applications are:
Refers to the
Can deal with
JPG for still transmission
RTP priority, delay
images and
constraints,
networking
delay
technologies
variability
that can
constraints,
support high-
and other
volume
MPG for video SIP similar
multimedia
requirements
traffic
Sockets Programming
• Concept was 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
listen( )
port address
Listen on a socket
addresslength Length of the socket address structure
sockfd Socket on which the application is to listen
2.4
for inbound queuesize Number of inbound requests that can be queued
connections at any time
accept( ) Accept an sockfd Socket on which the connection is to be
inbound accepted
connection remoteaddress Remote socket address from which the
connection was initiated Core Socket
addresslength Length of the socket address structure
connect( ) Connect
outbound to a
sockfd Socket on which the connection is to be
opened
Functions
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 (Table can be found on
datagram socket data will be placed page 78 in textbook)
datalength Length of the data to be written, or amount of
data to be read
close( ) Close a socket sockfd Socket which is to be closed
Server Client
Open communication
socket()
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