схема базы данных OVN_Southbound (OVN_Southbound database schema)
DHCP_Options TABLE
Each row in this table stores the DHCP Options supported by
native OVN DHCP. ovn-northd populates this table with the
supported DHCP options. ovn-controller looks up this table to get
the DHCP codes of the DHCP options defined in the "put_dhcp_opts"
action. Please refer to the RFC 2132
"https://tools.ietf.org/html/rfc2132" for the possible list of
DHCP options that can be defined here.
Summary:
name string
code integer, in range 0 to 254
type string, one of bool, ipv4,
static_routes, str, uint16, uint32,
or uint8
Details:
name: string
Name of the DHCP option.
Example. name="router"
code: integer, in range 0 to 254
DHCP option code for the DHCP option as defined in the RFC
2132.
Example. code=3
type: string, one of bool, ipv4, static_routes, str, uint16,
uint32, or uint8
Data type of the DHCP option code.
value: bool
This indicates that the value of the DHCP option is
a bool.
Example. "name=ip_forward_enable", "code=19",
"type=bool".
put_dhcp_opts(..., ip_forward_enable = 1,...)
value: uint8
This indicates that the value of the DHCP option is
an unsigned int8 (8 bits)
Example. "name=default_ttl", "code=23",
"type=uint8".
put_dhcp_opts(..., default_ttl = 50,...)
value: uint16
This indicates that the value of the DHCP option is
an unsigned int16 (16 bits).
Example. "name=mtu", "code=26", "type=uint16".
put_dhcp_opts(..., mtu = 1450,...)
value: uint32
This indicates that the value of the DHCP option is
an unsigned int32 (32 bits).
Example. "name=lease_time", "code=51",
"type=uint32".
put_dhcp_opts(..., lease_time = 86400,...)
value: ipv4
This indicates that the value of the DHCP option is
an IPv4 address or addresses.
Example. "name=router", "code=3", "type=ipv4".
put_dhcp_opts(..., router = 10.0.0.1,...)
Example. "name=dns_server", "code=6", "type=ipv4".
put_dhcp_opts(..., dns_server = {8.8.8.8
7.7.7.7},...)
value: static_routes
This indicates that the value of the DHCP option
contains a pair of IPv4 route and next hop
addresses.
Example. "name=classless_static_route", "code=121",
"type=static_routes".
put_dhcp_opts(..., classless_static_route =
{30.0.0.0/24,10.0.0.4,0.0.0.0/0,10.0.0.1}...)
value: str
This indicates that the value of the DHCP option is
a string.
Example. "name=host_name", "code=12", "type=str".