Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
I PARTIAL EXAM
Chapter 1: Computer networks
1. Network hardware
There are two types of transmission technology that are in widespread use:
broadcast links and point-to-point links.
Point to point links connect individual pairs of machines. Short messages
called packets are sent, and they visit one or more intermediate
machines, often multiple routers. It is sometimes called unicasting.
Broadcast networks, its channel is shared by all the machines of the
network and all of them receive every information that is sent. An
address filled in each packet is checked, if the machine recognizes its own
address it opens the file. If not, it is ignored. A wireless network is a
common example for this. Broadcast systems usually also allow the
possibility of addressing a packet to all destinations by using a special
code in the address field. When a packet with this code is transmitted, it
is received and processed by every machine on the network. This mode
of operation is called broadcasting. Some broadcast systems also support
transmission to a subset of the machines, which known as multicasting.
An alternative criterion for classifying networks is by scale:
o Personal Area Networks (PAN) lets devices communicate over a
range of a person. (Blutooth)
o Large Area Networks (LAN) a privately owned network that
operates within and nearby a single building like a home, office or
factory. (WIFI router. WIFI = IEEE 802.11; Ethernet = IEEE 802.3)
o Metropolitan Area Network (MAN) covers a city.
o Wide Area Network (WAN) spreads a large geographical area
often a country or continent. Computers of running (application)
programs are called hosts, the rest of the network that connects
these hosts is called subnet. The subnet consists of:
Transmission lines move bits between machines. Made
of copper wire, optical fiber, radio links.
I.
Internet: Technologies for moving bits over wired, wireless, satellite and other types of links.
II.
Data layer L2
Reliable communication over a given link. Introducing the concept of frame (A set of bits
that belong together). Idle no frame markers. Begin and end start/end frame
makers. Data layer protocols are the first software layer. Very dependent on the
physical link characteristics. Usually physical and data layer are grouped together in the
hardware. Internet: Multiple different data protocols, most common is the Ethernet
(others FDDI, SONET). Ethernet (broadcast link): the system must receive only bits that
are meant for it. Data layer addresses are required.
III.
Network layer L3
Transfers data from source to destination. Logically connects a set of links in order to
form a path abstraction. Enables the end system to communicate with another end
system by calculating a route between two. Hides the characteristics of the specific data
layer. Enables the definition of a unique network address. Can be found in the end
systems and the intermediate systems.
In datagram networks: provides routing and data forwarding.
In connection-oriented networks: separate data and control plane. The data plane
forwards and reorders data (deals with each data byte). The control plane is responsible
for routing, call establishment, call establishment, call ending (doesnt work with the
data). Internet: The network layer is provided with IP. Can be found in all intermediate
systems. Provides path abstraction. Segment and reassembly. Packet-forwarding and
routing. Unique IP address. Can be used as a layer on top of anything, but its just a besteffort service. At the routers: Part of the routing protocol that creates the routing
tables. Responsible for packet forwarding. Defines the packet transmission order.
Decides which packets are going to be dropped. At the hosts: Primarily hides the
details from the data layer. Segmentation and reassembly. Error detection.
IV.
Transport layer L4
Reliable end-to-end communication. Creates an abstraction of error-controlled, flowcontrolled & multiplexed end-to-end link. Some transport layers offer less services
(simple error detection, no flow control, no retransmissions). Internet: TCP
(Transmission Control Protocol) provides error-control, flow-control & multiplexing. UDP
Session layer
Not common. Provides: full-duplex service (provides dialogue control for half-duplex
applications, or applications that need to send or receive data), expedited data delivery
(enables some messages to move faster through the queues, using separate low delay
end points at the transport layer) & synchronization (enables the end users to place
markers in the data stream and go back to a given marker). Internet: No standard
session layer.
VI.
Presentation layer
Usually ad hoc. Works with application data (unlike the other layers that work with the
headers and dont touch the data). Hides the difference in the data representation
between the communicating applications (char encoding). Can encrypt the data.
Internet: No standard presentation level. Only defines the network byted order for 2- &
4- byte integers.
VII.
Application layer
Set of applications that use the network in order to exchange information. Doesnt
provide services for layers.
1.
2.
3.
4.
5. Nyquist bandwidth If the rate of signal transmission is 2H, than a signal with
frequencies no greater than H is sufficient to carry the signal rate.
V Number of levels
= 22
6. Shannon capacity When we take noise into consideration
N Noise power
D channel capacity
S Signal power
H bandwidth
= 2 (1 + )
( ) = 1010
(2),
0,
1
0
(21 ),
(22 ),
1
0
(2)
(2),
={
(2 + )
(2),
1
0
10.
o
o
iii.
Corrupted frame:
i.
ii.
iii.
iv.
Lost frame:
i.
ii.
iii.
iv.
v.
Frame i is lost
Sender sends frame i+1
Receiver receives frame i+1 out of order
Receiver sends REJ i
Sender resends frame I and all following frames
i.
ii.
iii.
iv.
v.
i.
iii.
iv.
v.
vi.
vii.
Frame format:
Flag fields:
Address:
Control field:
Context dependent
Command frame
o P bit
o 1 = poll
Response frame
o F bit
o 1 = response to a command
Information field:
Error detection
Usually 16 bit CRC, optionally 32 bit CRC
HDLC:
When the station has a frame to send, it sends the frame, but frames can collide
inside the interval.
1/(2e) is the efficiency
Slotted ALOHA:
Station can send a new frame in the next slot no collision (simple)
Station retries to send the frame in the next slot with probability p, until it is
successful collision (lost slots, clock synchronization)
1/e efficiency
Protocols in which stations listen for a carrier and act accordingly are called carrier sense
protocols.
CSMA (Carrier Sense Multiple Access):
CSMA:
Sense the channel before transmitting
If the channel is free, send the frame
If the channel is busy, deter from transmission
Analogy: do not interrupt the others!
But, collisions can occur, because of the propagation time, two stations cant sense the
transmission. The transmission time for the complete frame is wasted. The distance and
propagation delay affect the collision probability.
CSMA/CD (Collision Detection)
Sense the channel, deter from transmission as for CSMA. Collisions are detected
after a short time period. Upon detection, the transmission is aborted in order not
to waste the channel. It is easy in wired LAN, but difficult in wireless LAN.
Before starting the transmission the station needs to know whether there is activity
at the receiver
CSMA only shows whether there is activity at the sender
In a radio system, multiple transmissions can occur successfully if the destinations
are out of range
Lan topologies:
Chapter 5: Ethernet
-Medium fat coaxial cable with up to 2,5 km in length using repeaters on each 500m
-Up to 256 stations can be connected
-Multidrop cable (2.94 Mb/s)
Cabling 2 pairs of wires are always used:
Cabling types: Linear, Backbone, Three, Segmented. Manchester encoding is used to be able to find the
start, end and middle of each bit with no ambiguity while not using any external clock.
Ethernet frame the sending adapter encapsulates an IP datagram inside the Ethernet frame.
Preamble: 8 bytes. Synchronizes the sender and receiver, used for clock speed.
CRC: 4 bytes. For error detection at the receiver, who drops the frame if error is detected.
Type: 2 bytes. Determines the upper layer protocol, most frequently IP.
Addressing alternatives:
Broadcast medium all nodes receive all frames. Addressing determines what frames to keep
and what to drop. Frames can be sent as: Unicast(single destination), Multicast(group) and
Broadcast(all).
Dynamic addressing Random addressing selection, Broadcast does anyone uses address XX?,
If yes repead the selection
Static addressing (ex. Ethernet)
Switched Ethernet:
Hub: The hub will flood all ports except the one that sent the frame. The hub doesnt
understand the layer2 addresses (MAC), thus is very fast.
Switch: Is the same as a learning bridge. Every Switch has a source table in his RAM memory
where all source MAC port pairs are kept after he learns them. When a Switch receives an
Ethernet frame, he searches his address table for the destination MAC. If match is found, he
sends the frame to the designated port only (timer is reset and address I kept mostly 5 min). If
no match is found, he uses flooding. Unlike the hub, it buffers the frames that are sent to the
same port simultaneously and doesnt allow collisions.
5. ISO OSI Model: Lower three layers are peer-to-peer. Next four layers are end-to-end.
6. Each layer takes data from above. Adds header and tail and passes new data unit below.