shared-network.json 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. // This is an example configuration file for DHCPv6 server in Kea.
  2. // It demonstrates an advanced feature called shared network. Typically, for
  3. // each physical link there is one IPv6 subnet that the server is expected
  4. // to manage. However, in some cases there is a need to configure more subnets
  5. // in the same physical location. This may sound odd, as IPv6 is not expected
  6. // to run out of addresses. However, due to vast address space some deployments
  7. // experiment with various addressing schemes and later find out that the
  8. // initial proposal was not best and way to migrate to something else.
  9. {
  10. "Dhcp6": {
  11. // Kea is told to listen on ethX interface only.
  12. "interfaces-config": {
  13. "interfaces": [ "ethX" ]
  14. },
  15. // You also need to tell where to store lease information.
  16. // memfile is the backend that is easiest to set up.
  17. "lease-database": {
  18. "type": "memfile",
  19. "lfc-interval": 3600
  20. },
  21. // It is likely that in your network you'll have a mix of regular,
  22. // "plain" subnets and shared networks. It is perfectly valid to mix
  23. // them in the same config file.
  24. //
  25. // This is regular subnet. It's not part of any shared-network.
  26. "subnet6": [
  27. {
  28. "pools": [ { "pool": "2001:db8:2::/80" } ],
  29. "subnet": "2001:db8:2::/64",
  30. "interface": "ethX"
  31. }
  32. ],
  33. // Hhe shared networks definition starts here. shared-networks can
  34. // contain a list of shared networks. There are many parameters
  35. // that can be specified here, so this example may be overwhelming
  36. // at first, but the only mandatory parameter for each shared
  37. // network is name. It must be unique. Typically, each shared
  38. // network also needs to have at least two subnets to be functional,
  39. // but if you really want to, you can define a degraded shared
  40. // network that has 1 or even 0 subnets. This may come in handy
  41. // when migrating between regular subnets and shared networks
  42. // or when debugging a problem. It is not recommended to use
  43. // 1 subnet per shared network, as there is extra processing
  44. // overhead for shared networks.
  45. "shared-networks": [
  46. {
  47. "interface": "eth1",
  48. // Similar to regular subnets, it is forbidden to define both
  49. // interface and interface-id at the same time. That's because
  50. // interface parameter expresses physical network interface
  51. // for links available locally and interface-id identifies
  52. // values inserted by relays, which are only used for
  53. // remote traffic. A shared network cannot be both direct
  54. // and relayed.
  55. //"interface-id": "content of the option",
  56. // Other parameters defined here will be inherited by the
  57. // subnets.
  58. "name": "frog",
  59. "option-data": [ ],
  60. "preferred-lifetime": 200,
  61. "rapid-commit": true,
  62. "rebind-timer": 150,
  63. "relay": {
  64. "ip-address": "2001:db8::1"
  65. },
  66. "renew-timer": 100,
  67. "reservation-mode": "all",
  68. // List of subnets belonging to this particular shared-network
  69. // start here.
  70. "subnet6": [
  71. // This is the first subnet.
  72. {
  73. "preferred-lifetime": 30,
  74. "rapid-commit": false,
  75. "rebind-timer": 20,
  76. // It is possible to override some values here.
  77. "relay": {
  78. "ip-address": "2001:db8:1::123"
  79. },
  80. "renew-timer": 10,
  81. "reservation-mode": "all",
  82. "subnet": "2001:db8:1::/64",
  83. "pools": [ { "pool": "2001:db8:1:abcd::/64" } ],
  84. "valid-lifetime": 40
  85. },
  86. // This is the second subnet.
  87. {
  88. "preferred-lifetime": 30,
  89. "pools": [ { "pool": "3000:db8::/64" } ],
  90. "rapid-commit": false,
  91. "rebind-timer": 20,
  92. "relay": {
  93. "ip-address": "3000::1"
  94. },
  95. "renew-timer": 10,
  96. "reservation-mode": "all",
  97. "subnet": "3000::/16",
  98. "valid-lifetime": 40
  99. }
  100. ],
  101. "valid-lifetime": 300
  102. } ]
  103. }
  104. }