Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[DHCP] configurer DNS statique et IP dynamique (résolu)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
Enlight
Advocate
Advocate


Joined: 28 Oct 2004
Posts: 3519
Location: Alsace (France)

PostPosted: Mon Aug 17, 2015 10:56 am    Post subject: [DHCP] configurer DNS statique et IP dynamique (résolu) Reply with quote

Salut à tous,

comme indiqué dans le titre, je souhaiterais configurer mon interface de manière à ce que ma box m'attribue toujours mon IP de manière dynamique via DHCP, mais qu'en revanche, les serveurs DNS soient attribués de manière statique depuis un fichier de conf. Pour ceux qui se demandent pourquoi je veux faire ça, la raison me semble évidente, c'est pour avoir plus de succès avec les filles! :D

J'ai tenté une première piste mais sans succès en configurant /etc/conf.d/net de la manière suivante :


Code:
dns_domain_lo="homenetwork"

config_eth0="dhcp"
dns_servers_eth0="IP.serveur.no.1 IP.serveur.no.2"


mais a priori sans succès... :/

Quelqu'un peut m'aider sur ce coup là svp?


Last edited by Enlight on Sun Aug 23, 2015 6:34 pm; edited 1 time in total
Back to top
View user's profile Send private message
El_Goretto
Moderator
Moderator


Joined: 29 May 2004
Posts: 3101
Location: Paris

PostPosted: Mon Aug 17, 2015 8:28 pm    Post subject: Reply with quote

Impossible de remettre la main sur le fichier de conf d'exemple d'une gentoo où j'ai vu ce truc la première fois, mais voici à peu près la même chose dans la doc: https://wiki.gentoo.org/wiki/Handbook:AMD64/Networking/Modular
Quote:
We try and make DHCP relatively agnostic - as such we support the following commands using the dhcp_eth0 variable. The default is not to set any of them:

  • release - releases the IP address for re-use
  • nodns - don't overwrite /etc/resolv.conf
  • nontp - don't overwrite /etc/ntp.conf
  • nonis - don't overwrite /etc/yp.conf

_________________
-Gentoo hardened [EoL]: µ-serv Gen8 G1610T, 8Go ECC ; NF9D-2700, 4Go
-FreeBSD 11/Vimage/Jails: DS61, i3 2100T, 16Go ; FreeNAS: µ-serv N40L, 8Go ECC
-Réseau: ERL-3 + ESL-24 + GS108Tv2
-NAS: RN312
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7197

PostPosted: Thu Aug 20, 2015 11:14 am    Post subject: Reply with quote

El_Goretto voilà d'ou ça viens : https://forums.gentoo.org/viewtopic-p-7801358.html#7801358
Back to top
View user's profile Send private message
El_Goretto
Moderator
Moderator


Joined: 29 May 2004
Posts: 3101
Location: Paris

PostPosted: Fri Aug 21, 2015 8:53 pm    Post subject: Reply with quote

Raaaah, merci :)
_________________
-Gentoo hardened [EoL]: µ-serv Gen8 G1610T, 8Go ECC ; NF9D-2700, 4Go
-FreeBSD 11/Vimage/Jails: DS61, i3 2100T, 16Go ; FreeNAS: µ-serv N40L, 8Go ECC
-Réseau: ERL-3 + ESL-24 + GS108Tv2
-NAS: RN312
Back to top
View user's profile Send private message
Enlight
Advocate
Advocate


Joined: 28 Oct 2004
Posts: 3519
Location: Alsace (France)

PostPosted: Sun Aug 23, 2015 6:33 pm    Post subject: Reply with quote

Merci les gars, en configurant comme suit j'ai exactement ce que je voulais!

Code:
config_eth0="dhcp"
dhcp_eth0="release nodns nontp nonis"
dns_servers_eth0="$ip1 $ip2"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum