Router DHCP configuration commands

dhcp

Syntax

dhcp

Context

config>service>vprn

Platforms

7210 SAS-K 2F6C4T and 7210 SAS-K 3SFP+ 8C

Description

Commands in this context configure DHCP parameters.

local-dhcp-server

Syntax

local-dhcp-server server-name [create]

no local-dhcp-server server-name

Context

config>service>vprn>dhcp

config>service>vprn>if

config>service>vprn>nw-if

Platforms

7210 SAS-K 2F6C4T and 7210 SAS-K 3SFP+ 8C

Description

This command instantiates a local DHCP server. A local DHCP server can serve multiple interfaces but is limited to the routing context in was which it was created.

Note:

The DHCP server is supported only for craft access for local management of the node. It must not be used as a general purpose DHCP server.

Parameters

server-name

Specifies the name of local DHCP server.

create

Keyword used to create the server name. The create keyword requirement can be enabled and disabled in the environment>create context.

force-renews

Syntax

[no] force-renews

Context

config>service>vprn>dhcp>server

Platforms

7210 SAS-K 2F6C4T and 7210 SAS-K 3SFP+ 8C

Description

This command enables the sending of ‟forcerenew” messages.

The no form of this command disables the sending of ‟forcerenew” messages.

Default

no force-renews

pool

Syntax

pool pool-name [create]

no pool pool-name

Context

config>service>vprn>dhcp>local-dhcp-server

Platforms

7210 SAS-K 2F6C4T and 7210 SAS-K 3SFP+ 8C

Description

This command configures a DHCP address pool on the router.

Parameters

pool name

Specifies the name of this IP address pool. Allowed values are any string up to 32 characters composed of printable, 7-bit ASCII characters.

create

Keyword used to create the entity. The create keyword requirement can be enabled or disabled in the environment>create context.

max-lease-time

Syntax

max-lease-time [days days] [hrs hours] [min minutes] [sec seconds]

no max-lease-time

Context

config>service>vprn>dhcp>local-dhcp-server>pool

Platforms

7210 SAS-K 2F6C4T and 7210 SAS-K 3SFP+ 8C

Description

This command configures the maximum amount of time that a client can lease the IP address.

The no form of this command reverts to the default value.

Default

max-lease-time days 10

Parameters

days

Specifies the number of days in the lease time.

Values

0 to 3650

hours

Specifies the number of hours in the lease time.

Values

0 to 23

minutes

Specifies the number of minutes in the lease time.

Values

0 to 59

seconds

Specifies the number of seconds in the lease time.

Values

0 to 59

min-lease-time

Syntax

min-lease-time [days days] [hrs hours] [min minutes] [sec seconds]

no min-lease-time

Context

config>service>vprn>dhcp>local-dhcp-server>pool

Platforms

7210 SAS-K 2F6C4T and 7210 SAS-K 3SFP+ 8C

Description

This command configures the minimum amount of time that a client can lease the IP address.

The no form of this command reverts to the default value.

Default

min-lease-time min 10

Parameters

days

Specifies the number of days in the lease time.

Values

0 to 3650

hours

Specifies the number of hours in the lease time.

Values

0 to 23

minutes

Specifies the number of minutes in the lease time.

Values

0 to 59

seconds

Specifies the number of seconds in the lease time.

Values

0 to 59

minimum-free

Syntax

minimum-free minimum-free [percent] [event-when-depleted]

no minimum-free

Context

config>router>dhcp>server>pool

Platforms

7210 SAS-K 2F6C4T and 7210 SAS-K 3SFP+ 8C

Description

This command specifies the desired minimum number of free addresses in this pool.

The no form of this command reverts to the default value.

Default

1

Parameters

minimum-free

Specifies the minimum number of free addresses.

Values

0 to 255

percent

Keyword to specify that the value is a percentage.

event-when-depleted

Keyword that enables a system-generated event when all available addresses in the pool or subnet of the local DHCP server are depleted.

nak-non-matching-subnet

Syntax

[no] nak-non-matching-subnet

