Summary of course

When i read the course summary i also wrote it down.

Hugo 2023-01-05

Summary of the Summary

Summary of Sammanfattning datorkom

The OSI model

OSI has seven layers:

  1. Physical - Handles physical transfer of bits.
  2. Data Link
  3. Network
  4. Transport
  5. Session
  6. Presentation
  7. Application

Switches are used within a network, routers between networks. Gateways are used between networks of different types.

Three concepts about data security

  1. Protection against surveillance (Privacy).
  2. Protection against data corruption (Integrity).
  3. Authentication


  • Analog: The frequency band of the channel (Hz)
  • Digital: The number of bits per second the channel can transmit (bps) also called bit rate.


When a signal travels trough a link it will degrade from:

  • Attenuation: Energy loss
  • Distortion: Change of the signal
  • Noise: Damage to the signal trough destructive interference.

Signal-to-noise-ratio (SNR):

SNR = Average signal power / Average Noise Power


  • Throughput: Real transmission capacity between sender and receiver.
  • Latency: Time required to transmit data from sender to receiver; sum of [utbredningstid, transmissionstid, kötid och betjäningstid]

Transmission over link

Sender and receiver must use the same protocols for physical layer.

  • Digital communications use binary potential levels.
  • Analog communications use modulated sine waves.

Linjekodning ??? Line encoding

The process of converting digital data to digital signals where the data is represented by electric potentials.

Methods used:

  • Non return to zero level (NRZ-L)
  • Manchester
  • Differential Manchester

Methods of DAC (Digital-to-analog conversion)

  • ASK - Amplitude shift keying
  • FSK - Frequency shift keying
  • PSK - Phase shift keying
  • QAM

Link Layer

The link layers function is to frame data with flags, bit stuffing so flags are not found in the data, error detection and handling.

The flags shows the receiver where the frame begins and ends.

Error detection is done using redundant bits which can be used to check if other bits have been corrupted. Methods for error detection:

  • Parity bit, (Simple Parity-Check Code)
  • Cyclic Redundancy Check (CRC)
  • Checksum

Error handling

The receiver sends an ACK for all correctly received packages.

The link layer defines what happens if an ACK is missing.

Methods for Automatic Repeat Request (ARQ)

  • Stop-and wait ARQ
  • Go-back N ARQ
  • Selective Repeat ARQ

Point-to-Point Protocol (PPP)

An example of how a link-protocol could work. PPP is character-oriented (sv: byte-baserat) protocol. In a character-oriented protocol all data in a frame is handled as characters (bytes) and uses byte-stuffing.


Multiplexing is used to split a physical link into multiple channels.


  • Frequency-Division Multiplexing (FDM, sv: Frekvensmultiplexering)
  • Time-Division Multiplexing (TDM, sv: Tidsmultiplexering)
    • Synchronous-time multiplex (STDM)
    • Static multiplexing


Each node gets a time slot in which they are allowed to send data. If the device has nothing to send the time slot will be empty.

Synchronizing frames in STDM

If a multiplexer and demultiplexer aren't synchronized bits could end on the wrong channel. Therefor framing bits (synkroniseringsbitar) are used at the starts of each frame.

Local nets

  • A local area network (LAN) is a computer network with a limited size.
  • Can in its simplest form consist of only one physical link to which all devices are connected trough.
  • Can also consist of multiple physical links connected by bridges.

Fundamentals of a shared medium

All data sent trough a shared medium gets to all devices (broadcast).

Because of attenuation on the link the network has a limited size, which could be extended with repeaters.

The part in which a collision could occur is called a Collision-Domain (kollisonsdomän).


All hosts sharing a link exist in the same collision domain, this applies restrictions on the amount of devices a single link could have.

Medium Access Control (MAC) - Protocol

  • All hosts that share a link must have the same rules for sending or receiving data.
  • Called Multiple- Access Protocol or MAC.

Methods with 'Controlled access'

In controlled access devices are only allowed to send data if the other nodes allows it.


  • Reservation
  • Polling
  • Token ring

Methods with "Random access"

In methods with random access (contention) no node decides over others. All terminals instead decide for themselves when they can send. Each node uses a predetermined procedure for deciding if they shall send.


  • Aloha

Network topologies

  • Mesh
  • Bus
  • Ring
  • Star

Physical address | MAC-address

6 bytes long - example: 06:01:02:01:2C:4B

All nodes with a network card supporting IEEE 802.x have a physical address (MAC). If a device possess more than one network card it also has multiple MAC addresses.

Unicast or Broadcast-addresses

  • Normal data transmission is done with unicast (one sender to one receiver).
  • Some frames are instead sent in broadcast, if a frame is sent as a broadcast all nodes in the network gets the message.
  • In 802 networks the broadcast address is FF:FF:FF:FF:FF:FF (all ones).


