DNS nameserver

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

DNS nameserver

3,562 次查看
niklasmolin
Senior Contributor I

Hi.

I wonder how I set the DNS nameserver when using static IP.

I tried to include dns-nameservers in the interface file, but resolv.conf won't be updated.

If I use DHCP, then the resolv.conf will be updated.

Thanks,

Niklas

标签 (2)
0 项奖励
回复
2 回复数

2,306 次查看
Yuri
NXP Employee
NXP Employee

Have You tried the following ?

# echo nameserver 8.8.8.8 >> /etc/resolv.conf

or

# echo nameserver 8.8.8.8 > /etc/resolv.conf


It works under i.MX6 Ubuntu demo image. 

Best regards

Yuri

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复

2,306 次查看
niklasmolin
Senior Contributor I

Hi Yuri.

I'm trying to avoid to add external script to update the resolv.conf, since it should be done from the information in the interface file.

Best regards,

Niklas

0 项奖励
回复