板卡自带的buildroot 系统里面,网络由NetworkManager
管理。默认配置的IP是192.168.1.10
默认添加的网络配置如下:
# nmcli c show
NAME UUID TYPE DEVICE
eth0-connection 1bbd9bed-6870-4098-a4f3-06a5bb11ad3d ethernet eth0
[root@LS-GD ~]# cd /etc/NetworkManager/system-connections
[root@LS-GD system-connections]# ls
eth0-connection.nmconnection
[root@LS-GD system-connections]# cat eth0-connection.nmconnection
[connection]
id=eth0-connection
uuid=1bbd9bed-6870-4098-a4f3-06a5bb11ad3d
type=ethernet
interface-name=eth0
permissions=
[ethernet]
mac-address-blacklist=
[ipv4]
address1=192.168.1.10/24
dns-search=
method=manual
[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto
[proxy]
如果想修改IP, 可以运行nmtui
进行修改,也可以直接编辑/etc/NetworkManager/system-connections/eth0-connection.nmconnection
,也可运行systemclt stop NetworkManager
命令关闭NetworkManager
服务,然后通过ifconfig
或ip
命令进行修改。
更多回帖