DNS nameserver

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

DNS nameserver

2,869件の閲覧回数
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 返答(返信)

1,613件の閲覧回数
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 件の賞賛
返信

1,613件の閲覧回数
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 件の賞賛
返信