百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

smee

> 编程语言
开源

DHCP 和 iPXE 服务器

343 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

DHCP 和 iPXE 服务器

[!IMPORTANT]
The Smee repo has been deprecated. All functionality has been moved to https://github.com/tinkerbell/tinkerbell. For more details, see the roadmap issue #41. This repository is scheduled for archive by the end of 2025.

Smee

Smee is the network boot service in the Tinkerbell stack, formerly known as Boots. It is comprised of the following services.

  • DHCP server
    • host reservations only
    • mac address based lookups
    • netboot options support
    • backend support
      • Kubernetes
      • file based
    • ProxyDHCP support
  • TFTP server
    • serving iPXE binaries
  • HTTP server
    • serving iPXE binaries and iPXE scripts
    • iPXE script serving uses IP authentication
    • backend support
      • Kubernetes
      • file based
  • Syslog server
    • receives syslog messages and logs them

Definitions

DHCP Reservation: A fixed IP address that is reserved for a specific client.

DHCP Lease: An IP address, that can potentially change, that is assigned to a client by the DHCP server. The IP is typically pulled from a pool or subnet of available IP addresses.

ProxyDHCP: "[A] Proxy DHCP server behaves much like a DHCP server by listening for ordinary DHCP client traffic and responding to certain client requests. However, unlike the DHCP server, the PXE Proxy DHCP server does not administer network addresses, and it only responds to clients that identify themselves as PXE clients. The responses given by the PXE Proxy DHCP server contain the mechanism by which the client locates the boot servers or the network addresses and descriptions of the supported, compatible boot servers." -- IBM

Running Smee

DHCP Modes

Smee's DHCP functionality can operate in one of the following modes:

  1. DHCP Reservation
    To enable this mode set -dhcp-mode=reservation. Smee will respond to DHCP requests from clients and provide them with IP and next boot info when netbooting. This is the default mode. IP info is all reservation based. There must be a corresponding Hardware record for the requesting client's MAC address.

  2. Proxy DHCP
    To enable this mode set -dhcp-mode=proxy. Smee will respond to PXE enabled DHCP requests from clients and provide them with next boot info when netbooting. In this mode an existing DHCP server that does not serve network boot information is required. Smee will respond to PXE enabled DHCP requests and provide the client with the next boot info. There must be a corresponding Hardware record for the requesting client's MAC address. The auto.ipxe script will be served with the MAC address in the URL and the MAC address will be used to lookup the corresponding Hardware record. Layer 2 access to machines or a DHCP relay agent that will forward the DHCP requests to Smee is required.

  3. Auto Proxy DHCP
    To enable this mode set -dhcp-mode=auto-proxy. Smee will respond to PXE enabled DHCP requests from clients and provide them with next boot info when netbooting. In this mode an existing DHCP server that does not serve network boot information is required. In this mode, if no corresponding Hardware record is found for the requesting client's MAC address, Smee will provide the client with a statically defined iPXE script. If a Hardware record is found, then the normal auto.ipxe script will be served. Use -backend-noop-enabled to disable all backend look ups. Layer 2 access to machines or a DHCP relay agent that will forward the DHCP requests to Smee is required.

    • When using Smee's auto.ipxe, you'll generally want to set the following flags:
      • -dhcp-mode=auto-proxy
      • -osie-url
      • -tink-server
      • -extra-kernel-args="tink_worker_image=quay.io/tinkerbell/tink-worker:"
    • When not using Smee's auto.ipxe, you'll generally want to set the following flags:
      • -dhcp-mode=auto-proxy
      • -dhcp-http-ipxe-script-url=https://boot.netboot.xyz
      • -dhcp-http-ipxe-script-prepend-mac=false
  4. DHCP disabled
    To enable this mode set -dhcp-enabled=false. Smee will not respond to DHCP requests from clients. This is useful when the network has an existing DHCP server that will provide both IP and next boot info and Smee's TFTP and HTTP functionality will be used. The IP address in the Hardware record must be the same as the IP address of the client requesting the auto.ipxe script. See this doc for more details. In most situations--dhcp-http-ipxe-script-prepend-mac=false should also be set when in this mode.

Interoperability with other DHCP servers

When a DHCP server exists on the network, Smee should be set to run proxy or auto-proxy mode. This will allow Smee to provide the next boot information to clients that request it. The existing DHCP server will provide the IP address and other network boot details. Layer 2 access to machines or a DHCP relay agent that will forward the DHCP requests to Smee is required.

It is not recommended, but it is possible for Smee to be run in reservation mode in networks with another DHCP server(s). To get the intended behavior from Smee one of the following must be true.

  1. All DHCP servers besides Smee are configured to ignore the MAC addresses that Smee is configured to serve.

  2. All DHCP servers are configured to serve the same IP address and network boot details as Smee. In this scenario the DHCP functionality of Smee is redundant. It would be recommended to run Smee with the DHCP server functionality disabled (-dhcp=false). See the doc on using your existing DHCP service for more details.

Environment Variables and CLI Flags

It's important to note that CLI flags take precedence over environment variables. All CLI flags can be set as environment variables. Environment variable names are the same as the flag names with some modifications. For example, the flag -dhcp-addr has the environment variable of SMEE_DHCP_ADDR. The modifications of CLI flags to environment variables are as follows:

  • prefixed with SMEE_
  • all uppercase
  • hyphens (-) are replaced with underscores (_)

There is one environment variable that does not have a corresponding CLI flag. The environment variable is SMEE_PUBLIC_IP_INTERFACE. This environment variable takes a local network interface name and uses it to auto detect the IP address to use as the default in all other CLI flags that require an IP address. This is useful when the machine running Smee has multiple network interfaces and you want the default detected IP to be from this specified interface.

Local Setup

Running the Tests

bash
# run the tests
make test

Build/Run Smee

…

Developing using the file backend

The quickest way to get started is docker-compose up. This will start Smee using the file backend. This uses the example Yaml file (hardware.yaml) in the test/ directory. It also starts a client container that runs some tests.

bash
docker compose up --build   # build images and start the network & services
# it's fine to hit control-C twice for fast shutdown
docker compose down  # stop the network & containers

Alternatively Smee can be run by itself. It requires a few flags or environment variables for configuration.

test/hardware.yaml should be safe enough for most developers to use on the command line locally without getting a call from your network administrator. That said, you might want to contact them before running a DHCP server on their network. Best to isolate it in Docker or a VM if you're not sure.

…

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Godhcpipxenetbootpxe

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言