blob: 6cc715e7a8826d78230bf97be37300ef47502505 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
.. cfgcmd:: set interfaces {{ var0 }} <interface> {{ var2 }} {{ var3 }}
{{ var5 }} {{ var6 }} dhcp-options client-id <description>
**Configure a DHCP client identifier for the interface, as specified in**
:rfc:`2131`.
The ``client-id`` is an identifier that the DHCP client sends to the DHCP
server to uniquely identify itself for IP address assignment. By default,
the client uses its MAC address. The ``<description>`` is a user-defined
string that will be sent to the DHCP server as the DHCP client identifier.
Example:
.. code-block:: none
set interfaces {{ var0 }} {{ var1 }} {{ var2 }} {{ var4 }} {{ var5 }} {{ var7 }} dhcp-options client-id 'foo-bar'
.. cfgcmd:: set interfaces {{ var0 }} <interface> {{ var2 }} {{ var3 }}
{{ var5 }} {{ var6 }} dhcp-options host-name <hostname>
**Configure a specific hostname for the interface.**
Instead of the real hostname, the DHCP client will send the specific hostname
to the DHCP server when requesting an IP address.
Example:
.. code-block:: none
set interfaces {{ var0 }} {{ var1 }} {{ var2 }} {{ var4 }} {{ var5 }} {{ var7 }} dhcp-options host-name 'VyOS'
.. cfgcmd:: set interfaces {{ var0 }} <interface> {{ var2 }} {{ var3 }}
{{ var5 }} {{ var6 }} dhcp-options vendor-class-id <vendor-id>
**Configure the DHCP client to include a vendor-class identifier in its DHCP
requests on this interface.**
The vendor-class identifier is a vendor-specific byte string that enables
the DHCP server to identify the device and, in some cases, provide
configuration options.
Example:
.. code-block:: none
set interfaces {{ var0 }} {{ var1 }} {{ var2 }} {{ var4 }} {{ var5 }} {{ var7 }} dhcp-options vendor-class-id 'VyOS'
.. cfgcmd:: set interfaces {{ var0 }} <interface> {{ var2 }} {{ var3 }}
{{ var5 }} {{ var6 }} dhcp-options no-default-route
**Configure the DHCP client to obtain an IP address, but ignore any default
gateway provided by the DHCP server on this interface.**
Example:
.. code-block:: none
set interfaces {{ var0 }} {{ var1 }} {{ var2 }} {{ var4 }} {{ var5 }} {{ var7 }} dhcp-options no-default-route
.. cfgcmd:: set interfaces {{ var0 }} <interface> {{ var2 }} {{ var3 }}
{{ var5 }} {{ var6 }} dhcp-options default-route-distance <distance>
**Configure the distance for the default route obtained from the DHCP server
on this interface.**
Example:
.. code-block:: none
set interfaces {{ var0 }} {{ var1 }} {{ var2 }} {{ var4 }} {{ var5 }} {{ var7 }} dhcp-options default-route-distance 220
.. cfgcmd:: set interfaces {{ var0 }} <interface> {{ var2 }} {{ var3 }}
{{ var5 }} {{ var6 }} dhcp-options reject <address>
**Configure the DHCP client to reject the specific IP address or IP address
range from the DHCP server on this interface.**
This is useful when a modem assigns a local IP address upon start. To reject
multiple addresses, run this command multiple times with different values.
You can reject individual addresses (192.168.100.1) or entire subnets
(192.168.100.0/24).
Example:
.. code-block:: none
set interfaces {{ var0 }} {{ var1 }} {{ var2 }} {{ var4 }} {{ var5 }} {{ var7 }} dhcp-options reject 192.168.100.0/24
.. cfgcmd:: set interfaces {{ var0 }} <interface> {{ var2 }} {{ var3 }}
{{ var5 }} {{ var6 }} dhcp-options user-class <string>
**Configure the DHCP client to send a specific user-class identifier in its
DHCP requests on this interface.**
The DHCP server can interpret this identifier and provide specific
configuration options based on it (for example, default routes).
The user-class value typically groups DHCP clients with similar configuration
needs (for example, employees, guests, or printers).
Example:
.. code-block:: none
set interfaces {{ var0 }} {{ var1 }} {{ var2 }} {{ var4 }} {{ var5 }} {{ var7 }} dhcp-options user-class VyOS
|