summaryrefslogtreecommitdiff
path: root/docs/_include/interface-dhcp-options.txt
blob: c5683ca39a473940b84c0ed25c8e7fefaa77cc6e (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
.. cfgcmd:: set interfaces {{ var0 }} <interface> {{ var2 }} {{ var3 }}
  {{ var5 }} {{ var6 }} dhcp-options client-id <description>

  :rfc:`2131` states: The client MAY choose to explicitly provide the identifier
  through the 'client identifier' option. If the client supplies a 'client
  identifier', the client MUST use the same 'client identifier' in all
  subsequent messages, and the server MUST use that identifier to identify the
  client.

  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>

  Instead of sending the real system hostname to the DHCP server, overwrite the
  host-name with this given-value.

  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>

  This option is used by some DHCP clients to identify the vendor type and
  possibly the configuration of a DHCP client. The information is a string of
  bytes whose contents are specific to the vendor and are not specified in a
  standard.

  The vendor-class-id option can be used to request a specific class of vendor
  options from the server.

  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

  Only request an address from the DHCP server but do not request a default
  gateway.

  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>

  Set the distance for the default gateway sent by the DHCP server.

  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>

  Reject DHCP leases from a given address or range.
  This is useful when a modem gives a local IP when first starting.

  * **address** can be specified multiple times,
    e.g. 192.168.100.1 and/or 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>

  This option is used by some DHCP clients as a way for users to specify
  identifying information to the client. This can be used in a similar way to
  the vendor-class-identifier option, but the value of the option is specified
  by the user, not the vendor.

  Example:

  .. code-block:: none

    set interfaces {{ var0 }} {{ var1 }} {{ var2 }} {{ var4 }} {{ var5 }} {{ var7 }} dhcp-options user-class VyOS