Download Network layer

Document related concepts

Asynchronous Transfer Mode wikipedia , lookup

Wake-on-LAN wikipedia , lookup

Distributed firewall wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Network tap wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

Computer network wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Peering wikipedia , lookup

Airborne Networking wikipedia , lookup

Deep packet inspection wikipedia , lookup

IEEE 1355 wikipedia , lookup

Internet protocol suite wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

UniPro protocol stack wikipedia , lookup

Transcript
Introduction to Communication
Networks
Amit Dvir
[email protected]
Lecture 1
Introduction and
Layering
1
Introduction to Communication Networks 1/2006
Course Information

Lectures:
–

Website: www.cse.bgu.ac.il/Courses/
–

Slides, Assignments, Messages
Books:
–
–
–
2
Sunday 17:00 – 20:00, 28/303
Computer Networking: A Top-Down Approach
Featuring the Internet / Kurose-Ross
Computer Networks / Tanenbaum
Data Networks / Bertsekas-Gallager
Introduction to Communication Networks 1/2006
Course Information

Reception hours:
–

Grading
–
–
3
Monday 10:00-11:00, 30/302D
80% Final exam
20% Assignments
Introduction to Communication Networks 1/2006
Course Objectives
4

Learn the basics of data communication and
computer networks

To understand the main concepts and
principles of communication

To present modern communication networks
and their applications
Introduction to Communication Networks 1/2006
Simplified Communication Model
Source
Workstation
5
Transmitter
Transmission
System
Receiver
Destination
Modem
Modem
Public Telephone
Network
Introduction to Communication Networks 1/2006
Server
Simplified Data Communication
Model
Analog
signal
Digital bit
stream
Analog
signal
Digital bit
stream
Text
Text
Source
1
2
Input
Input data
information
g(t)
m
6
Transmission
System
Transmitter
Receiver
3
4
Transmitted
signal
s(t)
Received
signal
r(t)
Introduction to Communication Networks 1/2006
Destination
5
Output data
g(t)'
6
Output
information
m'
An Introduction to the mail
system
BGU
Nick
Dave
Admin
Admin
(Some of the following slides are taken from lectures by Nick Mckeown, stanford)
7
TLV
Introduction to Communication Networks 1/2006
Characteristics of the mail
system
Each envelope is individually routed.
 No time guarantee for delivery.
 No guarantee of delivery in sequence.
 No guarantee of delivery at all!

Things get lost
 How can we acknowledge delivery?
 Retransmission

How to determine when to retransmit? Timeout?
 Need local copies of contents of each envelope.
 How long to keep each copy.
 What if an acknowledgement is lost?

8
Introduction to Communication Networks 1/2006
An Introduction to the mail
system
BGU
TLV
Application Layer
Nick
Dave
Transport Layer
Admin
Admin
Network Layer
Link Layer
9
Introduction to Communication Networks 1/2006
An Introduction to the
Internet
Leland.Stanford.edu
Application Layer
Athena.MIT.edu
Nick
Dave
Transport Layer
O.S.
Datagram
Data
Header
Data
Header
O.S.
Network Layer
Link Layer
10
Introduction to Communication Networks 1/2006
Characteristics of the Internet
Each packet is individually routed.
 No time guarantee for delivery.
 No guarantee of delivery in sequence.
 No guarantee of delivery at all!

Things get lost
 Acknowledgements
 Retransmission

How to determine when to retransmit? Timeout?
 Need local copies of contents of each packet.
 How long to keep each copy?
 What if an acknowledgement is lost?

11
Introduction to Communication Networks 1/2006
Characteristics of the Internet (2)
No guarantee of integrity of data.
 Packets can be fragmented.
 Packets may be duplicated.


12
All of the above properties and questions are
solved by today’s modern networks and
communication systems !
Introduction to Communication Networks 1/2006
Data Communication

Passing (digital) information throughout the
network
–
–
–
–
Out of the computer from one system to another
Usually in a serial manner
Using a specific medium (fiber, cables, radio)
Option of passing through “intermediate stations”

13
Possible errors before reaching to the destination
Introduction to Communication Networks 1/2006
Early communications systems





14
I.e. telephone
point-to-point links
directly connect together the users wishing to
communicate
use dedicated communication circuit
if distance between users increases beyond the
length of the cable, the connection is formed by a
number of sections connected end-to-end in series.
Introduction to Communication Networks 1/2006
Data Networks - Overview




15
Set of interconnected nodes exchange information
Sharing of the transmission circuits = "switching".
Many links allow more than one path between
every 2 nodes.
Network must select an appropriate path for each
required connection.
Introduction to Communication Networks 1/2006
Data Networks - Overview
Overview
Hardware:How you can configure a bunch of
computers into a network:
 Local Are Networks (LAN)
 Metropolitan Area Networks (MAN)
 Wide Area Networks (WAN)
 Internetworks
Software: This is what actually makes computer
networks – not the hardware!
 Protocols: describe how two communicating parties
exchange information.
16
Introduction to Communication Networks 1/2006
Overview
– cont. - Overview
Data Networks


Services: describe what a network offers to parties
that want to communicate.
Interfaces: describe how a client can make use
of network services, i.e. how the services can be
accessed.
Reference models: Describe how the OSI (Open
System Interconnection) and Internet networks are
organized.
17
Introduction to Communication Networks 1/2006
ComputerNetworks
NetworksHardware
Hardware
Computer

Broadcast network: a single communication
channel is shared by all computers:
–

Point-to-point network: Computers are
connected in pairs:
–
18
sending a packet implies that all others receive it.
sending a packet goes strictly from the sender to
the receiver, possibly having to visit intermediate
machines (routing).
Introduction to Communication Networks 1/2006
Transmission Technology
19
Introduction to Communication Networks 1/2006
Local Area Networks (LAN)
20

A LAN is a computer network (or data communications network)
which is confined in a limited geographical area

Apart from scale, LANs distinguish themselves from other networks by
(generally) using broadcast technology,and having simple topologies:

Type (a) (Bus-based): All computers are connected to the same wire.
When one of them starts sending, the signal is propagated to all others.
If two of them start sending at the same time, packets collide and rubbish
is the result.
Introduction to Communication Networks 1/2006
Local Area Networks (LAN)
Type (b) (Token-based): a token (which is just
a small packet) continuously circulates along
the ring.
A sending computer
(1) waits until the token passes and
removes it
(2) sends its packet along the ring,
(3) waits until the packet returns
(4) reinserts the token.
Why we need the token?
21
Introduction to Communication Networks 1/2006
Metropolitan Area Networks (MAN)


A network which is bigger than a LAN but smaller then
WAN.
A MAN typically covers an area of between 5 and 50 km
diameter
–

22
For example, cover an area the size of a city
A typical use of MANs to provide shared access to a wide
area network
Introduction to Communication Networks 1/2006
Wide Area Networks (WAN)



23
A WAN spans a large geographic area, such as a state,
province or country
WANs often connect multiple smaller networks, such as
LANs or MANs.
A network device called a router connects LANs to a
WAN.
Introduction to Communication Networks 1/2006
Wide Area Networks (WAN) – cont.
Routers generally adhere to a store-and-forward
principle: incoming packets are first buffered (stored),
the router takes a decision on where the packet has to
go, and forwards the packet across the selected output
line.
Note: In contrast to LANs and MANs, the organization
of a WAN in terms which hosts are interconnected is
Important.

24
Introduction to Communication Networks 1/2006
Examples of WAN Topology
25
Introduction to Communication Networks 1/2006
Internetworks

The assumption so far is that a network is
homogeneous: there is hardly any variation in hardware
and software. In practice, large networks can only be
constructed by interconnecting different kinds of
networks
internet(work).
Examples:
 Connecting a collection of different kinds of LANs (busbased to token-based) within a department.
26
Introduction to Communication Networks 1/2006
Internetworks – cont.


27
Connecting LANs to each other through a WAN (think
of enterprise networks for multinationals). The WAN
acts as a subnet.
Connecting WANs to each other (the Internet).
Introduction to Communication Networks 1/2006
Networking Issues - Internet

Addressing - identify the end user
IP addresses 132.66.48.37, Refer to a host interface = network
number + host number

Routing- How to get from source to destination
packet switching. move packets (chunks) of data among routers
from source to destination independently.
 Information Units - How is information sent
Self-descriptive data: packet = data + metadata (header).
28
Introduction to Communication Networks 1/2006
Protocol Layers


29
A way for organizing structure of network
The idea: a series of steps
Introduction to Communication Networks 1/2006
Protocols

A protocol is a set of rules and formats
that govern the communication
between communicating peers



30
set of valid messages
meaning of each message
Necessary for any function that requires
cooperation between peers
Introduction to Communication Networks 1/2006
Protocols

A protocol provides a service
–

Peer entities use a protocol to provide a
service to a higher-level peer entity
–
31
For example: the post office protocol for reliable parcel
transfer service
for example, truck drivers use a protocol to present post
offices with the abstraction of an unreliable parcel transfer
service
Introduction to Communication Networks 1/2006
Protocol Layers



A network that provides many services needs many
protocols
Some services are independent, But others depend on
each other
A Protocol may use another protocol as a step in its
execution
–

This form of dependency is called layering
–
32
for example, ground transfer is one step in the execution of the
example reliable parcel transfer protocol
Post office handling is layered above parcel ground transfer
protocol.
Introduction to Communication Networks 1/2006
Layer
Person  delivery of parcel
Post office  counter handling
Peer entities
Ground transfer  loading on trucks
Airport transfer  loading on airplane
Airplane  routing from source to destination

33
each layer implements a service

via its own internal-layer actions

relying on services provided by layer below
Introduction to Communication Networks 1/2006
Advantages of Layering


34
Explicit structure allows identification & relationship of
complex system’s pieces
– layered reference model for discussion
Modularization eases maintenance & updating of
system
– change of implementation of layer’s service
transparent to rest of system
Introduction to Communication Networks 1/2006
Open protocols and systems

A set of protocols is open if
–
–


A system that implements open protocols is called an
open system
International Organization for Standards (ISO)
prescribes a standard to connect open systems
–

35
protocol details are publicly available
changes are managed by an organization whose
membership and transactions are open to the public
open system interconnect (OSI)
Has greatly influenced thinking on protocol stacks
Introduction to Communication Networks 1/2006
ISO OSI reference model

Reference model
–

Service architecture
–

–
36
describes the services provided by each layer and the service
access point (the interface with higher and lower layers)
Protocol architecture
–

formally defines what is meant by a layer, a service etc.
set of protocols that implement the service architecture
compliant service architectures may still use non-compliant
protocol architectures
Grouping together all the protocols of the different
layers is called: Protocol Stack.
Introduction to Communication Networks 1/2006
The seven Layers
Application
Application
Presentation
Presentation
Session
Session
Transport
Transport
Network
Network
Network
Data Link
Data Link
Data Link
Physical
Physical
Physical
End system
37
Intermediate
system
Introduction to Communication Networks 1/2006
End system
The seven Layers - protocol stack
data
Application
Presentation
Session
Transport
Network
Data Link
Physical
AH
PH
data
SH
TH
Network
Data Link
Physical
data
data
data
NH
data
DH+data+DT
bits
Application
Presentation
Session
Transport
Network
Data Link
Physical
Session and presentation layers are not so important, and are often ignored
38
Introduction to Communication Networks 1/2006
Postal network


Application: people using the postal system
Session and presentation:
–
–




39
chief clerk sends some priority mail, and some by regular mail ;
translator translates letters going abroad.
Mail clerk sends a message, retransmits if not acked
Postal system computes a route and forwards the
letters
Datalink layer: letters carried by planes, trains,
automobiles
Physical layer: the letter itself
Introduction to Communication Networks 1/2006
Internet protocol stack




40
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
 Ethernet, wireless LAN
physical: bits “on the wire”

Introduction to Communication Networks 1/2006
application
transport
network
link
physical
Protocol layering and data
source
M
Ht M
Hn Ht M
Hl Hn Ht M
41
application
transport
network
Link
physical
destination
application
Ht
transport
Hn Ht
network
Link
Hl Hn Ht
physical
Introduction to Communication Networks 1/2006
M
message
M
segment
M
M
datagram
frame
Physical layer


Moves bits between physically connected endsystems
Standard prescribes
–
–
–

Internet
–
42
coding scheme to represent a bit
shapes and sizes of connectors
bit-level synchronization
technology to move bits on a wire, wireless link, satellite
channel etc.
Introduction to Communication Networks 1/2006
Datalink layer


Reliable communication over a single link.
Introduces the notion of a frame
–



