test: update dhcp test topologies

Fixes #746
This commit is contained in:
Ahmed Karic
2024-10-24 09:59:56 +02:00
parent b81407e7d9
commit 594d074f7a
12 changed files with 126 additions and 87 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
==== Description
This is a very basic DHCP test that requests an IPv4 lease
from a DHCP server and checks that the lease is set on the
interface.
interface.
==== Topology
ifdef::topdoc[]
+2 -5
View File
@@ -1,15 +1,12 @@
#!/usr/bin/env python3
# This is a very basic DHCP test that requests an IPv4 lease
# from a DHCP server and checks that the lease is set on the
# interface.
"""
DHCP Basic
This is a very basic DHCP test that requests an IPv4 lease
from a DHCP server and checks that the lease is set on the
interface.
interface.
"""
import time
import infamy, infamy.dhcp
import infamy.iface as iface
from infamy.util import until
+4 -4
View File
@@ -1,13 +1,13 @@
graph "1x2" {
layout="neato";
overlap="false";
esep="+80";
esep="+100";
node [shape=record, fontname="DejaVu Sans Mono, Book"];
edge [color="cornflowerblue", penwidth="2", fontname="DejaVu Serif, Book"];
host [
label="host \n(10.0.0.1) | { <tgt> tgt | <data> data }",
label="host | { <mgmt> mgmt | <data> data }",
pos="0,20!",
kind="controller",
];
@@ -18,6 +18,6 @@ graph "1x2" {
kind="infix",
];
host:tgt -- client:mgmt [kind=mgmt, color=black, taillabel="10.0.0.42/24"]
host:data -- client:data
host:mgmt -- client:mgmt [kind=mgmt, color=lightgrey]
host:data -- client:data [color=black, taillabel="10.0.0.1/24", headlabel="10.0.0.42/24"]
}
+23 -22
View File
@@ -1,44 +1,45 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.43.0 (0)
-->
<!-- Title: 1x2 Pages: 1 -->
<svg width="473pt" height="59pt"
viewBox="0.00 0.00 473.03 58.50" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 54.5)">
<svg width="474pt" height="55pt"
viewBox="0.00 0.00 474.04 55.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 51)">
<title>1x2</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-54.5 469.03,-54.5 469.03,4 -4,4"/>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-51 470.04,-51 470.04,4 -4,4"/>
<!-- host -->
<g id="node1" class="node">
<title>host</title>
<polygon fill="none" stroke="black" points="0,-0.5 0,-46.5 149,-46.5 149,-0.5 0,-0.5"/>
<text text-anchor="middle" x="49.5" y="-27.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">host </text>
<text text-anchor="middle" x="49.5" y="-12.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">(10.0.0.1)</text>
<polyline fill="none" stroke="black" points="99,-0.5 99,-46.5 "/>
<text text-anchor="middle" x="124" y="-31.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">tgt</text>
<polyline fill="none" stroke="black" points="99,-23.5 149,-23.5 "/>
<text text-anchor="middle" x="124" y="-8.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">data</text>
<polygon fill="none" stroke="black" points="0,-0.5 0,-46.5 100,-46.5 100,-0.5 0,-0.5"/>
<text text-anchor="middle" x="25" y="-19.8" font-family="DejaVu Sans Mono, Book" font-size="14.00">host</text>
<polyline fill="none" stroke="black" points="50,-0.5 50,-46.5 "/>
<text text-anchor="middle" x="75" y="-31.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt</text>
<polyline fill="none" stroke="black" points="50,-23.5 100,-23.5 "/>
<text text-anchor="middle" x="75" y="-8.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">data</text>
</g>
<!-- client -->
<g id="node2" class="node">
<title>client</title>
<polygon fill="none" stroke="black" points="349.03,-0.5 349.03,-46.5 465.03,-46.5 465.03,-0.5 349.03,-0.5"/>
<text text-anchor="middle" x="374.03" y="-31.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt</text>
<polyline fill="none" stroke="black" points="349.03,-23.5 399.03,-23.5 "/>
<text text-anchor="middle" x="374.03" y="-8.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">data</text>
<polyline fill="none" stroke="black" points="399.03,-0.5 399.03,-46.5 "/>
<text text-anchor="middle" x="432.03" y="-19.8" font-family="DejaVu Sans Mono, Book" font-size="14.00">client</text>
<polygon fill="none" stroke="black" points="350.04,-0.5 350.04,-46.5 466.04,-46.5 466.04,-0.5 350.04,-0.5"/>
<text text-anchor="middle" x="375.04" y="-31.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt</text>
<polyline fill="none" stroke="black" points="350.04,-23.5 400.04,-23.5 "/>
<text text-anchor="middle" x="375.04" y="-8.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">data</text>
<polyline fill="none" stroke="black" points="400.04,-0.5 400.04,-46.5 "/>
<text text-anchor="middle" x="433.04" y="-19.8" font-family="DejaVu Sans Mono, Book" font-size="14.00">client</text>
</g>
<!-- host&#45;&#45;client -->
<g id="edge1" class="edge">
<title>host:tgt&#45;&#45;client:mgmt</title>
<path fill="none" stroke="black" stroke-width="2" d="M149.5,-35.5C149.5,-35.5 349.03,-35.5 349.03,-35.5"/>
<text text-anchor="middle" x="195" y="-39.3" font-family="DejaVu Serif, Book" font-size="14.00">10.0.0.42/24</text>
<title>host:mgmt&#45;&#45;client:mgmt</title>
<path fill="none" stroke="lightgrey" stroke-width="2" d="M100,-35.5C100,-35.5 350.04,-35.5 350.04,-35.5"/>
</g>
<!-- host&#45;&#45;client -->
<g id="edge2" class="edge">
<title>host:data&#45;&#45;client:data</title>
<path fill="none" stroke="cornflowerblue" stroke-width="2" d="M149.5,-11.5C149.5,-11.5 349.03,-11.5 349.03,-11.5"/>
<path fill="none" stroke="black" stroke-width="2" d="M100,-11.5C100,-11.5 350.04,-11.5 350.04,-11.5"/>
<text text-anchor="middle" x="304.54" y="-15.3" font-family="DejaVu Serif, Book" font-size="14.00">10.0.0.42/24</text>
<text text-anchor="middle" x="141" y="-15.3" font-family="DejaVu Serif, Book" font-size="14.00">10.0.0.1/24</text>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