Context

config>router>dhcp>server>pool

Platforms

7210 SAS-K 2F6C4T and 7210 SAS-K 3SFP+ 8C

Description

This command configures the local DHCPv4 server handling of an Option 50 request. Option 50 indicates a client request for a previously allocated message, as described in section 3.2 of RFC 2131, Dynamic Host Configuration Protocol.

When this command is enabled, the address allocation algorithm uses a pool to search for the address specified in Option 10. If the address is not found in the pool, the system returns a DHCP NAK message. If the message is found, the system drops the DHCP packet.

Default

no nak-non-matching-subnet

offer-time

Syntax

offer-time [min minutes] [sec seconds]

no offer-time

Context

config>service>vprn>dhcp>server>pool

Platforms

7210 SAS-K 2F6C4T and 7210 SAS-K 3SFP+ 8C

Description

This command configures the offer time.

The no form of this command reverts to the default value.

Default

1 minute

Parameters

minutes

Specifies the offer time in minutes.

Values

0 to 10

seconds

Specifies the offer time in seconds.

Values

0 to 59

options

Syntax

options

Context

config>service>vprn>dhcp>server>pool

Platforms

7210 SAS-K 2F6C4T and 7210 SAS-K 3SFP+ 8C

Description

Commands in this context configure pool options. The options defined in this context can be overruled if the same option is defined in the local user database.

custom-option

Syntax

custom-option option-number address [ip-address...(up to 4 max)]

custom-option option-number hex hex-string

custom-option option-number string ascii-string

no custom-option option-number

Context

config>service>vprn>dhcp>server>pool>options

config>service>vprn>dhcp>server>pool>subnet>options

Platforms

7210 SAS-K 2F6C4T and 7210 SAS-K 3SFP+ 8C

Description

This command configures specific DHCP options. The option defined in this context can be overruled if the same option is defined in the local user database.

The no form of the removes the option from the configuration.

Parameters

option-number

Specifies the option number that the DHCP server uses to send the identification strings to the DHCP client.

Values

1 to 254

address ip-address

Specifies the IP address of this host.

hex hex-string

Specifies the hex value of this option.

Values

0x0 to 0xFFFFFFFF (maximum 254 hex nibbles)

string ascii-string

Specifies the value of this option up to 127 characters.

dns-server

Syntax

dns-server ip-address [ip-address...(up to 4 max)]

Context

config>service>vprn>dhcp>server>pool>options

Platforms

7210 SAS-K 2F6C4T and 7210 SAS-K 3SFP+ 8C

Description

This command configures the IP address of the DNS server.

Parameters

ip-address

Specifies the IP address of the DNS server. This address must be unique within the subnet and specified in dotted decimal notation.

Values

a.b.c.d

domain-name

Syntax

domain-name domain-name

no domain-name

Context

config>service>vprn>dhcp>server>pool>options

Platforms

7210 SAS-K 2F6C4T and 7210 SAS-K 3SFP+ 8C

Description

This command configures the default domain for a DHCP client that the router uses to complete unqualified hostnames (without a dotted-decimal domain name).

The no form of this command removes the name from the configuration.

Parameters

domain-name

Specifies the domain name for the client up to 127 characters.

lease-rebind-time

Syntax

lease-rebind-time [days days] [hrs hours] [min minutes] [sec seconds]

no lease-rebind-time

Context

config>service>vprn>dhcp>server>pool>options

Platforms

7210 SAS-K 2F6C4T and 7210 SAS-K 3SFP+ 8C

Description

This command configures the time the client transitions to a rebinding state.

The no form of this command removes the time from the configuration.

Parameters

days

Specifies the number of days in the lease rebind time.

Values

0 to 3650

hours

Specifies the number of hours in the lease rebind time.

Values

0 to 23

minutes

Specifies the number of minutes in the lease rebind time.

Values

0 to 59

seconds

Specifies the number of seconds in the lease rebind time.

Values

0 to 59

lease-renew-time

Syntax

