Configuring a DHCP Server in Gaia Clish
|
Important:
|
Syntax

|

add dhcp server subnet <Subnet IPv4 Address> netmask <IPv4 Subnet Mask Length> exclude-ip-pool start <First IPv4 Address> end <Last IPv4 Address> include-ip-pool start <First IPv4 Address> end <Last IPv4 Address> |

set dhcp server subnet <Subnet IPv4 Address> {enable | disable} exclude-ip-pool <First IPv4 Address-Last IPv4 Address> {enable | disable} include-ip-pool <First IPv4 Address-Last IPv4 Address> {enable | disable} default-lease <Lease in Seconds> max-lease <Maximum Lease in Seconds> default-gateway <IPv4 Address of Default Gateway> dns "<DNS Server 1>, <DNS Server 2>, <DNS Server 3>" domain <Domain Name>
|

delete dhcp server subnet <Subnet IPv4 Address> exclude-ip-pool <First IPv4 Address-Last IPv4 Address> include-ip-pool <First IPv4 Address-Last IPv4 Address> |

show dhcp server all status subnet <Subnet IPv4 Address> [ip-pools] subnets |
|
Important - After you add, configure, or delete features, run the " |
Parameters

Parameter |
Description |
---|---|
|
Specifies the IPv4 address of the DHCP subnet on an Ethernet interface of the Gaia device. Hosts behind the Gaia interface get IPv4 addresses from address pools in the subnet. For example: |
|
Specifies the IPv4 subnet mask length. For example: |
|
Specifies the IPv4 address that starts and the IPv4 address that ends the included allocated IP Pool range. For example: |
|
Specifies the IPv4 address that starts and the IPv4 address that ends the excluded allocated IP Pool range. For example: |
|
Specifies the range of IPv4 addresses to include in the IP pool. For example: |
|
Specifies the range of IPv4 addresses to exclude from the IP pool. For example: |
|
Enables or disables the DHCP Server subnet, or the DHCP Server process (depending on the context). |
|
Specifies the default DHCP lease in seconds, for host IPv4 addresses. Applies only if DHCP clients do not request a unique lease time. Range: 1 - 4294967295 Default: 43200 |
|
Specifies the maximum DHCP lease in seconds, for host IPv4 addresses. Range: 1 - 4294967295 Default: 86400 |
|
Optional. Specifies the IPv4 address of the default gateway for the network hosts |
|
Optional. Specifies the domain name for DHCPv4 Clients. For example: |
|
Optional. Specifies the IPv4 addresses of DNS servers that the network hosts will use to resolve hostnames. Optionally, specify a primary, secondary, and tertiary server in the order of precedence. For example: |
|
Shows the DHCPv6 Server settings:
|
Example
gaia> add dhcp server subnet 192.168.2.0 netmask 24 gaia> add dhcp server subnet 192.168.2.0 include-ip-pool start 192.168.2.20 end 192.168.2.90 gaia> add dhcp server subnet 192.168.2.0 include-ip-pool start 192.168.2.120 end 192.168.2.150 gaia> add dhcp server subnet 192.168.2.0 exclude-ip-pool start 192.168.2.155 end 192.168.2.254 gaia> set dhcp server subnet 192.168.2.0 include-ip-pool 192.168.2.20-192.168.2.90 enable gaia> set dhcp server subnet 192.168.2.0 include-ip-pool 192.168.2.120-192.168.2.150 disable gaia> set dhcp server subnet 192.168.2.0 exclude-ip-pool 192.168.2.155-192.168.2.254 enable gaia> set dhcp server subnet 192.168.2.0 default-lease 43200 gaia> set dhcp server subnet 192.168.2.0 max-lease 86400 gaia> set dhcp server subnet 192.168.2.0 default-gateway 192.168.2.103 gaia> set dhcp server subnet 192.168.2.0 domain example.com gaia> set dhcp server subnet 192.168.2.0 dns 192.168.2.101, 192.168.2.102, 192.168.2.103 gaia> set dhcp server subnet 192.168.2.0 enable |
gaia> add dhcp server subnet 172.30.4.0 netmask 24 gaia> add dhcp server subnet 172.30.4.0 include-ip-pool start 172.30.4.10 end 172.30.4.99 gaia> set dhcp server subnet 172.30.4.0 include-ip-pool 172.30.4.10-172.30.4.99 enable gaia> set dhcp server subnet 172.30.4.0 default-lease 43200 gaia> set dhcp server subnet 172.30.4.0 max-lease 86400 gaia> set dhcp server subnet 172.30.4.0 disable |
gaia> add dhcp server subnet 10.20.30.0 netmask 24 gaia> set dhcp server subnet 10.20.30.0 default-lease 43200 gaia> set dhcp server subnet 10.20.30.0 max-lease 86400 gaia> set dhcp server subnet 10.20.30.0 disable |
gaia> show dhcp server all DHCP Server Enabled DHCP-Subnet 192.168.2.0 State Enabled Net-Mask 24 Maximum-Lease 86400 Default-Lease 43200 Domain example.com Default Gateway 192.168.2.103 DNS 192.168.2.101, 192.168.2.102, 192.168.2.103 Pools (Include List) 192.168.2.20-192.168.2.90 : enabled 192.168.2.120-192.168.2.150 : disabled Pools (Exclude List) 192.168.2.155-192.168.2.254 : enabled DHCP-Subnet 172.30.4.0 State Disabled Net-Mask 24 Maximum-Lease 86400 Default-Lease 43200 Pools (Include List) 172.30.4.10-172.30.4.99 : enabled DHCP-Subnet 10.20.30.0 State Disabled Net-Mask 24 Maximum-Lease 86400 Default-Lease 43200 gaia> |