Add FAQ entry for resolving unstable IP addresses due to randomly generated MAC addresses

This commit is contained in:
taorye
2025-07-11 10:52:09 +08:00
parent 218444b6aa
commit 8660875c1e
3 changed files with 24 additions and 2 deletions

View File

@@ -62,4 +62,15 @@ echo "I2C3_SCL GPIO2_A27" > pinmux-select
gpioset gpiochip2 27=0
gpioset gpiochip2 27=1
```
```
## Q: The MAC physical address is randomly generated upon each reboot, causing unstable IP addresses. How can this be resolved?
A: Starting from sdcard-20250627.img.xz, the `config.txt` file in the root directory of the first partition (FAT32) contains the U-Boot environment variable configuration. To permanently modify the MAC addresses of the corresponding network interfaces, add the environment variables `ethaddr` and `eth1addr` like this below:
```
ethaddr=d0:00:00:00:00:03
eth1addr=d0:00:00:00:00:04
```
![](../../../zh/maixIV/assets/m4n/set-macaddress.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -62,4 +62,15 @@ echo "I2C3_SCL GPIO2_A27" > pinmux-select
gpioset gpiochip2 27=0
gpioset gpiochip2 27=1
```
```
## QMAC 物理地址每次重启随机生成,导致 ip 地址不稳定,请问如何解决?
Asdcard-20250627.img.xz 开始第一分区FAT32根目录下会有 `config.txt` 文件,内为 uboot 的环境变量配置。添加环境变量 `ethaddr``eth1addr` 即可持久化修改对应网卡的mac地址
```
ethaddr=d0:00:00:00:00:01
eth1addr=d0:00:00:00:00:02
```
![](../assets/m4n/set-macaddress.png)