%Schriftgröße, Layout, Papierformat, Art des Dokumentes
\documentclass[10pt,oneside,a4paper]{scrartcl}

%Einstellungen der Seitenränder
\usepackage[left=2cm,right=2cm,top=1.5cm,bottom=1.5cm,includeheadfoot]{geometry}

%neue Rechtschreibung
\usepackage[ngerman]{babel}

%Umlaute ermöglichen
\usepackage[utf8]{inputenc}

%Gesamtseitenzahl
\usepackage{lastpage}

% Kopf- und Fußzeile
\usepackage[automark]{scrpage2}

%Quellcode-Listings
\usepackage{listings}

%Hyperlinks
\usepackage{hyperref}

% \text{}
\usepackage{amsmath}

%multi-row
\usepackage{multirow}

\usepackage{array}

%Kopfzeile
\ihead{CCNA v7.0 Enterprise Networking, Security, and Automation}
\chead{}
\ohead{kohnlehome.de/netz/CCNA-3-09.pdf}
\setheadsepline{0.5pt}

%Fußzeile
\setfootsepline{0.5pt}
\ifoot{Franz Kohnle}
\cfoot{Seite \thepage\ von  \pageref{LastPage}}
\ofoot{\today}

\pagestyle{scrheadings}

\begin{document}

% Überschrift 
\begin{center}
    \LARGE % Schriftgröße
    \bfseries % Fettdruck
    \sffamily % Serifenlose Schrift
    9 QoS Concepts
\end{center}

\section*{9.1 Network Transmission Quality}
\begin{itemize}
    \item Ursachen von congestion (Stau)
          \begin{itemize}
              \item Aggregation (viele Links $\rightarrow$ Uplink)
              \item große Bandbreite $\rightarrow$ kleine Bandbreite (speed mismatch, LAN to WAN)
          \end{itemize}
    \item congestion $\rightarrow$ queue $\rightarrow$ delay
    \item Priority Queue
    \item Sources of Delay
          \begin{itemize}
              \item Code delay: compress data at the source (fixed time)
              \item Packetization delay: encapsulate packet (fixed)
              \item Queuing delay (variable)
              \item Serialization delay: transmit frame onto wire (fixed)
              \item Propagation delay: travel between source and destination (variable)
              \item De-jitter delay: buffer flow of packets, send out in evenly spaced intervals (fixed)
          \end{itemize}
    \item Jitter: variation of delay of received packets
    \item Playout delay buffer: send de-jittered stream (packet drop due to excessive jitter)
\end{itemize}

\section*{9.2 Traffic Characteristics}
\renewcommand{\arraystretch}{1.5}
\begin{tabular}{l || c | c | c }
                           & Voice         & Video              & Data    \\ \hline \hline
    Smooth (constant rate) & $\surd$       & -                  & $\surd$ \\
    Bursty                 & -             & $\surd$            & $\surd$ \\ \hline
    Benign (freundlich)    & $\surd$       & -                  & $\surd$ \\
    Greedy (gierig)        & -             & $\surd$            & $\surd$ \\ \hline
    Drop sesitive          & $\surd$       & $\surd$            & -       \\
    Delay sensitive        & $\surd$       & $\surd$            & -       \\\hline
    UDP priority           & $\surd$       & $\surd$            & -       \\
    TCP retransmits        & -             & -                  & $\surd$ \\ \hline
    \multicolumn{4}{c}{One-Way Requirements}                              \\ \hline
    Latency                & $\leq$ 150ms  & $\leq$ 200-400ms   & -       \\
    Jitter                 & $\leq$ 30ms   & $\leq$ 30-50ms     & -       \\
    Loss                   & $\leq$ 1\%    & $\leq$ 0,1-1\%     & -       \\
    Bandwidth              & 30 - 128 kb/s & 384 kb/s - 20 Mb/s & -
\end{tabular}

\subsection*{Factors to Consider for Data Delay}
\renewcommand{\arraystretch}{1.5}
\begin{tabular}{l || l | l }
    Factor          & Mission Critical                                   & Not Mission Critical     \\ \hline \hline
    Interactive     & Prioritize for the lowest delay, 1-2s respose time & benefit from lower delay \\ \hline
    Not interactive & supply minimum bandwidth                           & lowest priority
