computer networking
TRANSCRIPT
Shaowen Yao, School Of Software, YNU 1
Computer Networking
— — A Top-Down ApproachFeaturing the Internet
By Shaowen Yao
Shaowen Yao, School Of Software, YNU 2
Foreword: Before The lecture begin Lecturer and tutorial assistant:
Dr. Yao Shaowen (姚绍文), Mr. Tian Kebin(田克斌)
Prof. Of School of Software
Tel: 5038650(O),5032263(L),Email: [email protected]
Text Book and Reference Books:
Computer Network -- James F. Kurose
Computer Networks -- Andrew S. Tannenbaum - 3rd Edition
Internetworking with TCP/IP, Volume 1; Protoco1s, and Architecture -2nd Edition
Operating Systems -Internals and Design Principles - William Stallings
计算机网络 –谢希仁 –2nd and 3rd Edition(In Chinese)
Etc.
Assessment Procedure:
Exam — — 70%
Middle-term examination — — 20%
Exercise — — 10%
Some Experiment, Practice and Exercise will be assigned during the tutorial hours
Shaowen Yao, School Of Software, YNU 3
Foreword: Before The lecture begin
Some Requirements:
Not necessary to present but must keep silent.
Questions and good suggestions are encouraged to be given out in time
during lecturing hours.
Self-study with the help of Internet are greatly encouraged. After tutorial hours,
you can find and learn some useful protocols, such as HTTP, LDAP, SOAP,
IIOP of CORBA, NAT and something else. section 1.1.3 list some useful
hyperlinks.
Experiment and Practice:
Experiment: to configure network and some network equipments, such as
Firewall, Switch;
Practice: Programming in Java, C++ or ANSI C to implement core protocols,
and analyzing the implementation of some protocols with free source codes.
Lecture Notes Download:
URL: ftp://202.203.32.52
Username: seinetwork(password:seiynu)
Shaowen Yao, School Of Software, YNU 4
After the course, you should: Learn architecture of computer network, Master TCP/IP suite;
Master computer network protocol, network layering and key protocols of
each layer;
Master typical transmission media, data switch principle;
Master protocols of application layer and programming of some typical
application layer protocols;
Master functionality of transport layer, particularly TCP and UDP
programming;
Master functionality of network layer, particularly IP address and routing;
Master functionality of DLL and LAN, focusing on some basic concepts,
protocol, error control and IEEE standard for LAN;
Learn multi-media transmission;
Learn core concepts, key issues and foundation of network information
security;
Learn other key issues of computer network, such as Network
Management, C/S computing, Distributed computing, PKI and so on.
Shaowen Yao, School Of Software, YNU 5
Chapter 1— —Computer Networksand the Internet
Shaowen Yao, School Of Software, YNU 6
Goal:
get context, overview,
“feel” of networking
more depth, detail
later in course
approach:
descriptive
use Internet as
example
Overview:
what’s the Internet
what’s a protocol?
network edge
network core
access net, physical media
performance: loss, delay
protocol layers, service models
backbones, NAPs, ISPs
history
ATM network
Shaowen Yao, School Of Software, YNU 7
Computer Network, internet and Internet
1、 What is network?— — Human network as an example.
Computer Network: the collection of computers:Computer Network: the collection of computers:
Via communication linksVia communication links
With the target to share resourceWith the target to share resource
Resource include: hardware/software/Resource include: hardware/software/
information/data and something useful to othersinformation/data and something useful to others
2、What is computer network?
3、What is internet?
3、What is Internet?
Shaowen Yao, School Of Software, YNU 8
internet and Internet
1、In computer network— — Computer is theelement of the set.
Internet is one special internet;Internet is one special internet; Internet is a worldInternet is a world--wide computer network;wide computer network;
2、What is internet?
3、What is Internet?
the internet is the interconnection ofthe internet is the interconnection of ““ComputerComputerNetworkNetwork””, internet can be seen as: the collection of, internet can be seen as: the collection ofcomputer networks, i.e. Network of networks.computer networks, i.e. Network of networks.
4、What support the network and Internet to run well:Various protocols;Various protocols;
Shaowen Yao, School Of Software, YNU 9
What’s the Internet: “nuts and bolts” view
millions of connected
computing devices: hosts,
end-systems
pc’s, workstations, servers
PDA’s, phones, toasters
running network apps
communication links
fiber, copper, radio, satellite
routers: forward packets
(chunks) of data thru
network
local ISP
companynetwork
regional ISP
router workstation
servermobile
Shaowen Yao, School Of Software, YNU 10
What’s the Internet: “nuts and bolts” view
protocols: control sending,
receiving of msgs
e.g., TCP, IP, HTTP, FTP, PPP
Internet: “network of networks”
loosely hierarchical
public Internet versus private
intranet
Internet standards
RFC: Request for comments
IETF: Internet Engineering Task
Force
local ISP
companynetwork
regional ISP
router workstation
servermobile
Shaowen Yao, School Of Software, YNU 11
Some concepts
1、Hosts or end systems: the computing deviceshooked up to the Internet.
2、TCP/IP: TCP/IP suite are the Internetprincipal protocols.
3、ISP: Internet Service Provider.
TheThe topologytopology of the Internet;of the Internet;
Access network;Access network;
Regional ISP;Regional ISP;
National and international ISP;National and international ISP;
Shaowen Yao, School Of Software, YNU 12
Some concepts
Voice communication vs. packet switching.
TeleTele--communication: before transmission, a physical linkcommunication: before transmission, a physical linkconnection is established;connection is established;
The Internet and Network employ a technique named asThe Internet and Network employ a technique named as ““packetpacketswitchingswitching”” instead of a dedicated path, e.g., IP packetinstead of a dedicated path, e.g., IP packet
Packet switching allows multiple communicating end systems toPacket switching allows multiple communicating end systems toshare a path, even parts of a path at the same time.share a path, even parts of a path at the same time.
5、With protocols, how can the information or data besent on network or Internet:
4、Communication links: to connect every kinds of endsystem together.
Links are made up of different types of physical media, includinLinks are made up of different types of physical media, includingg
coaxial cable, copper wire, fiber optics, radio spectrum;coaxial cable, copper wire, fiber optics, radio spectrum;
Link bandwidth: the link transmission rate in bits/sec.Link bandwidth: the link transmission rate in bits/sec.
Shaowen Yao, School Of Software, YNU 13
Some concepts
7、Intranet.
Private Networks;Private Networks;
Use the same Internet Technology (the same typesUse the same Internet Technology (the same typesof host, routers, links, protocols, and standards).of host, routers, links, protocols, and standards).
Packet switching allows multiple communicating endPacket switching allows multiple communicating endsystems to share a path, even parts of a path atsystems to share a path, even parts of a path atthe same time.the same time.
6、Who take the responsible to standardize theprotocol for network.
There are many organizations with high reputationThere are many organizations with high reputationto produce protocols: IEEE, ITUto produce protocols: IEEE, ITU--T(CCITT), ISO,T(CCITT), ISO,IETFIETF… …… …
Shaowen Yao, School Of Software, YNU 14
IETF and RFC documentations
Internet Engineering Task Force (IETF)
Open organization - anyone may join
Primarily dedicated to development of the Internet
protocols.
Ideas are presented as RFCs and go through a
review process
RFC standards described in RFC 1602
Proposed
Draft
Standard
Shaowen Yao, School Of Software, YNU 15
IETF and RFC documentations
Requests For Comment (RFC)
Describe formally (and sometimes not soformally) everything about the Internet;;
Actually, RFCs are really a form of Memo;
All RFC docs are available on-line:www.ietf.org/rfc.html;
We use RFCs to learn about SMTP (821),
HTTP (2616), for example.
Shaowen Yao, School Of Software, YNU 16
What’s the Internet: a service view
Communication infrastructure
enables distributed
applications:
WWW, email, games, e-
commerce, databases, voting,
more?
To enable distributed apps.,
the Internet must provide
one or more services to make
distributed apps. transparent
across the underlied physical
network.
Shaowen Yao, School Of Software, YNU 17
What’s the Internet: a service view
communication services
provided:
Connection-Oriented: to
guarantee Quality of Service
(QOS) of data transmission
between two peers. Peer can be
host, component, computing
entity like process or object.
connectionLess: without any
guarantees on QOS of data
transmission.
Do you give some examples in
real life like the services?
Shaowen Yao, School Of Software, YNU 18
What’s the Internet: a service view
Internet and applications:
Internet is an infrastructure to
allow various applications to be
invented and deployed, e.g.,
early email, ftp, and etc.
Advance and new development is
the eventual power to make the
Internet grow up.
Shaowen Yao, School Of Software, YNU 19
What’s a protocol?
human protocols:
“what’s the time?”
“I have a question”
Run different protocols,
e.g., different languages.
… specific msgs sent
… specific actions takenwhen msgs received, orother events
… Without protocol, withoutcommunication.
network protocols:
machines rather than
humans
all communication activity
in Internet governed by
protocols
protocols define format, order
of msgs sent and received
among network entities, and
actions taken on msg
transmission, receipt
Shaowen Yao, School Of Software, YNU 20
What’s a protocol?
a human protocol and a computer network protocol:
Q: Other human protocol?
Hi
Hi
Got thetime?
2:00
TCP connectionreq.
TCP connectionreply.
Get http://cs.smith.edu/Welcome.html
<file>time
Protocol is very important, learning computer network isfocused on learning network protocols, to understandingthe what, why, and how of networking protocols.
Shaowen Yao, School Of Software, YNU 21
Shaowen Yao, School Of Software, YNU 22
A closer look at network structure:
network edge:
applications and
hosts
network core:
routers
network of networks
access networks,
physical media:
communication links
Shaowen Yao, School Of Software, YNU 23
Another view of computer Network
Computer Network =Computer Network =
Communication subnet + Resources subnetCommunication subnet + Resources subnet
or Communication subnet + User subnetor Communication subnet + User subnet
ResourcesResourcesSubnetSubnet
CommunicationSubnet
CommunicationCommunicationSubnetSubnet
HostHost
Host
Host
HostHost
Host
Shaowen Yao, School Of Software, YNU 24
The network edge:
end systems (hosts):
run application programs
e.g., WWW, email
at “edge of network”
client/server model
client host requests, receives
service from server
e.g., WWW client (browser)/
server; email client/server
peer-peer model:
host interaction symmetric
e.g.: teleconferencing
Shaowen Yao, School Of Software, YNU 25
Network edge: connection-oriented service
Goal: data transfer between end
sys.
handshaking: setup (prepare
for) data transfer ahead of
time
Hello, hello back human
protocol
set up “state” in two
communicating hosts
TCP Connection: like reg. letter
In a very loose manner;
Only the end systems is aware;
Virtual Connection: vs. physical
connection in circuit switching.
TCP service [RFC 793]
TCP - Transmission Control
Protocol
Internet’s connection-oriented
service
reliable, in-order byte-stream
data transfer
loss: acknowledgements and
retransmissions
flow control:
sender won’t overwhelm receiver
congestion control:
senders “slow down sending rate”
when network congested
Shaowen Yao, School Of Software, YNU 26
Network edge: connectionless service
Goal: data transfer
between end systems
same as before!
UDP - User Datagram
Protocol [RFC 768]:
Internet’s connectionless
service - no handshaking
unreliable data transfer
no flow control
no congestion control
App’s using TCP:
HTTP (WWW), FTP
(file transfer), Telnet
(remote login), SMTP
(email)
App’s using UDP:
streaming media,
teleconferencing,
Internet telephony
Shaowen Yao, School Of Software, YNU 27
Shaowen Yao, School Of Software, YNU 28
The Network Coremesh of interconnected routers
the fundamental question: how is data transferred
through net?
circuit switching: dedicated
circuit per call: telephone
net
packet-switching: data sent
thru net in discrete “chunks”
Shaowen Yao, School Of Software, YNU 29
Network Core: Circuit Switching
End-to-end resources
reserved for “call”
link bandwidth, switch
capacity
dedicated resources: no
sharing
circuit-like (guaranteed)
performance
call setup required
Shaowen Yao, School Of Software, YNU 30
Visualized circuit switching: illustration
Switching in Telephone network:
Relay circuit-based circuit switching
Time-slot-based circuit switching
Circuit Switch
1
2
3
1 2 3
...
i
Input time-slot queue buffer
j
Output time-slot queue buffer
RAM buffering
Time-slot Switching
Shaowen Yao, School Of Software, YNU 31
Network Core: Circuit Switching
network resources (e.g.,
bandwidth) divided into
“pieces”— — Multiplexing
pieces allocated to calls
resource piece idle if not used
by owning call (no sharing)
dividing link bandwidth into
“pieces”
frequency division:FDM
time division:TDM
some examples:cable TV,
satellite communication… …
Shaowen Yao, School Of Software, YNU 32
Network Core: Packet Switching
each end-end data stream divided
into packets
Why we need packet;
user A, B packets share network
resources;
each packet uses full link
bandwidth;
resources used as needed,
resource contention:
aggregate resource
demand can exceed
amount available
congestion: packets
queue, wait for link use
store and forward:
packets move one hop
at a time
transmit over link
wait turn at next link
Bandwidth division into “pieces”
Dedicated allocation
Resource reservation
Shaowen Yao, School Of Software, YNU 33
Network Core: Packet Switching
Packet-switching versus circuit switching: human
restaurant analogy
other human analogies?
A
B
C10 MbsEthernet
1.5Mbps
45 Mbs
D E
statistical multiplexing
queue of packets waitingfor output link
Primary Rate Interface (PRI):
E1:2.048Mbps;
T1:1.544Mbps.
Shaowen Yao, School Of Software, YNU 34
Packet switching vs. circuit switching
1 Mbit link (1Mbps)
each user:
100Kbps when “active”
active 10% of time
circuit-switching:
10 users
packet switching:
with 35 users,
probability > 10 active
less that .0017
Packet switching allows more users to use network!
N users
1 Mbps link
Shaowen Yao, School Of Software, YNU 35
Packet switching vs. circuit switching
Great for bursty data
resource sharing
no call setup
Excessive congestion: packet delay and loss
protocols needed for reliable data transfer, congestion control
Q: How to provide circuit-like behavior?
bandwidth guarantees needed for audio/video apps
still an unsolved problem (chapter 6)
Is packet switching a “slam dunk winner?”
Shaowen Yao, School Of Software, YNU 36
Message switching
All kinds of messages are segmented into smaller on the source
host, and the receiver reassembles the packets back into
original message. Why do we need packet instead of app.
message?
The segmentation and reassembly may be an extra burden, is
such burden worthy of the advantage from doing that?
One comparison between packet switching and message
switching:
Assume: message with 7.5Mbits,
between source and destination are 2 packet switches and 3 links
with 1.5Mbps.
No congestion in the network
Do you wonder:
Shaowen Yao, School Of Software, YNU 37
Packet switching vs. Message switching
Message switching costs: 5sec. in each hop, totally
takes 15sec.
MessageMessage
Packet switching: Segment into 5000 packets;
One packet cost 1ms;
Two switches works (instore and forward behavior)simultaneously;
Totally takes 5.002sec.
Shaowen Yao, School Of Software, YNU 38
The advantages and disadvantages ofPacket switching
With obvious smaller end-to-end delays;
When bit errors occur, even only one bit is error,
the whole packet is corrupted and will be discarded,
the advantage of PS over MS is very obvious.
Sth. like FTP with “Resume” vs. traditional FTP.
Another potential advantage is that different
message with different size, and packet can be
specified with uniformed length, the PS and end-
system can process packets much simpler than msg.
packet switching’s disadvantage: overhead. Both
packets and msg need additional data as their header.
Shaowen Yao, School Of Software, YNU 39
Have a Try !
On page 42 before subsection 1.4.2;
Download one Java Applet and try it;
Examine the effect of additional propagation delays