informatik master, pm2100.1, 2013kommunikationssysteme, teil 2.2, s. rupp kommunikationssysteme teil...

40
Informatik Master, PM2100.1, 2013 Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp Informatik Masterstudium www.dhbw-stuttgart.de

Upload: gerwulf-abrams

Post on 05-Apr-2015

114 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp

KommunikationssystemeTeil 2.2 – Aufbau und Entwurf von Protokollen

Stephan Rupp

Informatik Masterstudium

www.dhbw-stuttgart.de

Page 2: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 2

Inhalt

Aufbau und Entwurf von Protokollen

• Protokolle

• Entwicklung und Test

• Protokollanalysator

Page 3: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 3

Protokollschichten

Prinzip: Schichtung von Diensten

Schicht N + 1

nutzt …

… Dienst der

Schicht N

Page 4: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 4

Referenzmodell der ISO-OSI

Endsysteme und Übertragungssysteme

Page 5: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 5

ISO-OSI Referenzmodell

Funktionen der Protokollschichten

Page 6: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 6

OSI – Modell für Systeme

Anw

endu

ngen

Net

zwer

k

Page 7: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 7

Ebenen om OSI Referenzmodell

Management Plane:

Systemadministration

(OSS/NMS)

Control Plane: Steuerung

User Plane: Daten

OSS: Operation Support System, Betriebsführungssystem NMS: Network Management System, Leitsystem

Page 8: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 8

Anfragen auf Dienstebene

Dienstanbieter (Service Provider) leitet Anfragen weiter

Page 9: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 9

Innerhalb der Anwendungsknoten

SDU: Service Date Unit

PDU: Protocol Data Unit

Page 10: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 10

Hierarchie der Nachrichten

Protocol Data Units als komplette Nachricht der Schicht

• (N) PDU = (N) SDU + (N) PCI

• (N) SDU = (N+1) PDU

SDU: Service Date Unit

PDU: Protocol Data Unit

PCI: Protocol Control Information

Page 11: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 11

Kommunikationsprozess

Nachrichten und Zustandsänderungen

PaketkopfPaketinhaltQuelle: Gerd Siegmund

Prozess: Zustandsautomat

(Finite State Machine)

PDU

Page 12: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 12

Beispiel: Client - Server Kommunikation

Client und Server als Zustandsautomaten

Zustände (States):

0: Disconnected (DISC)

1: Waiting (WAIT)

2: Connected (CONN)

Zustandsübergänge (Transitions):

+/-1: send/receive Connect Request (Creq)

+/-2: send/receive Connect Acknowledge (Cack)

+/-3: send/receive Disconnect Request (Dreq)

Page 13: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 13

Zustandsdiagramm

Nachrichten lösen Zustandsänderungen aus

• Gleiches Konzept wie bei UML Zustandsdiagrammen (State Diagram)

Page 14: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 14

Beispiel: Client-Server in SDL Notation

SDL: Service Description Language (vergleichbar mit Aktivitätsdiagramm bei UML)

Zustand

Nachricht empfangen

Nachricht senden

Nachricht empfangen(warten auf Benutzer)

Zustand

Page 15: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 15

Beispiel: Sequenzdiagramm

Message Sequence Diagram entspricht Sequenzdiagramm bei UML (Nachricht senden = Methode aufrufen)

Page 16: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 16

Formale Validierung

Formale Validierung

ist in sehr einfachen

Fällen durch

Berücksichtigung

globaler Zustände

möglich.

Page 17: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 17

Beispiel: Client-Server Kommunikation

Kriterien zur Validierung:

• gegenseitige Blockierung (Deadlock): Pfade ohne Ausgang

• unspezifizierte Signale (ohne Empfang)

• Nicht auführbare Zustände (Zustand ist nicht erreichbar)

• Mehrdeutige Zustände (Zustand wird durch unterschiedliche Ereignisse erreicht)

Page 18: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 18

Inhalt

Aufbau und Entwurf von Protokollen

• Protokolle

• Entwicklung und Test

• Protokollanalysator

Page 19: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 19

Planen und Bauen

Top-Down Prozess

Bottom-Up

Prozess

Modell

Code

Planung und Design: Transformationen eines Modells

Bauen: Transformationen eines Codes

(OpenSource: Code als Modell)

Page 20: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 20

Implementierung und Tests

System-

anforderungen

Funktionale

Anforderungen

Design

Anforderungen

Implementierung

der Module

Implementierung der Units

white box