+1 -3
View File
@@ -1,14 +1,12 @@
#!/usr/bin/env python3
# Verify DHCP option 3 (router)
"""
DHCP router
Verify that the DHCP client receives default gateway (DHCP option 3, router)
and that route exists in operational datastore.
"""
import time
import infamy, infamy.dhcp
import infamy.iface as iface
import infamy.route as route
from infamy.util import until
@@ -1,13 +1,13 @@
graph "1x2" {
layout="neato";
overlap="false";
esep="+80";
esep="+100";
node [shape=record, fontname="DejaVu Sans Mono, Book"];
edge [color="cornflowerblue", penwidth="2", fontname="DejaVu Serif, Book"];
host [
label="host \n(192.168.0.1) | { <tgt> tgt | <data> data }",
label="host | { <mgmt> mgmt | <data> data }",
pos="0,20!",
kind="controller",
];
@@ -18,6 +18,6 @@ graph "1x2" {
kind="infix",
];
host:tgt -- client:mgmt [kind=mgmt, color=black, taillabel="192.168.0.254/24"]
host:data -- client:data
host:mgmt -- client:mgmt [kind=mgmt, color=lightgrey]
host:data -- client:data [color=black, taillabel="192.168.0.1/24"]
}
+20 -21
View File
@@ -3,42 +3,41 @@
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Title: 1x2 Pages: 1 -->
<svg width="498pt" height="59pt"
viewBox="0.00 0.00 498.03 58.50" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 54.5)">
<svg width="474pt" height="55pt"
viewBox="0.00 0.00 474.04 55.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 51)">
<title>1x2</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-54.5 494.03,-54.5 494.03,4 -4,4"/>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-51 470.04,-51 470.04,4 -4,4"/>
<!-- host -->
<g id="node1" class="node">
<title>host</title>
<polygon fill="none" stroke="black" points="0,-0.5 0,-46.5 174,-46.5 174,-0.5 0,-0.5"/>
<text text-anchor="middle" x="62" y="-27.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">host </text>
<text text-anchor="middle" x="62" y="-12.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">(192.168.0.1)</text>
<polyline fill="none" stroke="black" points="124,-0.5 124,-46.5 "/>
<text text-anchor="middle" x="149" y="-31.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">tgt</text>
<polyline fill="none" stroke="black" points="124,-23.5 174,-23.5 "/>
<text text-anchor="middle" x="149" y="-8.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">data</text>
<polygon fill="none" stroke="black" points="0,-0.5 0,-46.5 100,-46.5 100,-0.5 0,-0.5"/>
<text text-anchor="middle" x="25" y="-19.8" font-family="DejaVu Sans Mono, Book" font-size="14.00">host</text>
<polyline fill="none" stroke="black" points="50,-0.5 50,-46.5 "/>
<text text-anchor="middle" x="75" y="-31.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt</text>
<polyline fill="none" stroke="black" points="50,-23.5 100,-23.5 "/>
<text text-anchor="middle" x="75" y="-8.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">data</text>
</g>
<!-- client -->
<g id="node2" class="node">
<title>client</title>
<polygon fill="none" stroke="black" points="374.03,-0.5 374.03,-46.5 490.03,-46.5 490.03,-0.5 374.03,-0.5"/>
<text text-anchor="middle" x="399.03" y="-31.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt</text>
<polyline fill="none" stroke="black" points="374.03,-23.5 424.03,-23.5 "/>
<text text-anchor="middle" x="399.03" y="-8.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">data</text>
<polyline fill="none" stroke="black" points="424.03,-0.5 424.03,-46.5 "/>
<text text-anchor="middle" x="457.03" y="-19.8" font-family="DejaVu Sans Mono, Book" font-size="14.00">client</text>
<polygon fill="none" stroke="black" points="350.04,-0.5 350.04,-46.5 466.04,-46.5 466.04,-0.5 350.04,-0.5"/>
<text text-anchor="middle" x="375.04" y="-31.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt</text>
<polyline fill="none" stroke="black" points="350.04,-23.5 400.04,-23.5 "/>
<text text-anchor="middle" x="375.04" y="-8.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">data</text>
<polyline fill="none" stroke="black" points="400.04,-0.5 400.04,-46.5 "/>
<text text-anchor="middle" x="433.04" y="-19.8" font-family="DejaVu Sans Mono, Book" font-size="14.00">client</text>
</g>
<!-- host&#45;&#45;client -->
<g id="edge1" class="edge">
<title>host:tgt&#45;&#45;client:mgmt</title>
<path fill="none" stroke="black" stroke-width="2" d="M174,-35.5C174,-35.5 374.03,-35.5 374.03,-35.5"/>
<text text-anchor="middle" x="237.5" y="-39.3" font-family="DejaVu Serif, Book" font-size="14.00">192.168.0.254/24</text>
<title>host:mgmt&#45;&#45;client:mgmt</title>
<path fill="none" stroke="lightgrey" stroke-width="2" d="M100,-35.5C100,-35.5 350.04,-35.5 350.04,-35.5"/>
</g>
<!-- host&#45;&#45;client -->
<g id="edge2" class="edge">
<title>host:data&#45;&#45;client:data</title>
<path fill="none" stroke="cornflowerblue" stroke-width="2" d="M174,-11.5C174,-11.5 374.03,-11.5 374.03,-11.5"/>
<path fill="none" stroke="black" stroke-width="2" d="M100,-11.5C100,-11.5 350.04,-11.5 350.04,-11.5"/>
<text text-anchor="middle" x="154.5" y="-15.3" font-family="DejaVu Serif, Book" font-size="14.00">192.168.0.1/24</text>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