\end{tabular}

\section*{9.3 Queuing Algorithms}
\begin{itemize}
    \item FIFO (First In irst Out): keine Priorisierung, Pakete werden direkt weitergeleitet
    \item WFQ (Weighted Fair Queuing)
          \begin{itemize}
              \item automatische Zuordnung der Pakete anhand ToS (IPv4-Header) bzw Traffic Class (IPv6-Header)
              \item Hohe Priorität: low-volume, interactive traffic (Telnet, Voice)
              \item Niedrige Priorität: high-volume traffic (FTP)
              \item Funktioniert nicht mit Tunneling und Encryption
          \end{itemize}
    \item CBWFQ (Class Bases Weighted Fair Queuing):
          \begin{itemize}
              \item user-defined traffic classes (protocol, ACLs, input interface)
              \item Ein FIFO-Queue für jede Class
              \item user-defined bandwidth, weight, and maximum packet limit für jede Class
              \item keine Class hat absolute Priorität
          \end{itemize}
    \item LLQ (Low Latency Queuing)
          \begin{itemize}
              \item PQ (priority queuing): absolute Priorität für delay-sensitive Pakete (Voice)
              \item Andere Pakete werden mit CBWFQ behandelt
          \end{itemize}
\end{itemize}

\section*{9.4 QoS Models}
\begin{itemize}
    \item Best-effort model: kein QoS, Paket ist wie Brief
    \item IntServ (Integrated Services Model)
          \begin{itemize}
              \item Hard QoS: guarantees bandwidth, delay, and packet-loss rates, from end to end
              \item connection-oriented (wie Telefon)
              \item application requests a specific kind of service
              \item RSVP (Resource Reservation Protocol): signal QoS needs along devices in the end-to-end path
              \item Resource intensive, not scalable to large implementations such as the internet
          \end{itemize}
    \item DiffServ (Diff Services Model)
          \begin{itemize}
              \item Soft QoS: Router classify traffic hop-by-hop
              \item low-latency guaranteed service for voice or video
              \item best-effort for web traffic or file transfers
              \item kein end-to-end service, kein signaling, scalable
          \end{itemize}
\end{itemize}

\newpage

\section*{9.5 QoS Implementation Techniques}
\subsection*{Avoiding Packet Loss}
\begin{itemize}
    \item Increase link capacity
    \item Increase buffer space
    \item Drop lower-priority packets
\end{itemize}

\subsection*{QoS Tools}
\begin{itemize}
    \item 1. Classification and 2. Marking tools
          \begin{itemize}
              \item Layer 2: Ethernet (802.1Q, 802.1p): CoS (Class of Service) (3 bits)
              \item Layer 2: Wi-Fi (802.11): TID (3 bits)
              \item Layer 2: MPLS: EXP (3 bits)
              \item Layer 3: IPv4 alt: IPP (IP Precedence:) (3 bits im ToS)
              \item Layer 3: IPv4 and IPv6 neu: DSCP (Differentiated Services Code Point) (6 bits)
              \item Trust boundaries: Trusted Endpoints klassifizieren Traffic (IP-Phone, L2-Switch, L3-Switch)
          \end{itemize}
    \item 3. Congestion avoidance tools (Drop packets): WRED (Weighted random early detection)
          \begin{itemize}
              \item Je voller der Queue ist, desto mehr \% der Pakete werden gedroppt.
              \item WRED: weighted random early detection (nur für TCP, Window-size?)
          \end{itemize}
    \item Congestion management tools: 4. Queuing: CBWFQ, LLQ, 5. Scheduling, shaping
          \begin{itemize}
              \item Shaping traffic (outbound): Pakete zwischenspeichern und gleichmäßig aussenden
              \item Policing (inbound): Provider kappt bei Überschreitung der CIR (customer information rate)
          \end{itemize}
\end{itemize}

\subsection*{QoS Policy Guidelines}
\begin{itemize}
    \item Enable queuing at every device in the path between source and destination
    \item Classify and mark traffic as close the source as possible.
    \item Shape and police traffic flows as close to their sources as possible.
\end{itemize}

\end{document}