lease-renew-time [days days] [hrs hours] [min minutes] [sec seconds]

no lease-renew-time

Context

config>service>vprn>dhcp>server>pool>options

Platforms

7210 SAS-K 2F6C4T and 7210 SAS-K 3SFP+ 8C

Description

This command configures the time the client transitions to a renew state.

The no form of this command removes the time from the configuration.

Parameters

days

Specifies the number of days in the lease renew time.

Values

0 to 3650

hours

Specifies the number of hours in the lease renew time.

Values

0 to 23

minutes

Specifies the number of minutes in the lease renew time.

Values

0 to 59

seconds

Specifies the number of seconds in the lease renew time.

Values

0 to 59

lease-time

Syntax

lease-time [days days] [hrs hours] [min minutes] [sec seconds]

no lease-time

Context

config>service>vprn>dhcp>server>pool>options

Platforms

7210 SAS-K 2F6C4T and 7210 SAS-K 3SFP+ 8C

Description

This command configures the amount of time that the DHCP server grants to the DHCP client to use a particular IP address.

The no form of this command removes the lease time parameters from the configuration.

Parameters

days

Specifies the number of days in the lease time.

Values

0 to 3650

hours

Specifies the number of hours in the lease time.

Values

0 to 23

minutes

Specifies the number of minutes in the lease time.

Values

0 to 59

seconds

Specifies the number of seconds in the lease time.

Values

0 to 59

subnet

Syntax

subnet {ip-address/mask | ip-address netmask} [create]

no subnet {ip-address/mask | ip-address netmask}

Context

config>service>vprn>dhcp>server>pool

Platforms

7210 SAS-K 2F6C4T and 7210 SAS-K 3SFP+ 8C

Description

This command configures a subnet of IP addresses to be served from the pool. The subnet cannot include any addresses that were assigned to subscribers without those addresses specifically excluded. When the subnet is created, no IP addresses are made available until a range is defined.

Parameters

ip-address

Specifies the base IP address of the subnet. This address must be unique within the subnet and specified in dotted decimal notation.

Values

a.b.c.d (no multicast address)

mask

Specifies the subnet mask in dotted decimal notation.

Values

8 to 30

netmask

Specifies a string of 0s and 1s that mask or screen out the network part of an IP address so that only the host computer part of the address remains.

Values

a.b.c.d (any mask expressed as dotted quad)

create

Keyword used to create the entity. The create keyword requirement can be enabled or disabled in the environment>create context.

address-range

Syntax

[no] address-range start-ip-address end-ip-address

Context

config>service>vprn>dhcp>server>pool>subnet

Platforms

7210 SAS-K 2F6C4T and 7210 SAS-K 3SFP+ 8C

Description

This command configures a range of IP addresses to be served from the pool. All IP addresses between the start and end IP addresses are included (other than specific excluded addresses).

Parameters

start-ip-address

Specifies the start address of this range to include. This address must be unique within the subnet and specified in dotted decimal notation.

Values

a.b.c.d

end-ip-address

Specifies the end address of this range to include. This address must be unique within the subnet and specified in dotted decimal notation.

Values

a.b.c.d

exclude-addresses

Syntax

[no] exclude-addresses start-ip-address [end-ip-address]

Context

config>service>vprn>dhcp>server>pool>subnet

Platforms

7210 SAS-K 2F6C4T and 7210 SAS-K 3SFP+ 8C

Description

This command specifies a range of IP addresses that are excluded from the pool of IP addresses in this subnet.

Parameters

start-ip-address

Specifies the start address of this range to exclude. This address must be unique within the subnet and specified in dotted decimal notation.

Values

a.b.c.d

end-ip-address

Specifies the end address of this range to exclude. This address must be unique within the subnet and specified in dotted decimal notation.

Values

a.b.c.d

maximum-declined

Syntax

maximum-declined maximum-declined

no maximum-declined

Context

config>service>vprn>dhcp>server>pool>subnet

Platforms

7210 SAS-K 2F6C4T and 7210 SAS-K 3SFP+ 8C

