Grundlagen der Rechnernetze
Introduction
Overview
• Building blocks and terms
• Basics of communication
• Addressing
• Protocols and Layers
• Performance
• Historical development
Building blocks and terms
Hosts and links
H1 H2
Host
Link
Hosts and links
H1 H2
Host
Link
Host is a computer or
more general a device that communicates with the other host on a network
Link is (in the context of computer networks) connection between two hosts
Point to point connection designates communication connection between two hosts (nodes) or endpoints
Types of communication
• Simplex
• Half-duplex
• Duplex (full duplex)
Medium
• Wired communication
• Wireless communication
• Light(?)
• Sound (ultrasound)
Communication channel between the nodes
• Communication channel – refers to a physical transmission medium (wired or wireless) but it also covers logical connection over
multiplexed medium
Message, stream, packet [1]
H1 M H2 H3 S H4
P1 P2
…
PnPayload
Header Trailer
Bytes
Message, stream, packet
Message
Communication primitive, usually consists of multiple packets; usually used in the higher layers of
communication
Stream
A sequence of signals that we use to transmit data
Packet
Formatted unit of data consisting of user data and control data (header and trailer). Essentially a part of a message; several
packets together form a message
Multiple access
H1 H2 H3
…
HnCollision domain
A network connected by a shared medium; in this network packets may collide with one another when they are sent. A term coming from early versions of
Single hop communication Basically communication within one collision domain; packet reaches destination within one hop
Multiplexing [1]
H1
H2
H3
H4
H5
H6
H1
H2
H
H4
H5
H6
…
Multiplexing [2]
• Static multiplexing (predefined)
• Statistical multiplexing (can adapt over time)
• Queueing
• Packet scheduling – the way of controlling packet transmission
Scalability of computer networks
• Scalability
• how networks adapt to the grow of load?
• how networks adapt to the increase of hosts?
• how networks adapt to the increase of links?
Scalability of multiple access networks
H1 H2 H3
…
HnAssuming that all node pairs communicate the same number of times. What is the share s of the medium per node pair?
Scalability of multiple access networks
H1 H2 H3
…
HnAssuming that all node pairs communicate the same number of times. What is the share s of the medium per node pair?
𝑠𝑠 = [𝑛𝑛 ∗ (𝑛𝑛 − 1)/2]
−1= 𝑂𝑂( 1
𝑛𝑛
2)
Scalability of fully connected network
H1 H2
H3
H5 H9 H4
H8
H6 H7
H10
H11
What is the number of links k per node and totalnumber of links l?
Scalability of fully connected network
H1 H2
H3
H5 H9 H4
H8
H6 H7
H10
H11
What is the number of links k per node and totalnumber of links l?
𝑘𝑘 = 𝑛𝑛 − 1 𝑙𝑙 = 𝑛𝑛 ∗ (𝑛𝑛 − 1)/2
Switched network
H1 H2 H3
H8
H7
H4 S1
S2 S3 S4
S5
Switch – a network device that provides dedicated communication between the hosts
Switched network – computer network that uses network switches
Switched network
H1 H2 H3
H8
H7
H6 H5
H4 S1
S2 S3 S4
S5
Packet switched network – a type of network that uses packets for communication; packet switching is a form of grouping of the data sent over the network; in here network links can be shared
Circuit switched network – a dedicated communication channel (circuit) is established between two hosts; in here network links are dedicated to one specific
communication between the hosts
Switched network
H1 H2 H3
H8
H7
H4 S1
S2 S3 S4
S5
Store and forward – a packet is sent to an intermediate station where it can be either kept or forwarded
Cut through switching – a bigger chunk of the data (frame) is forwarded in smaller pieces even before the whole chunk is received
Multi-hop communication – using multiple stations to transmit data between two hosts
Cloud representation
Internet [1]
N1
N3 N2
R1
H1 H2
H3
R3
R2
H4
H5 H9
H8
Internet [2]
• What is internet?
• Router
• Network interface
• The I nternet and a i nternet
• Physical network
• Intranet
Recursive use of cloud representation
N1
N3 N2
R1
H1 H2
H3
R3
R2
H4
H5 H9
H8
N
Network sizes
• LAN – local-area network
• WAN – wide-area network
• MAN – metropolitan area network ; larger than local area network (LAN) but smaller than the area covered by a wide area network (WAN).
• SAN – storage area network – is a high-speed network of storage devices that also connects those storage devices with servers.
• CAN – Controller Area Network (also known as CAN bus) is a vehicle bus standard designed to allow microcontrollers and devices to communicate with each other in applications without a host computer.
• PAN – personal area network ; network of localized and personalized devices.
• GAN – global area network; connecting everything.
Network sizes
Source: www.cebylon.com/khi1/141-01-GAN-MAN.html
Networks and graphs [1]
N1
N3 N2
R1
H1 H2
H3
R3
R2 H4
H5 H6
H9
H8
H7
H1 H2
H3 N1
R1 R2
N2
H4
H5 H7 H6
H9 H8
N3 R3
Networks and graphs [2]
• Nodes
• Links
• Topology
Formal definition of a network graph:
𝐺𝐺 = 𝑉𝑉, 𝐸𝐸 𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝐸𝐸 ⊆ 𝑉𝑉 × 𝑉𝑉
Topology examples
Bus Tree
Star Ring Mesh
Basics of communication
Types of communication
N1
N3 N2
R1
H1 H2
H3
R3
R2 H4
H5
H6 H9
H8
H7
• Unicast – communication where a piece of information is sent from one point to another point. In this case there is just one sender, and one receiver.
• Multicast – describe communication
where a piece of information is sent from one or more points to a set of other
points. In this case there is may be one or more senders, and the information is distributed to a set of receivers (theer may be no receivers, or any other number of receivers).
• Broadcast – communication where a piece of information is sent from one
point to all other points. In this case there is just one sender, but the information is sent to all connected receivers.
Types of communication
N1
N3 N2
R1
H1 H2
H3
R3
R2 H4
H5 H9
H8
• Forwarding – Packet (frame…) forwarding is the relaying of packets from one
network segment to another by nodes in a computer network. Usually refers to the effective transfer of a packet (frame...)
• Routing – process of selecting a path for traffic in a network, or between or across multiple networks.
• Path – actual path used for transmission between two hosts
Forwarding table
Destination Next hop
4711 3
7893 2
3467 5
2576 2
… …
R
1 2 4 3
5 6
Timeouts and acknowledgements
N1
N3 N2
R1
H1 H2
H3
R3
R2 H4
H5 H9
H8
• Timer
• Timeout
• Acknowledgement ACK
Connection oriented and connectionless communication
N1
N3 N2
R1
H1 H2
H3
R3
R2 H4
H5
H6 H9
H8
H7
Connection oriented
• Telephone, File transfer Connectionless
• VoIP, Post
Client-Server principle
H N S
Client Server
Client-Server principle
H N S
Client Request Server
Client-Server principle
H N S
Client Server
Response
Client-Server principle
H N S
Client Server
• stateful serverremembers client data (state) from one request to the next.
• stateless server does not keep state information. Using a stateless file server, the client must specify
complete file names in each request, specify location for reading or writing.
Adressing
Motivation
N1
N3 N2
R1
H1 H2
H3
R3
R2 H4
H5
H6 H9
H8
H7
How do we transfer message from H8 to H4?
Which path do we use?
Can we always reach the destination?
Physical address – Ethernet example
00001000 00000000 00101011 11100100 10110001 00000010
08 : 00 : 2B : E4 : B1 : 02
Broadcast
11111111 11111111 11111111 11111111 11111111 11111111 FF:FF:FF:FF:FF:FF
Multicast
1XXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
Address space
R1
H1 H2 H3
R3 R2
H4
H5 H6
H9 H8
H7
1
2
3 4
1.1 1.2 1.7
2.5
1.10
2.7
2.1
2.4 2.8
3.1
3.2
4.4
4.1 4.2 4.3
Forwarding table and address space
R1
H1 H2 H3
R3 R2
H4
H5 H6
H9 H8
H7
1
2
3 4
1.1 1.2 1.7
2.5
1.10
2.7
2.1
2.4 2.8
3.1
3.2
4.4
4.1 4.2 4.3
Dest Next-Hop H1 After R1 H2 After R1 H3 After R1 H4 Direct H5 Direct H6 Direct H7 After R3
Dest Next-Hop 1.X After R1 2.X Direct 4.X After R3
IP addresses
• 32 bits – approximately 4 billion addresses
• Binary representation 4 groups of 8 bits
• Dot notation – 4 decimal numbers representing 4 groups of bits
• Example:
10101011 01000101 11010010 11110101
171.69.210.245
Classful IP addresses
• What does it mean classful?
• Which are different classes?
• Network address
• Host address
• Broadcast address
Need for additional hierarchical layer
R1
H1 H2 H3
R3 H4 R2
H5 H6
H9 H8
H7
1
2
3 4
1.1 1.2 1.7
2.5
1.10
2.7
2.1
2.4 2.8
3.1
3.2
4.4
4.1 4.2 4.3
Entrance to the University network
Subnetworks
1 0 Network Host
14 16
For example class B Address
11111111 11111111 11111111 (255.255.255.0)
Subnet mask 00000000
Network number
Solution Subnet Host
Subnetting example
R1 H1
Subnet number : 128. 96. 34. 0 = 100000000 01100000 00100010 00000000 Subnet mask : 255.255.255.128 = 111111111 11111111 11111111 10000000
Example: Using one class B network:
128.96.X.X =
= 10000000 01100000 XXXXXXXX XXXXXXXX
128. 96. 34. 15 = 100000000 01100000 00100010 00001111
128. 96. 34. 1 = 100000000 01100000 00100010 00000001
128. 96. 34.130 = 100000000 01100000 00100010 10000010
128. 96. 34.128 = 100000000 01100000 00100010 10000000 255.255.255.128 = 111111111 11111111 11111111 10000000
Changes in forwarding tables
R1 H1
H2
Subnet number : 128. 96. 34. 0 Subnet mask : 255.255.255.128
128. 96. 34. 15
128. 96. 34. 1
128. 96. 34.130
128. 96. 34.128 255.255.255.128
128. 96. 34.139
Subnet number Subnet mask Next hop 128.96.34.0 255.255.255.128 direct (if 1) 128.96.34.128 255.255.255.128 direct (if 2) 128.96.33.0 255.255.255.0 after R2 (if 2)
Interface 1 Interface 2
128. 96. 34.129
Network number Next Hop
128.96 …
R3
Address resolution
H1 R1 H2
128.96.34.15 45:35:FE:36:42:55
128.96.34.1 128.96.34.16 57:FF:AA:36:AB:11 85:48:A4:28:AA:18
IP address Physical address
128.96.34.1 57:FF:AA:36:AB:11 128.96.34.16 85:48:A4:28:AA:18
… …
IP address Physical address
128.96.34.15 ???
128.96.34.16 85:48:A4:28:AA:18
… …
Supernetting – motivation
• Lets assume, for example, the IT department of a university campus, which "autonomously" uses a lot of IP addresses.
• With subnetting, we can efficiently use given set of IP addresses.
• The problem is that the IT department still has to request / manage IP
addressing in the granularities Class-A-, -B-, or -C-network.
Supernetting – motivation
• What happens when for example we need 257 hosts?
1. We can apply for Class B network address. The problem is efficiency
Supernetting – motivation
• What happens when for example we need 257 hosts?
1. We can apply for Class B network address. The problem is efficiency 257
2 16 − 1 ≈ 0,39%
Supernetting – motivation
• What happens when for example we need 257 hosts?
1. We can apply for Class B network address. The problem is efficiency 257
2 16 − 1 ≈ 0,39%
2. We can also consider 2 class C networks.
Supernetting – motivation
• What happens when for example we need 257 hosts?
1. We can apply for Class B network address. The problem is efficiency 257
2 16 − 1 ≈ 0,39%
2. We can also consider 2 class C networks.
This means that we have 2 routing entries in each internet router
Solution: Classless Inter-Domain Routing (CIDR)
• We can aggregate network addresses.
• Example: Lets assume that we have 16 * 256 - 1 hosts.
• We use 16 addresses of Class-C networks.
Not arbitrary addresses, but consecutive, e.g.:
192.4.16
192.4.17
... 192.4.31
Solution: Classless Inter-Domain Routing (CIDR)
• We can aggregate network addresses.
• Example: Lets assume that we have 16 * 256 - 1 hosts.
• We use 16 addresses of Class-C networks.
But not arbitrary addresses, but consecutive, e.g.:
192.4.16 192.4.17 ... 192.4.31
• Now we can observe following:
all addresses begin with the same 20 bits: 11000000 00000100 0001
Solution: Classless Inter-Domain Routing (CIDR)
• Observation: all addresses begin with the same 20 bits:
11000000 00000100 0001
• That means that we need a 20-bit network address
• This is between Class-C (24-bit) and Class-B (16-bit)
• Required output of 2 ^ 4 = 16 Class C addresses
• General question: How many class-C networks requires i-bit network address?
Solution: Classless Inter-Domain Routing (CIDR)
• Observation: all addresses begin with the same 20 bits:
11000000 00000100 0001
• That means that we need a 20-bit network address
• This is between Class-C (24-bit) and Class-B (16-bit)
• Required output of 2 ^ 4 = 16 Class C addresses
• General question: How many class-C networks requires i-bit network address?
2 24−𝑖𝑖
Solution: Classless Inter-Domain Routing (CIDR)
• We need a notation for the scheme.
• In our example:
192.4.16 192.4.17 ... 192.4.31
• Notation can be summarized as: 192.4.16 / 20
• So this additional number / 20 means network address consists of first 20
bits and summarizes the 2 ^ 4 = 16 successive class-C networks beginning
with 192.4.16.
Quiz
• How to represent the class-C networks from 192.4.0 to 192.4.31 using
/ X notation?
Quiz
• How to represent the class-C networks from 192.4.0 to 192.4.31 using / X notation?
192.4.0 / 19
Quiz
• How to represent the class-C networks from 192.4.0 to 192.4.31 using / X notation?
192.4.0 / 19
• How to represent the single class-C network 192.4.16 in / X notation?
Quiz
• How to represent the class-C networks from 192.4.0 to 192.4.31 using / X notation?
192.4.0 / 19
• How to represent the single class-C network 192.4.16 in / X notation?
192.4.0 / 24
Solution: Classless Inter-Domain Routing (CIDR)
• How are aggregated addresses handled in the router:
• Addresses in the routing tables are pair <length, value>
• This is comparable to the pair <mask, value> in subnetting if the mask
consists of successive 1-bit values
Solution: Classless Inter-Domain Routing (CIDR)
• CIDR allows further route aggregation. For example:
Internet provider Advertise
128.112.128/21
128.112.128/24
128.112.135/24 Client networks
We don’t even need to use 8 consecutive addresses
Solution: Classless Inter-Domain Routing (CIDR)
• What happens with CIDR and routing table entries? Prefixes may overlap.
Lets consider following routing table:
Where do we route the message for 171.69.10.5?
Where do we route the message 171.69.20.5?
Network address Next hop
... ...
171.69/16 if1 171.69.10/24 if2
... ...
Solution: Classless Inter-Domain Routing (CIDR)
• What happens with CIDR and routing table entries? Prefixes may overlap.
Lets consider following routing table:
Where do we route the message for 171.69.10.5?
if2
Where do we route the message 171.69.20.5?
if1
Network address Next hop
... ...
171.69/16 if1 171.69.10/24 if2
... ...
Solution: Classless Inter-Domain Routing (CIDR)
• What happens with CIDR and routing table entries? Prefixes may overlap.
Lets consider following routing table:
Where do we route the message for 171.69.10.5?
if2
Where do we route the message 171.69.20.5?
if1
In general: Longest-Prefix-Match
Network address Next hop
... ...
171.69/16 if1 171.69.10/24 if2
... ...
Subnetting vs CIDR
• Subnetting allows splitting a network address into subnets
• Distribution almost anywhere; everything that can be expressed with the subnet mask
• CIDR is used to aggregate network addresses in a single address
• Aggregation not arbitrary; network addresses must be consecutive; only 2^i sized networks can be aggregated
• Certain flexibility using "dummy networks"
Subnetting and addresses revisited
• Smaller networks using one network address
• Hierarchy
• Better organization
• Better use of resources
• Addresses (network, host, broadcast)
Subnetting example [1]
• We have been given one class C network address: 217.110.20.0 that we want to divide it into two subnets. The questions are:
• How many hosts can we have in each subnet?
• What are the subnet addresses for these two subnets?
• What are corresponding subnet masks?
• What set of IP addresses cover these subnets?
• What are CIDR notations for subnets?
Subnetting example [1]
• We have been given one class C network address: 217.110.20.0 that we want to divide it into two subnets. The questions are:
• How many hosts can we have in each subnet?
2 subnets = address space of 2^7 addresses
Number of hosts = 2^7 – host address – broadcast address = 126
Subnetting example [1]
• We have been given one class C network address: 217.110.20.0 that we want to divide it into two subnets. The questions are:
• What are the subnet addresses for these two subnets?
217.110.20.0
217.110.20.128
Subnetting example [1]
• We have been given one class C network address: 217.110.20.0 that we want to divide it into two subnets. The questions are:
• What are corresponding subnet masks?
255.255.255.128
255.255.255.128
Subnetting example [1]
• We have been given one class C network address: 217.110.20.0 that we want to divide it into two subnets. The questions are:
• What set of IP addresses cover these subnets?
217.110.20.0 - 217.110.20.127
217.110.20.128 - 217.110.20.255
Subnetting example [1]
• We have been given one class C network address: 217.110.20.0 that we want to divide it into two subnets. The questions are:
• What are CIDR notations for subnets?
25 for both networks 217.110.20.0 / 25
217.110.20.128 / 25
Subnetting example [2]
• We have been given one class C network address: 217.110.20.0 that we want to divide it into three subnets, the first having 101 hosts, second 44 and the third 60. The questions are:
• What are the subnet addresses for these three subnets?
• What are corresponding subnet masks?
• What set of IP addresses cover these subnets?
• What are CIDR notations for subnets?
Subnetting example [2]
• We have been given one class C network address: 217.110.20.0 that we want to divide it into three subnets, the first having 101 hosts, second 44 and the third 60. The questions are:
• Actual first question is what are the sizes of those three subnets
• 64 < 101 < 128 => 2
7− 1 − 1 = 126
• 32 < 44 < 64 => 2
6− 1 − 1 = 62
• 32 < 60 < 64 => 2
6− 1 − 1 = 62
Subnetting example [2]
• We have been given one class C network address: 217.110.20.0 that we want to divide it into three subnets, the first having 101 hosts, second 44 and the third 60. The questions are:
• What are the subnet addresses for these three subnets?
217.110.20.0
217.110.20.128
217.110.20.192
Subnetting example [2]
• We have been given one class C network address: 217.110.20.0 that we want to divide it into three subnets, the first having 101 hosts, second 44 and the third 60. The questions are:
• What are corresponding subnet masks?
255.255.255.128
255.255.255.192
255.255.255.192
Subnetting example [2]
• We have been given one class C network address: 217.110.20.0 that we want to divide it into three subnets, the first having 101 hosts, second 44 and the third 60. The questions are:
• What set of IP addresses cover these subnets?
217.110.20.0 - 217.110.20.127
217.110.20.128 - 217.110.20.191
217.110.20.192 - 217.110.20.255
Subnetting example [2]
• We have been given one class C network address: 217.110.20.0 that we want to divide it into three subnets, the first having 101 hosts, second 44 and the third 60. The questions are:
• What are CIDR notations for subnets?
217.110.20.0 / 25
217.110.20.128 / 26
217.110.20.192 / 26
Addresses example
• Given are following IP addresses in CIDR notation. Determine whether these addresses are subnet, host or broadcast addresses.
1. 192.168.0.17 / 24
2. 14.195.1.191 / 26
3. 112.127.0.0 / 14
4. 112.127.0.0 / 16
Addresses example
• Given are following IP addresses in CIDR notation. Determine whether these addresses are subnet, host or broadcast addresses.
1. 192.168.0.17 / 24
=> Host address, host bits are different from 0
Addresses example
• Given are following IP addresses in CIDR notation. Determine whether these addresses are subnet, host or broadcast addresses.
2. 14.195.1.191 / 26
=> Broadcast address, host bits are all equal to 1
Addresses example
• Given are following IP addresses in CIDR notation. Determine whether these addresses are subnet, host or broadcast addresses.
3. 112.127.0.0 / 14
=> Host address, host bits are different from 0
Addresses example
• Given are following IP addresses in CIDR notation. Determine whether these addresses are subnet, host or broadcast addresses.
4. 112.127.0.0 / 16
=> Network address, host bits are equal to 0
Protocols and layers
Protocol and interface
Host 1
Protocol High-Level Object
Host 2
Protocol High-Level Object
Peer-to-peer Interface Service
Interface Service
Interface
Protocol and interface
Host 1
Protocol High-Level Object
Host 2
Protocol High-Level Object
Peer-to-peer Interface Service
Interface Service
Interface
Interoperability
Protocol vs algorithm
Message sequence chart (MSC)
H1 H2
Message sequence chart (MSC)
H1 H2
RTS CTS Data
RTS – request to send
CTS – clear to send
Data – useful data
Protocol state machine
Wait for connection
request
Wait for file request connection request/
connection response
close request
file request/
file response
Example
H N S
Service primitives:
States:
Timeline:
File f GET_FILE(), void ABORT_FILE_RETRIVAL(), ...
CLIENT_IDLE, CLIENT_WAITS_FOR_FILE, ...
if client waits 1000ms then change to state CLIENT_ERROR
Protocol graph
Host 1
Protocol 1
Protocol 3
Protocol 2
Protocol 4
Host 2
Protocol 1
Protocol 3
Protocol 2
Protocol 4
Message encapsulation
Host 1
Application 1
Protocol 1
Protocol 2
Protocol 3
Host 2
Data
Data H1
Data H1
H2
Application 1
Protocol 1
Protokoll 2
Protocol 3
Data
Data H1
Data H1
H2
Multiplexing and demultiplexing
Host 1
Protocol 1
Protocol 3
Protocol 2
Protocol 4
Host 2
Protocol 1
Protocol 3
Protocol 2
Protocol 4
Protocol stack – practical example
OSI model
OSI – Open System Interconnection Communication subnet boundary
OSI model – concepts
Service – set of operations that layer provides to the layer above it Protocol – set of rules that
determine the format and meaning of the packets
(messages) that are exchanged Analogy with OO programming languages: services – abstract data types; protocols implementation of services
OSI model
OSI Principles:
1. A layer should be created where a different abstraction is needed.
2. Each layer should perform a well-defined function.
3. The function of each layer should be chosen with an eye toward defining internationally standardized protocols.
4. The layer boundaries should be chosen to minimize the information flow across the interfaces.
5. The number of layers should be large enough that distinct functions need not be thrown together in the same layer out of necessity and small enough that the
architecture does not become unwieldy.
OSI model
Physical layer– transmitting raw bits (or signal in general) over the communication channel Data link layer – organizes raw data into the data frames (order of 100 – 1000 of bytes) and transmits frames sequentially. Sending back ACK in reliable services. Traffic regulation when we have fast transmitter and slow receiver.
Control of access to the shared medium – separate sublayer media access control
OSI model
Network layer – controls operation of subnet, determines how packets are routed from
source to destination. Possible different types of routes – static tables, routes that can be updated (at the start of each conversation) and highly dynamic routes. Handling congestion (too many packets received).
Transport layer– accepts data above it and splits it in smaller units, passing them to the lower layers. End-to-end layer – carries
communication from source to the destination.
Delivering in the order in which bytes were sent or delivering isolated messages or broadcast to multiple destinations
OSI model
Session layer – allows different machines (users) to establish sessions: dialog control
(whose turn is to transmit), token management (preventing two parties to attempt same
critical operation) and synchronization.
Presentation layer – syntax and semantics of the information. Manages abstract data
structures
Application layer – protocols needed by users
Internet model (TCP/IP reference model)
Internet model (TCP/IP reference model)
Link layer – interface between hosts and transmission (not a layer in standard sense)
Internet layer – corresponds to network layer. “Internet” –
between the networks. Modeled over snail mail, series of packets delivered using one or more gateways. Internet Protocol (IP) and Internet Control Message Protocol (ICMP)
Internet model (TCP/IP reference model)
Transport layer – above internet layer, allows conversation
between the source and
destination. Transport Control Protocol (TCP) – reliable
transmission and User Datagram Protocol (UDP) – connectionless protocol
Application layer – high level protocols. Early examples: Telnet (virtual terminal), FTP (file
transfer), SMTP (electronic mail)
Internet protocols
Comparisons (critique) of OSI and TCP/IP model
• OSI model
• Model made before protocols were made (good and bad)
• Bad technology and implementations (empty layers, big and slow)
• TCP/IP
• Protocols then models
• Not general - it cannot describe anything else but TCP/IP
• Does not distinguish services, services and protocols
• Link layer – not a real layer; no distinction between physical and data layer
• In general a lot of ad-hoc solutions
How do we use TCP (or UDP)
Creating a socket
int socket(int domain, int type, int protocol) domain : PF_INET, PF_UNIX, PF_PACKET, ...
type : SOCK_STREAM, SOCK_DGRAM, ...
protocol : UNSPEC, ...
Passive open on the server side
int bind(int socket, struct sockaddr *address, int len) int listen(int socket, int backlog)
int accept(int socket, struct sockaddr *address, int *len) address : enthält IP-Adresse und Port
backlog : Anzahl erlaubter Pending-Connections
Active open on the client side
int connect(int socket, struct sockaddr *address, int len)
How do we use TCP (or UDP)
Server side: Client side:
Addresses in internet model
Host 2 Host 1
TCP
IP IP
LINK LINK
TCP UDP
UDP
Application Application Application Application
Physical address
IP address Port
Demux-Key
Performance
Bandwidth
1 µs
1 second
0 1 1 0 0 1 1
…
Bandwidth b in this example:
Bandwidth
1 µs
1 second
0 1 1 0 0 1 1
…
Bandwidth b in this example:
𝑏𝑏 = 10 6 𝑏𝑏𝑏𝑏𝑠𝑠 = 1 𝑀𝑀𝑏𝑏𝑏𝑏𝑠𝑠
Bps and bps
Parameter Order of value Value
KBps 2
10Byte/s 1.024
MBps 2
20Byte/s 1.048.576
GBps 2
30Byte/s 1.073.741.824
TBps 2
40Byte/s 1.099.511.627.776
Kbps 10
3Bits/s 1.000
Mbps 10
6Bits/s 1.000.000
Gbps 10
9Bits/s 1.000.000.000
Tbps 10
12Bits/s 1.000.000.000.000
Bytes per second vs bits per second
Bps and bps
Parameter Order of value Value
KBps 2
10Byte/s 1.024
MBps 2
20Byte/s 1.048.576
GBps 2
30Byte/s 1.073.741.824
TBps 2
40Byte/s 1.099.511.627.776
Kbps 10
3Bits/s 1.000
Mbps 10
6Bits/s 1.000.000
Gbps 10
9Bits/s 1.000.000.000
Tbps 10
12Bits/s 1.000.000.000.000
Simplification of surpluses:
Simplification:
𝑛𝑛 𝑀𝑀𝑀𝑀𝑏𝑏𝑠𝑠 = 𝑛𝑛 � 2 20 𝑀𝑀𝐵𝐵𝑤𝑤𝐵𝐵
10 6 𝑀𝑀𝐵𝐵𝑤𝑤𝐵𝐵
= 8𝑛𝑛 � 10 6 𝑀𝑀𝑤𝑤𝑤𝑤
= 8𝑛𝑛 𝑀𝑀𝑏𝑏𝑏𝑏𝑠𝑠
Propagation delay
H2 H1
d
Time x needed for transmission of one bit at distance d and with signal propagation speed l
x
Propagation delay
H2 H1
d
Time x needed for transmission of one bit at distance d and with signal propagation speed l
𝒙𝒙 = 𝒅𝒅
𝒍𝒍 [ 𝒎𝒎 𝒎𝒎 𝒔𝒔
= 𝒔𝒔]
x
Delay of one 1-hop transmission
H2 H1
d
Time x needed for transmission of n bits at distance d and with signal propagation speed l and bandwidth b:
x
Delay of one 1-hop transmission
H2 H1
d
Time x needed for transmission of n bits at distance d and with signal propagation speed l and bandwidth b:
𝒙𝒙 = 𝒅𝒅
𝒍𝒍 + 𝒏𝒏
𝒃𝒃 [ 𝒃𝒃𝒃𝒃𝒃𝒃𝒔𝒔 𝒃𝒃𝒃𝒃𝒃𝒃𝒔𝒔
𝒔𝒔
= 𝒔𝒔]
x
Delay of one 1-hop transmission
H2 H1
d
Time x needed for transmission of n bits at distance d and with signal propagation speed l and bandwidth b:
𝒙𝒙 = 𝑷𝑷𝑷𝑷 + 𝑻𝑻𝑷𝑷
x
Propagation delay:
𝑷𝑷𝑷𝑷 = 𝒅𝒅
Transmission delay: 𝒍𝒍 𝑻𝑻𝑷𝑷 = 𝒏𝒏
𝒃𝒃 [ 𝒃𝒃𝒃𝒃𝒃𝒃𝒔𝒔 𝒃𝒃𝒃𝒃𝒃𝒃𝒔𝒔
𝒔𝒔
= 𝒔𝒔]
Delay of one multi-hop transmission
d
Time x needed for transmission of n bits at distance d and with signal propagation speed l and bandwidth b and queuing time q:
x H2
H1
Delay of one multi-hop transmission
d
Time x needed for transmission of n bits at distance d and with signal propagation speed l and bandwidth b and queuing time q:
𝒙𝒙 = 𝒅𝒅
+ 𝒏𝒏
+ 𝒒𝒒 [𝒔𝒔]
x H2
H1
Round-trip time (RTT)
d
Round-trip time – time needed for the signal to be sent plus time it takes to get the acknowledgment for that signal
𝑹𝑹𝑻𝑻𝑻𝑻 = 𝟐𝟐 � 𝑷𝑷𝑷𝑷
RTT H2
H1
Bandwidth delay product
Bandbreite
Delay
Definition: Number of the bits n that are contained in one channel with latency of l and bandwidth of b
𝑛𝑛 = 𝑙𝑙 � 𝑏𝑏
Bandwidth delay product
Bandbreite
Delay
Example: Number of the bits n that are contained in one channel with latency of 100ms and bandwidth of 50Mbps
𝑛𝑛 = 50 � 10
6𝑏𝑏𝑤𝑤𝑤𝑤𝑠𝑠
𝑠𝑠 � 0,1𝑠𝑠 = 5 � 10
6𝑏𝑏𝑤𝑤𝑤𝑤𝑠𝑠
Transfer time and effective throughput
l
x H2
H1
Transfer time and effective throughput
l
x H2
H1
Example: Calculation of transfer time z and effective throughput d and when retrieving a 1MB file over a channel with bandwidth of 1Gbps and RTT of 92ms.
𝑧𝑧 = 1𝑀𝑀𝑀𝑀
1𝐺𝐺𝑏𝑏𝑏𝑏𝑠𝑠 + 0,092 ≈ 8𝑀𝑀𝑏𝑏
1𝐺𝐺𝑏𝑏𝑏𝑏𝑠𝑠 + 0,092 = 8 � 106𝑏𝑏 1 �109𝑏𝑏
𝑠𝑠
+ 0,092 = 0,092 + 0,008 = 0,1𝑠𝑠
𝑑𝑑 = 1𝑀𝑀𝑀𝑀 8𝑀𝑀𝑏𝑏
= 80𝑀𝑀𝑏𝑏𝑏𝑏𝑠𝑠 ≪ 1𝐺𝐺𝑏𝑏𝑏𝑏𝑠𝑠 ‼!
Bit error rate and packet error rate
010100010111100010011101110010110001101
Bit error rate (BER)
Packet error rate (PER)
Packet 1 Packet 2 Packet 3 Packet 4
Bit error rate and packet error rate
010100010111100010011101110010110001101
Bit error
Packet error
Packet 1 Packet 2 Packet 3 Packet 4
Connection between BER and PER for n bit message without correction:
𝑃𝑃𝐸𝐸𝑃𝑃 = 1 − (1 − 𝑀𝑀𝐸𝐸𝑃𝑃 ) 𝑛𝑛
Additive and bottleneck costs
H1 H2
R1
R2
R3
10ms 5ms 10ms 20ms
1Mbps 1Gbps 1Gbps
1Mbps
e1 e2 e3 e4
Additive and bottleneck costs
H1 H2
R1
R2
R3
10ms 5ms 10ms 20ms
1Mbps 1Gbps 1Gbps
1Mbps
e1 e2 e3 e4
Example: What is delay d und bandwidth b between hosts H1 and H2
𝑑𝑑 = �
𝑖𝑖=1 𝑛𝑛
𝐷𝐷𝐵𝐵𝑙𝑙𝐷𝐷𝐵𝐵(𝐵𝐵
𝑖𝑖) = 45𝑚𝑚𝑠𝑠
𝑏𝑏 = min
1≤𝑖𝑖≤𝑛𝑛𝑀𝑀𝐷𝐷𝑛𝑛𝑑𝑑𝑤𝑤𝑤𝑤𝑑𝑑𝑤𝑤𝑤(𝐵𝐵
𝑖𝑖) = 1𝑀𝑀𝑏𝑏𝑏𝑏𝑠𝑠
Multiplicative costs
H1 H2
R1
R2
R3
p1=2/3 p2=1/3 p3=1/2 p4=1/2
e1 e2 e3 e4
Multiplicative costs
H1 H2
R1
R2
R3
p1=2/3 p2=1/3 p3=1/2 p4=1/2
e1 e2 e3 e4
Example: What is the total packet success rate with given packet error rates per link.
𝑟𝑟 = 1 − �
𝑖𝑖=1 𝑛𝑛
(1 − 𝑏𝑏 𝑖𝑖 )
Performance
example of effective throughput with packet switching
Delay savings
H1 H2
Circuit switching
R1 R2 H1 H2
Message switching
R1 R2 H1 H2
Packet switching
R1 R2
Delay savings
H1 H2
Circuit switching
R1 R2 H1 H2
Message switching
R1 R2 H1 H2
Packet switching
R1 R2
Delay savings
H1 H2
Circuit switching
R1 R2 H1 H2
Message switching
R1 R2 H1 H2
Packet switching
R1 R2
Delay savings
H1 H2
Circuit switching
R1 R2 H1 H2
Message switching
R1 R2 H1 H2
Packet switching
R1 R2
Influence of the packet size
H1
H2
R1 R2
Message size n bits Packet payload k bits Packet header c bits
Bandwidth b bps
Delay per hop d seconds Number of hops h
Effective throughput x
𝒙𝒙 = 𝒏𝒏
𝒃𝒃 ; 𝒃𝒃 = 𝑷𝑷𝑷𝑷 + 𝑻𝑻𝑷𝑷
Influence of the packet size
H1
H2
R1 R2
Message size n bits Packet payload k bits Packet header c bits
Bandwidth b bps
Delay per hop d seconds Number of hops h
Effective throughput x
𝒙𝒙 = 𝒏𝒏
𝒃𝒃 ; 𝒃𝒃 = 𝑷𝑷𝑷𝑷 + 𝑻𝑻𝑷𝑷 = 𝒉𝒉 � 𝒅𝒅 + ( 𝒏𝒏
𝒌𝒌 + 𝒉𝒉 − 𝟏𝟏) � 𝒌𝒌 + 𝒄𝒄
𝒃𝒃
Example plot
EffectiveThroughputin Gbps
Message size 1 GB
Bandwidth 1 Gbps
Header size 64 Byte
Number of hops 10
Delay per hop 10 ms
History and present
Packet switching – the first generation
• The end of 1950s
• Cold war at its peak; DoD (USA – department of defense) looks for command and control center that could survive nuclear attack
• During 1960s
• Contract with RAND corporation (still looking for a solution). Paul Baran develops a distributed and fault tolerant system as a basis for packet switching. AT&T thinks it is not feasible.
Structure of telephone systems
Baran’s distributed switching system
ARPANET
• 1967
• Feasibility of packet switched networks
• Donald Davies (at NPL) independently developed packet switching system as a campus network. They referenced work from Paul Baran
• 1969
• (D)ARPA contracted consulting
company BBN to develop that kind of network and necessary software.
Graduate students from the University of Utah developed host software.
Dec 1969 Jul 1970 Mar 1971
Structure of packet switched subnet according to Clark
ARPANET and NSFNET
• 1974
• First ARPANET protocol (Vinton Cerf and Robert Kahn)
• ARPA pushed usage of TCP/IP;
University of California Berkeley
integrated these protocols in Berkeley Unix
• Late 1970s – end of 1980s
• TCP/IP emerged in its nearly final form
• Associated standards were published in 1981
• Form the 1. January 1983 TCP/IP became the only approved part of ARPANET
NSF backbone 1988
Commercialization of Internet
• During 1980s
•
IP addresses becoming more expensive (scarce); development of hierarchical name structure – DNS – domain name system
•
Further growth of network (universities, research labs, libraries,…); problems with overload;
NSF contract MERIT (consortium from Chicago) to continue operating the network; upgrade of backbone (56kbps -> 448kbps ->1.5Mbps)
•
Merger of ARPANET and NSFNET followed by many other regional networks (Canada, Europe, Pacific)
• 1990
•
First step of commercialization of internet NSFNET donated to nonprofit corporation ANS (Advanced Networks and Services – MERIT, MCI, IBM); further upgrade of the backbone 1.5 Mbps -> 45Mbps
•
NSF ensures fair competition (through the agreements with PacBell, Ameritech, MSF and Sprint)
• 1995
WWW
• During 1990s
• Development in other countries EuropaNET and EBONE (started at 2Mbps then upgraded to 34Mbps)
• Until early 1990s Internet was mainly used in academia.
• Everything changed with development of world wide web (WWW) – Tim Berners-Lee (CERN physicist) and Mosaic Browser Marc Andersen (National Center for Supercomputer Applications in Urbana Illinois)
• Rise of Internet Service Providers – increased number of home computers on
the internet (dial-up service)
Simplified overview of Internet today
Wide area data networks – evolution
• 1970s
• X.25 system – connection-oriented wide area data networks of the first generation. System was used for a decade.
• 1980s
• Frame relay system – mostly used for connections of LANs (even until today)
• 1990s
• Development of ATM (asynchronous transfer mode); the main aim was
transfer of speech, data, cable TV, telegraph using one type of data network.
ATM did not achieved awaited success but it is used for data transport of
Internet traffic
Local area networks
• Early 1970s
• Norman Abrahamson and colleagues from the university of Hawaii developed wireless (short range radio) ALOHANET. They were using computers from
neighboring islands to communicate with main computer in Honolulu
• 1976
• Using previous work from Abrahamson, Bob Metcalfe and David Boggs (Xerox PARC) developed the first LAN, called Ethernet, data rate of 2,94Mbps
• 1978
• Xerox Ethernet is standardized by DEC, Intel and Xerox (10 Mbps Ethernet)
Local area networks
• 1978 onwards
• Bob Metcalfe founded company 3Com which sold over 100 Millions of Ethernet adapters
• Development of Ethernet (100 Mbps and 1000 Mbps, switching, cabling)
• Token bus and token ring were added
• Middle of 1990s
• Standardization of Ethernet compatible wireless communication network WiFi
Standardization communities
Telecommunication
ITU International Telecommunication Union
International Standards
ISO International Standards Organization
IEEE Institute of Electrical and Electronics Engineering
Internet standards ISOC Internet Society
IAB Internet Architecture Board IRTF Internet Research Task Force IETF Internet Engineering Task Force
IEEE 802 Working-Groups
Overview and conclusion
• Definition of a network
• Scalability (hierarchical aggregation)
• Addressing, routing, forwarding
• Multiplexing
• Layering and protocols (separation of concerns)
• OSI model and Internet (TCP/IP) model
• Latency and bandwidth
• Standardization
Literature
[PetersonDavie2007] Larry L. Peterson and Bruce S. Davie, „Computer Networks: A Systems Approach“, Edition 4, 2007.
1.2 Requirements
1.3 Network Architecture
1.4.1 Application Programming Interface (Sockets) 1.5 Performance
4.1.1 What is an Internetwork?
4.1.3 Global Addresses
4.1.4 Datagramm Forwarding in IP 4.3.1 Subnetting
4.3.2 Classless Routing (CIDR)
[Tanenbaum2003] Andrew S. Tanenbaum, „Computer Networks“, Fourth Edition, 2003.
1.5 Example Networks