---
title: DHCP/TFTP Service Configuration Guide
slug: aidc/dhcptftp-service-configuration-guide
description: Configuration of DHCP and TFTP services for AsterNOS installation
createdAt: 2026-01-15T06:35:19.166Z
---

AsterNOS automatic installation and ONIE automatic update require setting up DHCP to automatically assign IP to the switch and setting up TFTP or HTTP service to host the image server. The following sections describe building DHCP and TFTP services on Windows and Ubuntu platforms.

## <font color="#1d50a2">DHCP, TFTP Configuration on Windows</font>

Connect the Windows host to the environment intranet. Please download the Tftpd64 software beforehand.

- Disable network firewall.

::Image[]{src="https://api.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/vPBptUJsrkb1pgtiQ7S93-20260116-055433.png" size="100" width="891" height="725" position="center" showCaption="false" indent="1"}

- Set the IP address of the network adapter to which the switch's network port is connected and disable other networks.
- Create a new folder for AsterNOS system files and copy the AsterNOS system files into the path
- Set up Tftpd64, configure DHCP, TFTP services

* [ ] Open Tftpd64 and select server interfaces.

::Image[]{src="https://api.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/OCEArf_5i7QzLC8TlVVYK-20260116-055515.png" size="100" width="488" height="417" position="center" showCaption="false" indent="1"}

- [ ] configure DHCP services
  DHCP server -> Setting, set the initial IP pool value, IP pool size, default route, subnet mask and click OK to save.

::Image[]{src="https://api.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/KfsUov1WXl4Wjh97YCkPQ-20260116-055852.png" size="100" width="482" height="690" position="center" showCaption="false" indent="2"}

- [ ] Configuring the TFTP service
  TFTP server -> Setting
  Select the path where AsterNOS is located in the Base Directory field and click OK to save

::Image[]{src="https://api.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/_MqdhFCYQnEsC0KSzyho7-20260116-055935.png" size="70" width="482" height="690" position="center" showCaption="false" indent="1"}

- [ ] Check the configuration
  Click **Show Dir** to see if the TFTP configuration root directory is correct and if AsterNOS exists.
- [ ] After the configuration is complete, log in to the switch via the serial port, enter the ONIE GRUB Menu and select Install OS to automatically configure the installation.

::Image[]{src="https://api.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/Ui9RKMfdxz9fgvN5MKD7z-20260116-060143.png" size="100" width="2160" height="1440" position="center" showCaption="false" indent="1"}

::Image[]{src="https://api.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/045RipayiEjzmWCbKMRGE-20260116-060211.png" size="100" width="488" height="417" position="center" showCaption="false" indent="1"}

## <font color="#1d50a2">DHCP, TFTP Configuration on Ubuntu</font>

### <font color="#1d50a2">DHCP Configuration Guide</font>

- Install DHCP service.
  Install isc-dhcp-server.

:::CodeblockTabs{indent="1"}
```null
sudo apt install isc-dhcp-server
```
:::

::Image[]{src="https://api.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/1gCUHkJucaMXFkr_5_edR-20260116-060452.png" size="100" width="2160" height="1440" position="center" showCaption="false" indent="1"}

- View server NIC information.

:::CodeblockTabs{indent="1"}
```null
ifconfig
```
:::

::Image[]{src="https://api.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/2jh0_3uA3r7FJUQQXbA-9-20260116-060537.png" size="100" width="1015" height="266" position="center" showCaption="false" indent="1"}

:::Paragraph{indent="1"}
In the picture above, the NIC name of the server is **br1**.
:::

- Modify information about the NIC in DHCP configuration file.

:::CodeblockTabs{indent="1"}
```null
sudo vim /etc/default/isc-dhcp-server
```
:::

:::Paragraph{indent="1"}
Complement `INTERFACES="br1"`
:::

::Image[]{src="https://api.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/Ci9gBWHWqATGvCTGDtEGb-20260116-060614.png" size="100" width="1270" height="846" position="center" showCaption="false" indent="1"}

- Configure the `/etc/dhcp/dhcpd.conf` file

:::CodeblockTabs{indent="1"}
```null
sudo vim /etc/dhcp/dhcpd.conf
```
:::

- [ ] Comment out `"option domain-name-servers ns1.example.org, ns2.example.org"`.

::Image[]{src="https://api.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/usGTQE8DP3U1wGQw5lXPi-20260116-061056.png" size="100" width="996" height="309" position="center" showCaption="false" indent="1"}

- [ ] Add the following information (see appendix for details).

::Image[]{src="https://api.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/Xs1bEvAs9GvJ6AQgPSwLZ-20260116-061242.png" size="100" width="454" height="231" position="center" showCaption="false" indent="1"}

:::hint{type="info" indent="1"}
**NOTE:**

Please pay particular attention to **next-server** about the above parameters, which point to the TFTP server address. Please configure the subnet mask, route, DNS server, and TFTP-server addresses as described in the environment Intranet.
:::

- Restart DHCP service.

:::CodeblockTabs{indent="1"}
```null
sudo service isc-dhcp-server restart
```
:::

- Check if DHCP is working properly.

:::CodeblockTabs{indent="1"}
```null
sudo netstat -uap
```
:::

::Image[]{src="https://api.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/xlfydKt7e1qQy1lt5Epep-20260116-061512.png" size="100" width="1438" height="564" position="center" showCaption="false" indent="1"}

:::Paragraph{indent="1"}
If **dhcpd** service appears in the program name column, the dhcp service is running normally. When finished, proceed to the TFTP service configuration step.
:::

### <font color="#1d50a2">TFTP Configuration Guide</font>

- Download the TFTP server.

:::CodeblockTabs{indent="1"}
```null
sudo apt-get install tftpd-hpa
```
:::

::Image[]{src="https://api.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/ChTOFgGs338-Z6eOQWeiz-20260116-061841.png" size="100" width="1932" height="271" position="center" showCaption="false" indent="1"}

- Create a new folder sonic-install in the root directory (/) and assign permissions.

:::CodeblockTabs{indent="1"}
```null
mkdir sonic-install
chmod 777 sonic-install
```
:::

- Copy the image file to the path /sonic-install.
- Modify the tftp server configuration file.

```null
sudo vim /etc/default/tftpd-hpa
```

:::Paragraph{indent="1"}
Modify the content as follows.
:::

![](https://api.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/82jNMUl9vLoIPi6zmm9bf-20260116-061923.png)

- Restart the service.

```null
sudo service tftpd-hpa restart
```

- Check the status of the service.

```null
sudo service tftpd-hpa status
```

![](https://api.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/iABcO-5en0TwmrXA9o9SZ-20260116-062120.png)

:::Paragraph{indent="1"}
If the running status is **active (running)**, that means TFTP is running successfully.
:::

