View
242
Download
2
Category
Tags:
Preview:
Citation preview
Ch.1: Introduction
Computer Networking
Eliezer Dor (eliezer dor@gmail.com)
Teaching Assistant: Allon Wagner
1
Ch.1: Introduction
Course InformationLectures: Thursday 5 – 8 Dach 005Recitation: Tuesday 16 – 17, 17 – 18 Dan David 001
Web site: http://www.cs.tau.ac.il/~allonwag/comnet2011B/index.html
1. Keshav : An Engineering Approach to Computer Networking
2. Tanenbaum : Computer Networks3. Bertsekas and Gallager : Data Networks
• Kurose-Ross: A Top-down Approach to Computer Networking
Main Book:
2/71
Additional Books:
Ch.1: Introduction
Practical Information
Homework assignment: Mandatory Both theoretical and programming
Grades:Final Exam: 60% theory exercises: 20%Programming exercises: 20%
3/71
Ch.1: Introduction
Motivation
1st stage society: Agriculture, handicraft 2nd stage society: Industrial, labor intensive Today’s society:
automated industry with sophisticated logistics information intensive:
business, knowledge, advertising, news, social interaction, recreation
Future society is likely to be even more information-dominated
5/71
Ch.1: Introduction
The Purpose of the Network
serves network applications residing in hosts applications at distinct hosts need to
co-ordinate actions / co-operate thus they need to communicate information
to each other network must deliver that information
to the right host to the right application process / thread
network serves applications which serve users
6/71
Ch.1: Introduction
Information A representation of knowledge Examples:
text, music, video, technical specifications software, instructions, reports, alarms
Can be represented in two ways analog (pictures / ideograms) digital (bits)
the Digital Revolution convert information as pictures to information as
bits networks move around bits instead of pictures
7/71
Ch.1: Introduction
Challenges make order in the jungle of applications organize information into manageable units keep track of info units sent/ moving/
received take account of errors / misunderstandings etc.
move the bits through the network find the destination host in the network jungle
using an efficient path learn automatically the current network topology
make efficient use of link / router capacities resolve competition for use of same resource Cheaply, Securely, with Quality of Service,
8/71
Ch.1: Introduction
This course’s Challenge
To discuss this complexity in an organized way, so that we understand the issues / alternatives can follow/design/troubleshoot processes
Need to divide the job into functional layers
Understand the interrelation between them These problems are beyond a specific
technology
10/71
Ch.1: Introduction
Early communications systems
telegraph, telephone first used direct point to point links when number of users grew: introduced switching points/ configurable
circuits each call had a dedicated circuit for its
duration
11/71
Switched connection
phone linetrunk group
Ch.1: Introduction
Data Networks
set of interconnected nodes exchanging information links are common usage switching node must:
choose for each data unit a link bringing it closer to dest. schedule their transmission on the common usage links
(resolve the competition for the usage of the link)
12/71
Ch.1: Introduction
Qwest backbone
http://www.qwest.com/largebusiness/enterprisesolutions/networkMaps/preloader.swf13/71
Ch.1: Introduction
Networking Tasks – phone net. sol’n
Addressing - identify the end user phone number 1-201-222-2673 = country code + region code + exchange + number
Routing – Find route from source to destination. determined from phone number by static routing tables
Forwarding – how information is moved circuit switching::a fixed circuit along path to destination
Information Units - How information is sent voice samples; no addressing attached samples sent continuously , 8000/sec network must prepare source-dest. circuit in advance
14/71
Ch.1: Introduction
Networking Tasks – Internet Solution
Addressing - identify the end user IP addresses 132.66.48.37, = network number || host #
Routing- How to get from source to destination routers learn automatically network topology build routing tables / updated frequently
Forwarding – how information is moved packet switching: move packets 1 by 1 through routers.
Information Units - How information is sent. self-descriptive packet = data + header header contains destination address
15/71
Ch.1: Introduction
Telephone networks support a high end-to-end quality of service, but is expensive
Internet supports no quality of service but is flexible and cheap
Future networks will have to support a wide range of service qualities at a reasonable cost
16/71
Ch.1: Introduction
History
1961: Kleinrock shows effectiveness of packet-switching1964: Baran - packet-switching concept in military
networks1967: ARPAnet – by Advanced Research Projects Agency1972: ARPAnet demonstrated publicly (15 nodes total)
first transport. email, protocols1970: ALOHAnet satellite network in Hawaii1973: Metcalfe’s PhD thesis proposes Ethernet1974: Cerf and Kahn - architecture for internetworkinglate70’s: proprietary architectures: DECnet, SNA, XNA1982-5: TCP/IP, SMTP mail, DNS, FTP1988: TCP congestion control1991: ARPAnet commercialized: NSFnet , Internet1989-93: WWW, browser, http, html, URL
17/71
LAN idea
Ch.1: Introduction
Cerf and Kahn’s internetworking principles:
autonomy - no internal changes required to interconnect networks
best effort service model stateless routers decentralized control
Defines today’s Internet architecture
18/71
Ch.1: Introduction
Why do we need Protocols
Communication is between applications or other S/W entities
Its objective: enable cooperation on a common task
Need protocols to understand each other Semantics: what I report/ want of you to do Syntax/ format: how write/ read this info
19/71
Ch.1: Introduction
Open/ Proprietary Protocols
Open protocol can be used by anyone it is published by a standards organization
or a public consortium e.g. draft standard. standard
Proprietary protocol is owned by a company may be used subject to company’s agreement
20/71
Ch.1: Introduction
Why do we need Standards
Communication happens between entities Hosts (personal computers, servers) Routers
H/W entities produced by different vendors S/W applications/ OS entities also Need agreement to ensure correct, efficient
and meaningful communication this is called Interworking
21/71
Ch.1: Introduction
Organizations that Issue Standards
IETF (Internet Engineering Task Force)
IEEE (Institute for Electrical and Electronic
Engineers)
ITU (International Telecommunications Union)
ISO (International Organization for Standardization)
W3C (World Wide Web Consortium)
22/71
Ch.1: Introduction
Why Layering
Communication is a very complex task What we need is:
communication btw applications at distant hosts What is reasonably feasible in one piece is:
the ability to transfer a series of bits over a link We need to bridge between very sophisticated
applications and very primitive physical layer What is needed is to divide the task’s
functionality into well chosen parts each part should be reasonably ‘easy’ to do they should work well together
23/71
Ch.1: Introduction
How to do Layering
Define a conceptual Layering Model means: what is the function of each layer how they cooperate / use each other’s services
Set principles for proper usage of the model Build protocols for each layer
protocol is between same layer entities @ distinct nodes
there may be several protocols in each layer providing different type service for the layer’s function
Define interfaces between layers interface (here) is between distinct layer entities at
same node (computing device) 24/71
Ch.1: Introduction
Layering PrinciplesModularity each layer works independently of the others
information exchange only according to Interfaces defined in the Model
analogous to the Object Oriented principle in S/W eng.
this means: don’t change/peek into internal variables of other
layers modularity is bypassed very seldom
only when there is no other solution to a problem
Transparency layering should be invisible to user
25/71
Ch.1: Introduction
Layering Benefits
Layering enables: discussion/understanding of the issues
enables clear visualizing of relationships btw. functions
it’s impossible to think about all layers @ once efficient development of protocols
each layer has a different functional focus no need to think other layers when designing it
easy replacement/maintenance of protocols as long as modularity & interfaces are adhered to
Layering is a good reference model for discussion
26/71
Ch.1: Introduction
A mail system layering model
QuickTime™ and aTIFF (Uncompressed) decompressor
are needed to see this picture.
27/71
Ch.1: Introduction
How do we Communicate?
Send a mail from Alice to Bob Alice in Champaign, Bob in Hollywood
Example: US Postal Service
Bob
Champaign, Illinois
Hollywood, California
Alice
28/71
Ch.1: Introduction
What does Alice do?
Bob’s address (his mailbox) Bob’s name – in case people share mailbox Postage – have to pay! Alice’s own name and address
in case Bob wants to return a message In case the mail has to be returned.
Bob100 Santa Monica Blvd.Hollywood, CA 90028
Alice200 Cornfield Rd.Champaign, IL 61820
29/71
Ch.1: Introduction
What does Bob do?
Install a mailbox Receive the mail Get rid of envelope Read the message
Bob100 Santa Monica Blvd.Hollywood, CA 90028
Alice200 Cornfield Rd.Champaign, IL 61820
30/71
Ch.1: Introduction
Layers Peer entities
each layer implements a service via its own internal-layer actions relying on services provided by layer belowQn: Find scenarios justifying adding extra layers to the mail model. Name the layers and specify their place in model
31/71
Champaign
HollywoodUser give parcel to P.O pick up parcel at P.O
Post office (P.O) counter handling put parcel in mailbox
Ground transfer: on truck to airport from airport to dest. P.O
Airport transfer: loading on airplane take off the airplane
Airplane routing from source to destination
Ch.1: Introduction
What Layers are Necessary?
32/71
Application:
I received your msg …I want you to do …
Application
Transmitter:Physical Layer
1011001…
RouterHost A
Host B
how to get it to B ?
NETWORK
Receiver
how to make
sense?
msg
Ch.1: Introduction
What Layers are Necessary?
33/71
Application:
I received your msg …I want you to do …
Application
Transmitter:Physical Layer
1011001…
RouterHost A
Host B
how to get it to B ?
NETWORK
Receiver
how to make
sense?
Link Layer
Frame
1011001…
Frame Link L.
msg
Ch.1: Introduction
What Layers are Necessary?
34/71
Application:
I received your msg …I want you to do …
Application
Transmitter:Physical Layer
1011001…
RouterHost A
Host B
NETWORK
Receiver
Link Layer
Frame
1011001…
Frame Link L.
Net Layer packet
1011001…
…
packetNet L.too many details !!
too many pieces!!
msg
Ch.1: Introduction
What Layers are Necessary?
35/71
Application:
I received your msg …I want you to do …
Application
Transmitter:Physical Layer
1011001…
RouterHost A
Host B
NETWORK
Receiver
Link Layer
Frame
1011001…
Frame Link L.
Net Layer packet
1011001…
…
packetNet L.
Transport Transport
Net Layer
msg
THE FIVE LAYER MODEL
Ch.1: Introduction
Application Layer L5
Tasks: write messages serving needs of application
proper type of semantics (meaning, information) appropriate syntax/format, so that semantics is understood
keep track of the interaction process / state machine Focus: on needs of a specific application
type Data unit: Message Peer:the Application Layer at destination host Uses: the Transport Layer Used by: the application itself Run by: the application
36/71
Ch.1: Introduction
Transport Layer L4
Main Tasks: prepare data for transfer
fragment data into proper size segments / reassemble at dest.
add header which enables delivery to the correct appl. process
optional: error- /flow- /congestion-control Data Unit: Segment Focus: on control of End-to-End data transfer Peer:the Transport Layer at destination host Uses: the Network Layer Used by: the Application Layer Run by: the OS of the host
37/71
Ch.1: Introduction
Network Layer L3 Main Tasks:
learn network topology in real time prepare routing tables for fast usage in forwarding data network layer (WAN) addressing forward data from source to destination
Data Unit: Datagram / “packet” Focus: on network and data fowarding Peers: the Network Layer along the whole
path Uses: the Link Layer Used by: the Transport Layer Run by: the OS of the host, the router S/W
38/71
Ch.1: Introduction
Link Layer L2 Main Tasks:
insert delimiters so start/end of frame can be known physical layer may transfer an endless stream of bits this is part of the task of the Link header and Link trailer
in LAN, access control/ link layer addressing Data Unit: Frame Focus: data transfer over a link Peer:Link Layer at the other end of the link Uses: the Physical Layer Used by: the Network Layer Run by: the NIC (Network interface card, כרטיס
(רשת
39/71
Ch.1: Introduction
Physical Layer L1
Main Tasks: transmit signals that encode bits 1 and 0 receive such signals and decode bits from them synchronize the bit rate clocks of the peer nodes
Data Unit: Bit Focus: bit transfer over a link Peer:the Physical Layer @ other end of the link
Uses: the raw media: cable/ space Used by: the Link Layer Run by: transmitter/ receiver /wave
propagation40/71
Ch.1: Introduction
Protocols
A protocol is a set of rules and formats that govern the communication between communicating peers set of valid message formats - syntax meaning of each message -
semantics Necessary for any function that
requires cooperation between peers
41/71
Ch.1: Introduction
A protocol provides a service For example: the post office “registered”
protocol for reliable parcel transfer service Peer entities use a protocol to provide a
service to a higher-level peer entity for example, truck drivers use a protocol to
present post offices with the abstraction of an unreliable parcel transfer service
In the layering model: each layer gives service to next higher layer
Protocols
42/71
Ch.1: Introduction
ISO OSI reference model
Reference model formally defines what is meant by a layer, a
service etc. Service architecture
describes the services provided by each layer and the service access point
Protocol architecture set of protocols that implement the service
architecture compliant service architectures may still use
non-compliant protocol architectures
43/71
Ch.1: Introduction
The seven/five Layers
Presentation
Application
Session
Transport
Network
Data Link
Physical
Presentation
Application
Session
Transport
Network
Data Link
Physical
Network
Data Link
Physical
End system End systemIntermediate system
There are only 5 (!!) in most architectures
Application
44/71
Transport
Ch.1: Introduction
The seven Layers - protocol stack
Presentation
Application
Session
Transport
Network
Data Link
Physical
Presentation
Application
Session
Transport
Network
Data Link
Physical
data
DH+data+DT
bits
data
data
data
data
AH
PH
SH
TH
Network
Data Link
Physical
dataNH
Session and presentation layers are not so important, and are often ignoredSession and presentation layers are not so important, and are often ignored
45/71
Ch.1: Introduction
Postal network
Application: people using the postal system Session and presentation: chief clerk sends
some priority mail, and some by regular mail ; translator translates letters going abroad.
Transport layer: mail clerk sends a message, retransmits if not acked
Network layer: postal system computes a route and forwards the letters
Datalink layer: letters loaded on planes, trains, trucks
Physical layer: the driver/pilot carrying letters in sack
46/71
Ch.1: Introduction
Internet protocol stack
application: supporting network applications ftp, smtp, http
transport: host-host data transfer tcp, udp
network: routing of datagrams from source to destination ip, routing protocols
link: data transfer between neighboring network elements ppp, ethernet, WiFi, token ring
physical: bits “on the wire”
application
transport
network
link
physical
47/71N
etw
ork
acc
ess
Ch.1: Introduction 1-48
HtHn Mpacketdatagram/
source host
application
transportnetwork
linkphysical
segment Ht M
message M
destination hostapplicatio
ntransportnetwork
linkphysical
HtHn M
Ht M
M
networklink
physical
HtHn M HtHn M
router
Encapsulation
frame HtHnHl M Tl
M – message
Ht – transport header
Hn – network header
Hl – link header
Tl – link trailer
HtHnHl M TlHtHnHl’ M Tl’
HtHnHl’ M Tl’
1011………
Ch.1: Introduction 1-50
Service & protocol at layer k
Service received by layer k from layer k-1
to layer k+1
Ch.1: Introduction 1-51
H3datagram
T2H2 frameH4
segment
Packet structure: sending host view
L5: application layer generates a message and passes it to transport layer
L4: transport layer adds its header (H4=Ht) this generates a segment which is passed to netwk
layer(one message may be fragmented into several segments)
L3: network layer adds its header (H3=Hn) this generates a datagram, which is passed to link layer
L2: link layer adds header (H2=Hl), trailer (T2=Tl) this generates a frame which is passed to physical layer
L1: physical layer sends the frame as a sequence of bytes is on link
Message
1-52
Ch.1: Introduction
Packet structure: router viewReceiving stage:• L1: physical layer receives frame, passes it to L2• L2: link layer checks H2+T2 and removes them
– this makes a datagram which is passed to network layer
H3datagram
L3 payload T2H2frame
Sending stage:L3: network layer decides on which link to
sendtransfers datagram to L2
L2: link layer adds new H2+T2 and makes a frame
frame is passed to L1 which sends its bits on link H3
datagram
L3 payloadH2* T2*frame
Ch.1: Introduction 1-53
T2H2 frame
Packet structure: destination view L1: physical layer receives frame from link L2: link layer recognizes frame boundaries
checks H2+T2 and removes them this makes a datagram, passed to network layer
L3: network layer checks H3 and removes it this generates a segment, passed to transport layer
L4: transport layer checks H4 and removes it this leaves the message which is saved in receive buffer
L5: application layer takes message from buffer
MessageH4
segment
H3datagram
Ch.1: Introduction
Physical layer L1 Link Types:
Point to Point (usually continuous transmission) LAN/multiple access (intermittent transmission)
What is contained in a standard: shapes/sizes/material of connectors and
cables/media coding scheme to represent a bit bit-level synchronization
Nodes: Repeater Hub (on LAN only)
Located: in transmitter/receiver of NIC ( רשת (כרטיס
54/71
Ch.1: Introduction
Datalink layer L2 Protocol Types
PTP protocol (HDLC, PPP, LAPD) LAN protocol (Ethernet, Token Ring, WiFI)
contains a MAC sublayer) What is contained in a protocol
header & trailer format indication of start & end frame (delimitation) in cont. transmission links: filler frame/marker
format in LAN: media access (MAC) rules, addressing rules
Nodes (in LAN only) Bridge, (L2-) Switch
Located: in NIC of hosts, routers, swithces55/71
Ch.1: Introduction
Network layer L3 Network Types
Circuit switching/Packet switching (datagram or VC) Protocol Types: Routing/ Forwarding What is contained in a forwarding protocol
header format, address formats forwarding rules (how to use routing tables)
What is contained in a routing protocol rules/ messages for learning topology info rules for building routing tables
Nodes: Router Metaphor: Welds links into Host into Host (ETE)
“channel” Location: Host OS, Router S/W
56/71
Ch.1: Introduction
Network layer (more) L3 In datagram networks
provides both routing and data forwarding In connection-oriented network
separate data plane and control plane data plane only forwards and schedules
data control plane prepares (virtual) circuits
before data is sent Internet
forwarding by IP protocol (a datagram protocol)
best effort service (no reliability tools) several routing protocols (RIP, OSFP, BGP)
57/71
Ch.1: Introduction
At intermediate systems participates in routing protocol to create
routing tables responsible for forwarding packets schedules the transmission order of packets chooses which packets to drop
Network layer (contd.)
At end-systems
primarily hides details of datalink layer segments and reassemble detects errors
58/71
Ch.1: Introduction
Transport layer L4 Protocol Types:
Reliable stream protocols (TCP, SCTP, SSL) Unreliable datagram protocols (UDP)
What is contained a protocol header format user-process multiplexing rules (using port)in Reliable protocols, also: error control (ack, seq. #s, retransmission) flow control (don’t overwhelm destination) congestion control (don’t overload network)
Metaphor: Gives a Process to Process ETE channel Location: Hosts only, part of OS
59/71
Ch.1: Introduction
Application layer L5 Application Types:
User-oriented applications (Web, Mail, File xfer..) Protocols: HTTP, SMTP+POP, FTP
Infrastructure applications (DNS, NTP) Protocol Types:
Each application type has a separate protocol What is contained a protocol
header format rules for mutual interaction of peer processes
Metaphor: Talks to peer application about common job
Location: Hosts only, run by the application S/W
60/71
Ch.1: Introduction
Layer Model Summary Studied (basically) the Internet 5 Layer Model OSI model (defined earlier, by ISO)
Contains 2 more layers: Layer 5 (Sessiion) Layer 6 (Presentation)
Application Layer is pushed to Layer 7 Not used in the Internet
Session layer Duplex ctrl, Data priority, Special session controls
Presentation layer Data structure standardization, encoding,
encryption see Extra slides for more details
61/71
Ch.1: Introduction
History 1961-1972: Early packet-switching principles
1961: Kleinrock - queuing theory shows effectiveness of packet-switching
1964: Baran - packet-switching in military networks1967: ARPAnet – conceived by Advanced Research
Projects Agency1969: first ARPAnet node operational
1972: ARPAnet demonstrated publicly– NCP (Netwk Control Protocol) 1st host-host protocol – first e-mail program– ARPAnet has 15 nodes
62/71
Ch.1: Introduction
History 1972-1980: Internetworking, new and
proprietary nets
1970: ALOHAnet satellite network in Hawaii1973: Metcalfe’s PhD thesis proposes Ethernet1974: Cerf and Kahn - architecture for interconnecting
networkslate70’s: proprietary architectures: DECnet, SNA, XNAlate 70’s: switching fixed length packets (ATM precursor)1979: ARPAnet has 200 nodes
63/71
Ch.1: Introduction
Cerf and Kahn’s internetworking principles:
– minimalism, autonomy - no internal changes required to interconnect networks
– best effort service model– stateless routers– decentralized control
Defines today’s Internet architecture
64/71
Ch.1: Introduction
History 1980-1990: new protocols,
proliferation of networks
1983: deployment of TCP/IP1982: SMTP e-mail protocol defined 1983: DNS defined for name-to-IP-address translation1985: FTP protocol defined1988: TCP congestion control
new national networks: CSnet, BITnet, NSFnet, Minitel
100,000 hosts connected to confederation of networks
65/71
Ch.1: Introduction
History 1990 - : commercialization and WWW
early 1990’s: ARPAnet decommissioned1991: NSF lifts restrictions on commercial use of NSFnet
(decommissioned, 1995)early 1990s: WWW
hypertext [Bush 1945, Nelson 1960’s]HTML, http: Berners-Lee1994: Mosaic, later Netscapelate 1990’s: commercialization of WWW
66/71
Ch.1: Introduction
Demand and Supply
• Huge growth in users– The introduction of the web
• Faster home access– Better user experience.
• Infrastructure– Significant portion of telecommunication.
• New evolving industries– Although, sometimes temporary setbacks
67/71
Ch.1: Introduction
Internet: Users
0
200
400
600
800
1000
1200
1400
Mil
lion
use
rs
1995 1997 1999 2001 2003 2005 2007 2009
year 68/71
Ch.1: Introduction
Penetration around the Globe (2009)
Africa
Asia/Pacific
Europe
Middle EastUSA+Canada
Latin America
Australia
Africa
Asia/Pacific
Europe
Middle East
USA+Canada
Latin America
Australia
0
10
20
30
40
50
60
70
80
Africa
Asia/P
acific
Europ
e
Mid
dle E
ast
USA+Can
ada
Latin
Am
erica
Austra
lia
%Population %Penetration
http://www.internetworldstats.com/stats.htm69/71
Ch.1: Introduction
Users around the Globe (2002/5/9)
Africa
Asia/Pacific
Europe
Middle East
USA+Canada
Latin America
Australia
0
100
200
300
400
500
600
700
800
2009
2005
2002
70/71
Ch.1: Introduction
Technology: Modem speed
300 12002400960014400
2880033600
56000
0
20000
40000
60000
80000
100000
1979
1980
1984
1987
1991
1993
1995
1997
2008
year
bp
s
71/71
Ch.1: Introduction
Today’s options
• Modem: 56 K
• ISDN: 64K – 128K
• Frame Relay: 56K ++
• Today High Speed Connections– Cable, ADSL, Satellite.– All are available at
• 5Mb (2005)• 30 Mb (2009)
OBSOLETE
72/71
Ch.1: Introduction
Session layer
• Not common
• Provides full-duplex service, expedited data delivery, and session synchronization
• Internet– doesn’t have a standard session layer
75/71
Ch.1: Introduction
• Duplex– if transport layer is simplex, concatenates two transport
endpoints together
• Expedited data delivery– allows some messages to skip ahead in end-system
queues, by using a separate low-delay transport layer endpoint
• Synchronization– allows users to place marks in data stream and to roll back
to a prespecified mark
Session layer (cont.)
76/71
Ch.1: Introduction
Presentation layer• Usually ad hoc• Touches the application data (Unlike other layers which deal with headers)
• Hides data representation differences between applications– characters (ASCII, unicode, EBCDIC.)
• Can also encrypt data• Internet
– no standard presentation layer– only defines network byte order for 2- and 4-byte
integers
77/71
Ch.1: Introduction
עיקרון השכבות
VoIP
UDP
Network (IPv4)
Ethernet
Application
Transport
Network
Data-Link
Network
Source Destination
Email(smtp) ftp
TCP
WiFiModem
78/71
Ch.1: Introduction
עיקרון השכבות
Network
Source Destination
app1
UDP
Network (IPv4)
Ethernet
app2 app3
TCP
WiFiModem
app1
UDP
Network (IPv4)
Ethernet
app2 app3
TCP
WiFiModem
79/71
Recommended