Idle markers tell us that a link is not carrying a frame
Begin and end markers delimit a frame
Internet
–
–
–
43
set of bits that belong together
a variety of datalink layer protocols
most common is Ethernet
others are FDDI, SONET (fiber-optic), HDLC, wireless
(802.11 – WiFi, 802.16 – WiMAX)
Introduction to Communication Networks 1/2006
Datalink layer (contd.)




44
Ethernet (broadcast link)

end-system must receive only bits meant for it

need datalink-layer address

also need to decide who gets to speak next

these functions are provided by Medium Access sublayer (MAC)
Datalink layer protocols are the first layer of software
Very dependent on underlying physical link properties
Usually bundle both physical and datalink
Introduction to Communication Networks 1/2006
Network layer

Carries data from source to destination.

Logically concatenates a set of links to form the abstraction of an
end-to-end link
Allows an end-system to communicate with any other endsystem by computing a route between them
Hides specific behavior of datalink layer
Provides unique network-wide addresses
Found both in end-systems and in intermediate systems




45
Introduction to Communication Networks 1/2006
Network layer types

In datagram networks


In connection-oriented network



46
provides both routing and data forwarding
separate data plane and control plane
data plane only forwards and schedules data
(touches every byte)
control plane responsible for routing, callestablishment, call-teardown (doesn’t touch
data bytes)
Introduction to Communication Networks 1/2006
Network layer (contd.)

Internet







47
network layer is provided by Internet Protocol
found in all end-systems and intermediate systems
provides abstraction of end-to-end link
segmentation and reassembly
packet-forwarding, routing, scheduling
unique IP addresses
can be layered over anything, but only best-effort
service
Introduction to Communication Networks 1/2006
Network layer (contd.)


48
At end-systems

primarily hides details of datalink layer

segments and reassemble

detects errors
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
Introduction to Communication Networks 1/2006
Transport layer
Reliable end-to-end communication.
creates the abstraction of an error-controlled, flowcontrolled and multiplexed end-to-end link


(Network layer provides a ‘raw’ end-to-end service)
Some transport layers provide fewer services

e.g. simple error detection, no flow control, and no retransmission
–

Internet
TCP provides error control, flow control, multiplexing

UDP provides only multiplexing

49
Introduction to Communication Networks 1/2006
Transport layer (contd.)

Error control
–
–

Flow control
–

match transmission rate to rate currently sustainable on the path to
destination, and at the destination itself
Multiplexes multiple applications to the same end-toend connection
–
50
message will reach destination despite packet loss, corruption and
duplication
retransmit lost packets; detect, discard, and retransmit corrupted
packets; detect and discard duplicated packets
adds an application-specific identifier (port number) so that receiving
end-system can hand in incoming packet to the correct application
Introduction to Communication Networks 1/2006
Session layer

Not common
Provides full-duplex service, expedited data
delivery, and session synchronization

Internet

–
51
doesn’t have a standard session layer
Introduction to Communication Networks 1/2006
Session layer (cont.)

Duplex
–

Expedited data delivery
–

allows some messages to skip ahead in end-system queues, by
using a separate low-delay transport layer endpoint
Synchronization
–
52
if transport layer is simplex, concatenates two transport
endpoints together (keep track of whose turn it is)
allows users to place marks in data stream and to roll back to a
pre-specified mark (for example, resume option when
downloading a big file)
Introduction to Communication Networks 1/2006
Presentation layer


Usually ad hoc
Touches the application data
(Unlike other layers which deal with headers)

Hides data representation differences between
applications
–


Can also encrypt data
Internet
–
–
53
characters (ASCII, unicode, EBCDIC.)
no standard presentation layer
only defines network byte order for 2- and 4-byte integers
Introduction to Communication Networks 1/2006
Application layer


54
The set of applications that use the network
Doesn’t provide services to any other layer
Introduction to Communication Networks 1/2006
Discussion


55
Layers break a complex problem into smaller,
simpler pieces.
Why seven layers?
Introduction to Communication Networks 1/2006
Next Lecture

Physical Layer
–
–
Basic Principles
Nyquist Theorem

–
Shanon Limit

–
56
Relation between digital throughput and bandwidth
Maximum capacity in presence of noise
Basic concepts in encoding and modulation
methods
Introduction to Communication Networks 1/2006