Skip to content

Commit

Permalink
Fixed error in IPv6 figures
Browse files Browse the repository at this point in the history
  • Loading branch information
obonaventure committed Nov 26, 2019
1 parent a328e8f commit fc2af7f
Show file tree
Hide file tree
Showing 9 changed files with 327 additions and 129 deletions.
6 changes: 3 additions & 3 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@
\\usepackage{tikz}
\\usepackage{pgfplots}
\pgfplotsset{compat=1.14}
\\usetikzlibrary{arrows,positioning, matrix,backgrounds,shapes,shadows,calc}
\\usetikzlibrary{arrows.meta,positioning, matrix,backgrounds,shapes,shadows,calc}
'''
}

Expand All @@ -246,9 +246,9 @@
# If false, no module index is generated.
#latex_use_modindex = True

tikz_libraries="positioning,matrix,arrows"
tikz_libraries="positioning,matrix,arrows,shapes"

tikz_proc_suite='Netpbm'
tikz_proc_suite='pdf2svg'

tikz_latex_preamble='''
%preamble
Expand Down
206 changes: 206 additions & 0 deletions exercises/routing-policies.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
.. Copyright |copy| 2013 by Justin Vellemans, Florentin Rochet, David Lebrun, Juan Antonio Cordero, Olivier Bonaventure
.. This file is licensed under a `creative commons licence <http://creativecommons.org/licenses/by/3.0/>`_
Inter-domain routing
====================


Exercises
---------




1. Consider the interdomain topology shown in the figure below.



.. tikz::
:libs: shapes,matrix,arrows,shapes

[align=center,node distance=2.5cm]
\tikzstyle{arrow} = [thick,->,>=stealth]
\tikzset{router/.style = {rectangle, draw, text centered, minimum height=2em}, }
\tikzset{host/.style = {circle, draw, text centered, minimum height=2em}, }
\tikzset{ftable/.style={rectangle, dashed, draw} }
\tikzset{as/.style={cloud, draw,cloud puffs=10,cloud puff arc=120, aspect=2, minimum height=1em, minimum width=1em} }
\tikzset{state/.style={circle, draw, minimum height=2cm, minimum width=2cm} }
\tikzset{pref/.style = {} }
\node[as] (AS1) {AS1};
\node[as, below right of=AS1] (AS2) {AS2};
\node[as, above right of=AS2] (AS4) {AS4};
\node[as, below of=AS2] (AS3) {AS3};


% customer provider
\draw[->, color=red, line width=1.5mm]
(AS1) edge node [pos=0.5, sloped, above, color=red] {\texttt{\$}}(AS2)
(AS1) edge node [pos=0.5, sloped, below, color=red] {\texttt{\$}} (AS3)
(AS4) edge node [pos=0.5, sloped, above, color=red] {\texttt{\$}} (AS2);
\path[draw, color=blue, line width= 1 mm]
(AS2) edge node [sloped, midway, above, color=blue] {\textbf{=}} (AS3)
(AS4) edge node [sloped, midway, below, color=blue] {\textbf{=}} (AS3);



In this network, what are the paths :

- from `AS1` to `AS4`
- from `AS4` to `AS2`
- from `AS4` to `AS1`


2. Consider the interdomain topology shown in the figure below. Assuming, that `AS1` advertises prefix ``2001:db8:1::/48``, `AS2` prefix ``2001:db8:2::/48``, ... compute the routing tables of the different ASes.


.. tikz::
:libs: shapes,matrix,arrows,shapes

[align=center,node distance=2.5cm]
\tikzstyle{arrow} = [thick,->,>=stealth]
\tikzset{router/.style = {rectangle, draw, text centered, minimum height=2em}, }
\tikzset{host/.style = {circle, draw, text centered, minimum height=2em}, }
\tikzset{ftable/.style={rectangle, dashed, draw} }
\tikzset{as/.style={cloud, draw,cloud puffs=10,cloud puff arc=120, aspect=2, minimum height=1em, minimum width=1em} }
\tikzset{state/.style={circle, draw, minimum height=2cm, minimum width=2cm} }
\tikzset{pref/.style = {} }
\node[as] (AS1) {AS1};
\node[as, above right of=AS1] (AS3) {AS3};
\node[as, above left of=AS3] (AS2) {AS2};
\node[as, below right of=AS1] (AS1) {AS4};


% customer provider
\draw[->, color=red, line width=1.5mm]
(AS1) edge node [pos=0.5, sloped, above, color=red] {\texttt{\$}}(AS4)
(AS3) edge node [pos=0.5, sloped, below, color=red] {\texttt{\$}} (AS1)
(AS3) edge node [pos=0.5, sloped, above, color=red] {\texttt{\$}} (AS4);
\path[draw, color=blue, line width= 1 mm]
(AS2) edge node [sloped, midway, above, color=blue] {\textbf{=}} (AS3)
(AS2) edge node [sloped, midway, below, color=blue] {\textbf{=}} (AS1);