Description

This command configures the maximum number of declined addresses allowed.

Default

64

Parameters

maximum-declined

Specifies the maximum number of declined addresses allowed.

Values

0 to 4294967295

minimum-free

Syntax

minimum-free minimum-free

no minimum-free

Context

config>service>vprn>dhcp>server>pool>subnet

Platforms

7210 SAS-K 2F6C4T and 7210 SAS-K 3SFP+ 8C

Description

This command configures the minimum number of free addresses in this subnet. If the actual number of free addresses in this subnet falls below this configured minimum, a notification is generated.

Default

1

Parameters

minimum-free

Specifies the minimum number of free addresses in this subnet.

Values

0 to 255

default-router

Syntax

default-router ip-address [ip-address...(up to 4 max)]

no default-router

Context

config>service>vprn>dhcp>server>pool>subnet

Platforms

7210 SAS-K 2F6C4T and 7210 SAS-K 3SFP+ 8C

Description

This command configures the IP address of the default router for a DHCP client. Up to four IP addresses can be specified.

The no form of this command removes the addresses from the configuration.

Parameters

ip-address

Specifies the IP address of the default router. This address must be unique within the subnet and specified in dotted decimal notation.

Values

a.b.c.d

subnet-mask

Syntax

subnet-mask ip-address

no subnet-mask

Context

config>service>vprn>dhcp>server>pool>subnet

Platforms

7210 SAS-K 2F6C4T and 7210 SAS-K 3SFP+ 8C

Description

This command specifies the subnet-mask option to the client. The mask can either be defined (for supernetting) or taken from the pool address.

The no form of this command removes the address from the configuration.

Parameters

ip-address

Specifies the IP address of the subnet mask. This address must be unique within the subnet and specified in dotted decimal notation.

Values

a.b.c.d

use-gi-address

Syntax

[no] use-gi-address

Context

config>service>vprn>dhcp>server

Platforms

7210 SAS-K 2F6C4T and 7210 SAS-K 3SFP+ 8C

Description

This command enables the use of gateway IP address (GIADDR) matching. If the gi-address flag is enabled, a pool can be used even if a subnet is not found. If the local-user-db-name is not used, the gi-address flag is used and addresses are handed out by GI only. If a user must be blocked from getting an address, the server maps to a local user database and configures the user with no address.

A pool can include multiple subnets. Because the GIADDR is shared by multiple subnets in a subscriber-interface, the pool may provide IP addresses from any of the subnets included when the GIADDR is matched to any of its subnets. This allows a pool to be created that represents a subnet.

Default

no use-gi-address

user-db

Syntax

user-db local-user-db-name

no user-db

Context

config>service>vprn>dhcp>server

Platforms

7210 SAS-K 2F6C4T and 7210 SAS-K 3SFP+ 8C

Description

This command configures a local user database for authentication.

Default

no user-db

Parameters

local-user-db-name

Specifies the name of a local user database.

vrf-target

Syntax

vrf-target {ext-community | export ext-community | import ext-community}

no vrf-target

Context

config>service>vprn

Platforms

7210 SAS-K 2F6C4T and 7210 SAS-K 3SFP+ 8C

Description

This command specifies the route target to be added to the advertised routes or compared against the received routes from other VRFs on the same or remote PE routers. Specified vrf-import or vrf-export policies override the vrf-target policy.

The no form of this command removes the vrf-target.

Default

no vrf-target

Parameters

ext-community

Specifies an extended BGP community in the type:x:y format. The value x can be an integer or IP address. The type can be the target or origin. x and y are 16-bit integers.

Values

target:{ip-address:comm-val |2byte-asnumber:ext-comm-val|4byte-asnumber:comm-val}

ip-address:

a.b.c.d

comm-val:

0 to 65535

2byte-asnumber:

1 to 65535

4byte-asnumber

0 to 4294967295

import ext-community

Specifies communities allowed to be accepted from remote PE neighbors.

export ext-community

Specifies communities allowed to be sent to remote PE neighbors.