-
Notifications
You must be signed in to change notification settings - Fork 6
89 lines (69 loc) · 2.27 KB
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
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
module sysrepo-dnsmasq {
yang-version 1;
namespace "urn:ietf:params:xml:ns:yang:dnsmasq";
prefix srdns;
import ietf-inet-types {
prefix inet;
}
organization "sysrepo.org";
contact "[email protected]";
description "Experimental dnsmasq tool YANG model.";
revision 2016-01-22 {
description "Inital revision";
reference "sysrepo.org";
}
container dnsmasq-cfg {
description "dnsmasq tool configuration.";
leaf username {
type string;
default "nobody";
description "Specify the userid to which dnsmasq will change after startup. Dnsmasq must normally be started as root,
but it will drop root privileges after startup by changing id to another user. Normally this user is 'nobody'
but that can be over-ridden with this switch.";
}
leaf groupname {
type string;
default "dip";
description "Specify the group which dnsmasq will run as. The defaults to 'dip', if available, to facilitate access to
/etc/ppp/resolv.conf which is not normally world readable.";
}
container dns-server {
description "DNS server subsystem configuration.";
leaf enabled {
type boolean;
default true;
description "Controls whether DNS server is enabled or disabled.";
}
leaf port {
type uint32;
default 53;
description "Port that DNS serevr is bound to.";
}
}
container dhcp-server {
description "DHCP server subsystem configuration.";
leaf enabled {
type boolean;
default true;
description "Controls whether DHCP server is enabled or disabled.";
}
list dhcp-pool {
key "start-addr end-addr";
description "DHCP pool configuration. Addresses will be given out from the range start-addr to end-addr.";
leaf start-addr {
type inet:ipv4-address-no-zone;
description "First address of the DHCP pool.";
}
leaf end-addr {
type inet:ipv4-address-no-zone;
description "Last address of the DHCP pool.";
}
leaf lease-time {
type uint32;
default 3600;
description "Time period for which the assigned IP address will be leased.";
}
}
}
}
}