Site Tools


basic-static

DHCP Reservation

The DHCP Reservation menu has settings to configure DHCP Reservations, Static ARP bindings and IP Traffic monitoring for clients with the above mappings.

Basic Concepts

Since release 2020.8, what was called “Static DHCP” is now more accurately named “DHCP Reservation”. Please see “Inconsistent Terminology” in this section for clarification and differentiation of terminology.

DHCP Reservation is a simple way to ensure that FreshTomato offers certain client devices the same IP address each time they request a lease. Simply enter the MAC address for a client device (found in Device List), into the MAC Address field, enter the IP Address (and optionally, Hostname) you want to assign into the appropriate fields and click “Save”.

The Bound to button is optional. Check the Bound to button only if you want to enable Static ARP binding. FreshTomato will then offer that address (and hostname) to the MAC address you specified every time it offers a lease. In general, the client device will always get that IP address whenever it requests one. That last part, “whenever it requests one” is the key part here. See the explanation of the term Hostname later on this page.

Configuring DHCP Reservations

When assigning Reservations, you should use an IP address in FreshTomato's main subnet, but outside the normal IP Range in the Network menu. This helps to avoid address conflicts.

For example, if the DHCP server is set to assign addresses: 10.0.1.1 - 10.0.1.100, then choosing DHCP Reservation assignments of 10.0.1.101 - 10.0.1.254 might work well.

If you want to assign multiple hostnames to one IP address (for example, you want server 10.0.1.3 to be known as both “galaxy” and “mail”), put them in the Hostname field, separated by a space. A space isn't a valid DHCP Hostname character, so you must use a hyphen for a single, multi-word Hostname like “My-PC”.

If a client has multiple network interfaces (say, Ethernet and WiFi) with different MAC addresses, it might not assign the hostname properly to both. This could cause a “Duplicate name” error.1)


FreshTomato will try to:

  1. Find a match for the device's Hostname (first priority).
  2. Find a match for the device's MAC address (second priority).
  3. If the first two options fail, the dnsmasq server may fall back
    to either Dynamic or Automatic allocation. For details about
    the term Hostname, see later on this page.





Security Limitations

Again, DHCP Reservation offers the mapped IP address (and Hostname) to the MAC address you specified every time it offers a lease. DHCP Reservation does not prevent a different client from being configured with the same IP address. This is because DHCP Reservation only offers a static mapping to client devices which request a lease. If another device were self-configured with a static IP, or if the router/DHCP were disabled, the other device could take that address. Similarly, if the first client with a DHCP Reservation were then self-configured with a static address, it could claim a different IP address than the DHCP Reservation.

Even if everything else were working properly, only DHCP lease offers are made static. The router's IP→MAC neighbour cache (ARP cache) is still filled dynamically using ARP broadcasts. Thus, unless we add something else, FreshTomato will rely on client devices to be honest about their MAC addresses. The data source for ARP mappings is assumed to be “honest” and accurate, even though that source is often the clients themselves. Under such conditions, there's little to stop unauthorized or malicious clients from pretending to be a different MAC address (ARP spoofing). ARP spoofing could even include spoofing the MAC address of the router or gateway. This could have serious consequences. This is where Static ARP becomes useful.

Inconsistent Terminology

Sometimes, confusion occurs because of imprecise or inconsistent terminology. First, DHCP Reservation is sometimes confused with Static IP. They are not the same. DHCP Reservation involves configuring an assigned IP address for the client device within FreshTomato's DHCP server. This causes the client to receive a specific address when it requests a lease. Static IP is the configuration of an IP address manually from within the client device itself.

Also, the term “Static DHCP” is given different names by different vendors/projects.

Some terminology variations include:


  • “static DHCP assignment” in DD-WRT.
  • fixed-address” in the Linux dhcp daemon (dhcpd) documentation.
  • “Address Reservation” by Netgear.
  • “DHCP Reservation” or “Static DHCP” by Cisco/Linksys.
  • “IP address reservation” or “MAC/IP address binding”
    by other vendors.


To reduce confusion, it is wise to to be precise with terminology relating to this subject.


FreshTomato can assign one IP/Hostname to 2 MAC addresses if the following steps here are taken:

https://www.linksysinfo.org/index.php?threads/official-freshtomato-org-website.75333/post-322397

Static ARP

ARP is used so clients can figure out how to address network packets to another client. Clients use the ARP protocol when they have another client's IP address, but not its MAC address. If a client needs to communicate with another client, it broadcasts an ARP request across the network asking for the other client's MAC address. The “other client” should reply honestly. With DHCP Reservation, only DHCP lease offers were made static. The router's IP - MAC neighbour cache (ARP cache) is still filled dynamically using ARP. Unless we add something else, FreshTomato is relying on client devices to be honest when reporting their own MAC addresses. This has several repercussions.

Reduces Broadcast Traffic

Since ARP requests are broadcast on the network, they add network traffic. Using FreshTomato as a central source of ARP resolution can help to limit ARP broadcasts, reducing network traffic.

Reduces ARP spoofing

By default, ARP gets its mapping information from other clients, in a peer-to-peer fashion. ARP mappings are assumed to be “honest” and accurate, even though the data source is often the clients themselves. Given this, there's little to stop unauthorized or malicious clients from pretending to be a different MAC address (ARP spoofing). This reduces the reliability/security of DHCP Reservation mappings. What good is a mapping if a client can spoof another's MAC address? Even the router or gateway's MAC address could be spoofed. That could have dangerous consequences.

Here again, Static ARP binding can help. When enabled, Static ARP binding will ignore ARP spoofing attempts. FreshTomato will ignore all (broadcast) ARP replies of devices listed in the table. Instead, FreshTomato will check the Static DHCP tables to find the MAC address that belongs to a certain IP address. We assume this information is more accurate, since the Static DHCP table is maintained by the network administrator.


MAC Address: here, enter the MAC Address you wish to bind.


Bound To: enables Static ARP binding for the IP - MAC mapping.

This adds a Static ARP entry for it in FreshTomato's ARP table, using data found in the DHCP Reservation table.

(Default: Disabled).


IP Address: the (optional) address to bind to the MAC address entered.

Leaving this empty will link only a Hostname to a MAC address, allowing normal DHCP operations. This “lack of IP” can be helpful for devices that don't automatically have a Hostname assigned, but for which you still prefer a dynamic IP allocation.


IP Traffic: enables IP Traffic Monitoring for the mapped MAC Address/IP/Hostname combination.

(Default: Disabled).


Hostname: an optional DHCP Client Identifier to be mapped to the client device.

This is an arbitrary human-readable nickname to make it easier to identify the device on the network.

Traditionally, devices were identified within DHCP by a hardware type code and a client hardware (MAC) address. Later, the optional Hostname field allowed more freedom when mapping device names in DHCP. Ironically, many people still used the hardware type followed by the client hardware address as a Hostname.


For example: “01 00 01 02 a0 bc d3”). However, you can use whatever (valid) naming scheme you wish.

Often, the client DNS/Netbios name is used as the Hostname. Every client must have a unique Hostname on the broadcast domain to avoid conflicts.


The Hostname description was derived from:

IETF (IETF.ORG) RFC2131 Standards Track, DHCP Protocol, page 8 RFC2131

Options

Ignore DHCP Requests from unknown devices:

Enabling this ensures FreshTomato won't offer a DHCP lease to any requests from unlisted MAC addresses/Hostnames. A MAC address is considered unknown when there's no DHCP Reservation for it. Again, this won't apply to a client configured with a (true) Static IP. By default, it will still be allowed on the network, unless further measures are taken.

The Ignore DHCP Requests from unknown devices function only works for devices in subnets with netmask 255.255.255.0 (previously called “Class C” subnets).


dhcp_reservation-options-2022.6.jpg


ARP only works with IPv4. IPv6 uses a different protocol for IP-to-MAC Address resolution protocol.

IPT

IPT stands for IP Traffic Monitoring. Enabling IPT puts inactive/disconnected client devices on the IP Traffic Monitoring list. If Auto-Discovery is enabled in the IP Traffic Monitoring menu, every client not marked as 'Disconnected' in Device List will be on the monitoring list.



basic-static.txt · Last modified: 2024/11/27 00:14 by hogwild