Are all ASes capable of reaching all the other ASes in this simple Internet ?


3. Consider the interdomain topology shown in the figure below. Assuming, that `AS1` advertises prefix ``2001:db8:1::/48``, `AS2` prefix ``2001:db8:2::/48``, ... compute the routing tables of the different ASes.

.. tikz::
:libs: shapes,matrix,arrows,shapes

[align=center,node distance=2.5cm]
\tikzstyle{arrow} = [thick,->,>=stealth]
\tikzset{router/.style = {rectangle, draw, text centered, minimum height=2em}, }
\tikzset{host/.style = {circle, draw, text centered, minimum height=2em}, }
\tikzset{ftable/.style={rectangle, dashed, draw} }
\tikzset{as/.style={cloud, draw,cloud puffs=10,cloud puff arc=120, aspect=2, minimum height=1em, minimum width=1em} }
\tikzset{state/.style={circle, draw, minimum height=2cm, minimum width=2cm} }
\tikzset{pref/.style = {} }
\node[as] (AS4) {AS4};
\node[as, right of=AS1] (AS3) {AS3};
\node[as, below of=AS4] (AS2) {AS2};
\node[as, below right of=AS3] (AS5) {AS5};


% customer provider
\draw[->, color=red, line width=1.5mm]
(AS4) edge node [pos=0.5, sloped, above, color=red] {\texttt{\$}}(AS2)
(AS4) edge node [pos=0.5, sloped, below, color=red] {\texttt{\$}} (AS1);

\path[draw, color=blue, line width= 1 mm]
(AS4) edge node [sloped, midway, above, color=blue] {\textbf{=}} (AS5)
(AS3) edge node [sloped, midway, above, color=blue] {\textbf{=}} (AS2)
(AS3) edge node [sloped, midway, above, color=blue] {\textbf{=}} (AS5)
(AS3) edge node [sloped, midway, above, color=blue] {\textbf{=}} (AS1)
(AS2) edge node [sloped, midway, below, color=blue] {\textbf{=}} (AS1);


In this internet, some ASes cannot reach all other ASes. Can you fix the problem by adding one shared-cost peering link or one customer-provider peering link ?

4. Consider the network below in which a stub domain, `AS456`, is connected to two providers `AS123` and `AS789`. `AS456` advertises its prefix to both its providers. On the other hand, `AS123` advertises ``2001:db8:dead::/48`` while `AS789` advertises ``2001:db8:beef::/48`` and ``2001:db8:dead:cafe::/63``. Via which provider will the packets destined to ``2001:db8:dead:cafe::1`` will be received by `AS456` ?

.. figure:: fig/ex-bgp-stub-two-providers.png
:align: center
:scale: 100



Should `AS123` change its configuration ?

5. Consider that the AS stub (`AS456`) shown in the figure below decides to advertise two ``/48`` prefixes instead of its allocated ``/47`` prefix.


.. figure:: fig/ex-bgp-stub-two-providers-specific.png
:align: center
:scale: 100


- Via which provider does `AS456` receive the packets destined to ``2001:db8:caff::bb`` and ``2001:db8:cafe::aa`` ?

- How is the reachability of these addresses affected when link `R1`-`R3` fails ?

- Propose a configuration on R1 that achieves the same objective as the one shown in the figure but also preserves the reachability of all IP addresses inside `AS456` if one of `AS456`'s interdomain links fails.

6. Consider the network shown below. In this network, the metric of each link is set to `1` except link `A-B` whose metric is set to `4` in both directions. In this network, there are two paths with the same cost between `D` and `C`. Old routers would randomly select one of these equal cost paths and install it in their forwarding table. Recent routers are able to use up to `N` equal cost paths towards the same destination.

.. figure:: ../../book/network/svg/ex-five-routers-weigth4.png
:align: center
:scale: 30

A simple network

On recent routers, a lookup in the forwarding table for a destination address returns a set of outgoing interfaces. How would you design an algorithm that selects the outgoing interface used for each packet, knowing that to avoid reordering, all segments of a given TCP connection should follow the same path ?

7. A ``traceroute6`` towards ``ipv6.google.com`` provides the following output :

