Imx6 Set Network interface

如何設置IMX6 Yocto2.X 網絡接口?

Yocto2.2 的網絡由connMan 管理,/etc/network/interface的相關設置會被connman override,設置網絡通過命令 connmanctl 進行。

設置靜態IP

# 查看Service
$  connmanctl services
*AO Wired                { ethernet_00142d269dfd_cable }

# 設置靜態IP 地址
$ connmanctl  config ethernet_00142d269dfd_cable --ipv4 manual 192.168.10.2 255.255.255.0 192.168.10.1

# 設置dhcp
$ connmanctl  config ethernet_00142d269dfd_cable --ipv4 dhcp

# 設置dnsserver
$ connmanctl config ethernet_00142d269dfd_cable --nameservers 8.8.8.8

## 更多詳情,請參考:
$   connmanctl  --help

之後相應設置就永久保存了。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章