Created
July 16, 2024 09:40
-
-
Save radixm46/06e18f475f4a69754e693dd23138949d to your computer and use it in GitHub Desktop.
kea dhcpでclassless static route配布
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// kea dhcpでclassless static route配布 | |
{ | |
"Dhcp4": { | |
// .... | |
"subnet4": [ | |
{ | |
"id": 1, | |
"subnet": "192.168.0.0/24", | |
"option-data": [ | |
{ | |
"space": "dhcp4", | |
"name": "routers", | |
"code": 3, | |
"data": "192.168.0.1" | |
}, | |
{ | |
"space": "dhcp4", | |
"name": "domain-name-servers", | |
"code": 6, | |
"data": "8.8.8.8, 1.1.1.1" | |
}, | |
// .... | |
{ // classless-static-routes to tailscale vpn gw | |
"space": "dhcp4", | |
"name": "classless-static-routes", | |
"code": 121, | |
// Route to 100.64.0.0/10 192.168.2.0/24 -> 192.168.0.110 | |
// ┌───────────┘ 192.168.2.0/24 -> 192.168.0.110 | |
// | | | ┌──────────┘ default route | |
// | | | | | | | | | |
"data": "10,100,64, 192.168.0.110, 24,192,168,2, 192.168.0.110, 0,192.168.0.1" | |
// data format defined at "option-def" | |
} | |
] | |
} | |
], | |
"option-def": [{ | |
// define option 121 | |
"name": "classless-static-routes", | |
"code": 121, | |
"space": "dhcp4", | |
"type": "record", | |
"record-types": "uint8,uint8,uint8,ipv4-address, uint8,uint8,uint8,uint8,ipv4-address, uint8,ipv4-address" | |
}], | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment