你好,
AM335x linux kernel 4.19.94 如何设置静态ip地址,sdk开发包为ti-processor-sdk-linux-am335x-evm-06.03.00.106
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
你好,问题已经解决,非常感谢
总结一下,首先需要关闭DHCP功能,修改下面这个文件
Stop the dhcp from /lib/systemd/network/80-container-host0.network, i.e.:
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Match]
Virtualization=container
Name=host0
[Network]
#DHCP=yes /*THE DEFAULT FILE has this set to YES, so comment this line*/
LinkLocalAddressing=yes
#[DHCP] /*THE DEFAULT FILE has this setting, so COMMENT this line*/ #UseTimezone=yes /*THE DEFAULT FILE has this set to YES, so comment this line*/
-----------------------------------------------EOF---------------------------------------------------------------
然后在“/lib/systemd/network/”目录下添加配置文件,文件名为01-eth-static.network,内容如下:
[Match]
Name=eth0
[Network]
Address=192.168.10.20/24
Broadcast=192.168.10.255
Netmask=255.255.255.0
Gateway=192.168.10.1
-------------------------------------EOF--------------------------------------------
如有其他错误请指出,谢谢!