.. code-block:: console
traceroute6 to ipv6.l.google.com (2a00:1450:4009:800::1001) from 2a02:2788:2c4:16f:5099:ccba:671d:e085, 64 hops max, 12 byte packets
1 2a02:2788:2c4:16f:a221:b7ff:fed8:aa90 4.777 ms 1.189 ms 1.023 ms
2 2a02:2788:2c0::1 8.746 ms 7.934 ms 10.024 ms
3 2a02:2788:2c0:3::1 10.039 ms 14.967 ms 8.943 ms
4 2a02:2788:ffff:12::1 9.808 ms 11.076 ms 13.658 ms
5 xe-4-2.r00.brslbe01.be.bb.gin.ntt.net 10.043 ms 10.408 ms 9.551 ms
6 ae-10.r02.amstnl02.nl.bb.gin.ntt.net 15.591 ms 18.416 ms 15.665 ms
7 core1.ams.net.google.com 21.259 ms 24.261 ms 20.826 ms
8 2001:4860::1:0:4b3 19.134 ms
2001:4860::1:0:8 22.208 ms
2001:4860::1:0:4b3 19.713 ms
9 2001:4860::8:0:519f 26.712 ms
2001:4860::8:0:51a0 25.313 ms 19.392 ms
10 2001:4860::8:0:5bb8 24.197 ms
2001:4860::8:0:5bb9 25.337 ms 26.264 ms
11 2001:4860::1:0:3067 29.431 ms 31.585 ms 29.260 ms
12 2001:4860:0:1::9 24.806 ms 24.297 ms 23.819 ms
13 lhr14s23-in-x01.1e100.net 29.406 ms 25.729 ms 29.160 ms
Can you explain why at the eighth, ninth and tenth hopes several IPv6 addresses are reported in the ``traceroute6`` output ?

8. `Section 3.3 <https://tools.ietf.org/html/rfc4443#section-3.3>`_ of :rfc:`4443` explains two different reasons why an IPv6 enabled device could generate an ICMPv6 Time Exceeded message. Explain when a router could generate such a message with ``Code==0`` and when a host could generate such a message with ``Code==1``.

9. `Section 3.1 <https://tools.ietf.org/html/rfc4443#section-3.1>`_ of :rfc:`4443` seven different Codes for the ICMPv6 Destination Unreachable Message. Under which circumstances would a router generate such an ICMPv6 message with :

- ``Code==0``

.. No address in forwarding table
- ``Code==1``
.. firewall
- ``Code==3``
.. host unreachable on LAN
- ``Code==4``
.. no daemon running on this destination port (likely UDP)
10. An ICMPv6 error message includes in its message body the beginning of the IPv6 packet that triggered this error. How many bytes of the original packet must be returned to allow the host to recover the original source and destination addresses and source and destination ports of the packet that caused the error ?

.. 40 bytes for IPv6 and 4 bytes for the port numbers
.. include:: /links.rst
1 change: 1 addition & 0 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Computer Networking : Principles, Protocols and Practice, third edition
.. preface
.. _part1:

##################
Expand Down
2 changes: 0 additions & 2 deletions links.rst
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,4 @@

.. _ipmininet: https://github.com/cnp3/ipmininet

.. _IPMininet: https://github.com/cnp3/ipmininet

.. _mininet: https://mininet.org
2 changes: 2 additions & 0 deletions protocols/email.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
Electronic mail
===============



Electronic mail, or email, is a very popular application in computer networks such as the Internet. Email `appeared <http://openmap.bbn.com/~tomlinso/ray/firstemailframe.html>`_ in the early 1970s and allows users to exchange text based messages. Initially, it was mainly used to exchange short messages, but over the years its usage has grown. It is now not only used to exchange small, but also long messages that can be composed of several parts as we will see later.

Before looking at the details of Internet email, let us consider a simple scenario illustrated in the figure below, where Alice sends an email to Bob. Alice prepares her email by using an `email clients`_ and sends it to her email server. Alice's `email server <http://en.wikipedia.org/wiki/Comparison_of_mail_servers>`_ extracts Bob's address from the email and delivers the message to Bob's server. Bob retrieves Alice's message on his server and reads it by using his favorite email client or through his webmail interface.
Expand Down
Binary file added protocols/figures/belnet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions protocols/figures/belnet.tikz
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.. tikz::
:libs: positioning, matrix, arrows

\begin{scope}
\pgfsetstrokecolor{black}
\definecolor{strokecol}{rgb}{0.0,0.0,0.0};
\pgfsetstrokecolor{strokecol}
\draw (8.0bp,8.0bp) -- (8.0bp,115.74bp) -- (387.0bp,115.74bp) -- (387.0bp,8.0bp) -- cycle;
\draw (197.5bp,100.54bp) node {Belnet};
\draw (197.5bp,85.54bp) node {2001:6a8::/32};
\end{scope}
\begin{scope}
\pgfsetstrokecolor{black}
\definecolor{strokecol}{rgb}{0.0,0.0,0.0};
\pgfsetstrokecolor{strokecol}
\draw (395.0bp,16.87bp) -- (395.0bp,106.87bp) -- (507.0bp,106.87bp) -- (507.0bp,16.87bp) -- cycle;
\draw (451.0bp,91.67bp) node {ISP1};
\draw (451.0bp,76.67bp) node {2a02:2788::/32};
\end{scope}
\node (ucl) at (293.0bp,42.87bp) [draw,ellipse] {UCLouvain$\backslash$n2001:6a8:3080::/48};
\node (ulg) at (102.0bp,42.87bp) [draw,ellipse] {ULg$\backslash$n2001:6a8:2d80::/48};
\node (alpha) at (451.0bp,42.87bp) [draw,ellipse] {alpha.com};
%



Loading

0 comments on commit fc2af7f

Please sign in to comment.