+2 -2
View File
@@ -4,8 +4,8 @@ Verify DHCP option 121 (static routes) is used over option 3 and that the
routes exist in the operational datastore.
Installing unrelated routes from a DHCP server should not affect already
existing routes. To verify this a canary route is set up in the client
before initiating DHCP. This canary route does not need to be reachable
existing routes. To verify this, a canary route is set up in the client
before initiating DHCP. This canary route does not need to be reachable
before a DHCP lease has been acquired.
==== Topology
+2 -1
View File
@@ -6,10 +6,11 @@ Verify DHCP option 121 (static routes) is used over option 3 and that the
routes exist in the operational datastore.
Installing unrelated routes from a DHCP server should not affect already
existing routes. To verify this a canary route is set up in the client
existing routes. To verify this, a canary route is set up in the client
before initiating DHCP. This canary route does not need to be reachable
before a DHCP lease has been acquired.
"""
import infamy
import infamy.dhcp
import infamy.route as route
@@ -7,7 +7,7 @@ graph "1x2" {
edge [color="cornflowerblue", penwidth="2", fontname="DejaVu Serif, Book"];
host [
label="host \n(10.0.0.0/24) | { <tgt> tgt | <data> data }",
label="host | { <mgmt> mgmt | <data> data }",
pos="0,20!",
kind="controller",
];
@@ -18,6 +18,6 @@ graph "1x2" {
kind="infix",
];
host:tgt -- client:mgmt [kind=mgmt, color=black, taillabel="192.168.0.254/24"]
host:data -- client:data
host:mgmt -- client:mgmt [kind=mgmt, color=lightgrey]
host:data -- client:data [color=black, taillabel="192.168.0.1/24"]
}
+20 -21
View File
@@ -3,42 +3,41 @@
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Title: 1x2 Pages: 1 -->
<svg width="548pt" height="59pt"
viewBox="0.00 0.00 548.04 58.50" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 54.5)">
<svg width="474pt" height="55pt"
viewBox="0.00 0.00 474.04 55.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 51)">
<title>1x2</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-54.5 544.04,-54.5 544.04,4 -4,4"/>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-51 470.04,-51 470.04,4 -4,4"/>
<!-- host -->
<g id="node1" class="node">
<title>host</title>
<polygon fill="none" stroke="black" points="0,-0.5 0,-46.5 174,-46.5 174,-0.5 0,-0.5"/>
<text text-anchor="middle" x="62" y="-27.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">host </text>
<text text-anchor="middle" x="62" y="-12.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">(10.0.0.0/24)</text>
<polyline fill="none" stroke="black" points="124,-0.5 124,-46.5 "/>
<text text-anchor="middle" x="149" y="-31.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">tgt</text>
<polyline fill="none" stroke="black" points="124,-23.5 174,-23.5 "/>
<text text-anchor="middle" x="149" y="-8.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">data</text>
<polygon fill="none" stroke="black" points="0,-0.5 0,-46.5 100,-46.5 100,-0.5 0,-0.5"/>
<text text-anchor="middle" x="25" y="-19.8" font-family="DejaVu Sans Mono, Book" font-size="14.00">host</text>
<polyline fill="none" stroke="black" points="50,-0.5 50,-46.5 "/>
<text text-anchor="middle" x="75" y="-31.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt</text>
<polyline fill="none" stroke="black" points="50,-23.5 100,-23.5 "/>
<text text-anchor="middle" x="75" y="-8.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">data</text>
</g>
<!-- client -->
<g id="node2" class="node">
<title>client</title>
<polygon fill="none" stroke="black" points="424.04,-0.5 424.04,-46.5 540.04,-46.5 540.04,-0.5 424.04,-0.5"/>
<text text-anchor="middle" x="449.04" y="-31.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt</text>
<polyline fill="none" stroke="black" points="424.04,-23.5 474.04,-23.5 "/>
<text text-anchor="middle" x="449.04" y="-8.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">data</text>
<polyline fill="none" stroke="black" points="474.04,-0.5 474.04,-46.5 "/>
<text text-anchor="middle" x="507.04" y="-19.8" font-family="DejaVu Sans Mono, Book" font-size="14.00">client</text>
<polygon fill="none" stroke="black" points="350.04,-0.5 350.04,-46.5 466.04,-46.5 466.04,-0.5 350.04,-0.5"/>
<text text-anchor="middle" x="375.04" y="-31.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">mgmt</text>
<polyline fill="none" stroke="black" points="350.04,-23.5 400.04,-23.5 "/>
<text text-anchor="middle" x="375.04" y="-8.3" font-family="DejaVu Sans Mono, Book" font-size="14.00">data</text>
<polyline fill="none" stroke="black" points="400.04,-0.5 400.04,-46.5 "/>
<text text-anchor="middle" x="433.04" y="-19.8" font-family="DejaVu Sans Mono, Book" font-size="14.00">client</text>
</g>
<!-- host&#45;&#45;client -->
<g id="edge1" class="edge">
<title>host:tgt&#45;&#45;client:mgmt</title>
<path fill="none" stroke="black" stroke-width="2" d="M174,-35.5C174,-35.5 424.04,-35.5 424.04,-35.5"/>
<text text-anchor="middle" x="237.5" y="-39.3" font-family="DejaVu Serif, Book" font-size="14.00">192.168.0.254/24</text>
<title>host:mgmt&#45;&#45;client:mgmt</title>
<path fill="none" stroke="lightgrey" stroke-width="2" d="M100,-35.5C100,-35.5 350.04,-35.5 350.04,-35.5"/>
</g>
<!-- host&#45;&#45;client -->
<g id="edge2" class="edge">
<title>host:data&#45;&#45;client:data</title>
<path fill="none" stroke="cornflowerblue" stroke-width="2" d="M174,-11.5C174,-11.5 424.04,-11.5 424.04,-11.5"/>
<path fill="none" stroke="black" stroke-width="2" d="M100,-11.5C100,-11.5 350.04,-11.5 350.04,-11.5"/>
<text text-anchor="middle" x="154.5" y="-15.3" font-family="DejaVu Serif, Book" font-size="14.00">192.168.0.1/24</text>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

+44
View File
@@ -0,0 +1,44 @@
:topdoc:
= Test specification
Infix v24.10.1-23-g8fc0ab9b-dirty
:title-page:
:toc:
:toclevels: 2
:sectnums:
:sectnumlevels: 2
<<<
include::../case/misc/Readme.adoc[]
<<<
include::../case/ietf_system/Readme.adoc[]
<<<
include::../case/ietf_syslog/Readme.adoc[]
<<<
include::../case/ietf_interfaces/Readme.adoc[]
<<<
include::../case/ietf_routing/Readme.adoc[]
<<<
include::../case/infix_containers/Readme.adoc[]
<<<
include::../case/infix_dhcp/Readme.adoc[]
<<<
include::../case/ietf_hardware/Readme.adoc[]
<<<
include::../case/infix_services/Readme.adoc[]