
Interfaces and Subnets
37
Since the DHCP behaviour needs to be defined for each interface (specifically, each broadcast domain), the
behaviour is controlled by one or more
dhcp
objects, which are children of an
interface
object.
Address allocations are made from a pool of addresses - the pool is either explicitly defined using the
ip
attribute, or if
ip
is not specified, it consists of all addresses on the interface, i.e. from all subnets but excluding
network or broadcast addresses, or any addresses that the FB6000 has seen ARP responses for (eg addresses
already in use, perhaps through a device configured with a fixed static address).
The XML below shows an example of an explicitly-specified DHCP pool :
<interface ...>
...
<dhcp name="LAN"
ip="172.30.16.50-80"
log="default"/>
...
</interface>
Tip
When specifying an explicit range of IP addresses, if you start at the network then the FB6000 will
allocate that address. Not all devices cope with this so it is recommended that an explicit range is used,
e.g.
192.168.1.100-199
. You do not, however, have to be careful of either the FireBrick's own
addresses or subnet broadcast addresses as they are automatically excluded. When using the default
(0.0.0.0/0) range network addresses are also omitted, as are any other addresses not within a subnet
on the same interface.
Every allocation made by the DHCP server built-in to the FB6000 is stored in non-volatile memory, and will
survive power-cycling and/or rebooting. The allocations can be seen using the "DHCP" item in the "Status"
menu, or using the
show dhcp
CLI command.
If a client does not request renewal of the lease before it expires, the allocation entry will show "expired".
Expired entries remain stored, and are used to lease the same IP address again if the same client (as identified
by its MAC address) requests an IP address. However, if a new MAC address requests an allocation, and there
are no available IPs (excluding expired allocations) in the allocation pool, then the oldest expired allocation
IP address is reused for the new client.
6.2.2.1. Fixed/Static DHCP allocations
'Fixed' (or 'static') allocations can be achieved by creating a separate
dhcp
object for each such allocation, and
specifying the client MAC address via the
mac
attribute, or the client name using the
client-name
attribute.
The XML below shows an example of a fixed allocation. Note the MAC address is written without any colons,
and is therefore a string of twelve hexadecimal digits (48 bits). This allocation also supplies DNS resolver
information to the client.
<interface ...>
...
<dhcp name="laptop"
ip="81.187.96.81"
mac="0090F59E4F12"
dns="81.187.42.42 81.187.96.96"
log="default"/>
...
</interface>
Содержание FB6402
Страница 1: ...FireBrick FB6402 User Manual FB6000 Versatile Network Appliance...
Страница 2: ......