Ethernet is a standard for wired LANs.


A hub sends data from a incoming link to all other links and thus operates on the physical layer (OSI 1).


Modern Ethernet networks use switches which gives each device their own link.

Function of Switch/Bridge

A switch has an adress-tabel to enable the transfer of frames to only the correct receiver. The table is extended with each address it sees.

Switches are used to build larger networks and broadcasts are still sent to all nodes in the network (networks end with a router).

Wireless access (WiFi), IEEE 802.11

Uses a mixture of CSMA/CA and RTS/CTS, the last mentioned is used to reserve access to the net and mitigate problems from the hidden terminal problem.

Spread Spectrum

Is a method used by different wireless networks which encounter lots of noise. Its therefor used in mobile networks, Bluetooth and some version of IEEE 802.11.

  • Frequency Hopping Spread Spectrum (FHSS)
    • A source uses multiple carrier frequencies, one frequency at a time but it changes very often.
  • Direct Sequence Spread Spectrum (DSSS)
    • Every data-bit is coded with n chips (bits) with unique dislocation code (sv: spridningskod) which is predetermined by sender and receiver.

Network layer

Responsible for sending information from a sender to a receiver potentially on different nets (host-to-host delivery).

Addressing and routing

A common addressing system is needed to be able to address hosts on other nets, this is called a net-address. A net address is built up by an net-id and a host-id.

Rules are needed for how to get information between nets (routing).

A device between the nets which does the routing is also needed, a router!


A router transfers packets between networks based on the addresses. Tries to make intelligient decisions on the best path to the destination. The routing decisions is made from the net-id and not the host-id.

One network protocol: IP

Internet protocol (IP) is the only network protocol that is used on the internet. And has two versions, IPv4 and IPv6.

Data is later sent as IP-packets (sv: datagram) which uses checksums but defines no error handling or flow control.


Has two parts:

  • Net-id | Identifies the network the unit is connected to.
  • Host-id | Identifies the unit inside the network.

There exists two ways of defining IP-addresses, Classful addressing and Classless addressing.

Classful addressing

Five classes exist: A, B, C, D and E. The classes have different prefix sizes and host id ranges.

Classless addressing (CIDR)

Has a variable prefix length, example: which shows that the first 25 bits are network id bits.

Some of IPv6's advantages

  • Many more address, 128 bit
  • Better header format, base header is 40 bytes long making forwarding easier.
  • Support for data security as it contains functions for encrypting and authentication.
  • Support for real-time applications as routers can assign priority to streaming data (flow control).

Example address shortened different amounts:

  • FDEC:0074:0000:0000:0000:B0FF:0000:FFF0
  • FDEC:74:0:0:0:B0FF:0:FFF0
  • FDEC:74::B0FF:0:FFF0

Mapping IP-addresses to MAC addresses

For a host or router to be able to find a node within a net the IP-address must be translated to a physical address.

Address Resolution Protocol is used to query for a MAC address from a IP address within a network.

A host in a LAN always knows the IP-address to the router (default router/ gateway) which is connected to the rest of the Internet.

ARP - Address Resolution Protocol

  • Every unit has an ARP - cache which stores IP-MAC address pairs.
  • A unit broadcasts a ARP query packet each time it needs to map a IP-address to a MAC address.
  • The host with the IP-address answers with an ARP response packet.

Routers use the net-address

Each router uses the net address to determine the next hop. All routers must also have forwarding.

Routing methods

  • Distance Vector
    • Every nodes information about its best paths is distributed to its neighbors.
    • The best end-to-end path is gotten by comparing all the possible next-hops.
    • Simple, low performance cost on CPU and memory.
  • Link State
    • Local information about topology is flooded to all nodes.
    • The best end-to-end path to all nodes i locally calculated in each node. (Tree building)
    • Complicated with larger CPU and memory requirements.

Link costs

The links (edges in the network graph) costs can depend on many things, for example:

  • Capacity
  • Strain
  • Distance
  • Propagation medium
  • Many more...

What happens when something goes wrong in IP?

All routers contains message buffers where packages wait on processing. If the network load increases the buffers fill and latency increase. If the buffers fill totally packages are trough away. As IP has no error correction some other protocol has to handle this.

Internet Control Message Protocol (ICMP)

  • ICMP has been developed to compensate for IP's lack of error detection and handling.
  • ICMP is seen as a helper protocol for IP.
  • ICMP messages are sent inside IP packets (encapsulated).
  • When a IP-packet is lost ICMP is used to report the error to the sender, the message contains the IP-header and the first 8 bytes of the original IP-packet.
  • A unit can send ICMP queries to other units:
    • Echo-request and Reply: Used to check if two units have functioning communication on the IP-level.
    • Timestamp request and reply: Used to estimate a round-trip time (RTT) between two units.
    • Router-Solicitation and Advertisement: Used by a unit to identify which routers are connected to the same network.

