6 Topotests is a suite of topology tests for FRR built on top of Mininet.
11 Only tested with Ubuntu 16.04 and Ubuntu 18.04 (which uses Mininet 2.2.x).
13 Instructions are the same for all setups (i.e. ExaBGP is only used for BGP
16 Installing Mininet Infrastructure
17 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21 apt-get install mininet
22 apt-get install python-pip
23 apt-get install iproute
26 pip install "pytest<5"
27 pip install "scapy>=2.4.2"
28 pip install exabgp==3.4.17 (Newer 4.0 version of exabgp is not yet
30 useradd -d /var/run/exabgp/ -s /bin/false exabgp
35 Optional, will give better output.
40 disable apport (which move core files)
42 Set ``enabled=0`` in ``/etc/default/apport``.
44 Next, update security limits by changing :file:`/etc/security/limits.conf` to::
46 #<domain> <type> <item> <value>
48 root soft core unlimited
50 root hard core unlimited
52 Reboot for options to take effect.
54 SNMP Utilities Installation
55 """""""""""""""""""""""""""
57 To run SNMP test you need to install SNMP utilities and MIBs. Unfortunately
58 there are some errors in the upstream MIBS which need to be patched up. The
59 following steps will get you there on Ubuntu 20.04.
63 apt install libsnmp-dev
64 apt install snmpd snmp
65 apt install snmp-mibs-downloader
67 wget http://www.iana.org/assignments/ianaippmmetricsregistry-mib/ianaippmmetricsregistry-mib -O /usr/share/snmp/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB
68 wget http://pastebin.com/raw.php?i=p3QyuXzZ -O /usr/share/snmp/mibs/ietf/SNMPv2-PDU
69 wget http://pastebin.com/raw.php?i=gG7j8nyk -O /usr/share/snmp/mibs/ietf/IPATM-IPMC-MIB
70 edit /etc/snmp/snmp.conf to look like this
71 # As the snmp packages come without MIB files due to license reasons, loading
72 # of MIBs is disabled by default. If you added the MIBs you can reenable
73 # loading them by commenting out the following line.
80 FRR needs to be installed separately. It is assume to be configured like the
81 standard Ubuntu Packages:
83 - Binaries in :file:`/usr/lib/frr`
84 - State Directory :file:`/var/run/frr`
85 - Running under user ``frr``, group ``frr``
86 - vtygroup: ``frrvty``
87 - config directory: :file:`/etc/frr`
88 - For FRR Packages, install the dbg package as well for coredump decoding
90 No FRR config needs to be done and no FRR daemons should be run ahead of the
91 test. They are all started as part of the test.
96 If you prefer to manually build FRR, then use the following suggested config:
102 --localstatedir=/var/run/frr \
103 --sbindir=/usr/lib/frr \
104 --sysconfdir=/etc/frr \
108 --enable-multipath=64 \
111 --enable-vty-group=frrvty \
112 --enable-snmp=agentx \
113 --with-pkg-extra-version=-my-manual-build
115 And create ``frr`` user and ``frrvty`` group as follows:
119 addgroup --system --gid 92 frr
120 addgroup --system --gid 85 frrvty
121 adduser --system --ingroup frr --home /var/run/frr/ \
122 --gecos "FRRouting suite" --shell /bin/false frr
123 usermod -G frrvty frr
128 Execute all tests with output to console
129 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
133 py.test -s -v --tb=no
135 The above command must be executed from inside the topotests directory.
137 All test\_\* scripts in subdirectories are detected and executed (unless
138 disabled in ``pytest.ini`` file).
140 ``--tb=no`` disables the python traceback which might be irrelevant unless the
141 test script itself is debugged.
151 For example, and assuming you are inside the frr directory:
155 cd tests/topotests/bgp_l3vpn_to_bgp_vrf
156 ./test_bgp_l3vpn_to_bgp_vrf.py
158 For further options, refer to pytest documentation.
160 Test will set exit code which can be used with ``git bisect``.
162 For the simulated topology, see the description in the python file.
164 If you need to clear the mininet setup between tests (if it isn't cleanly
165 shutdown), then use the ``mn -c`` command to clean up the environment.
167 StdErr log from daemos after exit
168 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
170 To enable the reporting of any messages seen on StdErr after the daemons exit,
171 the following env variable can be set::
173 export TOPOTESTS_CHECK_STDERR=Yes
175 (The value doesn't matter at this time. The check is whether the env
176 variable exists or not.) There is no pass/fail on this reporting; the
177 Output will be reported to the console.
179 Collect Memory Leak Information
180 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
182 FRR processes can report unfreed memory allocations upon exit. To
183 enable the reporting of memory leaks, define an environment variable
184 ``TOPOTESTS_CHECK_MEMLEAK`` with the file prefix, i.e.::
186 export TOPOTESTS_CHECK_MEMLEAK="/home/mydir/memleak_"
188 This will enable the check and output to console and the writing of
189 the information to files with the given prefix (followed by testname),
190 ie :file:`/home/mydir/memcheck_test_bgp_multiview_topo1.txt` in case
193 Running Topotests with AddressSanitizer
194 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
196 Topotests can be run with AddressSanitizer. It requires GCC 4.8 or newer.
197 (Ubuntu 16.04 as suggested here is fine with GCC 5 as default). For more
198 information on AddressSanitizer, see
199 https://github.com/google/sanitizers/wiki/AddressSanitizer.
201 The checks are done automatically in the library call of ``checkRouterRunning``
202 (ie at beginning of tests when there is a check for all daemons running). No
203 changes or extra configuration for topotests is required beside compiling the
204 suite with AddressSanitizer enabled.
206 If a daemon crashed, then the errorlog is checked for AddressSanitizer output.
207 If found, then this is added with context (calling test) to
208 :file:`/tmp/AddressSanitizer.txt` in Markdown compatible format.
210 Compiling for GCC AddressSanitizer requires to use ``gcc`` as a linker as well
211 (instead of ``ld``). Here is a suggest way to compile frr with AddressSanitizer
212 for ``master`` branch:
216 git clone https://github.com/FRRouting/frr.git
220 --enable-address-sanitizer \
221 --prefix=/usr/lib/frr --sysconfdir=/etc/frr \
222 --localstatedir=/var/run/frr \
223 --sbindir=/usr/lib/frr --bindir=/usr/lib/frr \
224 --enable-exampledir=/usr/lib/frr/examples \
225 --with-moduledir=/usr/lib/frr/modules \
226 --enable-multipath=0 --enable-rtadv \
227 --enable-tcp-zebra --enable-fpm --enable-pimd \
231 # Create symlink for vtysh, so topotest finds it in /usr/lib/frr
232 sudo ln -s /usr/lib/frr/vtysh /usr/bin/
234 and create ``frr`` user and ``frrvty`` group as shown above.
236 .. _topotests_docker:
238 Running Tests with Docker
239 -------------------------
241 There is a Docker image which allows to run topotests.
246 If you have Docker installed, you can run the topotests in Docker. The easiest
247 way to do this, is to use the make targets from this repository.
249 Your current user needs to have access to the Docker daemon. Alternatively you
250 can run these commands as root.
256 This command will pull the most recent topotests image from Dockerhub, compile
257 FRR inside of it, and run the topotests.
262 Internally, the topotests make target uses a shell script to pull the image and
263 spawn the Docker container.
265 There are several environment variables which can be used to modify the
266 behavior of the script, these can be listed by calling it with ``-h``:
270 ./tests/topotests/docker/frr-topotests.sh -h
272 For example, a volume is used to cache build artifacts between multiple runs of
273 the image. If you need to force a complete recompile, you can set
278 TOPOTEST_CLEAN=1 ./tests/topotests/docker/frr-topotests.sh
280 By default, ``frr-topotests.sh`` will build frr and run pytest. If you append
281 arguments and the first one starts with ``/`` or ``./``, they will replace the
282 call to pytest. If the appended arguments do not match this patttern, they will
283 be provided to pytest as arguments. So, to run a specific test with more
288 ./tests/topotests/docker/frr-topotests.sh -vv -s all-protocol-startup/test_all_protocol_startup.py
290 And to compile FRR but drop into a shell instead of running pytest:
294 ./tests/topotests/docker/frr-topotests.sh /bin/bash
299 The Docker image just includes all the components to run the topotests, but not
300 the topotests themselves. So if you just want to write tests and don't want to
301 make changes to the environment provided by the Docker image. You don't need to
302 build your own Docker image if you do not want to.
304 When developing new tests, there is one caveat though: The startup script of
305 the container will run a ``git-clean`` on its copy of the FRR tree to avoid any
306 pollution of the container with build artefacts from the host. This will also
307 result in your newly written tests being unavailable in the container unless at
308 least added to the index with ``git-add``.
310 If you do want to test changes to the Docker image, you can locally build the
311 image and run the tests without pulling from the registry using the following
317 TOPOTEST_PULL=0 make topotests
320 .. _topotests-guidelines:
328 To run the whole suite of tests the following commands must be executed at the
329 top level directory of topotest:
333 $ # Change to the top level directory of topotests.
334 $ cd path/to/topotests
335 $ # Tests must be run as root, since Mininet requires it.
338 In order to run a specific test, you can use the following command:
342 $ # running a specific topology
343 $ sudo pytest ospf-topo1/
344 $ # or inside the test folder
346 $ sudo pytest # to run all tests inside the directory
347 $ sudo pytest test_ospf_topo1.py # to run a specific test
348 $ # or outside the test folder
350 $ sudo pytest ospf-topo1/test_ospf_topo1.py # to run a specific one
352 The output of the tested daemons will be available at the temporary folder of
357 $ ls /tmp/topotest/ospf-topo1.test_ospf-topo1/r1
359 zebra.err # zebra stderr output
360 zebra.log # zebra log file
361 zebra.out # zebra stdout output
364 You can also run memory leak tests to get reports:
368 $ # Set the environment variable to apply to a specific test...
369 $ sudo env TOPOTESTS_CHECK_MEMLEAK="/tmp/memleak_report_" pytest ospf-topo1/test_ospf_topo1.py
370 $ # ...or apply to all tests adding this line to the configuration file
371 $ echo 'memleak_path = /tmp/memleak_report_' >> pytest.ini
372 $ # You can also use your editor
374 $ # After running tests you should see your files:
375 $ ls /tmp/memleak_report_*
376 memleak_report_test_ospf_topo1.txt
381 This section will guide you in all recommended steps to produce a standard
384 This is the recommended test writing routine:
386 - Write a topology (Graphviz recommended)
387 - Obtain configuration files
388 - Write the test itself
389 - Format the new code using `black <https://github.com/psf/black>`_
390 - Create a Pull Request
392 Some things to keep in mind:
394 - BGP tests MUST use generous convergence timeouts - you must ensure
395 that any test involving BGP uses a convergence timeout of at least
397 - Topotests are run on a range of Linux versions: if your test
398 requires some OS-specific capability (like mpls support, or vrf
399 support), there are test functions available in the libraries that
400 will help you determine whether your test should run or be skipped.
401 - Avoid including unstable data in your test: don't rely on link-local
402 addresses or ifindex values, for example, because these can change
406 Topotest File Hierarchy
407 """""""""""""""""""""""
409 Before starting to write any tests one must know the file hierarchy. The
410 repository hierarchy looks like this:
414 $ cd path/to/topotest
417 ./README.md # repository read me
418 ./GUIDELINES.md # this file
419 ./conftest.py # test hooks - pytest related functions
420 ./example-test # example test folder
421 ./example-test/__init__.py # python package marker - must always exist.
422 ./example-test/test_template.jpg # generated topology picture - see next section
423 ./example-test/test_template.dot # Graphviz dot file
424 ./example-test/test_template.py # the topology plus the test
426 ./ospf-topo1 # the ospf topology test
427 ./ospf-topo1/r1 # router 1 configuration files
428 ./ospf-topo1/r1/zebra.conf # zebra configuration file
429 ./ospf-topo1/r1/ospfd.conf # ospf configuration file
430 ./ospf-topo1/r1/ospfroute.txt # 'show ip ospf' output reference file
431 # removed other for shortness sake
433 ./lib # shared test/topology functions
434 ./lib/topogen.py # topogen implementation
435 ./lib/topotest.py # topotest implementation
437 Guidelines for creating/editing topotest:
439 - New topologies that don't fit the existing directories should create its own
440 - Always remember to add the ``__init__.py`` to new folders, this makes auto
441 complete engines and pylint happy
442 - Router (Quagga/FRR) specific code should go on topotest.py
443 - Generic/repeated router actions should have an abstraction in
445 - Generic/repeated non-router code should go to topotest.py
446 - pytest related code should go to conftest.py (e.g. specialized asserts)
448 Defining the Topology
449 """""""""""""""""""""
451 The first step to write a new test is to define the topology. This step can be
452 done in many ways, but the recommended is to use Graphviz to generate a drawing
453 of the topology. It allows us to see the topology graphically and to see the
454 names of equipment, links and addresses.
456 Here is an example of Graphviz dot file that generates the template topology
457 :file:`tests/topotests/example-test/test_template.dot` (the inlined code might
458 get outdated, please see the linked file)::
480 label="s1\n192.168.0.0/24",
486 label="s2\n192.168.1.0/24",
492 r1 -- s1 [label="eth0\n.1"];
494 r1 -- s2 [label="eth1\n.100"];
495 r2 -- s2 [label="eth0\n.1"];
498 Here is the produced graph:
522 label="s1\n192.168.0.0/24",
528 label="s2\n192.168.1.0/24",
534 r1 -- s1 [label="eth0\n.1"];
536 r1 -- s2 [label="eth1\n.100"];
537 r2 -- s2 [label="eth0\n.1"];
540 Generating / Obtaining Configuration Files
541 """"""""""""""""""""""""""""""""""""""""""
543 In order to get the configuration files or command output for each router, we
544 need to run the topology and execute commands in ``vtysh``. The quickest way to
545 achieve that is writing the topology building code and running the topology.
547 To bootstrap your test topology, do the following steps:
549 - Copy the template test
554 $ touch new-topo/__init__.py
555 $ cp example-test/test_template.py new-topo/test_new_topo.py
557 - Modify the template according to your dot file
559 Here is the template topology described in the previous section in python code:
563 class TemplateTopo(Topo):
564 "Test topology builder"
565 def build(self, *_args, **_opts):
567 tgen = get_topogen(self)
570 for routern in range(1, 3):
571 tgen.add_router('r{}'.format(routern))
573 # Create a switch with just one router connected to it to simulate a
575 switch = tgen.add_switch('s1')
576 switch.add_link(tgen.gears['r1'])
578 # Create a connection between r1 and r2
579 switch = tgen.add_switch('s2')
580 switch.add_link(tgen.gears['r1'])
581 switch.add_link(tgen.gears['r2'])
585 Topogen allows us to run the topology without running any tests, you can do
586 that using the following example commands:
590 $ # Running your bootstraped topology
591 $ sudo pytest -s --topology-only new-topo/test_new_topo.py
592 $ # Running the test_template.py topology
593 $ sudo pytest -s --topology-only example-test/test_template.py
594 $ # Running the ospf_topo1.py topology
595 $ sudo pytest -s --topology-only ospf-topo1/test_ospf_topo1.py
597 Parameters explanation:
603 Actives input/output capture. This is required by mininet in order to show
604 the interactive shell.
606 .. option:: --topology-only
608 Don't run any tests, just build the topology.
610 After executing the commands above, you should get the following terminal
615 === test session starts ===
616 platform linux2 -- Python 2.7.12, pytest-3.1.2, py-1.4.34, pluggy-0.4.0
617 rootdir: /media/sf_src/topotests, inifile: pytest.ini
620 ospf-topo1/test_ospf_topo1.py *** Starting controller
622 *** Starting 6 switches
623 switch1 switch2 switch3 switch4 switch5 switch6 ...
624 r2: frr zebra started
625 r2: frr ospfd started
626 r3: frr zebra started
627 r3: frr ospfd started
628 r1: frr zebra started
629 r1: frr ospfd started
630 r4: frr zebra started
631 r4: frr ospfd started
635 The last line shows us that we are now using the Mininet CLI (Command Line
636 Interface), from here you can call your router ``vtysh`` or even bash.
638 Here are some commands example:
642 mininet> r1 ping 10.0.3.1
643 PING 10.0.3.1 (10.0.3.1) 56(84) bytes of data.
644 64 bytes from 10.0.3.1: icmp_seq=1 ttl=64 time=0.576 ms
645 64 bytes from 10.0.3.1: icmp_seq=2 ttl=64 time=0.083 ms
646 64 bytes from 10.0.3.1: icmp_seq=3 ttl=64 time=0.088 ms
648 --- 10.0.3.1 ping statistics ---
649 3 packets transmitted, 3 received, 0% packet loss, time 1998ms
650 rtt min/avg/max/mdev = 0.083/0.249/0.576/0.231 ms
654 mininet> r1 ping 10.0.3.3
655 PING 10.0.3.3 (10.0.3.3) 56(84) bytes of data.
656 64 bytes from 10.0.3.3: icmp_seq=1 ttl=64 time=2.87 ms
657 64 bytes from 10.0.3.3: icmp_seq=2 ttl=64 time=0.080 ms
658 64 bytes from 10.0.3.3: icmp_seq=3 ttl=64 time=0.091 ms
660 --- 10.0.3.3 ping statistics ---
661 3 packets transmitted, 3 received, 0% packet loss, time 2003ms
662 rtt min/avg/max/mdev = 0.080/1.014/2.872/1.313 ms
668 Hello, this is FRRouting (version 3.1-devrzalamena-build).
669 Copyright 1996-2005 Kunihiro Ishiguro, et al.
671 frr-1# show running-config
672 Building configuration...
674 Current configuration:
676 frr version 3.1-devrzalamena-build
677 frr defaults traditional
679 no service integrated-vtysh-config
686 ip address 10.0.3.1/24
689 ip address 10.0.10.1/24
692 ip address 172.16.0.2/24
695 ospf router-id 10.0.255.3
697 redistribute connected
699 network 10.0.3.0/24 area 0
700 network 10.0.10.0/24 area 0
701 network 172.16.0.0/24 area 1
708 After you successfully configured your topology, you can obtain the
709 configuration files (per-daemon) using the following commands:
713 mininet> r3 vtysh -d ospfd
715 Hello, this is FRRouting (version 3.1-devrzalamena-build).
716 Copyright 1996-2005 Kunihiro Ishiguro, et al.
718 frr-1# show running-config
719 Building configuration...
721 Current configuration:
723 frr version 3.1-devrzalamena-build
724 frr defaults traditional
725 no service integrated-vtysh-config
730 ospf router-id 10.0.255.3
732 redistribute connected
734 network 10.0.3.0/24 area 0
735 network 10.0.10.0/24 area 0
736 network 172.16.0.0/24 area 1
746 Test topologies should always be bootstrapped from
747 :file:`tests/topotests/example-test/test_template.py` because it contains
748 important boilerplate code that can't be avoided, like:
750 - imports: os, sys, pytest, topotest/topogen and mininet topology class
751 - The global variable CWD (Current Working directory): which is most likely
752 going to be used to reference the routers configuration file location
758 # For all registered routers, load the zebra configuration file
759 for rname, router in router_list.items():
762 os.path.join(CWD, '{}/zebra.conf'.format(rname))
764 # os.path.join() joins the CWD string with arguments adding the necessary
765 # slashes ('/'). Arguments must not begin with '/'.
767 - The topology class that inherits from Mininet Topo class:
771 class TemplateTopo(Topo):
772 def build(self, *_args, **_opts):
773 tgen = get_topogen(self)
774 # topology build code
776 - pytest ``setup_module()`` and ``teardown_module()`` to start the topology
780 def setup_module(_m):
781 tgen = Topogen(TemplateTopo)
782 tgen.start_topology('debug')
784 def teardown_module(_m):
788 - ``__main__`` initialization code (to support running the script directly)
792 if __name__ == '__main__':
793 sys.exit(pytest.main(["-s"]))
797 - Test code should always be declared inside functions that begin with the
798 ``test_`` prefix. Functions beginning with different prefixes will not be run
800 - Configuration files and long output commands should go into separated files
801 inside folders named after the equipment.
802 - Tests must be able to run without any interaction. To make sure your test
803 conforms with this, run it without the :option:`-s` parameter.
804 - Use `black <https://github.com/psf/black>`_ code formatter before creating
805 a pull request. This ensures we have a unified code style.
806 - Mark test modules with pytest markers depending on the daemons used during the
807 tests (see :ref:`topotests-markers`)
811 - Keep results in stack variables, so people inspecting code with ``pdb`` can
812 easily print their values.
818 assert foobar(router1, router2)
824 result = foobar(router1, router2)
827 - Use ``assert`` messages to indicate where the test failed.
833 for router in router_list:
835 assert condition, 'Router "{}" condition failed'.format(router.name)
840 The most effective ways to inspect topology tests are:
842 - Run pytest with ``--pdb`` option. This option will cause a pdb shell to
843 appear when an assertion fails
845 Example: ``pytest -s --pdb ospf-topo1/test_ospf_topo1.py``
847 - Set a breakpoint in the test code with ``pdb``
853 # Add the pdb import at the beginning of the file
857 # Add a breakpoint where you think the problem is
863 The `Python Debugger <https://docs.python.org/2.7/library/pdb.html>`__ (pdb)
864 shell allows us to run many useful operations like:
866 - Setting breaking point on file/function/conditions (e.g. ``break``,
868 - Inspecting variables (e.g. ``p`` (print), ``pp`` (pretty print))
869 - Running python code
873 The TopoGear (equipment abstraction class) implements the ``__str__`` method
874 that allows the user to inspect equipment information.
876 Example of pdb usage:
880 > /media/sf_src/topotests/ospf-topo1/test_ospf_topo1.py(121)test_ospf_convergence()
881 -> for rnum in range(1, 5):
883 Documented commands (type help <topic>):
884 ========================================
885 EOF bt cont enable jump pp run unt
886 a c continue exit l q s until
887 alias cl d h list quit step up
888 args clear debug help n r tbreak w
889 b commands disable ignore next restart u whatis
890 break condition down j p return unalias where
892 Miscellaneous help topics:
893 ==========================
896 Undocumented commands:
897 ======================
901 116 title2="Expected output")
903 118 def test_ospf_convergence():
904 119 "Test OSPF daemon convergence"
906 121 -> for rnum in range(1, 5):
907 122 router = 'r{}'.format(rnum)
909 124 # Load expected results from the command
910 125 reffile = os.path.join(CWD, '{}/ospfroute.txt'.format(router))
911 126 expected = open(reffile).read()
913 > /media/sf_src/topotests/ospf-topo1/test_ospf_topo1.py(122)test_ospf_convergence()
914 -> router = 'r{}'.format(rnum)
916 > /media/sf_src/topotests/ospf-topo1/test_ospf_topo1.py(125)test_ospf_convergence()
917 -> reffile = os.path.join(CWD, '{}/ospfroute.txt'.format(router))
922 (Pdb) tgen = get_topogen()
923 (Pdb) pp tgen.gears[router]
924 <lib.topogen.TopoRouter object at 0x7f74e06c9850>
925 (Pdb) pp str(tgen.gears[router])
926 'TopoGear<name="r1",links=["r1-eth0"<->"s1-eth0","r1-eth1"<->"s3-eth0"]> TopoRouter<>'
929 121 for rnum in range(1, 5):
930 122 router = 'r{}'.format(rnum)
932 124 # Load expected results from the command
933 125 -> reffile = os.path.join(CWD, '{}/ospfroute.txt'.format(router))
934 126 expected = open(reffile).read()
936 128 # Run test function until we get an result. Wait at most 60 seconds.
937 129 test_func = partial(compare_show_ip_ospf, router, expected)
938 130 result, diff = topotest.run_and_expect(test_func, '',
939 (Pdb) router1 = tgen.gears[router]
940 (Pdb) router1.vtysh_cmd('show ip ospf route')
941 '============ OSPF network routing table ============\r\nN 10.0.1.0/24 [10] area: 0.0.0.0\r\n directly attached to r1-eth0\r\nN 10.0.2.0/24 [20] area: 0.0.0.0\r\n via 10.0.3.3, r1-eth1\r\nN 10.0.3.0/24 [10] area: 0.0.0.0\r\n directly attached to r1-eth1\r\nN 10.0.10.0/24 [20] area: 0.0.0.0\r\n via 10.0.3.1, r1-eth1\r\nN IA 172.16.0.0/24 [20] area: 0.0.0.0\r\n via 10.0.3.1, r1-eth1\r\nN IA 172.16.1.0/24 [30] area: 0.0.0.0\r\n via 10.0.3.1, r1-eth1\r\n\r\n============ OSPF router routing table =============\r\nR 10.0.255.2 [10] area: 0.0.0.0, ASBR\r\n via 10.0.3.3, r1-eth1\r\nR 10.0.255.3 [10] area: 0.0.0.0, ABR, ASBR\r\n via 10.0.3.1, r1-eth1\r\nR 10.0.255.4 IA [20] area: 0.0.0.0, ASBR\r\n via 10.0.3.1, r1-eth1\r\n\r\n============ OSPF external routing table ===========\r\n\r\n\r\n'
942 (Pdb) tgen.mininet_cli()
946 To enable more debug messages in other Topogen subsystems (like Mininet), more
947 logging messages can be displayed by modifying the test configuration file
953 # Change the default verbosity line from 'info'...
958 Instructions for use, write or debug topologies can be found in :ref:`topotests-guidelines`.
959 To learn/remember common code snippets see :ref:`topotests-snippets`.
961 Before creating a new topology, make sure that there isn't one already that
962 does what you need. If nothing is similar, then you may create a new topology,
963 preferably, using the newest template
964 (:file:`tests/topotests/example-test/test_template.py`).
966 .. include:: topotests-markers.rst
968 .. include:: topotests-snippets.rst
973 All the configs and scripts are licensed under a ISC-style license. See Python