| 1 |
{ |
| 2 |
# host declaration with flexible identifiers config |
| 3 |
# subnet4 declaration |
| 4 |
/// This configuration declares some subnets but has no interfaces-config |
| 5 |
/// Reference Kea #245 |
| 6 |
"Dhcp4": { |
| 7 |
"subnet4": [ |
| 8 |
{ |
| 9 |
"id": 1, |
| 10 |
"subnet": "10.5.5.0/27", |
| 11 |
"pools": [ |
| 12 |
{ |
| 13 |
"pool": "10.5.5.5 - 10.5.5.10" |
| 14 |
} |
| 15 |
] |
| 16 |
}, |
| 17 |
{ |
| 18 |
"id": 2, |
| 19 |
"subnet": "10.10.10.0/27" |
| 20 |
} |
| 21 |
], |
| 22 |
"option-def": [ |
| 23 |
# option definition |
| 24 |
{ |
| 25 |
"space": "dhcp4", |
| 26 |
"name": "my-id", |
| 27 |
"code": 250, |
| 28 |
"type": "string" |
| 29 |
} |
| 30 |
], |
| 31 |
"host-reservation-identifiers": [ |
| 32 |
"flex-id", |
| 33 |
"hw-address" |
| 34 |
], |
| 35 |
/// The flexible host identifier is a premium feature |
| 36 |
"hooks-libraries": [ |
| 37 |
{ |
| 38 |
"library": "/path/libdhcp_flex_id.so", |
| 39 |
"parameters": { |
| 40 |
"identifier-expression": "option[250].hex" |
| 41 |
} |
| 42 |
} |
| 43 |
], |
| 44 |
"reservation-mode": "global", |
| 45 |
"reservations": [ |
| 46 |
# host declarations |
| 47 |
{ |
| 48 |
"hostname": "test1", |
| 49 |
"flex-id": "'test1'", |
| 50 |
"option-data": [ |
| 51 |
{ |
| 52 |
"space": "dhcp4", |
| 53 |
"name": "domain-search", |
| 54 |
"code": 119, |
| 55 |
// "original-data": "\"example.com\", \"example.org\"", |
| 56 |
"data": "example.com, example.org" |
| 57 |
} |
| 58 |
], |
| 59 |
// /// default-valid-lifetime in unsupported scope |
| 60 |
// "valid-lifetime": 1800, |
| 61 |
"ip-address": "10.5.5.1" |
| 62 |
// "extra-ip-addresses": [ |
| 63 |
// "10.10.10.10" |
| 64 |
// ] |
| 65 |
}, |
| 66 |
{ |
| 67 |
"hostname": "test2", |
| 68 |
"hw-address": "00:07:0e:36:48:19", |
| 69 |
"ip-address": "10.5.5.2" |
| 70 |
} |
| 71 |
// { |
| 72 |
// "hostname": "test3", |
| 73 |
// "hw-address": "fddi 00:07:0e:36:48:19", |
| 74 |
// "ip-address": "10.10.10.1" |
| 75 |
// } |
| 76 |
] |
| 77 |
} |
| 78 |
} |