From 1c13e8c5f78bc1e052f7a6bc6a813ffd2193636d Mon Sep 17 00:00:00 2001 From: chhan11 Date: Sat, 24 Jun 2017 13:03:04 +0200 Subject: [PATCH 1/7] CMD: New list for inline use --- structure.tex | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/structure.tex b/structure.tex index 2d3e50a..483c755 100644 --- a/structure.tex +++ b/structure.tex @@ -272,3 +272,8 @@ \renewcommand{\footnote}[1]{% \renewcommand\footnotesize\scriptsize % here there is scriptsize in footnotes (example) \origfootnote{#1}} + + +% https://tex.stackexchange.com/a/146312 +\newlist{mylist}{enumerate*}{1} +\setlist[mylist]{label={\alph*)},font={\color{red!25!black}\bfseries}} From b22d8229c00578093d51da21e15f9427c5d4d840 Mon Sep 17 00:00:00 2001 From: chhan11 Date: Sat, 24 Jun 2017 13:06:46 +0200 Subject: [PATCH 2/7] Footnotes: set spacing between to down to 1mm --- structure.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/structure.tex b/structure.tex index 483c755..6403acc 100644 --- a/structure.tex +++ b/structure.tex @@ -190,7 +190,7 @@ \geometry{a4paper,margin=1.5cm} \setlength{\columnsep}{1.5cm} %space between columns \setlength{\headheight}{15pt} -\setlength{\footnotesep}{0.5cm} %space between footnotes: +\setlength{\footnotesep}{1mm} %space between footnotes: \setlength{\skip\footins}{2cm} %space between the text body and the footnotes \setlist[itemize,1]{leftmargin=\dimexpr 26pt-.2cm} \setlist[itemize,2]{leftmargin=\dimexpr 26pt-.3cm} From 71d08be87bfa5d9a4dc7aeec1bc583ab610f65f3 Mon Sep 17 00:00:00 2001 From: chhan11 Date: Sat, 24 Jun 2017 13:07:15 +0200 Subject: [PATCH 3/7] Acronyms: updated --- acronyms.tex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/acronyms.tex b/acronyms.tex index 4eb4f94..d6d6831 100644 --- a/acronyms.tex +++ b/acronyms.tex @@ -33,6 +33,7 @@ \newacronym{dwdm}{DWDM}{} \newacronym{eap}{EAP}{Extensible Authentication Protocol} \newacronym{eapol}{EAPoL}{Extensible Authentication Protocol over Local Area Network} +\newacronym{ebgp}{eBGP}{Externel Border Gateway Protocol} \newacronym{ecn}{ECN}{Explicit Congestion Notification} \newacronym{eff}{EFF}{Electronic Frontier Foundation} \newacronym{eigrp}{EIGRP}{Enhanced Interior Gateway Routing Protocol} @@ -59,9 +60,11 @@ \newacronym{https}{HTTPS}{Hyper Text Transfer Protocol Secure} \newacronym{iab}{IAB}{Internet Architecture Board} \newacronym{iana}{IANA}{Internet Assigned Numbers Authority} +\newacronym{ibgp}{iBGP}{Internal Border Gateway Protocol} \newacronym{icann}{ICANN}{Internet Corporation for Assigned Names and Numbers} \newacronym{ieee}{IEEE}{Institute of Electrical and Electronics Engineers} \newacronym{ietf}{IETF}{Internet Engineering Task Force} +\newacronym{igp}{IGP}{Interior Gateway Protocol} \newacronym{igrp}{IGRP}{Interior Gateway Routing Protocol} \newacronym{imap}{IMAP}{Internet Message Access Protocol} \newacronym{ios}{IOS}{Internetwork Operating System} @@ -124,6 +127,7 @@ \newacronym{ros}{ROS}{MikroTik RouterOS} \newacronym{rpr}{RPR}{Route Processor Redundancy} \newacronym{rpr+}{RPR+}{Route Processor Redundancy Plus} +\newacronym{rr}{RR}{Route Reflector} \newacronym{rspan}{RSPAN}{Remote Switch Port Analyser} \newacronym{rstp}{RSTP}{Rapid Spanning Tree Protocol} \newacronym{rpvst}{RPVST}{Per Vlan Rapid Spanning Tree} From de79d35f5283b212580284a6f60d46e4261db0fd Mon Sep 17 00:00:00 2001 From: chhan11 Date: Sat, 24 Jun 2017 13:17:35 +0200 Subject: [PATCH 4/7] Fix: Wrong use of \url in \rfc{}. Corrected to \href --- commands.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands.tex b/commands.tex index e21dfd8..0857e3b 100644 --- a/commands.tex +++ b/commands.tex @@ -128,4 +128,4 @@ License: \texttt{\href{https://creativecommons.org/licenses/by-sa/3.0/}{CC BY-SA % Usage: -\newcommand{\rfc}[1]{RFC #1\footnote{\url{https://tools.ietf.org/html/rfc#1}{tools.ietf.org/html/rfc#1}}} +\newcommand{\rfc}[1]{RFC #1\footnote{\href{https://tools.ietf.org/html/rfc#1}{tools.ietf.org/html/rfc#1}}} From 99c5c262c8dc7212f30f8567709bd30de17351f3 Mon Sep 17 00:00:00 2001 From: chhan11 Date: Fri, 30 Jun 2017 08:22:13 +0200 Subject: [PATCH 5/7] WIP: Updated bgp --- acronyms.tex | 1 + chapter/layer3.tex | 41 +++++++++++++++++++++++++++++------------ commands.tex | 5 +++++ references-websites.bib | 21 +++++++++++++++------ 4 files changed, 50 insertions(+), 18 deletions(-) diff --git a/acronyms.tex b/acronyms.tex index d6d6831..b51ca09 100644 --- a/acronyms.tex +++ b/acronyms.tex @@ -156,6 +156,7 @@ \newacronym{tlv}{TLV}{Type, Length, Value} \newacronym{toc}{ToC}{Table of Contents} \newacronym{tosdr}{ToS;DR}{Terms of Service; Didn't Read} +\newacronym{ttl}{TTL}{Time-to-live} \newacronym{udld}{UDLD}{Unidirectional Link Detection} \newacronym{udp}{UDP}{User Datagram Protocol} \newacronym{utc}{UTC}{Coordinated Universal Time} diff --git a/chapter/layer3.tex b/chapter/layer3.tex index af035a4..9679574 100644 --- a/chapter/layer3.tex +++ b/chapter/layer3.tex @@ -7,14 +7,15 @@ \section{EIGRP} \section{RIP} \section{Static} + +\newpage + \section{BGP} \wikicommons{BGP_FSM} The protocol of the internet used since 1994.\cite{wiki:Border_Gateway_Protocol} -Currently based upon \rfc{4271} with updates following in \rcf{6286} \rfc{6608}, \rfc{6793}, \rfc{7606}, \rfc{7607}, \rfc{7705}. - - +Currently based upon \rfc{4271} with updates following in \rfc{6286} \rfc{6608}, \rfc{6793}, \rfc{7606}, \rfc{7607}, \rfc{7705}. \begin{itemize} \item \itemhead{Properties} @@ -27,20 +28,19 @@ Currently based upon \rfc{4271} with updates following in \rcf{6286} \rfc{6608}, \begin{itemize} \item \itemhead{Route-maps mechanism} \begin{itemize} - \item Routes can be aggregated between \Glspl{as}. + \item Routes can be aggregated between \glspl{as}. \item Properties can be changed on the fly by mathing - \begin{enumerate*}[label={\alph*)}] - \item \Gls{bgp} communities, - \item \Gls{ip} prefix, - \item \Gls{bgp} as-path, - \end{enumerate*} + \begin{mylist} + \item \gls{bgp} communities, + \item \gls{ip} prefix, + \item \gls{bgp} as-path, + \end{mylist} \end{itemize} - \item \end{itemize} \item \itemhead{States} \begin{enumerate} - \item Idle: \Gls{bgp} while initializing refuses all incoming connections. Will initiate \Gls{tcp} connection to peer. - \item Connect: Waits for \Gls{tcp} connection. If \Gls{tcp} is established goes to state OpenSent. If \Gls{tcp} is \textit{un}successful ConnectRetry timer is started and then goes to Active state. + \item Idle: \gls{bgp} while initializing refuses all incoming connections. Will initiate \gls{tcp} connection to peer. + \item Connect: Waits for \gls{tcp} connection. If \gls{tcp} is established goes to state OpenSent. If \gls{tcp} is \textit{un}successful ConnectRetry timer is started and then goes to Active state. \item Active: When ConnectRetry counter reaches 0 goes to state Connect. \item OpenSent: Sends \gls{msg} to remote node. Waits for reply \gls{msg} before going to OpenConfirm. \item OpenConfirm: Nodes exchange keepalive \glspl{msg} and goes to Established state if successful. @@ -48,4 +48,21 @@ Currently based upon \rfc{4271} with updates following in \rcf{6286} \rfc{6608}, \end{enumerate} \end{itemize} +\subsection[iBGP]{Internal Border Gateway Protocol} +\gls{ibgp} is running \gls{bgp} within the same \gls{as} between routers. Much like running a general \gls{igrp} in the network. + +Tradition one has to be fearful of creating \textit{routing loops} in the network. \glspl{bgp} mechanism for this is using either \begin{mylist} \item Full Mesh, or \item \glspl{rr} \end{mylist}. + +Problems by running \textit{Full Mesh} is the formula of \[ iBGPsessions = n*(n-1)/2 \] \note{where $ n $ is the number \gls{ibgp} speakers} which results in scaling problems as \gls{ibgp} speakers are added to the \gls{as}. + +\textit{\glspl{rr}} solves this problem by peering with all \gls{ibgp} speakers in the \gls{as}. All \gls{ibgp} speakers are then clients of the \glspl{rr}. This in turn helps maintainability by also advertising routes learnt from \gls{ibgp} clients to clients. Classic filtering/mathing route-maps/prefix-filters can be used to \textit{not} advertise all routes select group of clients from the \glspl{rr}. + +\subsection[eBGP]{External Border Gateway Protocol} + +\gls{ebgp} connections is inherently different from \gls{ibgp} connections. Some assumptions are made such as +\begin{enumerate} + \item a \gls{ttl} of 1 is the default\footnote{Multi-hop \gls{ebgp} can thou be configured}, + \item distance is set to 20 compared to 200 for \gls{ibgp} routes, + \item Next hop does \textit{not} change for \gls{ebgp} routes advertised to \gls{ibgp} neighbours. +\end{enumerate} \ No newline at end of file diff --git a/commands.tex b/commands.tex index 0857e3b..b31662a 100644 --- a/commands.tex +++ b/commands.tex @@ -129,3 +129,8 @@ License: \texttt{\href{https://creativecommons.org/licenses/by-sa/3.0/}{CC BY-SA % Usage: \newcommand{\rfc}[1]{RFC #1\footnote{\href{https://tools.ietf.org/html/rfc#1}{tools.ietf.org/html/rfc#1}}} + + +% Usage: \note{} or \nb{} +\newcommand{\note}[1]{{\color{Mahogany!20!black}{\small(#1)}}} +\newcommand{\nb}[1]{\note{#1}} \ No newline at end of file diff --git a/references-websites.bib b/references-websites.bib index a469821..5e1d553 100644 --- a/references-websites.bib +++ b/references-websites.bib @@ -2,14 +2,23 @@ author = "Hector Camba Lainez", title = "Cap4 implementing vtp", year = "2010", - url = {https://www.slideshare.net/lucky0679/cap4-implementing-vtp}, + url = {\url{https://www.slideshare.net/lucky0679/cap4-implementing-vtp}}, note = "[Online; accessed 22-May-2017]" } @misc{ web:SP_Tiers, - author = "Orhan Ergun", - title = "{Tier 1,Tier 2 and Tier 3 Service Providers - Tier and BGP Peering} --- Orhanergun.net", - year = "2017", - howpublished = {\url{https://orhanergun.net/2017/01/tier-1-tier-2-tier-3-service-providers/}}, - note = "[Online; accessed 17-June-2017]" + author = "Orhan Ergun", + title = "{Tier 1,Tier 2 and Tier 3 Service Providers - Tier and BGP Peering} --- Orhanergun.net", + year = "2017", + howpublished = {\url{https://orhanergun.net/2017/01/tier-1-tier-2-tier-3-service-providers/}}, + note = "[Online; accessed 17-June-2017]" } + +@misc{ Differen15:online, + author = {\url{http://www.differencebetween.com/author/root/}{Andrew}}, + title = "Difference Between EBGP and IBGP", + howpublished = {\url{http://www.differencebetween.com/difference-between-ebgp-and-vs-ibgp/}}, + month = "September", + year = "2011", + note = "[Online; accessed on 24-June-2017]" +} \ No newline at end of file From cf6ae6cc1c21e0781597d1f7e1fd10306f615b08 Mon Sep 17 00:00:00 2001 From: christoffer Date: Sat, 19 Aug 2017 20:01:18 +0200 Subject: [PATCH 6/7] Update section: BGP --- chapter/layer3.tex | 95 +++++++++++++++++++++++++++++++++------------- 1 file changed, 68 insertions(+), 27 deletions(-) diff --git a/chapter/layer3.tex b/chapter/layer3.tex index b6115ee..b9d54ba 100644 --- a/chapter/layer3.tex +++ b/chapter/layer3.tex @@ -17,37 +17,78 @@ The protocol of the internet used since 1994.\cite{wiki:Border_Gateway_Protocol} Currently based upon \rfc{4271} with updates following in \rfc{6286} \rfc{6608}, \rfc{6793}, \rfc{7606}, \rfc{7607}, \rfc{7705}. +\subsection{Properties} + \begin{itemize} - \item \itemhead{Properties} - \begin{itemize} - \item Uses tcp/179 as \gls{dst} port - \item Sends keep-alive message every 1 minute - \item Keep-alive message is 19 byte - \end{itemize} - \item \itemhead{Route exchange} - \begin{itemize} - \item \itemhead{Route-maps mechanism} - \begin{itemize} - \item Routes can be aggregated between \glspl{as}. - \item Properties can be changed on the fly by mathing - \begin{enumerate}[label={\alph*)}] - \item \Gls{bgp} communities, - \item \Gls{ip} prefix, - \item \Gls{bgp} as-path, - \end{enumerate} - \end{itemize} - \end{itemize} - \item \itemhead{States} - \begin{enumerate} - \item Idle: \gls{bgp} while initializing refuses all incoming connections. Will initiate \gls{tcp} connection to peer. - \item Connect: Waits for \gls{tcp} connection. If \gls{tcp} is established goes to state OpenSent. If \gls{tcp} is \textit{un}successful ConnectRetry timer is started and then goes to Active state. - \item Active: When ConnectRetry counter reaches 0 goes to state Connect. - \item OpenSent: Sends \gls{msg} to remote node. Waits for reply \gls{msg} before going to OpenConfirm. - \item OpenConfirm: Nodes exchange keepalive \glspl{msg} and goes to Established state if successful. - \item Established: Nodes can now exchange KeepAlive, Updates, and Notification \glspl{msg}. + \item Uses tcp/179 as \gls{dst} port + \item Sends keep-alive message every 1 minute + \item Keep-alive message is 19 byte long +\end{itemize} + +Be ware if sessions are terminated immediately upon trying to establish connection. Try debugging following points. + +\begin{itemize} + \item tcp/179 is not open, + \item random port 1023> is not open, + \item incorrect peer-ip, + \item incorrect peer-as. +\end{itemize} + +\subsection{Route exchange} + +Exchanging routes between routers is a reliant and tolerant manner is \glspl{bgp} 1-advantage over \gls{ospf}/\gls{isis}/\gls{rip}/\gls{eigrp}. + +The sheer tuning and control mechanisms \gls{bgp} can offer is simply astounding. Route-maps is the key and access-lists just one option. + +\subsubsection[Route-maps]{Route-maps mechanism} + +Route-maps is used to target a select set of routes and either modify/add/remove attributes attached to the select route-set. + +\begin{itemize} + \item Routes can be aggregated between \glspl{as}. + \item Properties can be changed on the fly by matching + \begin{enumerate}[label={\alph*)}] + \item \Gls{bgp} communities, + \item \Gls{ip} prefix, + \item \Gls{bgp} as-path, \end{enumerate} \end{itemize} +An simple example of using route-maps is + +\begin{cisco} +ip prefix-list 1 permit 172.16.0.0/16 +ip prefix-list 2 permit 192.168.1.0/24 +! +route-map RED permit 10 + match ip address prefix-list 1 + set ip next hop 10.1.1.1 + continue 20 ! Continues to apply rules normally only + ! applied to prefix-list 2. To apply to + ! prefix-list 1, too. + ! Any attributes set in '20' will + ! override any set during '10'. +route-map RED permit 20 + match ip address prefix-list 2 + set ip next hop 10.2.2.2 ! Last rule overrides previous rules from + ! previous '10' rule-set. +\end{cisco} + +When rules from a rule-set is chained together as shown above. The last rule will override all previous set values regarding the attribute being applied. In this case \texttt{next-hop} from 'permit 10' is overridden in 'permit 20'. + +\subsection[States]{BGP States} + +The states is the way \gls{bgp} handles peer/neighbor connection establishing. The \underline{playbook} so to speak. + +\begin{enumerate} + \item Idle: \gls{bgp} while initializing refuses all incoming connections. Will initiate \gls{tcp} connection to peer. + \item Connect: Waits for \gls{tcp} connection. If \gls{tcp} is established goes to state OpenSent. If \gls{tcp} is \textit{un}successful ConnectRetry timer is started and then goes to Active state. + \item Active: When ConnectRetry counter reaches 0 goes to state Connect. + \item OpenSent: Sends \gls{msg} to remote node. Waits for reply \gls{msg} before going to OpenConfirm. + \item OpenConfirm: Nodes exchange keepalive \glspl{msg} and goes to Established state if successful. + \item Established: Nodes can now exchange KeepAlive, Updates, and Notification \glspl{msg}. +\end{enumerate} + \subsection[iBGP]{Internal Border Gateway Protocol} \gls{ibgp} is running \gls{bgp} within the same \gls{as} between routers. Much like running a general \gls{igrp} in the network. From df9ac86548fdd67fe30caaca7ff46c4e6cc39e18 Mon Sep 17 00:00:00 2001 From: Christoffer Date: Sat, 9 Sep 2017 23:27:38 +0200 Subject: [PATCH 7/7] eBGP clarifications --- chapter/layer3.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chapter/layer3.tex b/chapter/layer3.tex index b9d54ba..d7c9233 100644 --- a/chapter/layer3.tex +++ b/chapter/layer3.tex @@ -103,7 +103,7 @@ Problems by running \textit{Full Mesh} is the formula of \[ iBGPsessions = n*(n- \gls{ebgp} connections is inherently different from \gls{ibgp} connections. Some assumptions are made such as \begin{enumerate} - \item a \gls{ttl} of 1 is the default\footnote{Multi-hop \gls{ebgp} can thou be configured}, + \item a \gls{ttl} of 1 is the default\footnote{Multi-hop \gls{ebgp} can thou be configured and therefore increase the max-\gls{ttl} value}, \item distance is set to 20 compared to 200 for \gls{ibgp} routes, - \item Next hop does \textit{not} change for \gls{ebgp} routes advertised to \gls{ibgp} neighbours. + \item Next hop does \textit{not} change for \gls{ebgp} routes advertised to \gls{ibgp} neighbours \textit{by-default}\footnote{Often times it is necessary to tell a router to set itself as the next-hop before advertising to \gls{ibgp} neighbours}. \end{enumerate} \ No newline at end of file