Transport layer (OSI 4)

The transport layer is responsible for sending messages between two application processes (Process-to-process delivery).

The transport protocol

The transport protocol encapsulates data from applications and ensures that it is sent to the correct destination application. The receivers transport protocol encapsulates (unpacks) the data.


The transport layer uses port-numbers to separate applications on the same host. Example 23 is telnet.

A transport protocol: TCP

Transmission Control Protocol (TCP) is one of the most used transport protocols on the internet and it provides a connection-oriented data transfer with error handling and flow control. It uses checksum and Go-back-N ARQ to accomplish that.

Another transport protocol: UDP

User Datagram Protocol (UDP) provides connection-free data transfer without error handling or flow control, uses checksum. Used when latency is more important than the data.

Session layer (OSI 5)

The session layer is responsible for coordinating and synchronizing dialogues between sender and receiver processes.

Presentation Layer (OSI 6)

The Presentation layer is responsible for translating, compressing and encryption of application data. The layer adds a header when received from application layer and removes one when sent to application layer.

Application layer (OSI 7)

The application layer is responsible for enabling user services.

User models for application

There exist two basic user models for applications. The client-server model and the peer-to-peer model. Some applications may decide to use combinations of the different models.

Client-Server model

In the client-server model data is passed trough a server which redirects it to another client if they wish to communicate.

Peer-to-Peer (P2P) model

Data is passed directly between devices without a middleman.

World Wide Web (WWW)

WWW is built up by three parts.

  • Web pages
    • HyperTextMarkup Language (HTML) are used for static websites.
    • Dynamic websites are built with scripting languages (JS, JSP, CGI, ASP).
  • Universal Resource Locator (URL)
    • Used to name web pages.
  • HyperText Transfer Protocol (HTTP)
    • Application protocol for sending and receiving data from web servers.


HTTP uses a TCP-session to send and receive data. Uses host-names to find destination ( But TCP/IP uses IP addresses.

To map ip addresses to host-names a Domain Name System is used (DNS).

Domain Name Servers (DNS)

DNS servers exist in all domain and communicate between domains to share their tables of domain name to IP pairs. A host always knows the IP-address to its closest DNS server.


If a data enters from a higher layer which does not fit in a single data packet a fragmentation is done. The fragmentation works by splitting the data into two parts with new headers, the first part holds the new header and the original header.

The receiver can then reassemble the data from the fragments.

Maximum Transfer Unit (MTU)

A protocol can specify a MTU which limits the possible size of payloads sent using the protocol.

Public Service Telephone Network (PSTN)

PSTN nets feature a core network (SONET/SDH) and access networks which connect to the core net. The core net is digital but the access nets are analog.

The access nets transfer information from phones to local base-stations using 0-4kHz frequencies.

The core networks instead use PCM in local station to translate analog data to digita. It transfers data with 8-bit samples. And uses circuit switching by STDM (Synchronous Time Division Multiplexing)

Digitizing audio

Translating analog signals to digital are done by PCM which works by:

  1. Sampling - splitting the analog signal into multiple discrete parts.
  2. Quantization - Measuring the amplitude level of each chunk at some granularity.
  3. Encoding - Turning the data into binary data.

Protocol Information

Worldwide telecom stations operate with a standardized protocol "Signaling System #7) by a separate data network.

Signaling System #7 vs the Internet

Internet sends the protocols on the same net as data, often as a part of the data packets header. Has some special protocols like ICMP, ARP and DNS.

In the telecom network data transfers are held separate from protocol data transfers which increases latency for starting or ending connections. It is however very effective data transfers using circuit coupling???.

Cellular nets

Cellular nets use access networks and core networks like telecom networks. The network is split into geographic cells (cellular) of which each has a base station and a specific frequency band to minimize interference with other nearby cells.


Many mobile devices must share the same frequency band in a cell and different channelization methods has thus been created. All access in mobile phone networks are also controlled.

Three methods are often combined and used for channeling.

  • Frequency-Division Multiple Access (FDMA)
  • Time-Division Multiple Access (TDMA)
  • Code-Division Multiple Access (CDMA)

Long Term Evolution (LTE)

LTE is the fourth generation of mobile networks and uses data packages and is developed for Internet-access instead of telecom and features a higher bandwidth. The higher bandwidth requires much smaller cells, called pico and femto-cells.

To still be able to send voice over these networks "Voice over LTE" was developed.

Circuit-switched fallback

Circuit switched fallback is used to switch over mobile calls to the GSM/UMTS nets and this requires communications between LTE and GSM/UMTS.


Card: 1/1 Score:  0.0
Press to start