Computer Networking :
Principles, Protocols and
Practice
Part 1 : Introduction
Olivier Bonaventure
[Link]
CNP3/2008.1. © O. Bonaventure 2008
Module 1 : Basics
• Contents
• Introduction
• Services in computer networks
• Connectionless service
• Connection oriented service
• Layered reference models
CNP3/2008.1. © O. Bonaventure 2008
A network ...
• A network is ...
• a set of hardware and software that
allows to transmit information from one
sender to one or more receivers
• Current networks
• Plain Old Telephone System (POTS)
• Mobile Telephone
• Broadcast networks
• television, radio
• Computer networks
• Internet
• Proprietary networks
CNP3/2008.1. © O. Bonaventure 2008
Network classification
• Based on their geographical coverage
• 0.1-1 m : Internal bus/network
• 10 m - 1 km : Local Area Network
(LAN)
• 1 km - 100 km : Metropolitan Area
Network(MAN)
• 100 km ->... : Wide Area Network
(WAN)
• and more ... : Satellite networks
Interplanetary
CNP3/2008.1. network © O. Bonaventure 2008
Network classification
(2)
• Based on their topologies
Bus
Tree Star
Full-mesh
Ring
CNP3/2008.1. © O. Bonaventure 2008
Internet growth
CNP3/2008.1. © O. Bonaventure 2008
Mobile GSM telephone
networks
CNP3/2008.1. © O. Bonaventure 2008
Evolution of networks
Plain Old Telephone TV and radio
broadcast
Mobile
Networks
Computer
Networks
CNP3/2008.1. © O. Bonaventure 2008
The future
• Most specialists expect
• A strong convergence between all
technologies
• Triple play
• Quadruple play
• New services will probably be
deployed first (and perhaps
exclusively) on data networks
• Television service provided by telecom
operators
• Mobile data services
• Mobile television services
• Voice or video over IP
CNP3/2008.1. © O. Bonaventure 2008
Transmission modes
Unicast
l Unicast or point-to-point
l one sender
l one receiver
u example : telephone
E
S B
CNP3/2008.1. © O. Bonaventure 2008
Transmission modes
Multicast
l Multicast or point-to-multipoints
l one sender
l a group of receivers
l The same information is sent to
all members of the group E
u example : videoconference
A
S B
D
l Broadcast
l The same information is sent to everyone
CNP3/2008.1. © O. Bonaventure 2008
Anycast
l Anycast
l Information is sent from one sender to one
receiver among a group of possible
receivers
• Example :find server hosting popular content
*
S B
CNP3/2008.1. © O. Bonaventure 2008
How to carry data through a
network ?
l Circuit switching
l Principle
u before transmitting data, a circuit is
established from the source to the
destination hosts
u each intermediate host knows how to
forward information received on a circuit
that crosses itself
l Example : POTS
D1
S1
A B
S2 D2
color link send to Rcvd from sent to
Red NW NE NW SE
Blue SW SE SW NE
CNP3/2008.1. © O. Bonaventure 2008
How to carry data through a
network ? (2)
l Packet switching
l Principles
• An address is associated to each host
• data is divided in small packets
• each packet contains
• the data to be exchange
• the address of the source host
• the address of the destination host
• Each intermediate host knows how to reach
each destination
• Example : post, Internet
S1 D1
D2
S1
A B
S2 D1
Dest address Link Dest address Link
D1 SE D1 SE
CNP3/2008.1. D2 SE D2 NE © O. Bonaventure 2008
A small Internet
S R
R ISP3 [Link]
[Link]
R R
R
ISP4
R
R R
ISP2 R
R
R S
R
[Link]
PSTN
R ISP1 R
ADSL
CNP3/2008.1. © O. Bonaventure 2008
Module 1 : Basics
l Contents
l Introduction
l Services in computer networks
u Connectionless service
u Connection oriented service
l Layered reference models
CNP3/2008.1. © O. Bonaventure 2008
Basic concepts
l Abstract model of the network
behaviour
l Network is considered as a black box
l Users interact with the network by using
primitives that are exchanged through a
service access point (SAP)
User A User B
Service Access Point
Primitives
Service provider (‘the network”)
CNP3/2008.1. © O. Bonaventure 2008
Types of primitives
Service provider (“network”)
l Primitive
l Abstract representation of the interaction
between one user and its network provider
l Can contain parameters such as :
• source
• destination
• message (SDU or Service Data Unit)
CNP3/2008.1. © O. Bonaventure 2008
Types of primitives (2)
User A User B
[Link] [Link] [Link] [Link]
Service provider (the network)
• [Link]
request from a user to a service
•
• [Link]
provider
• primitive generated by the network provider to a
user (often related to an earlier and remote
• [Link]
[Link] primitive)
• primitive used to answer to an earlier [Link]
primitive
• [Link]
• primitive generated by the network provider to a
user (related to a remote [Link] primitive)
CNP3/2008.1. © O. Bonaventure 2008
The connectionless service
l Goal
l Allow a sender to quickly send a message
to one receiver
l Principle
l The sender places the message to be
transmitted in a [Link] primitive and
gives it to the network provider
l The network provider carries the message
and delivers it to the receiver by using a
[Link] primitive
l Utilisation
l useful to send short-length messages
l example : post office
CNP3/2008.1. © O. Bonaventure 2008
Connectionless service
l Primitives
l [Link](source, destination, SDU)
l [Link](source, destination, SDU)
Source Provider Destination
[Link](S,D,"M")
[Link](S,D,"M")
Time
CNP3/2008.1. © O. Bonaventure 2008
Connectionless service (2)
l Variants of connectionless service
l confirmation
u primitive [Link] delivered by provider to
sender to confirm that some message has been
delivered to destination
l reliability
u reliable connectionless service (no errors)
u unreliable connectionless service (errors are
possible)
l protection against transmission errors
u service may or may not detect/correct errors
l protection against losses
u the service may or cannot lose messages
l in sequence delivery
u not guaranteed
u in-sequence delivery for all messages sent by one
source
CNP3/2008.1. © O. Bonaventure 2008
Connectionless service (3)
l Example of acknowledged service
Source Provider Destination
[Link](S,D,"M")
[Link](S,D,"M")
[Link]
Time
CNP3/2008.1. © O. Bonaventure 2008
Connection-oriented
service
l Goal
l Create a logical binding (connection)
between two users to allow them to
efficiently exchange messages
l Main phases of service
• Connection establishment
• Data transfer
• both users can send and receive messages over
connection
• Connection release
• Utilisation
l useful when the two users either
• must exchange a large number of messages
• need a structured exchange
• example : telephone
CNP3/2008.1. © O. Bonaventure 2008
Connection oriented
service
l Connection establishment
u Primitives
u [Link]
u [Link]
u [Link]
u [Link]
Source Network provider Destination
[Link]
[Link]
[Link]
Destination considers
connection open
[Link]
Source considers
connection open
CNP3/2008.1. © O. Bonaventure 2008
Connection oriented service
(2)
l Connection can be rejected
Source Provider Destination
[Link]
[Link]
[Link]
Connection rejected by destinati
[Link]
[Link]
[Link]
Connection rejected
by provider
CNP3/2008.1. © O. Bonaventure 2008
Data transfer : message
mode
Source Provider Destination
[Link]
[Link]
[Link]
[Link]
[Link]("A") [Link]("A")
[Link]("BCD") [Link]("BCD")
[Link]("EF") [Link]("EF")
l Provider delivers one [Link] for each [Link]
CNP3/2008.1. © O. Bonaventure 2008
Data transfer : stream mode
l The providers delivers a stream of
characters from source to destination
Source Provider Destination
[Link]
[Link]
[Link]
[Link]
[Link]("AB") [Link]("A")
[Link]("CD") [Link]("B")
[Link]("EF") [Link]("C")
[Link]("DEF")
CNP3/2008.1. © O. Bonaventure 2008
Connection release
l Abrupt release
l SDUs can be lost during connection release
Source Provider Destination
Connection opened Connection opened
[Link]("A")
[Link]("B")
[Link](abrupt) [Link]("A")
[Link]("C")
[Link]
l Such an abrupt connection release can be
caused by the network provider or by the
users
CNP3/2008.1. © O. Bonaventure 2008
Connection release (2)
l Ordered/graceful connection release
l A single direction is closed at a time
l no SDUs can be lost
Source Provider Destination
Connection opened Connection opened
[Link]("A")
[Link]("B") [Link]("C")
[Link](graceful) [Link]("A")
Source->Destination [Link]("B")
connection closed
[Link](graceful)
[Link]("C")
[Link]("D")
[Link]("D")
[Link](graceful)
[Link](graceful) Connection closed
Connection closed
CNP3/2008.1. © O. Bonaventure 2008
Characteristics of
the connection-oriented
service
l Possible characteristics
l bidirectional transmission
u both users can send and received SDUs
l reliable delivery
u All SDUs are delivered in sequence
u No SDU can be lost
u No SDU can be corrupted
l message mode or stream mode
l Connection release
u Usually abrupt when the provider is forced to
release a connection
u Abrupt or graceful when the users request the
end of a connection
CNP3/2008.1. © O. Bonaventure 2008
Module 1 : Basics
• Contents
• Introduction
• Services in computer networks
• Connectionless service
• Connection oriented service
• Layered reference models
CNP3/2008.1. © O. Bonaventure 2008
Layered reference
models
l Problem
l How is it possible to reason about complex
systems such as computer networks or the
Internet ?
l Solution
l Divide the network in layers
l Layer N provides a well defined service to
layer N+1 by using the service provided by
layer N-1
Layer N+1
Layer N
Layer N-1
CNP3/2008.1. © O. Bonaventure 2008
Layered reference
model
Application
Transport
Network
Datalink
Physical
Physical transmission medium
CNP3/2008.1. © O. Bonaventure 2008
The physical layer
Bits
Physical layer 010100010100010101001010 Physical layer
Physical transmission medium
l Goal
u Transmit bits between two physically
connected devices
l Service provided by physical layer
u bit transmission and reception
u unreliable service
u The receiver may decode a 1 while the sender sent
0
u Some transmitted bits may be lost
u The receiver may decode more bits than the bits
that were sent by the sender
CNP3/2008.1. © O. Bonaventure 2008
Physical layer : an
example
• A very simple physical layer operating at
one megabit per second
• One bit is transmitted by sender every
microsecond
• One bit is receiver by receiver every
microsecond
• Sender operation
• To transmit bit=1, set V=5 Volts during one
microsecond
• To transmit bit=0, set V=-5 Volts during one
microsecond
• Receiver operation
• During each microsecond, measure V
• If V=5 Volts, a 1 has been decoded
• If V=-5 Volts, a 0 has been decode
• Possible problems
CNP3/2008.1. © O. Bonaventure 2008
• electromagnetic perturbations
Transmission mediums
l Tapes, CDROMs and DVD
l Twisted pair
l Telephone networks, ADSL, VDSL, ...
u bandwidth : from a few megabits to a few 10
Mbps depending on the distance between
endpoints
l Enterprise networks
u UTP (category 3, category 5)
u STP (rarely used today)
u bandwidth :up to 1 Gigabit today
• new types of cables are being developed to reach
10 Gbps
l Wireless
• radio
CNP3/2008.1. © O. Bonaventure 2008
Transmission mediums
(2)
l Coaxial cable
l Cable TV networks (CATV)
u about 1Ghz frequency range
u available bandwidth : depends on the split
among tv distribution and data transmission
l Computer networks
u Used a few years ago, but not anymore today
l Optical fiber
l monomode (laser, long distance)
l multimode (LED, short distance)
u frequency range : up to 100.000 Ghz
u available bandwidth
u 10 Gbps per wavelength and more
u hundreds of wavelength per fiber
CNP3/2008.1. © O. Bonaventure 2008
The datalink layer
Datalink Frames Datalink
Physical Physical
l Goals
l Provide a service that allows the
exchange of frames
u Frame : structured group of bits
l Support local area networks
l Services
• Reliable connection-oriented service
• Unreliable connectionless service
CNP3/2008.1. © O. Bonaventure 2008
The Network Layer
Network Packets Network Packets Network
Datalink Datalink Datalink
Physical layer Physical layer Physical layer
l Goals
l Allow information to be exchanged
between hosts that are not attached to
the same physical medium by using
relays
l The unit of information in the network
layer is called a packet
l Services
u unreliable connectionless (Internet)
u reliable connection-oriented
CNP3/2008.1. © O. Bonaventure 2008
The Transport Layer
Transport Segments Transport
Network Network Network
Datalink Datalink Datalink
Physical layer Physical layer Physical layer
l Goals
l Ensure a reliable exchange of data
between endsystems even if the
network layer does not provide a
reliable service
l Services
l Unreliable connectionless service
l Reliable connection-oriented service
CNP3/2008.1. © O. Bonaventure 2008
The application layer
Application SDU Application
Transport Transport
Network Network Network
Datalink Datalink Datalink
Physical layer Physical layer Physical layer
l Goals
l Exchange useful information between
applications by relying on the transport
layer that hides the complexity of the
network
l Unit of information
u Service Data Unit, SDU
CNP3/2008.1. © O. Bonaventure 2008
The OSI reference model
Application SDU
Application
Presentation Presentation
Session Session
Transport Transport
Network Network Network
Datalink Datalink Datalink
Physical layer Physical layer Physical layer
l Higher layers
u Application
u Presentation
u Provides services to hide application from
complexities of data/image/audio/video encoding
u Session
u Organise the exchange of information between
applications
CNP3/2008.1. u Recover from failures of transport layer © O. Bonaventure 2008
Course schedule
• First week : application layer
• Weeks 2-3 : transport layer (key
• mechanisms)
Weeks 4-5 : transport layer in Internet
• (TCP,
Weeks UDP)
6,7,8 : network layer (IP, RIP,
• OSPF)
Weeks 9,10 : interdomain routing (BGP)
• Weeks 11,12 : Datalink layer (Ethernet,
802.11)
Application Application
Transport Transport
Network Network Network
Datalink Datalink Datalink
Physical layer Physical layer Physical layer
CNP3/2008.1. © O. Bonaventure 2008
Exams and grading
• Exercises
• A set of questions or a small implementation
in groups of 7/8 students every week
• answers on svn repository by Tuesday at 13.00
• discussions in small groups Tuesday at 16.15 or
17.15
• Participation and answers are graded as
• A : better than average answer/participation
• B : average answer/participation
• C : not enough answer/participation
• D : did not answer the questions/write the implementation
• Total : 25% of finale grade
• Oral exam
• Theory
• Several oral questions about theory
• 50% of final grade
• Exercises
• Several written questions similar to the exercises
• 25% of final grade
CNP3/2008.1. © O. Bonaventure 2008