-
Notifications
You must be signed in to change notification settings - Fork 106
Expand file tree
/
Copy path03-ipv4-server.yml
More file actions
45 lines (39 loc) · 978 Bytes
/
Copy path03-ipv4-server.yml
File metadata and controls
45 lines (39 loc) · 978 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
message: |
Use this topology to test the DHCPv4 server on your device. Use 'netlab
validate' to check whether your device allocated IPv4 addresses to DHCP
clients running on Linux VMs.
defaults.sources.extra: [ ../wait_times.yml, ../warnings.yml ]
groups:
clients:
members: [ c1, c2 ]
provider: libvirt
device: linux
nodes:
c1:
c2:
dut:
module: [ dhcp ]
dhcp.server: true
links:
- c1:
ipv4: dhcp
c2:
ipv4: dhcp
dut:
validate:
get_lease:
description: Renew DHCP lease on Linux clients
nodes: [ c1, c2 ]
devices: [ linux ]
exec: sudo networkctl forcerenew eth1
ck_lease:
description: Check for DHCP address assignments
nodes: [ c1, c2 ]
wait: 60
wait_msg: Waiting for DHCP to complete
pass: The DHCP clients got dynamic IPv4 addresses
fail: No IPv4 address assigned
exec:
linux: "ip addr show eth1 | grep inet | grep dynamic || true"
valid:
linux: stdout.rstrip()