aboutsummaryrefslogtreecommitdiffstats
path: root/extras/nsim/setup.nsim
AgeCommit message (Expand)AuthorFilesLines
2019-04-11Make the loss / delay sim available as an output featureDave Barach1-0/+25
id='n38' href='#n38'>38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
.. _srv6_mobile_runner_doc:

SRv6 Mobile Runner
==================

What’s ``runner.py`` doing?

Common configurations
---------------------

VPP1
~~~~

::

   create host-interface name eth1
   set int ip addr host-eth1 A1::1/120
   set int state host-eth1 up
   ip route add ::/0 via host-eth1 A1::2

VPP2
~~~~

::

   create host-interface name eth1
   set int ip addr host-eth1 A1::2/120
   create host-interface name eth2
   set int ip addr host-eth2 A2::1/120
   set int state host-eth1 up
   set int state host-eth2 up
   ip route add ::/0 via host-eth2 A2::2

VPP3
~~~~

::

   create host-interface name eth1
   set int ip addr host-eth1 A2::2/120
   create host-interface name eth2
   set int ip addr host-eth2 A3::1/120
   set int state host-eth1 up
   set int state host-eth2 up
   ip route add ::/0 via host-eth1 A2::1

VPP4
~~~~

::

   create host-interface name eth1
   set int ip addr host-eth1 A3::2/120
   set int state host-eth1 up
   ip route add ::/0 via host-eth1 A3::1

Drop-in for GTP-U over IPv4
---------------------------

Drop-in mode is handy to test both GTP-U-to-SRv6 and SRv6-to-GTP-U
functions at same time. Let’s see what’s happened when you run
``test gtp4``:

::

   $ ./runner.py test gtp4

Setting up a virtual interface of packet generator:

.. _vpp1-1:

VPP1
~~~~

::

   create packet-generator interface pg0
   set int mac address pg0 aa:bb:cc:dd:ee:01
   set int ip addr pg0 172.16.0.1/30
   set ip arp pg0 172.16.0.2/30 aa:bb:cc:dd:ee:02

.. _vpp4-1:

VPP4
~~~~

::

   create packet-generator interface pg0
   set int mac address pg0 aa:bb:cc:dd:ee:11
   set int ip addr pg0 1.0.0.2/30
   set ip arp pg0 1.0.0.1 aa:bb:cc:dd:ee:22

SRv6 and IP routing settings:

.. _vpp1-2:

VPP1
~~~~

::

   sr policy add bsid D4:: next D2:: next D3::
   sr policy add bsid D5:: behavior t.m.gtp4.d D4::/32 v6src_prefix C1::/64 nhtype ipv4
   sr steer l3 172.20.0.1/32 via bsid D5::

.. _vpp2-1:

VPP2
~~~~

::

   sr localsid address D2:: behavior end
   ip route add D3::/128 via host-eth2 A2::2

.. _vpp3-1:

VPP3
~~~~

::

   sr localsid address D3:: behavior end
   ip route add D4::/32 via host-eth2 A3::2

.. _vpp4-2:

VPP4
~~~~

::

   sr localsid prefix D4::/32 behavior end.m.gtp4.e v4src_position 64
   ip route add 172.20.0.1/32 via pg0 1.0.0.1