Skip to content

Commit

Permalink
T6773: dhcp-server: ddns: Fix config load test for DHCP server
Browse files Browse the repository at this point in the history
  • Loading branch information
abukharov committed Oct 12, 2024
1 parent cfc438e commit 3a5d9d6
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 10 deletions.
8 changes: 7 additions & 1 deletion smoketest/config-tests/basic-vyos
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ set protocols static arp interface eth2.200.201 address 100.64.201.20 mac '00:50
set protocols static arp interface eth2.200.202 address 100.64.202.30 mac '00:50:00:00:00:30'
set protocols static arp interface eth2.200.202 address 100.64.202.40 mac '00:50:00:00:00:40'
set protocols static route 0.0.0.0/0 next-hop 100.64.0.1
set service dhcp-server dynamic-dns-update enable-updates
set service dhcp-server dynamic-dns-update send-updates
set service dhcp-server dynamic-dns-update use-conflict-resolution
set service dhcp-server dynamic-dns-update tsig-key-name domain-lan-updates algorithm 'hmac-sha256'
set service dhcp-server dynamic-dns-update tsig-key-name domain-lan-updates secret 'SXQncyBXZWRuZXNkYXkgbWFoIGR1ZGVzIQ=='
set service dhcp-server dynamic-dns-update tsig-key-name reverse-0-168-192 algorithm 'hmac-sha256'
Expand All @@ -40,6 +41,8 @@ set service dhcp-server dynamic-dns-update reverse-ddns-domain-name 0.168.192.in
set service dhcp-server dynamic-dns-update reverse-ddns-domain-name 0.168.192.in-addr.arpa dns-server 2 address '100.100.0.1'
set service dhcp-server dynamic-dns-update reverse-ddns-domain-name 0.168.192.in-addr.arpa key-name 'reverse-0-168-192'
set service dhcp-server shared-network-name LAN authoritative
set service dhcp-server shared-network-name LAN dynamic-dns-update send-updates
set service dhcp-server shared-network-name LAN dynamic-dns-update ttl-percent 75
set service dhcp-server shared-network-name LAN subnet 192.168.0.0/24 option default-router '192.168.0.1'
set service dhcp-server shared-network-name LAN subnet 192.168.0.0/24 option domain-name 'vyos.net'
set service dhcp-server shared-network-name LAN subnet 192.168.0.0/24 option domain-search 'vyos.net'
Expand All @@ -57,6 +60,9 @@ set service dhcp-server shared-network-name LAN subnet 192.168.0.0/24 static-map
set service dhcp-server shared-network-name LAN subnet 192.168.0.0/24 static-mapping TEST2-2 ip-address '192.168.0.21'
set service dhcp-server shared-network-name LAN subnet 192.168.0.0/24 static-mapping TEST2-2 mac '00:01:02:03:04:22'
set service dhcp-server shared-network-name LAN subnet 192.168.0.0/24 subnet-id '1'
set service dhcp-server shared-network-name LAN subnet 192.168.0.0/24 dynamic-dns-update send-updates
set service dhcp-server shared-network-name LAN subnet 192.168.0.0/24 dynamic-dns-update generated-prefix myhost
set service dhcp-server shared-network-name LAN subnet 192.168.0.0/24 dynamic-dns-update qualifying-suffix lan1.domain.lan
set service dhcpv6-server shared-network-name LAN6 subnet fe88::/56 interface 'eth0'
set service dhcpv6-server shared-network-name LAN6 subnet fe88::/56 option domain-search 'vyos.net'
set service dhcpv6-server shared-network-name LAN6 subnet fe88::/56 option name-server 'fe88::1'
Expand Down
33 changes: 24 additions & 9 deletions smoketest/configs/basic-vyos
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ protocols {
service {
dhcp-server {
dynamic-dns-update {
enable-updates
forward-ddns-domain-name domain.lan {
dns-server 1 {
address 192.168.0.1
Expand All @@ -98,6 +97,7 @@ service {
}
key-name reverse-0-168-192
}
send-updates
tsig-key-name domain-lan-updates {
algorithm hmac-sha256
secret SXQncyBXZWRuZXNkYXkgbWFoIGR1ZGVzIQ==
Expand All @@ -106,34 +106,49 @@ service {
algorithm hmac-sha256
secret VGhhbmsgR29kIGl0J3MgRnJpZGF5IQ==
}
use-conflict-resolution
}
shared-network-name LAN {
authoritative
dynamic-dns-update {
send-updates
ttl-percent 75
}
subnet 192.168.0.0/24 {
default-router 192.168.0.1
dns-server 192.168.0.1
domain-name vyos.net
domain-search vyos.net
dynamic-dns-update {
generated-prefix myhost
qualifying-suffix lan1.domain.lan
send-updates
}
option {
default-router 192.168.0.1
domain-name vyos.net
domain-search vyos.net
name-server 192.168.0.1
}
range LANDynamic {
start 192.168.0.30
stop 192.168.0.240
}
static-mapping TEST1-1 {
ip-address 192.168.0.11
mac-address 00:01:02:03:04:05
mac 00:01:02:03:04:05
}
static-mapping TEST1-2 {
disable
ip-address 192.168.0.12
mac-address 00:01:02:03:04:05
mac 00:01:02:03:04:05
}
static-mapping TEST2-1 {
ip-address 192.168.0.21
mac-address 00:01:02:03:04:21
mac 00:01:02:03:04:21
}
static-mapping TEST2-2 {
disable
ip-address 192.168.0.21
mac-address 00:01:02:03:04:22
mac 00:01:02:03:04:22
}
subnet-id 1
}
}
}
Expand Down

0 comments on commit 3a5d9d6

Please sign in to comment.