%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% I, the copyright holder of this work, release this work into the
%% public domain. This applies worldwide. In some countries this may
%% not be legally possible; if so: I grant anyone the right to use
%% this work for any purpose, without any conditions, unless such
%% conditions are required by law.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass{beamer}
\usetheme[faculty=fi]{fibeamer}
\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\usepackage[
  main=english, %% By using `czech` or `slovak` as the main locale
                %% instead of `english`, you can typeset the
                %% presentation in either Czech or Slovak,
                %% respectively.
  czech, slovak %% The additional keys allow foreign texts to be
]{babel}        %% typeset as follows:
%%
%%   \begin{otherlanguage}{czech}   ... \end{otherlanguage}
%%   \begin{otherlanguage}{slovak}  ... \end{otherlanguage}
%%
%% These macros specify information about the presentation
\title{Séminaire CRANS} %% that will be typeset on the
\subtitle{Protocole de routage BGP (border gateway protocol)} %% title page.
\author{Grizzly}

%% These additional packages are used within the document:
\usepackage{ragged2e}  % `\justifying` text
\usepackage{booktabs}  % Tables
\usepackage{tabularx}
\usepackage{wrapfig}
\usepackage{tikz}      % Diagrams
\usetikzlibrary{calc, shapes, backgrounds}
\usepackage{amsmath, amssymb}
\usepackage{hyperref}       % `\url`s
\usepackage{showexpl}
\lstset
{
    language=[LaTeX]TeX,
    breaklines=true,
    basicstyle=\tt\scriptsize,
    keywordstyle=\color{blue},
    identifierstyle=\color{magenta},
}
\frenchspacing

\def\dashfill{\cleaders\hbox{$\bullet$}\hfill}

\setbeamertemplate{footline}[text line]{
  \parbox{\linewidth}{\vspace*{-8pt}\hfill Grizzly \hfill\insertpagenumber}}
\setbeamertemplate{navigation symbols}{} 

\begin{document}

\begin{darkframes}
%\frame{\maketitle}

\begin{frame}
{\huge Séminaire CRANS: \\ \tiny \hbox to \hsize{\dashfill\hfil}}
{\Large Protocole de routage BGP (border gateway protocol)} 
\end{frame}


\begin{frame}
\frametitle{Problématique}
Il faut pouvoir router les paquets.\\
-> Il faut des tables de routage avec l'exterieur.\\
-> Il faut pouvoir connaitre ses voisins.\\
-> Il faut un protocole de communication et d'échange.\\
\end{frame}


\begin{frame}
\frametitle{Vocabulaire}
\textbf{BGP:} Border Gateway Protocol.\\
\textbf{AS:} Autonomous system. Ensemble sous la même autorité (Crans, SFR, FREE, Bnpparibas...) avec un ID (204515 pour le CRANS).\\
\textbf{iBGP, eBGP:} Internal et external BGP.\\
\end{frame}

\begin{frame}
\frametitle{Rappel sur le routage}
\textbf{Méthode du Hop-By-Hop:}\\
Quand on cherche son chemin en voiture, on suit les panneaux. Le panneau ne pointe pas vers la destination finale mais vers le prochain panneau.\\
\end{frame}

\begin{frame}
\frametitle{Gestion des AS}
L'IANA gere les IP au niveau mondial. Sa branche (RIR) européen est le RIPE NCC.
\begin{figure}
  \centering
  \includegraphics[width=0.9\textwidth]{images/IANA-1.jpg}
\end{figure}
\end{frame}

\begin{frame}
\frametitle{Vocabulaire}
\textbf{RIR:} Regional Internet registry. Organisme qui gère l'allocation des IP et des numéros d'AS aux LIR.\\
\textbf{LIR:} Local Internet Register. Généralement des FAI, Entreprise etc qui à reçu un bloc d'IP\\
\textbf{Adresses PA, PI:} Provider Agregatable, Provider Independent.\\
\end{frame}


\begin{frame}
\frametitle{AS}
\begin{figure}
  \centering
  \includegraphics[width=0.9\textwidth]{images/as_crans.png}
\end{figure}
\end{frame}


\begin{frame}
\frametitle{Relation entre plusieurs AS}
\begin{figure}
  \centering
  \includegraphics[width=0.9\textwidth]{images/liens_as.png}
\end{figure}
\end{frame}


\begin{frame}
\frametitle{Tables BGP: Neighbor Table}
\begin{table}
\tiny
\centering
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|}
\hline
Neighbor & V & AS & MsgRcvd & MsgSent & TblVer & InQ & OutQ & Up/Down & State/PfxRcd\\
\hline
 & & & & & & & & & \\
\hline  
158.255.113.72 & 4 & 8218 & 4159282 & 40977 & 0 & 0 & 0 & 02w0d05h & 733065\\
\hline
 & & & & & & & & & \\
\hline  
10.15.8.0 & 4 & 2 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\
12.25.10.0 & 4 & 7 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\
100.5.7.0 & 4 & 10 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\
\hline
\end{tabular} 
\end{table}
\end{frame}

\begin{frame}
\frametitle{Caractère des attributs}
\begin{itemize}
  \item Well-Known/Optionnal: Supporté par tout les constructeurs ou pas.\\
  \item Mandatory/Discretionary: Inclus dans les mises à jours des tables.\\
  \item Transitive/Non-Transitive: Se passent d'AS en AS.\\
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Caractère des attributs}
\begin{figure}
\centering
\includegraphics[height=0.8\textheight]{images/atributs.png}
\end{figure}
\end{frame}

\begin{frame}
\frametitle{Choix de la meilleure route: la Metric}
14 attributs pour classer par priorité.
\begin{figure}
\centering
\includegraphics[width=\textwidth]{images/Metrique-de-BGP.png}
\end{figure}
\end{frame}

\begin{frame}
\frametitle{Boucles}
Boucles de réseau impossibles avec BGP.\\
Utile pour l'eBGP et l'iBGP.\\
Utilise l'attribut AS\_PATH et détect son propre numéro d'AS.\\
\end{frame}

\begin{frame}
\frametitle{Failles}
\begin{center}
"At the moment, large network providers tend to trust that other network providers are behaving reasonably--and aren't intentionally trying to hijack someone else's Internet addresses."
\end{center}
\end{frame}

\begin{frame}
\frametitle{Failles}
\begin{figure}
\centering
\includegraphics[width=\textwidth]{images/pakistan.png}
\end{figure}
\end{frame}

\begin{frame}
\frametitle{Méchanisme de controle}
\begin{figure}
\centering
\includegraphics[width=\textwidth]{images/controle.png}
\end{figure}
\end{frame}

\begin{frame}
\frametitle{Méchanisme de controle}
\begin{figure}
\centering
\includegraphics[width=0.9\textwidth]{images/ixp_schema.png}
\end{figure}
\end{frame}

\begin{frame}
\frametitle{IXP (Internet Exchange Point)}
Permet de créer des liaison Peer avec d'autres AS.
\begin{figure}
\centering
\includegraphics[width=\textwidth]{images/ixp.png}
\end{figure}
\end{frame}

\begin{frame}
\frametitle{Sources}
\begin{itemize}
  \item \href{https://www.networklab.fr/la-metrique-de-bgp/}{NetworkLab}\\
  \item \href{https://www.fingerinthenet.com/bgp/}{FingerInTheNet}\\
  \item \href{https://queue.acm.org/detail.cfm?id=2668966}{AcmQueue}\\
  \item \href{https://www.m00nie.com/2010/08/bgp-attributes/}{m00nie}\\
\end{itemize}
\end{frame}


\end{darkframes}
\end{document}