black box

Software-

Entwickler

Unit-

Tests

Modul- tests

Integrations- tests

Funktionale

Tests

System-

tests

Implementierung

und Test

V-ModellSpezifikation und Test

Page 21: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 21

Hardware Architektur

Controller

(Host)

Schnittstelle

(Communication Controller)

Page 22: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 22

Software Architektur

Controller

(Host)

Schnittstelle

(Communication Controller)

Page 23: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 23

Modell einer Protokollschicht

Schicht N als Dienstleister (Service Provider) für Schicht N+1

Page 24: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 24

Protokolltests

Ereignisse und Statustabellen (Event State Tables)

Page 25: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 25

Protokolltests

Referenz und Prüfling einer Protokollschicht

Referenz Prüfling

Page 26: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 26

Konformitätstests

Mit externem Protokolltester

FSM: Finite State Machine, Zustandsautomat ASP: Abstract Service Primitives

Page 27: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 27

Realer Testaufbau

Protokollschicht Testfälle (Test Cases)

Emulation der unteren Protokoll-

schichten

Prüfling(System under Test)

Testsystem(Protokolltester)

PDU

ASP

PDU: Packet Data Unit ASP: Abstract Service Primitives

Simulator Trace

Full Trace

Page 28: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 28

Anwendungstests

Editor

AnwendungSkript

Testumgebung

Entwicklungs-system & Emulator

Zielsystem

Test Case

Input

record inputs

play backError

situations

Events

Test report

Screen shots

laden

programmieren und testen

Page 29: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 29

Inhalt

Aufbau und Entwurf von Protokollen

• Protokolle

• Entwicklung und Test

• Protokollanalysator

Page 30: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 30

Protokollschichten

Page 31: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 31

Signalisierung und Verbindung

VoIP mit Session Initiation Protokoll (SIP)

Page 32: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 32

Protokollanalysator einsetzen

Übungen mit Wireshark

• Wireshark installieren und eigenen Verkehr mitschneiden

Siehe auch: SIP Labor

Page 33: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 33

Protokollanalysator einsetzen

Aufbau einer SIP-Nachricht – Anfrage (Request)

SP: Leerzeichen (Space)

Page 34: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 34

Protokollanalysator einsetzen

Aufbau einer SIP-Nachricht – Antwort (Response)

Page 35: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 35

Protokollanalysator einsetzen

Ablauf einer SIP-Transaktion

Verbindungsaufbau

Verbindungsabbau

Verbindung

Page 36: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 36

Protokollanalysator einsetzen

Aufzeichnung mit Wireshark (Beispiel)

Page 37: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 37

Protokolle manipulieren

Beispiel: ARP Poisoning

• Sicherheitslücke: zustandsloses Protokoll

• Beschreibung des Szenarios siehe:

http://www.oxid.it/downloads/apr-intro.swf

• Protokollwerkzeug Cain & Abel, siehe:

http://www.oxid.it/downloads/cain20.exe

Page 38: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 38

Protokolle absichern

Fehlerfälle und Sicherheitsmaßnahmen

  Maßnahme      Fehler

Sequenz Nummer

Watchdog Connection ID CRC (Prüfsumme) Berechnung

Unbeabsichtigte Wiederholung x     xVerlust x x   xEingefügte Nachricht x     xInkorrekte Sequenz x     xVerfälschung       xUnakzeptable Verzögerung   x    

Maskerade   x   x

Memory Fehler in Switches x     x

Inkorrekte Weiterleitung zwischen Segmenten     x  

Page 39: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 39

Funktionale Sicherheit (engl. Safety)

• Ziel: Gefahren für Menschen und Umwelt durch Maschinen und Anlagen vermeiden.

• Risiko = Schadenshäufigkeit * Schadensausmaß

• Prinzip: Senkung des Risikos auf ein akzeptables Maß durch Sicherheitsmaßnahmen.

Maschinen und Anlagen sind derart auszulegen, dass Fehler und Defekte keine Gefährdung nach sich ziehen.

Risiko ohne Schutzmaßnahme

< akzeptables Risiko

Risiko mit Schutzmaßnahme

Page 40: Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp Kommunikationssysteme Teil 2.2 – Aufbau und Entwurf von Protokollen Stephan Rupp

Informatik Master, PM2100.1, 2013Kommunikationssysteme, Teil 2.2, S. Rupp 40

Kommunikationssysteme

ENDE Teil 2.2

Aufbau und Entwurf von Protokollen